aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-09-19 09:14:19 +0200
committerJustin Lecher <jlec@gentoo.org>2015-11-28 18:25:09 +0100
commitbc36b5406f2bb289a3920ef13d50853a567bc83d (patch)
treeee431372f2726c8ffbc5ca294fd07076be18f737 /sci-libs/xblas
parentdev-util/amdapp: Version bump; Fixes issue #542 (diff)
downloadsci-bc36b5406f2bb289a3920ef13d50853a567bc83d.tar.gz
sci-bc36b5406f2bb289a3920ef13d50853a567bc83d.tar.bz2
sci-bc36b5406f2bb289a3920ef13d50853a567bc83d.zip
Large fix of numeric code
fortran-int64.eclass code has been splitted into numeric-int64-multibuild.eclass, fortran-2.eclass and numeric.eclass. Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=563292 https://bugs.gentoo.org/show_bug.cgi?id=551764 https://bugs.gentoo.org/show_bug.cgi?id=555302 Github: resolves gentoo-science/sci#438 resolves gentoo-science/sci#443 resolves gentoo-science/sci#447 resolves gentoo-science/sci#450 resolves gentoo-science/sci#467 resolves gentoo-science/sci#492 resolves gentoo-science/sci#507 resolves gentoo-science/sci#508 resolves gentoo-science/sci#522 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'sci-libs/xblas')
-rw-r--r--sci-libs/xblas/xblas-1.0.248-r1.ebuild78
-rw-r--r--sci-libs/xblas/xblas-1.0.248.ebuild93
2 files changed, 33 insertions, 138 deletions
diff --git a/sci-libs/xblas/xblas-1.0.248-r1.ebuild b/sci-libs/xblas/xblas-1.0.248-r1.ebuild
index 5005e9dfa..93ecafdf2 100644
--- a/sci-libs/xblas/xblas-1.0.248-r1.ebuild
+++ b/sci-libs/xblas/xblas-1.0.248-r1.ebuild
@@ -4,8 +4,10 @@
EAPI=5
-EBASE_PROFNAME="xblas"
-inherit eutils flag-o-matic fortran-2 fortran-int64 multibuild multilib multilib-build toolchain-funcs versionator
+NUMERIC_MODULE_NAME="xblas"
+FORTRAN_NEEDED=fortran
+
+inherit flag-o-matic fortran-2 numeric-int64-multibuild toolchain-funcs versionator
DESCRIPTION="Extra Precise Basic Linear Algebra Subroutines"
HOMEPAGE="http://www.netlib.org/xblas"
@@ -14,9 +16,9 @@ SRC_URI="${HOMEPAGE}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="doc fortran int64 static-libs"
+IUSE="doc fortran static-libs"
-RDEPEND="fortran? ( virtual/fortran )"
+RDEPEND=""
DEPEND="${RDEPEND}
sys-devel/m4"
@@ -38,8 +40,8 @@ static_to_shared() {
-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)
+ ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version)) || die
+ ln -s ${soname} ${libdir}/${libname}$(get_libname) || die
fi
}
@@ -48,23 +50,20 @@ pkg_setup() {
}
src_prepare() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- multibuild_copy_sources
+ numeric-int64-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)"
+ xblas_configure() {
+ export FCFLAGS="${FCFLAGS} $(get_abi_CFLAGS) $(numeric-int64_get_fortran_int64_abi_fflags)"
econf $(use_enable fortran)
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_configure
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir xblas_configure
}
src_compile() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_compile() {
- local profname=$(fortran-int64_get_profname)
+ xblas_src_compile() {
+ local profname=$(numeric-int64_get_module_name)
local libname="${profname//-/_}"
# default target builds and runs tests - split
# build first static libs because of fPIC afterwards
@@ -81,42 +80,31 @@ src_compile() {
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
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir xblas_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
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir emake tests
}
src_install() {
- local MULTIBUILD_VARIANTS=( $(fortran-int64_multilib_get_enabled_abis) )
- my_src_install() {
- local profname=$(fortran-int64_get_profname)
+ xblas_src_install() {
+ local profname=$(numeric-int64_get_module_name)
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
+ if numeric-int64_is_static_build; then
+ use static-libs && newlib.a lib${libname}_nonpic.a lib${libname}.a
+ else
+ dolib.so lib${libname}$(get_libname)*
+
+ create_pkgconfig \
+ --name ${profname} \
+ --libs "-L\${libdir} -l${libname}" \
+ --cflags "-I\${includedir} $(numeric-int64_get_fortran_int64_abi_fflags)" \
+ ${profname}
+ fi
}
- multibuild_foreach_variant run_in_build_dir fortran-int64_multilib_multibuild_wrapper my_src_install
+ numeric-int64-multibuild_foreach_all_abi_variants run_in_build_dir xblas_src_install
+
+ dodoc README README.devel
+ use doc && dodoc doc/report.ps
}
diff --git a/sci-libs/xblas/xblas-1.0.248.ebuild b/sci-libs/xblas/xblas-1.0.248.ebuild
deleted file mode 100644
index 609d8b931..000000000
--- a/sci-libs/xblas/xblas-1.0.248.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils flag-o-matic fortran-2 multilib 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 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_configure() {
- econf $(use_enable fortran)
-}
-
-src_compile() {
- # 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${PN}_nonpic.a
- emake clean
- fi
- sed -i \
- -e 's:\(CFLAGS.*\).*:\1 -fPIC:' \
- make.inc || die
- emake makefiles
- emake lib
- static_to_shared lib${PN}.a
-}
-
-src_test() {
- emake tests
-}
-
-src_install() {
- dolib.so lib${PN}$(get_libname)*
- use static-libs && newlib.a lib${PN}_nonpic.a lib${PN}.a
- dodoc README README.devel
- use doc && dodoc doc/report.ps
-
- # pkg-config file for our multliple numeric stuff
- cat > ${PN}.pc <<-EOF
- prefix=${EPREFIX}/usr
- libdir=\${prefix}/$(get_libdir)
- includedir=\${prefix}/include/${PN}
- Name: ${PN}
- Description: ${DESCRIPTION}
- Version: ${PV}
- URL: ${HOMEPAGE}
- Libs: -L\${libdir} -l${PN}
- Cflags: -I\${includedir}
- EOF
- insinto /usr/$(get_libdir)/pkgconfig
- doins ${PN}.pc
-}