diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2008-05-06 17:57:49 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2008-05-06 17:57:49 +0000 |
commit | 2552657e1c6bb5ce96237a79ea6f750eb8539adb (patch) | |
tree | 8eb19c10d97ae920eed2eb8e23cbe64860cf1c09 /sci-libs/acml | |
parent | Manual Manifest commit. (diff) | |
download | historical-2552657e1c6bb5ce96237a79ea6f750eb8539adb.tar.gz historical-2552657e1c6bb5ce96237a79ea6f750eb8539adb.tar.bz2 historical-2552657e1c6bb5ce96237a79ea6f750eb8539adb.zip |
Various fixes for x86 (bug #220321), re-added a default environment file according to use flags, pkgconfig recreated with proper libraries instead of always acml_mv
Package-Manager: portage-2.1.5_rc6
Diffstat (limited to 'sci-libs/acml')
-rw-r--r-- | sci-libs/acml/ChangeLog | 10 | ||||
-rw-r--r-- | sci-libs/acml/Manifest | 12 | ||||
-rw-r--r-- | sci-libs/acml/acml-4.1.0-r1.ebuild | 204 |
3 files changed, 220 insertions, 6 deletions
diff --git a/sci-libs/acml/ChangeLog b/sci-libs/acml/ChangeLog index f6a3db22317c..33d7075e5b10 100644 --- a/sci-libs/acml/ChangeLog +++ b/sci-libs/acml/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sci-libs/acml # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/ChangeLog,v 1.34 2008/04/30 12:03:34 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/ChangeLog,v 1.35 2008/05/06 17:57:49 bicatali Exp $ + +*acml-4.1.0-r1 (06 May 2008) + + 06 May 2008; SĂ©bastien Fabbro <bicatali@gentoo.org> + +acml-4.1.0-r1.ebuild: + Various fixes for x86 (bug #220321), re-added a default environment file + according to use flags, pkgconfig recreated with proper libraries instead + of always acml_mv *acml-4.1.0 (30 Apr 2008) diff --git a/sci-libs/acml/Manifest b/sci-libs/acml/Manifest index 6b0b067c7148..8e07fbd912b1 100644 --- a/sci-libs/acml/Manifest +++ b/sci-libs/acml/Manifest @@ -16,17 +16,19 @@ DIST acml-4-0-1-ifort-64bit.tgz 24741959 RMD160 323827cc893de6a524bd8ece8126f4e2 DIST acml-4-1-0-gfortran-64bit-int64.tgz 29351223 RMD160 99b26b025a60b21600d4a337b4a986a98b5fa03c SHA1 b14210b45ab710e7e63c26658b68be7ed2a82d46 SHA256 825ae742df873cf6d41fbaaecff08941badb2b43a7021ba6c8af7abc75a6d14d DIST acml-4-1-0-gfortran-64bit.tgz 29995624 RMD160 53a50524235903569905ecc3cd3f65225e5c081e SHA1 ef29426885af41c5ea121e2ace1e1a59c7b423fe SHA256 50f64687b86556123538e1f2bd4c185ff1d018501a5a5834ec8acf7487c817c4 DIST acml-4-1-0-ifort-32bit.tgz 18797527 RMD160 bbc0ec7e367693d8201b032b310bf3b36edf1834 SHA1 d6c1bacc012718190d54d3b7fd5804bc85429c46 SHA256 5dfa768c12e96d2d25678e85cf2e0eea3bd427ddd94f417bcad09abe25369375 +DIST acml-4-1-0-ifort-64bit-int64.tgz 36135363 RMD160 0c412608381f95518a58f9d923d515f0d16ce8a1 SHA1 b3f4aadc67b41bd1a9930e00ff3c1ab81ce5a1e6 SHA256 3da0ded50ab25e44f531ac58b469344fed0f6af4ae70aa58b1286cf8de9731a4 DIST acml-4-1-0-ifort-64bit.tgz 36577689 RMD160 35ef227d2bf24ae3ff2141a802570d6d2301d30a SHA1 ec2591f56233816ccfcd1ba1321e03cc21909206 SHA256 b5b60425fccb624e3baf48f5d51ae68ccdc3e9852a4a50661bb3e45a6f25be40 EBUILD acml-3.6.0-r1.ebuild 4486 RMD160 d740d9f002c2a4d1a8bb0c094108983d23400c00 SHA1 648a4efa47b57f2827fcd37235f59f6256ce6997 SHA256 8c1b0d1e02ba64ffdd60cc020e10d9f6e167fb6cdfabe6408c2279bc791a62ca EBUILD acml-3.6.1-r1.ebuild 5223 RMD160 b1799bd496f14aa19043a3bf210cc59ba58107d2 SHA1 5934984c91f4bd27b28d98a6c5fb6184d453bf8f SHA256 4f6ec15274818e6e2df0dc68c5e033fb72443f6289e610c05733f2c5ef810ec1 EBUILD acml-4.0.1.ebuild 4926 RMD160 03ea891a51366243be1a318cbfbd65b407c10800 SHA1 0762345d1dd1198060dcfe8244d083bb10ba9946 SHA256 bdea166ec84cd5e7eff4d7490cfab2f7c83d343f2a7d61f5e6470560f13f30d2 +EBUILD acml-4.1.0-r1.ebuild 5896 RMD160 0704cf4a9a07d9dc2a9d64c0b1a5b6a574dc3eff SHA1 82d64b62f75b0f31c4fba99c30cb85b99b0720d0 SHA256 e612884a32bcce6cb7ece154877d7bb061a9d40eae9bb3708a0d7cd88f4d2565 EBUILD acml-4.1.0.ebuild 5189 RMD160 642672441448df6bb6a150f7b627bbe183a4cd16 SHA1 01d8a39eb44ff1d800dc6245590877555004e7f5 SHA256 bfe76a5bdf0a1aa5db5fcf7061e6cea0c9f1125347387f5e720bbe0b21f30b49 -MISC ChangeLog 6903 RMD160 9c00e6a17f082f79232346a60b90d9e9a966849a SHA1 aa76346f1592ba1c20a79ee1a03c6665593bee4f SHA256 418ddd79f393ef043d3547fe9cbc443ee8181bdd68b8dabb3c051d571ecb4c26 +MISC ChangeLog 7185 RMD160 8fbbadbac79ea5fac42c37231d5b59cbbb29d793 SHA1 e199cd2d0f7d78aaa04845288dea858c3a993c30 SHA256 4b833ba7a0265bd7479b4aa948432f78238a48157d4bddaacb2dd3eae5d7a865 MISC metadata.xml 812 RMD160 878a52e199a177a1dade27a1ebfdf623a42b7e5d SHA1 24e5f44c01dfc65ac8c699015bb649abf29efcaf SHA256 3597c6694fc8b1f7b57103ffd799dfa077c29444c31d6a5be43ebc0198636cae -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.7 (GNU/Linux) +Version: GnuPG v2.0.9 (GNU/Linux) -iD8DBQFIGGAj1ycZbhPLE2ARAjnOAJ4jOj9vILPXEVNbeXJx7ST+7hIizQCglawy -qwA3XfGUPcdpbcpNY7gK+CA= -=wz1w +iEYEARECAAYFAkggnC4ACgkQ1ycZbhPLE2BpiACdEbcf1Jwd5TkR0RmAwea0hLP0 +b4MAnR9QWiytI9LTMgGq9dMPH0Q6TtEZ +=cYnS -----END PGP SIGNATURE----- diff --git a/sci-libs/acml/acml-4.1.0-r1.ebuild b/sci-libs/acml/acml-4.1.0-r1.ebuild new file mode 100644 index 000000000000..2b1dc7cc8643 --- /dev/null +++ b/sci-libs/acml/acml-4.1.0-r1.ebuild @@ -0,0 +1,204 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/acml-4.1.0-r1.ebuild,v 1.1 2008/05/06 17:57:49 bicatali Exp $ + +EAPI="1" + +inherit eutils toolchain-funcs fortran versionator + +MY_P=${PN}-$(replace_all_version_separators -) + +DESCRIPTION="AMD Core Math Library for x86 and amd64 CPUs" +HOMEPAGE="http://developer.amd.com/acml.jsp" +SRC_URI=" + amd64? ( + ifc? ( ${MY_P}-ifort-64bit.tgz + int64? ( ${MY_P}-ifort-64bit-int64.tgz ) ) + gfortran? ( ${MY_P}-gfortran-64bit.tgz + int64? ( ${MY_P}-gfortran-64bit-int64.tgz ) ) + !ifc? ( + !gfortran? ( ${MY_P}-gfortran-64bit.tgz + int64? ( ${MY_P}-gfortran-64bit-int64.tgz ) ) ) ) + x86? ( ${MY_P}-ifort-32bit.tgz )" + +# Once gfortran builds appear, replace x86? +# and remove the hack_x86 in the ebuild +# x86? ( +# ifc? ( ${MY_P}-ifort-32bit.tgz ) +# gfortran? ( ${MY_P}-gfortran-32bit.tgz ) +# !ifc? ( !gfortran ( ${MY_P}-gfortran-32bit.tgz ) ) )" + +IUSE="doc examples gfortran ifc int64 openmp test" +KEYWORDS="~amd64 ~x86" + +RESTRICT="strip fetch" +LICENSE="ACML" +SLOT="0" + +# gfortran? ( sys-devel/gcc:4.2 ) +# !gfortran? ( !ifc? ( sys-devel/gcc:4.2 ) ) ) +# hack_x86 +CDEPEND="ifc? ( dev-lang/ifc ) + amd64? ( gfortran? ( sys-devel/gcc:4.2 ) + !gfortran? ( !ifc? ( amd64? ( sys-devel/gcc:4.2 ) ) ) ) + x86? ( dev-lang/ifc )" + +DEPEND="test? ( ${CDEPEND} ) + app-admin/eselect-blas + app-admin/eselect-lapack" + +RDEPEND="${CDEPEND} + app-admin/eselect-blas + app-admin/eselect-lapack + doc? ( app-doc/blas-docs app-doc/lapack-docs )" + +S="${WORKDIR}" + +pkg_nofetch() { + einfo "Please download the ACML from:" + einfo "${HOMEPAGE}" + einfo "and place it in ${DISTDIR}." + einfo "The previous versions could be found at" + einfo "http://developer.amd.com/acmlarchive.jsp" + einfo "SRC=${A} $SRC_URI" +} + +pkg_setup() { + # hack_x86 + if use x86 && ! use ifc; then + ewarn "On x86 architectures, acml is only available with ifc." + ewarn "Make sure you have proper licenses to use ifc" + fi + FORTRAN="" + if use test; then + use gfortran && FORTRAN="${FORTRAN} gfortran" + use ifc && FORTRAN="${FORTRAN} ifc" + use gfortran || use ifc || FORTRAN="gfortran" + # hack_x86 + use x86 && FORTRAN="ifc" + fortran_pkg_setup + # work around incomplete fortran eclass + if use gfortran && + [[ ${FORTRANC} == gfortran ]] && + [[ $(gcc-version) != 4.2 ]] + then + eerror "You need gfortran-4.2 to test acml" + eerror "Please use gcc-config to switch gcc version 4.2" + die "gfortran check failed" + fi + fi + # construct default profile dprof from default ddir + local ddir=gfortran + use ifc && ddir=ifort + # hack_x86 + use x86 && ddir=ifort32 || ddir=ifort64 + #use x86 && ddir=${ddir}32 || ddir=${ddir}64 + use openmp && ddir=${ddir}_mp + use int64 && ddir=${ddir}_int64 + ACML_DEFAULT_DIR=${ddir} +} + +src_unpack() { + unpack ${A} + unpack ./contents-acml-*.tgz + use openmp || rm -rf *_mp* +} + +src_test() { + # only testing with current chosen compiler + for fdir in ${ACML_DEFAULT_DIR/_mp}*; do + einfo "Testing acml in ${fdir}" + for d in . acml_mv; do + cd "${S}"/${fdir}/examples/${d} + emake \ + ACMLDIR="${S}"/${fdir} \ + F77=${FORTRANC} \ + CC="$(tc-getCC)" \ + CPLUSPLUS="$(tc-getCXX)" \ + || die "emake test in ${fdir}/examples/${d} failed" + emake clean + done + done +} + +make_acml_profile_name() { + local fort=${1%%[[:digit:]]*} + local opt=${1#*[0-9][0-9]} + echo ${PN}-${fort}${opt/mp/openmp} | tr '_' '-' +} + +src_install() { + # respect acml default install dir (and FHS) + local instdir=/opt/${PN}${PV} + dodir ${instdir} + + for lib in */lib; do + local fdir=${lib%/*} + # install acml + use examples || rm -rf "${S}"/${fdir}/examples + cp -pPR "${S}"/${fdir} "${D}"${instdir} || die "copy ${fdir} failed" + + # install profiles + local prof=$(make_acml_profile_name ${fdir}) + local acmldir=${instdir}/${fdir} + local acmllibs="-lacml" + local libname=${acmldir}/lib/libacml + local extlibs + local extflags + [[ ${fdir} =~ int64 ]] && extflags="${extflags} -fdefault-integer-8" + [[ ${fdir} =~ gfortran ]] && extlibs="${extlibs} -lgfortran" + if [[ ${fdir} =~ _mp ]]; then + [[ ${fdir} =~ ifort ]] && extlibs="${extlibs} -lguide" + extlibs="${extlibs} -lpthread" + extflags="${extflags} -fopenmp" + acmllibs="-lacml_mp" + libname=${libname}_mp + fi + use amd64 && acmllibs="${acmllibs} -lacml_mv" + for x in blas lapack; do + # pkgconfig files + sed -e "s:@LIBDIR@:$(get_libdir):" \ + -e "s:@PV@:${PV}:" \ + -e "s:@ACMLDIR@:${acmldir}:g" \ + -e "s:@ACMLLIBS@:${acmllibs}:g" \ + -e "s:@EXTLIBS@:${extlibs}:g" \ + -e "s:@EXTFLAGS@:${extflags}:g" \ + "${FILESDIR}"/${x}.pc.in > ${x}.pc \ + || die "sed ${x}.pc failed" + insinto ${acmldir}/lib + doins ${x}.pc || die "doins ${x}.pc failed" + + # eselect files + cat > eselect.${prof}.${x} <<-EOF + ${libname}.so /usr/@LIBDIR@/lib${l}.so.0 + ${libname}.so /usr/@LIBDIR@/lib${l}.so + ${libname}.a /usr/@LIBDIR@/lib${l}.a + ${acmldir}/lib/${x}.pc /usr/@LIBDIR@/pkgconfig/${x}.pc + EOF + eselect ${x} add $(get_libdir) eselect.${prof}.${x} ${prof} + done + done + + echo "LDPATH=${instdir}/${ACML_DEFAULT_DIR}/lib" > 35acml + doenvd "${S}"/35acml || die "doenvd failed" + use doc || rm -rf "${S}"/Doc/acml.pdf "${S}"/Doc/html + cp -pPR "${S}"/Doc "${D}"${instdir} || die "copy doc failed" +} + +pkg_postinst() { + local dprof="$(make_acml_profile_name ${ACML_DEFAULT_DIR})" + for x in blas lapack; do + local cprof=$(eselect ${x} show | cut -d' ' -f2) + if [[ ${cprof} == ${dprof} || -z ${cprof} ]]; then + # work around eselect bug #189942 + local configfile="${ROOT}"/etc/env.d/${x}/$(get_libdir)/config + [[ -e ${configfile} ]] && rm -f ${configfile} + eselect ${x} set ${dprof} + elog "${x} has been eselected to ${dprof}" + else + elog "Current eselected ${x} implementation is ${cprof}" + elog "To use you have one of ${PN}, issue (as root):" + elog "\t eselect ${x} set <profile>" + fi + done +} |