From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8FA9D13838B for ; Mon, 6 Oct 2014 05:56:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0CAE8E0B05; Mon, 6 Oct 2014 05:56:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C70C0E0AE4 for ; Mon, 6 Oct 2014 05:56:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C706A3402CC for ; Mon, 6 Oct 2014 05:56:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F3BF871B4 for ; Mon, 6 Oct 2014 05:56:38 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1411818042.fbdfad7d139533e2e0d3b6993685b75772823f07.jlec@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/openblas/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/openblas/ChangeLog sci-libs/openblas/openblas-9999.ebuild X-VCS-Directories: sci-libs/openblas/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: fbdfad7d139533e2e0d3b6993685b75772823f07 X-VCS-Branch: master Date: Mon, 6 Oct 2014 05:56:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6b51b3cb-da9a-4343-abc1-36802eeae733 X-Archives-Hash: 77db5ed3e316ef82e4ea20085a56ea56 commit: fbdfad7d139533e2e0d3b6993685b75772823f07 Author: gienah gentoo org> AuthorDate: Sat Sep 13 01:02:57 2014 +0000 Commit: Justin Lecher gentoo org> CommitDate: Sat Sep 27 11:40:42 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=fbdfad7d Remove the setting of the FC and F77 environment variables, instead sed the COMMON_OPT in Makefile.rule to include the $(get_abi_CFLAGS). Add get_openblas_abi_cflags and get_openblas_abi_fflags, call them to create the pkg-config ${profname}.pc files. Call get_openblas_abi_cflags to obtain the defines, then remove the OPENBLAS_ at the start, and sed these into COMMON_OPT in Makefile.rule, as USE64BITINT was removed by the patch openblas-0.2.11-openblas_config_header_same_between_ABIs.patch that is required to ensure the openblas_config.h header file is the same between ABIs. --- sci-libs/openblas/ChangeLog | 11 ++++++++ sci-libs/openblas/openblas-9999.ebuild | 50 ++++++++++++++++++++-------------- 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog index 9f9c82e..bb794f4 100644 --- a/sci-libs/openblas/ChangeLog +++ b/sci-libs/openblas/ChangeLog @@ -2,6 +2,17 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 13 Sep 2014; Mark Wright openblas-9999.ebuild: + Remove the setting of the FC and F77 environment variables, instead sed the + COMMON_OPT in Makefile.rule to include the $(get_abi_CFLAGS). Add + get_openblas_abi_cflags and get_openblas_abi_fflags, call them to create the + pkg-config ${profname}.pc files. Call get_openblas_abi_cflags to obtain the + defines, then remove the OPENBLAS_ at the start, and sed these into + COMMON_OPT in Makefile.rule, as USE64BITINT was removed by the patch + openblas-0.2.11-openblas_config_header_same_between_ABIs.patch that is + required to ensure the openblas_config.h header file is the same between + ABIs. + 06 Sep 2014; Mark Wright +openblas-0.2.11.ebuild, openblas-9999.ebuild, +files/openblas-0.2.11-openblas_config_header_same_between_ABIs.patch, diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild index b3854fe..61ddcf0 100644 --- a/sci-libs/openblas/openblas-9999.ebuild +++ b/sci-libs/openblas/openblas-9999.ebuild @@ -55,6 +55,27 @@ get_openblas_flags() { echo "${openblas_flags}" } +get_openblas_abi_cflags() { + local openblas_abi_cflags="" + if [[ "${ABI}" == "x86" ]]; then + openblas_abi_cflags="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1" + else + openblas_abi_cflags="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1" + fi + if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then + openblas_abi_cflags+=" -DOPENBLAS_USE64BITINT" + fi + echo "${openblas_abi_cflags}" +} + +get_openblas_abi_fflags() { + local openblas_abi_fflags="" + if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then + openblas_abi_fflags+="-fdefault-integer-8" + fi + echo "${openblas_abi_fflags}" +} + get_profname() { local profname="${BASE_PROFNAME}" use dynamic && \ @@ -118,8 +139,6 @@ _int64_multilib_multibuild_wrapper() { local ABI="${MULTIBUILD_VARIANT/_${INT64_SUFFIX}/}" multilib_toolchain_setup "${ABI}" - export FC="$(tc-getFC) $(get_abi_CFLAGS)" - export F77="$(tc-getF77) $(get_abi_CFLAGS)" "${@}" } @@ -167,10 +186,12 @@ src_prepare() { src_configure() { local MULTIBUILD_VARIANTS=( $(int64_multilib_get_enabled_abis) ) my_configure() { + local openblas_abi_cflags="$(get_openblas_abi_cflags)" + local internal_openblas_abi_cflags="${openblas_abi_cflags//OPENBLAS_}" sed \ -e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC) $(get_abi_CFLAGS):" \ -e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC) $(get_abi_CFLAGS):" \ - -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS}:" \ + -e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS} ${internal_openblas_abi_cflags}:" \ -i Makefile.rule || die } multibuild_foreach_variant run_in_build_dir _int64_multilib_multibuild_wrapper my_configure @@ -207,23 +228,12 @@ src_compile() { Libs: -L\${libdir} -l${libname} Libs.private: -lm EOF - local openblas_abi_defs="" - if [[ "${ABI}" == "x86" ]]; then - openblas_abi_defs="-DOPENBLAS_ARCH_X86=1 -DOPENBLAS___32BIT__=1" - else - openblas_abi_defs="-DOPENBLAS_ARCH_X86_64=1 -DOPENBLAS___64BIT__=1" - fi - if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then - cat <<-EOF >> ${profname}.pc - Cflags: -DOPENBLAS_USE64BITINT ${openblas_abi_defs} -I\${includedir}/${PN} - Fflags=-fdefault-integer-8 - EOF - else - cat <<-EOF >> ${profname}.pc - Cflags: -I\${includedir}/${PN} ${openblas_abi_defs} - Fflags= - EOF - fi + local openblas_abi_cflags=$(get_openblas_abi_cflags) + local openblas_abi_fflags=$(get_openblas_abi_fflags) + cat <<-EOF >> ${profname}.pc + Cflags: -I\${includedir}/${PN} ${openblas_abi_cflags} + Fflags=${openblas_abi_fflags} + EOF mv libs/libopenblas* . || die } multibuild_foreach_variant run_in_build_dir _int64_multilib_multibuild_wrapper my_src_compile