public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:int64-build-eclass commit in: sci-libs/xblas/
@ 2014-10-13 10:22 Mark Wright
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wright @ 2014-10-13 10:22 UTC (permalink / raw
  To: gentoo-commits

commit:     8bb927ed7f22098143f37b62b695bbb14143cfc4
Author:     gienah <gienah <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 13 10:18:32 2014 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Mon Oct 13 10:18:32 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=8bb927ed

multilib int64 multibuild xblas. The int64 build may not work though, not tested.

---
 sci-libs/xblas/ChangeLog               |   9 ++-
 sci-libs/xblas/metadata.xml            |   3 +
 sci-libs/xblas/xblas-1.0.248-r1.ebuild | 121 +++++++++++++++++++++++++++++++++
 3 files changed, 132 insertions(+), 1 deletion(-)

diff --git a/sci-libs/xblas/ChangeLog b/sci-libs/xblas/ChangeLog
index 17e85f6..89c3d15 100644
--- a/sci-libs/xblas/ChangeLog
+++ b/sci-libs/xblas/ChangeLog
@@ -1,7 +1,14 @@
 # ChangeLog for sci-libs/xblas
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*xblas-1.0.248-r1 (13 Oct 2014)
+
+  13 Oct 2014; Mark Wright <gienah@gentoo.org> +xblas-1.0.248-r1.ebuild,
+  metadata.xml:
+  multilib int64 multibuild xblas. The int64 build may not work though, not
+  tested.
+
   22 Feb 2013; Justin Lecher <jlec@gentoo.org> xblas-1.0.248.ebuild,
   metadata.xml:
   Bump EAPI to 5

diff --git a/sci-libs/xblas/metadata.xml b/sci-libs/xblas/metadata.xml
index 4610f39..659b397 100644
--- a/sci-libs/xblas/metadata.xml
+++ b/sci-libs/xblas/metadata.xml
@@ -8,4 +8,7 @@
   Extended and Mixed Precision versions, as documented in Chapters 2 and 4 
   of the new BLAS Standard.
 </longdescription>
+  <use>
+    <flag name="int64">Build the 64 bits integer library</flag>
+  </use>
 </pkgmetadata>

diff --git a/sci-libs/xblas/xblas-1.0.248-r1.ebuild b/sci-libs/xblas/xblas-1.0.248-r1.ebuild
new file mode 100644
index 0000000..1c01265
--- /dev/null
+++ b/sci-libs/xblas/xblas-1.0.248-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+EBASE_PROFNAME="xblas"
+inherit eutils flag-o-matic fortran-2 fortran-int64 multibuild multilib multilib-build toolchain-funcs versionator
+
+DESCRIPTION="Extra Precise Basic Linear Algebra Subroutines"
+HOMEPAGE="http://www.netlib.org/xblas"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc fortran int64 static-libs"
+
+RDEPEND="fortran? ( virtual/fortran )"
+DEPEND="${RDEPEND}"
+
+static_to_shared() {
+	local libstatic=${1}; shift
+	local libname=$(basename ${libstatic%.a})
+	local soname=${libname}$(get_libname $(get_version_component_range 1-2))
+	local libdir=$(dirname ${libstatic})
+
+	einfo "Making ${soname} from ${libstatic}"
+	if [[ ${CHOST} == *-darwin* ]] ; then
+		${LINK:-$(tc-getCC)} ${LDFLAGS}  \
+			-dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
+			-Wl,-all_load -Wl,${libstatic} \
+			"$@" -o ${libdir}/${soname} || die "${soname} failed"
+	else
+		${LINK:-$(tc-getCC)} ${LDFLAGS}  \
+			-shared -Wl,-soname=${soname} \
+			-Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
+			"$@" -o ${libdir}/${soname} || die "${soname} failed"
+		[[ $(get_version_component_count) -gt 1 ]] && \
+			ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
+		ln -s ${soname} ${libdir}/${libname}$(get_libname)
+	fi
+}
+
+pkg_setup() {
+	use fortran && fortran-2_pkg_setup
+}
+
+src_prepare() {
+	local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
+	multibuild_copy_sources
+}
+
+src_configure() {
+	local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
+	my_configure() {
+		export FCFLAGS="${FCFLAGS} $(get_abi_CFLAGS) $(fortran-int64_get_fortran_int64_abi_fflags)"
+		econf $(use_enable fortran)
+	}
+	multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure
+}
+
+src_compile() {
+	local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
+	my_src_compile() {
+		local profname=$(fortran-int64_get_profname)
+		local libname="${profname//-/_}"
+		# default target builds and runs tests - split
+		# build first static libs because of fPIC afterwards
+		# and we link tests with shared ones
+		if use static-libs; then
+			emake makefiles
+			emake lib XBLASLIB=lib${libname}_nonpic.a
+			emake clean
+		fi
+		sed -i \
+			-e 's:\(CFLAGS.*\).*:\1 -fPIC:' \
+			make.inc || die
+		emake makefiles
+		emake lib XBLASLIB=lib${libname}.a
+		static_to_shared lib${libname}.a
+	}
+	multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_compile
+}
+
+src_test() {
+	local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
+	my_src_test () {
+		emake tests
+	}
+	multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_test
+}
+
+src_install() {
+	local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
+	my_src_install() {
+		local profname=$(fortran-int64_get_profname)
+		local libname="${profname//-/_}"
+		dolib.so lib${libname}$(get_libname)*
+		use static-libs && newlib.a lib${libname}_nonpic.a lib${libname}.a
+		dodoc README README.devel
+		use doc && dodoc doc/report.ps
+
+		# pkg-config file for our multliple numeric stuff
+		cat > ${profname}.pc <<-EOF
+			prefix=${EPREFIX}/usr
+			libdir=\${prefix}/$(get_libdir)
+			includedir=\${prefix}/include/${PN}
+			Name: ${profname}
+			Description: ${DESCRIPTION}
+			Version: ${PV}
+			URL: ${HOMEPAGE}
+			Libs: -L\${libdir} -l${libname}
+			Cflags: -I\${includedir}
+			Fflags=$(fortran-int64_get_fortran_int64_abi_fflags)
+		EOF
+		insinto /usr/$(get_libdir)/pkgconfig
+		doins ${profname}.pc
+	}
+	multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install
+}


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

* [gentoo-commits] proj/sci:int64-build-eclass commit in: sci-libs/xblas/
@ 2014-10-14  0:48 Mark Wright
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wright @ 2014-10-14  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     e393287c71ac919b3a99f0f53acc398e6abaf1e8
Author:     gienah <gienah <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 14 00:47:24 2014 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Tue Oct 14 00:47:24 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e393287c

Thanks to tamiko for testing and the fix to the problem: sci-libs/xblas is missing sys-devel/m4 as build time dependency (at least the configure script checks for it and barfs).

---
 sci-libs/xblas/ChangeLog               | 5 +++++
 sci-libs/xblas/xblas-1.0.248-r1.ebuild | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/sci-libs/xblas/ChangeLog b/sci-libs/xblas/ChangeLog
index 89c3d15..8e87289 100644
--- a/sci-libs/xblas/ChangeLog
+++ b/sci-libs/xblas/ChangeLog
@@ -2,6 +2,11 @@
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  14 Oct 2014; Mark Wright <gienah@gentoo.org> xblas-1.0.248-r1.ebuild:
+  Thanks to tamiko for testing and the fix to the problem: sci-libs/xblas is
+  missing sys-devel/m4 as build time dependency (at least the configure script
+  checks for it and barfs).
+
 *xblas-1.0.248-r1 (13 Oct 2014)
 
   13 Oct 2014; Mark Wright <gienah@gentoo.org> +xblas-1.0.248-r1.ebuild,

diff --git a/sci-libs/xblas/xblas-1.0.248-r1.ebuild b/sci-libs/xblas/xblas-1.0.248-r1.ebuild
index 1c01265..f703b32 100644
--- a/sci-libs/xblas/xblas-1.0.248-r1.ebuild
+++ b/sci-libs/xblas/xblas-1.0.248-r1.ebuild
@@ -17,7 +17,8 @@ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
 IUSE="doc fortran int64 static-libs"
 
 RDEPEND="fortran? ( virtual/fortran )"
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+	sys-devel/m4"
 
 static_to_shared() {
 	local libstatic=${1}; shift


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

end of thread, other threads:[~2014-10-14  0:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-14  0:48 [gentoo-commits] proj/sci:int64-build-eclass commit in: sci-libs/xblas/ Mark Wright
  -- strict thread matches above, loose matches on Subject: below --
2014-10-13 10:22 Mark Wright

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