From: Justin Lecher Date: Tue, 20 Apr 2010 18:26:51 +0000 (+0000) Subject: Fixing for prefix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7ab778d80d585c02f0ac205eacb3c6775420c1e9;p=gentoo.git Fixing for prefix Package-Manager: portage-2.2_rc67/cvs/Linux x86_64 --- diff --git a/sci-libs/blas-atlas/ChangeLog b/sci-libs/blas-atlas/ChangeLog index 693745bc604d..fe942c7f8300 100644 --- a/sci-libs/blas-atlas/ChangeLog +++ b/sci-libs/blas-atlas/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/blas-atlas # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/ChangeLog,v 1.99 2010/04/15 20:20:43 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/ChangeLog,v 1.100 2010/04/20 18:26:51 jlec Exp $ + +*blas-atlas-3.9.23-r3 (20 Apr 2010) + + 20 Apr 2010; Justin Lecher blas-atlas-3.9.23-r2.ebuild, + +blas-atlas-3.9.23-r3.ebuild: + Fixing for prefix *blas-atlas-3.9.23-r2 (15 Apr 2010) diff --git a/sci-libs/blas-atlas/Manifest b/sci-libs/blas-atlas/Manifest index 3ea3c4f9de26..1a5e909e57c7 100644 --- a/sci-libs/blas-atlas/Manifest +++ b/sci-libs/blas-atlas/Manifest @@ -27,15 +27,16 @@ EBUILD blas-atlas-3.8.0.ebuild 6972 RMD160 92cbaab9269dd4a1efa2741e9730bec922ed9 EBUILD blas-atlas-3.8.2.ebuild 6684 RMD160 1ed4af049074291479e2fcc50b9f522e94e97514 SHA1 a90f8ca025a262489e3e4f9827ae295c306f97b3 SHA256 860ea917bd58d7279011f6c87c62c188ba1b029cba4b3b9dbe40e84010c6484a EBUILD blas-atlas-3.9.21-r1.ebuild 7410 RMD160 f0a0515babbb06ddd289834ff4c7aa574b44136f SHA1 35aebeb3d374df1677cd6ac6c3b9f6318c8fb0bb SHA256 c97fa0672e479425fa3c550c1a90033ae00ed9326b295c907fa4f2f56b0cb114 EBUILD blas-atlas-3.9.21.ebuild 7376 RMD160 77d6cde1c8cdc4da6a0941a0df56925930d5aaf0 SHA1 5320d395d55aac519b15ae671c00c5f6d0316158 SHA256 ff840b98c98dacebac43a24b76fb3e95dd1919dd4a7f13f6698eb02aaa5cff27 -EBUILD blas-atlas-3.9.23-r2.ebuild 8050 RMD160 d2193abe521197eb0ef2bd0da6597d101b18b062 SHA1 470d83a0e482c65497a96b4a66587b5c49f07269 SHA256 bc67728fb6d120bbaa7e9ebc332539a9255232e7dc96b0e8c189fe76959934e0 +EBUILD blas-atlas-3.9.23-r2.ebuild 8015 RMD160 66ee24c15562a0d3f3fa543eb50c53882ba50f13 SHA1 94106fa3ed9c8d4a4b4d954ebe28c5915de58cfc SHA256 d15bc172544d391e5f24b78bbac009a7c64a95bd0412a41a5c7dab1b17a798b4 +EBUILD blas-atlas-3.9.23-r3.ebuild 8242 RMD160 311cc8bb2a71fbc5d75ab2d3275d4217f54e55aa SHA1 75929c25df4eac62c9534d2499ef1629af07166a SHA256 27aae2ab9a5bf41d22a5b5051ac0fff23758f4e14fdbb5702f297bfd663d50c7 EBUILD blas-atlas-3.9.23.ebuild 7485 RMD160 bcc26674658257717d34af3fd5cf8de4f5635a53 SHA1 276c11cc5b929b36503dcb4ba6b3e1f13da79756 SHA256 963e4f468dd4b0fd302ac5d9ebab233da04622d6029d67678a82b67e3cfd0fdd EBUILD blas-atlas-3.9.3.ebuild 7255 RMD160 5780bbdc5c6dcfadae06b26a843e88884418205b SHA1 b13e442086dcc56e00fac6dc517550831087f9c7 SHA256 fb416e2bc9bed3b41d4f2107d97289ca1b730d74d80f1ea5c1f161d601de70d0 -MISC ChangeLog 20675 RMD160 a7dd38ec3838581c13bede37e5a425230283ea11 SHA1 026f01f0d29d151acb9e6dc918d50b5e164a4aa1 SHA256 534a6553901a5ad079ade4ec277161cb17a7c59e74470d470356845281c4ff30 +MISC ChangeLog 20842 RMD160 bfa9c32730c47bb23eff5b85060c67a20a7a8ee8 SHA1 aa0aa318324b1b08f73eeec60f808442d28ab5aa SHA256 5fa6dda7a05576c0e7f390d248688688b5a3c30d04db78d81d8e13e6dbe4034c MISC metadata.xml 156 RMD160 dc078172bfebcb25d69bdf8731714f9cce9d3e36 SHA1 da2b240a255820145b7c83a5c48e45b96b7e9ee6 SHA256 5d22100902db7507a5b5493dd4a66cdb08025faf80a2c0b75e6392315c47f900 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) -iEYEARECAAYFAkvHdS0ACgkQgAnW8HDreRbRMQCffK4tkh6OlaWdzF7dG3ulhB4f -f3kAoMPe/seK8FgV6Pj2kp8y1VJ75BoC -=NeyS +iEYEARECAAYFAkvN8fIACgkQgAnW8HDreRaPtgCgmtPwr5+2ubwMqOfgiaT/QM5E +0wQAnAwX6yqwUPutWx0EJjlQuKEQgyMz +=sybQ -----END PGP SIGNATURE----- diff --git a/sci-libs/blas-atlas/blas-atlas-3.9.23-r2.ebuild b/sci-libs/blas-atlas/blas-atlas-3.9.23-r2.ebuild index 41e155c1291a..b5f0794cdea5 100644 --- a/sci-libs/blas-atlas/blas-atlas-3.9.23-r2.ebuild +++ b/sci-libs/blas-atlas/blas-atlas-3.9.23-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/blas-atlas-3.9.23-r2.ebuild,v 1.1 2010/04/15 20:20:43 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/blas-atlas-3.9.23-r2.ebuild,v 1.2 2010/04/20 18:26:51 jlec Exp $ EAPI="3" @@ -15,7 +15,7 @@ SRC_URI="mirror://sourceforge/math-atlas/${MY_PN}${PV}.tar.bz2 LICENSE="BSD" SLOT="0" -KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" IUSE="doc" RDEPEND="app-admin/eselect-blas diff --git a/sci-libs/blas-atlas/blas-atlas-3.9.23-r3.ebuild b/sci-libs/blas-atlas/blas-atlas-3.9.23-r3.ebuild new file mode 100644 index 000000000000..693d485a62aa --- /dev/null +++ b/sci-libs/blas-atlas/blas-atlas-3.9.23-r3.ebuild @@ -0,0 +1,264 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/blas-atlas-3.9.23-r3.ebuild,v 1.1 2010/04/20 18:26:51 jlec Exp $ + +EAPI="3" + +inherit eutils toolchain-funcs fortran multilib + +DESCRIPTION="Automatically Tuned Linear Algebra Software BLAS implementation" +HOMEPAGE="http://math-atlas.sourceforge.net/" +MY_PN=${PN/blas-/} +PATCH_V="3.9.21" +SRC_URI="mirror://sourceforge/math-atlas/${MY_PN}${PV}.tar.bz2 + mirror://gentoo/${MY_PN}-${PATCH_V}-shared-libs.2.patch.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="doc" + +RDEPEND="app-admin/eselect-blas + app-admin/eselect-cblas + doc? ( app-doc/blas-docs )" +DEPEND="app-admin/eselect-blas + app-admin/eselect-cblas + >=sys-devel/libtool-1.5" + +S="${WORKDIR}/ATLAS" +BLD_DIR="${S}"/gentoo-build +RPATH=/usr/$(get_libdir)/blas + +pkg_setup() { + # icc won't compile (as of icc-10.0.026) + # and will blow out $PORTAGE_TMPDIR + if [[ $(tc-getCC) = icc* ]]; then + eerror "icc compiler is not supported with sci-libs/blas-atlas" + die "blas-atlas won't compile with icc" + fi + + FORTRAN="g77 gfortran ifc" + fortran_pkg_setup + echo + ewarn "Please make sure to disable CPU throttling completely" + ewarn "during the compile of blas-atlas. Otherwise, all atlas" + ewarn "generated timings will be completely random and the" + ewarn "performance of the resulting libraries will be degraded" + ewarn "considerably." + echo + ewarn "For users of <=gcc-4.1 only:" + ewarn "If you experience failing SANITY tests during" + ewarn "atlas' compile please try passing -mfpmath=387; this" + ewarn "option might also result in much better performance" + ewarn "than using then sse instruction set depending on your" + ewarn "CPU." + echo + ewarn "If blas-atlas fails during linking with a message" + ewarn "'relocation R_X86_64_32 .... recompile with -fPIC.'" + ewarn "please re-emerge libtool and then try again." + echo +} + +src_prepare() { + epatch "${DISTDIR}"/${MY_PN}-${PATCH_V}-shared-libs.2.patch.bz2 + epatch "${FILESDIR}"/${MY_PN}-${PV}-ger-fix.patch + epatch "${FILESDIR}"/${MY_PN}-asm-gentoo.patch + + cp "${FILESDIR}"/eselect.{,c}blas.{,threaded-}atlas "${T}"/ + sed -i -e "s:/usr:${EPREFIX}/usr:" \ + "${T}"/eselect.{,c}blas.{,threaded-}atlas || die + if [[ ${CHOST} == *-darwin* ]] ; then + sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \ + "${T}"/eselect.{,c}blas.{,threaded-}atlas || die + sed -e /LIBTOOL/s/libtool/glibtool/ -i CONFIG/src/SpewMakeInc.c + epatch "${FILESDIR}"/${PN}-3.9.3-darwin-make-top.patch + fi + + mkdir "${BLD_DIR}" || die "failed to generate build directory" + cd "${BLD_DIR}" + cp "${FILESDIR}"/war . && chmod a+x war || die "failed to install war" + sed -i -e '1c\#!'"${EPREFIX}"'/bin/bash' war || die +} + +src_configure() { + cd "${BLD_DIR}" + local archselect= + if use amd64 || use ppc64; then + archselect="-b 64" + elif use alpha; then + archselect="" + else + archselect="-b 32" + fi + + # Remove -m64 on alpha, since the compiler doesn't support it + use alpha && sed -i -e 's/-m64//g' "${S}"/CONFIG/src/probe_comp.c + + # unfortunately, atlas-3.9.0 chokes when passed + # x86_64-pc-linux-gnu-gcc and friends instead of + # plain gcc. Hence, we'll have to workaround this + # until it is fixed by upstream + local c_compiler=$(tc-getCC) + if [[ "${c_compiler}" == *gcc* ]]; then + c_compiler="gcc" + fi + + ../configure \ + --cc="${c_compiler}" \ + --cflags="${CFLAGS}" \ + --prefix="${ED}"/usr \ + --libdir="${ED}"/usr/$(get_libdir)/atlas \ + --incdir="${ED}"/usr/include \ + -C ac "${c_compiler}" -F ac "${CFLAGS}" \ + -C if ${FORTRANC} -F if "${FFLAGS:-'-O2'}" \ + -Ss pmake "\$(MAKE) ${MAKEOPTS}" \ + -Si cputhrchk 0 ${archselect} \ + || die "configure failed" + + # fix LDFLAGS + sed -e "s|LDFLAGS =.*|LDFLAGS = ${LDFLAGS}|" \ + -i "${BLD_DIR}"/Make.inc +} + +src_compile() { + cd "${BLD_DIR}" + + # atlas does its own parallel builds + # — and it fails parallel make, bug #294172 + emake -j1 || die "emake failed" + + emake -j1 \ + LIBDIR=$(get_libdir) \ + RPATH="${EPREFIX}/${RPATH}"/atlas \ + shared || die "failed to build shared libraries" + + # build shared libraries of threaded libraries if applicable + if [[ -d gentoo/libptcblas.a ]]; then + emake -j1 \ + LIBDIR=$(get_libdir) \ + RPATH="${EPREFIX}${RPATH}"/threaded-atlas \ + ptshared || die "failed to build threaded shared libraries" + fi +} + +src_test() { + # make check does not work because + # we don't build lapack libs + for i in F77 C; do + einfo "Testing ${i} interface" + cd "${BLD_DIR}"/interfaces/blas/${i}/testing + make sanity_test || die "emake tests for ${i} failed" + if [[ -d "${BLD_DIR}"/gentoo/libptf77blas.a ]]; then + make ptsanity_test || die "emake tests threaded for ${i}failed" + fi + done + echo "Timing ATLAS" + cd "${BLD_DIR}" + emake time || die "emake time failed" +} + +src_install () { + dodir "${RPATH}"/atlas + cd "${BLD_DIR}"/gentoo/libs + cp -P libatlas* "${ED}"/usr/$(get_libdir) \ + || die "Failed to install libatlas" + + # pkgconfig files + local extlibs="-lm" + local threadlibs + [[ ${FORTRANC} == gfortran ]] && extlibs="${extlibs} -lgfortran" + [[ ${FORTRANC} == g77 ]] && extlibs="${extlibs} -lg2c" + cp "${FILESDIR}"/blas.pc.in blas.pc + cp "${FILESDIR}"/cblas.pc.in cblas.pc + sed -i \ + -e "s:=/usr:=${EPREFIX}/usr:" \ + -e "s:@LIBDIR@:$(get_libdir)/blas/atlas:" \ + -e "s:@PV@:${PV}:" \ + -e "s:@EXTLIBS@:${extlibs}:g" \ + -e "s:@THREADLIBS@:${threadlibs}:g" \ + *blas.pc || die "sed *blas.pc failed" + + cp -P *blas* "${ED}/${RPATH}"/atlas \ + || die "Failed to install blas/cblas" + + ESELECT_PROF=atlas + eselect blas add $(get_libdir) "${T}"/eselect.blas.atlas ${ESELECT_PROF} + eselect cblas add $(get_libdir) "${T}"/eselect.cblas.atlas ${ESELECT_PROF} + + if [[ -d "${BLD_DIR}"/gentoo/threaded-libs ]]; then + dodir "${RPATH}"/threaded-atlas + cd "${BLD_DIR}"/gentoo/threaded-libs + + # pkgconfig files + cp "${FILESDIR}"/blas.pc.in blas.pc + cp "${FILESDIR}"/cblas.pc.in cblas.pc + threadlibs="-lpthread" + sed -i \ + -e "s:=/usr:=${EPREFIX}/usr:" \ + -e "s:@LIBDIR@:$(get_libdir)/blas/threaded-atlas:" \ + -e "s:@PV@:${PV}:" \ + -e "s:@EXTLIBS@:${extlibs}:g" \ + -e "s:@THREADLIBS@:${threadlibs}:g" \ + *blas.pc || die "sed *blas.pc failed" + + cp -P * "${ED}/${RPATH}"/threaded-atlas \ + || die "Failed to install threaded atlas" + ESELECT_PROF=atlas-threads + + eselect blas add $(get_libdir) "${T}"/eselect.blas.threaded-atlas ${ESELECT_PROF} + eselect cblas add $(get_libdir) "${T}"/eselect.cblas.threaded-atlas ${ESELECT_PROF} + fi + + insinto /usr/include/atlas + doins \ + "${S}"/include/cblas.h \ + "${S}"/include/atlas_misc.h \ + "${S}"/include/atlas_enum.h \ + "${S}"/include/atlas_aux.h \ + || die "failed to install headers" + + # These headers contain the architecture-specific + # optimizations determined by ATLAS. The atlas-lapack build + # is much shorter if they are available, so save them: + doins "${BLD_DIR}"/include/*.h \ + || die "failed to install timing headers" + + sed \ + -e "s:/usr/:${EPREFIX}/usr/:g" \ + -e "s: /usr/lib: ${EPREFIX}/usr/lib:g" \ + -e "s:${EPREFIX}${EPREFIX}:${EPREFIX}:g" \ + -i \ + ${ED}/usr/$(get_libdir)/*.la \ + ${ED}/usr/$(get_libdir)/blas/*/*.la \ + || die + + # some docs + cd "${S}"/doc + dodoc INDEX.txt AtlasCredits.txt ChangeLog || die "dodoc failed" + # atlas specific doc (blas generic docs installed by blas-docs) + if use doc; then + insinto /usr/share/doc/${PF} + doins atlas*pdf cblasqref.pdf || die "doins docs failed" + fi +} + +pkg_postinst() { + for p in blas cblas; do + local current_p=$(eselect ${p} show | cut -d' ' -f2) + # this snippet works around the eselect bug #189942 and makes + # sure that users upgrading from a previous blas-atlas + # version pick up the new pkg-config files + if [[ ${current_p} == ${ESELECT_PROF} \ + || ${current_p} == "threaded-atlas" \ + || -z ${current_p} ]]; then + local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config + [[ -e ${configfile} ]] && rm -f ${configfile} + eselect ${p} set ${ESELECT_PROF} + elog "${p} has been eselected to ${ESELECT_PROF}" + else + elog "Current eselected ${p} is ${current_p}" + elog "To use the ${p} ${ESELECT_PROF} implementation, you have to issue (as root):" + elog "\t eselect ${p} set ${ESELECT_PROF}" + fi + done +}