public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:lapack-multibuild commit in: sci-libs/openblas/
@ 2014-02-19 10:17 Mark Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Wright @ 2014-02-19 10:17 UTC (permalink / raw
  To: gentoo-commits

commit:     815556ba39d176f640a22d261999a6aaa7df955c
Author:     gienah <gienah <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 19 10:16:43 2014 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Wed Feb 19 10:16:43 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=815556ba

Thanks to sfabbro: dodoc should be outside the function, they do not change

---
 sci-libs/openblas/ChangeLog            | 3 +++
 sci-libs/openblas/openblas-9999.ebuild | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog
index b4f5886..68e0955 100644
--- a/sci-libs/openblas/ChangeLog
+++ b/sci-libs/openblas/ChangeLog
@@ -2,6 +2,9 @@
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  19 Feb 2014; Mark Wright <gienah@gentoo.org> openblas-9999.ebuild:
+  Thanks to sfabbro: dodoc should be outside the function, they do not change
+
   18 Feb 2014; Mark Wright <gienah@gentoo.org> openblas-9999.ebuild:
   multibuild openblas when USE=int64 is specified.
 

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
index 3bd158a..3e3cd52 100644
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -158,9 +158,6 @@ src_install() {
 			doins ${pcfile}
 		done
 
-		dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
-		dodoc *md Changelog.txt
-
 		if [[ ${CHOST} == *-darwin* ]] ; then
 			cd "${ED}"/usr/$(get_libdir)
 			local d
@@ -172,4 +169,7 @@ src_install() {
 		fi
 	}
 	multibuild_foreach_variant run_in_build_dir my_src_install
+
+	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
+	dodoc *md Changelog.txt
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/sci:lapack-multibuild commit in: sci-libs/openblas/
@ 2014-02-25 13:46 Mark Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Wright @ 2014-02-25 13:46 UTC (permalink / raw
  To: gentoo-commits

commit:     03248de1de93bb243ae1336496270a9447843461
Author:     gienah <gienah <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 25 13:44:08 2014 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Tue Feb 25 13:44:08 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=03248de1

openblas: Strip the _int64 suffix from the BUILD_VARIANT to calculate the ABI

---
 sci-libs/openblas/openblas-9999.ebuild | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
index 1c2b6c6..f012efd 100644
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -74,11 +74,15 @@ int64_multilib_get_enabled_abis() {
 	# will be overwritten by the normal variant in the install, which removes the
 	# #define OPENBLAS_USE64BITINT for us.  We then specify it in Cflags in the
 	# /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
+	local MULTILIB_VARIANTS=( $(multilib_get_enabled_abis) )
 	local MULTIBUILD_VARIANTS=( )
-	use int64 && \
-		MULTIBUILD_VARIANTS+=( ${BASE_PROFNAME}_${INT64_SUFFIX} )
-	MULTIBUILD_VARIANTS+=( $(multilib_get_enabled_abis) )
-	echo "${MULTIBUILD_VARIANTS[*]}"
+	for i in "${MULTILIB_VARIANTS[@]}"; do
+		if use int64 && [[ "${i}" =~ 64$ ]]; then
+			MULTIBUILD_VARIANTS+=( "${i}_${INT64_SUFFIX}" )
+		fi
+		MULTIBUILD_VARIANTS+=( "${i}" )
+	done
+	echo "${MULTIBUILD_VARIANTS[@]}"
 }
 
 # @FUNCTION: _int64_multilib_multibuild_wrapper
@@ -89,12 +93,10 @@ int64_multilib_get_enabled_abis() {
 _int64_multilib_multibuild_wrapper() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	if [[ ! "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
-		local ABI=${MULTIBUILD_VARIANT}
-		multilib_toolchain_setup "${ABI}"
-		export FC="$(tc-getFC) $(get_abi_CFLAGS)"
-		export F77="$(tc-getF77) $(get_abi_CFLAGS)"
-	fi
+	local ABI="${MULTIBUILD_VARIANT/_${INT64_SUFFIX}/}"
+	multilib_toolchain_setup "${ABI}"
+	export FC="$(tc-getFC) $(get_abi_CFLAGS)"
+	export F77="$(tc-getF77) $(get_abi_CFLAGS)"
 	"${@}"
 }
 
@@ -191,7 +193,7 @@ src_test() {
 
 src_install() {
 	local MULTIBUILD_VARIANTS=( $(int64_multilib_get_enabled_abis) )
-	my_src_install () {
+	my_src_install() {
 		local openblas_flags=$(get_openblas_flags)
 		local profname=$(get_profname)
 		local pcfile


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/sci:lapack-multibuild commit in: sci-libs/openblas/
@ 2014-09-09 22:57 Mark Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Wright @ 2014-09-09 22:57 UTC (permalink / raw
  To: gentoo-commits

commit:     d6fe9a90f65e68d72c7688a0cf744ad9ea9d6923
Author:     gienah <gienah <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 19 10:16:43 2014 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Sun Sep  7 09:43:47 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=d6fe9a90

Thanks to sfabbro: dodoc should be outside the function, they do not change

---
 sci-libs/openblas/ChangeLog            | 3 +++
 sci-libs/openblas/openblas-9999.ebuild | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog
index b4f5886..68e0955 100644
--- a/sci-libs/openblas/ChangeLog
+++ b/sci-libs/openblas/ChangeLog
@@ -2,6 +2,9 @@
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  19 Feb 2014; Mark Wright <gienah@gentoo.org> openblas-9999.ebuild:
+  Thanks to sfabbro: dodoc should be outside the function, they do not change
+
   18 Feb 2014; Mark Wright <gienah@gentoo.org> openblas-9999.ebuild:
   multibuild openblas when USE=int64 is specified.
 

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
index 3bd158a..3e3cd52 100644
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -158,9 +158,6 @@ src_install() {
 			doins ${pcfile}
 		done
 
-		dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
-		dodoc *md Changelog.txt
-
 		if [[ ${CHOST} == *-darwin* ]] ; then
 			cd "${ED}"/usr/$(get_libdir)
 			local d
@@ -172,4 +169,7 @@ src_install() {
 		fi
 	}
 	multibuild_foreach_variant run_in_build_dir my_src_install
+
+	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
+	dodoc *md Changelog.txt
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/sci:lapack-multibuild commit in: sci-libs/openblas/
@ 2014-09-09 22:57 Mark Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Wright @ 2014-09-09 22:57 UTC (permalink / raw
  To: gentoo-commits

commit:     31519756bab19a0ef35f66e229f62d6aeee0ed04
Author:     gienah <gienah <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 25 13:44:08 2014 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Sun Sep  7 09:43:47 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=31519756

openblas: Strip the _int64 suffix from the BUILD_VARIANT to calculate the ABI

---
 sci-libs/openblas/openblas-9999.ebuild | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
index 1c2b6c6..f012efd 100644
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -74,11 +74,15 @@ int64_multilib_get_enabled_abis() {
 	# will be overwritten by the normal variant in the install, which removes the
 	# #define OPENBLAS_USE64BITINT for us.  We then specify it in Cflags in the
 	# /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
+	local MULTILIB_VARIANTS=( $(multilib_get_enabled_abis) )
 	local MULTIBUILD_VARIANTS=( )
-	use int64 && \
-		MULTIBUILD_VARIANTS+=( ${BASE_PROFNAME}_${INT64_SUFFIX} )
-	MULTIBUILD_VARIANTS+=( $(multilib_get_enabled_abis) )
-	echo "${MULTIBUILD_VARIANTS[*]}"
+	for i in "${MULTILIB_VARIANTS[@]}"; do
+		if use int64 && [[ "${i}" =~ 64$ ]]; then
+			MULTIBUILD_VARIANTS+=( "${i}_${INT64_SUFFIX}" )
+		fi
+		MULTIBUILD_VARIANTS+=( "${i}" )
+	done
+	echo "${MULTIBUILD_VARIANTS[@]}"
 }
 
 # @FUNCTION: _int64_multilib_multibuild_wrapper
@@ -89,12 +93,10 @@ int64_multilib_get_enabled_abis() {
 _int64_multilib_multibuild_wrapper() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	if [[ ! "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
-		local ABI=${MULTIBUILD_VARIANT}
-		multilib_toolchain_setup "${ABI}"
-		export FC="$(tc-getFC) $(get_abi_CFLAGS)"
-		export F77="$(tc-getF77) $(get_abi_CFLAGS)"
-	fi
+	local ABI="${MULTIBUILD_VARIANT/_${INT64_SUFFIX}/}"
+	multilib_toolchain_setup "${ABI}"
+	export FC="$(tc-getFC) $(get_abi_CFLAGS)"
+	export F77="$(tc-getF77) $(get_abi_CFLAGS)"
 	"${@}"
 }
 
@@ -191,7 +193,7 @@ src_test() {
 
 src_install() {
 	local MULTIBUILD_VARIANTS=( $(int64_multilib_get_enabled_abis) )
-	my_src_install () {
+	my_src_install() {
 		local openblas_flags=$(get_openblas_flags)
 		local profname=$(get_profname)
 		local pcfile


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/sci:lapack-multibuild commit in: sci-libs/openblas/
@ 2014-09-09 22:57 Mark Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Wright @ 2014-09-09 22:57 UTC (permalink / raw
  To: gentoo-commits

commit:     7ad7e4f7f99b3dd889f63c20a013145a06e6fb5b
Author:     gienah <gienah <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 18 14:01:11 2014 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Sun Sep  7 09:43:47 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=7ad7e4f7

multibuild openblas when USE=int64 is specified.

---
 sci-libs/openblas/ChangeLog            |   3 +
 sci-libs/openblas/openblas-9999.ebuild | 221 +++++++++++++++++++++------------
 2 files changed, 142 insertions(+), 82 deletions(-)

diff --git a/sci-libs/openblas/ChangeLog b/sci-libs/openblas/ChangeLog
index caf34f2..b4f5886 100644
--- a/sci-libs/openblas/ChangeLog
+++ b/sci-libs/openblas/ChangeLog
@@ -2,6 +2,9 @@
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  18 Feb 2014; Mark Wright <gienah@gentoo.org> openblas-9999.ebuild:
+  multibuild openblas when USE=int64 is specified.
+
   06 Jan 2014; Justin Lecher <jlec@gentoo.org> openblas-9999.ebuild,
   metadata.xml:
   Switch from git-2 to git-r3

diff --git a/sci-libs/openblas/openblas-9999.ebuild b/sci-libs/openblas/openblas-9999.ebuild
index 618c03b..3bd158a 100644
--- a/sci-libs/openblas/openblas-9999.ebuild
+++ b/sci-libs/openblas/openblas-9999.ebuild
@@ -4,7 +4,7 @@
 
 EAPI=5
 
-inherit alternatives-2 eutils fortran-2 git-r3 multilib toolchain-funcs
+inherit alternatives-2 eutils fortran-2 git-r3 multilib multibuild toolchain-funcs
 
 DESCRIPTION="Optimized BLAS library based on GotoBLAS2"
 HOMEPAGE="http://xianyi.github.com/OpenBLAS/"
@@ -14,105 +14,162 @@ EGIT_BRANCH="develop"
 
 LICENSE="BSD"
 SLOT="0"
-IUSE="int64 dynamic openmp static-libs threads"
+IUSE="dynamic int64 openmp static-libs threads"
 KEYWORDS=""
 
-src_configure() {
-	# lapack and lapacke are not modified from upstream lapack
-	sed \
-		-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \
-		-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \
-		-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS}:" \
-		-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
-		-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
-		-i Makefile.rule || die
-}
-
-openblas_compile() {
-	local profname=$1
-	einfo "Compiling profile ${profname}"
-	# cflags already defined twice
-	unset CFLAGS
-	emake clean
-	emake libs shared ${openblas_flags}
-	mkdir -p libs && mv libopenblas* libs/
-	# avoid pic when compiling static libraries, so re-compiling
-	if use static-libs; then
-		emake clean
-		emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
-		mv libopenblas* libs/
-	fi
-	cat <<-EOF > ${profname}.pc
-		prefix=${EPREFIX}/usr
-		libdir=\${prefix}/$(get_libdir)
-		includedir=\${prefix}/include
-		Name: ${PN}
-		Description: ${DESCRIPTION}
-		Version: ${PV}
-		URL: ${HOMEPAGE}
-		Libs: -L\${libdir} -lopenblas
-		Libs.private: -lm
-		Cflags: -I\${includedir}/${PN}
-	EOF
-}
+INT64_SUFFIX="int64"
+BASE_PROFNAME="openblas"
 
-src_compile() {
-	# openblas already does multi-jobs
-	MAKEOPTS+=" -j1"
-	openblas_flags=""
-	local openblas_name=openblas
+get_openblas_flags() {
+	local openblas_flags=""
 	use dynamic && \
-		openblas_name+="-dynamic" && \
 		openblas_flags+=" DYNAMIC_ARCH=1 TARGET=GENERIC NUM_THREADS=64 NO_AFFINITY=1"
-	use int64 && \
-		openblas_name+="-int64" && \
-		openblas_flags+=" INTERFACE64=1"
-
+	if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
+		openblas_flags+=" INTERFACE64=1 LIBNAMESUFFIX=${INT64_SUFFIX}"
+	fi
 	# choose posix threads over openmp when the two are set
 	# yet to see the need of having the two profiles simultaneously
 	if use threads; then
-		openblas_name+="-threads"
 		openblas_flags+=" USE_THREAD=1 USE_OPENMP=0"
 	elif use openmp; then
-		openblas_name+="-openmp"
 		openblas_flags+=" USE_THREAD=0 USE_OPENMP=1"
 	fi
-	openblas_compile ${openblas_name}
-	mv libs/libopenblas* . || die
+	echo "${openblas_flags}"
+}
+
+get_profname() {
+	local profname="${BASE_PROFNAME}"
+	use dynamic && \
+		profname+="-dynamic"
+	if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
+		profname+="-${INT64_SUFFIX}"
+	fi
+	# choose posix threads over openmp when the two are set
+	# yet to see the need of having the two profiles simultaneously
+	if use threads; then
+		profname+="-threads"
+	elif use openmp; then
+		profname+="-openmp"
+	fi
+	echo "${profname}"
+}
+
+pkg_setup() {
+	# The file /usr/include/openblas/openblas_config.h is generated during the install.
+	# By listing the int64 variant first, the int64 variant /usr/include/openblas/openblas_config.h
+	# will be overwritten by the normal variant in the install, which removes the
+	# #define OPENBLAS_USE64BITINT for us.  We then specify it in Cflags in the
+	# /usr/lib64/pkg-config/openblas-int64-{threads,openmp}.pc file.
+	MULTIBUILD_VARIANTS=()
+	use int64 && \
+		MULTIBUILD_VARIANTS+=( ${BASE_PROFNAME}_${INT64_SUFFIX} )
+	MULTIBUILD_VARIANTS+=( ${BASE_PROFNAME} )
+}
+
+src_prepare() {
+	multibuild_copy_sources
+}
+
+src_configure() {
+	my_configure() {
+		# lapack and lapacke are not modified from upstream lapack
+		sed \
+			-e "s:^#\s*\(CC\)\s*=.*:\1=$(tc-getCC):" \
+			-e "s:^#\s*\(FC\)\s*=.*:\1=$(tc-getFC):" \
+			-e "s:^#\s*\(COMMON_OPT\)\s*=.*:\1=${CFLAGS}:" \
+			-e "s:^#\s*\(NO_LAPACK\)\s*=.*:\1=1:" \
+			-e "s:^#\s*\(NO_LAPACKE\)\s*=.*:\1=1:" \
+			-i Makefile.rule || die
+	}
+	multibuild_foreach_variant run_in_build_dir my_configure
+}
+
+src_compile() {
+	# openblas already does multi-jobs
+	MAKEOPTS+=" -j1"
+	my_src_compile () {
+		local openblas_flags=$(get_openblas_flags)
+		local profname=$(get_profname)
+		einfo "Compiling profile ${profname}"
+		# cflags already defined twice
+		unset CFLAGS
+		emake clean
+		emake libs shared ${openblas_flags}
+		mkdir -p libs && mv libopenblas* libs/
+		# avoid pic when compiling static libraries, so re-compiling
+		if use static-libs; then
+			emake clean
+			emake libs ${openblas_flags} NO_SHARED=1 NEED_PIC=
+			mv libopenblas* libs/
+		fi
+		cat <<-EOF > ${profname}.pc
+			prefix=${EPREFIX}/usr
+			libdir=\${prefix}/$(get_libdir)
+			includedir=\${prefix}/include
+			Name: ${PN}
+			Description: ${DESCRIPTION}
+			Version: ${PV}
+			URL: ${HOMEPAGE}
+			Libs: -L\${libdir} -l${MULTIBUILD_ID}
+			Libs.private: -lm
+		EOF
+		if [[ "${MULTIBUILD_ID}" =~ "_${INT64_SUFFIX}" ]]; then
+			cat <<-EOF >> ${profname}.pc
+				Cflags: -DOPENBLAS_USE64BITINT -I\${includedir}/${PN}
+				Fflags=-fdefault-integer-8
+			EOF
+		else
+			cat <<-EOF >> ${profname}.pc
+				Cflags: -I\${includedir}/${PN}
+				Fflags=
+			EOF
+		fi
+		mv libs/libopenblas* . || die
+	}
+	multibuild_foreach_variant run_in_build_dir my_src_compile
 }
 
 src_test() {
-	emake tests ${openblas_flags}
+	my_src_test () {
+		local openblas_flags=$(get_openblas_flags)
+		emake tests ${openblas_flags}
+	}
+	multibuild_foreach_variant run_in_build_dir my_src_test
 }
 
 src_install() {
-	local pcfile
-	for pcfile in *.pc; do
-		local profname=${pcfile%.pc}
-		emake install \
-			PREFIX="${ED}"usr ${openblas_flags} \
-			OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
-			OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
-		use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a
-		alternatives_for blas ${profname} 0 \
-			/usr/$(get_libdir)/pkgconfig/blas.pc ${pcfile}
-		alternatives_for cblas ${profname} 0 \
-			/usr/$(get_libdir)/pkgconfig/cblas.pc ${pcfile} \
-			/usr/include/cblas.h ${PN}/cblas.h
-		insinto /usr/$(get_libdir)/pkgconfig
-		doins ${pcfile}
-	done
+	my_src_install () {
+		local openblas_flags=$(get_openblas_flags)
+		local profname=$(get_profname)
+		local pcfile
+		for pcfile in *.pc; do
+			local profname=${pcfile%.pc}
+			emake install \
+				PREFIX="${ED}"usr ${openblas_flags} \
+				OPENBLAS_INCLUDE_DIR="${ED}"usr/include/${PN} \
+				OPENBLAS_LIBRARY_DIR="${ED}"usr/$(get_libdir)
+			use static-libs || rm "${ED}"usr/$(get_libdir)/lib*.a
+			alternatives_for blas ${profname} 0 \
+				/usr/$(get_libdir)/pkgconfig/blas.pc ${pcfile}
+			alternatives_for cblas ${profname} 0 \
+				/usr/$(get_libdir)/pkgconfig/cblas.pc ${pcfile} \
+				/usr/include/cblas.h ${PN}/cblas.h
+			insinto /usr/$(get_libdir)/pkgconfig
+			doins ${pcfile}
+		done
 
-	dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
-	dodoc *md Changelog.txt
+		dodoc GotoBLAS_{01Readme,03FAQ,04FAQ,05LargePage,06WeirdPerformance}.txt
+		dodoc *md Changelog.txt
 
-	if [[ ${CHOST} == *-darwin* ]] ; then
-		cd "${ED}"/usr/$(get_libdir)
-		local d
-		for d in *.dylib ; do
-			ebegin "Correcting install_name of ${d}"
-			install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
-			eend $?
-		done
-	fi
+		if [[ ${CHOST} == *-darwin* ]] ; then
+			cd "${ED}"/usr/$(get_libdir)
+			local d
+			for d in *.dylib ; do
+				ebegin "Correcting install_name of ${d}"
+				install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${d}" "${d}"
+				eend $?
+			done
+		fi
+	}
+	multibuild_foreach_variant run_in_build_dir my_src_install
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [gentoo-commits] proj/sci:lapack-multibuild commit in: sci-libs/openblas/
@ 2014-09-13  1:03 Mark Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Wright @ 2014-09-13  1:03 UTC (permalink / raw
  To: gentoo-commits

commit:     709b3e5d88baf54ca019efa22443bfee7d3f0d25
Author:     gienah <gienah <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 13 01:02:57 2014 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Sat Sep 13 01:02:57 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=709b3e5d

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 <gienah@gentoo.org> 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 <gienah@gentoo.org> +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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-13  1:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-19 10:17 [gentoo-commits] proj/sci:lapack-multibuild commit in: sci-libs/openblas/ Mark Wright
  -- strict thread matches above, loose matches on Subject: below --
2014-02-25 13:46 Mark Wright
2014-09-09 22:57 Mark Wright
2014-09-09 22:57 Mark Wright
2014-09-09 22:57 Mark Wright
2014-09-13  1:03 Mark Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox