diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-01-15 13:32:50 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-01-15 13:32:50 +0000 |
commit | e9a6639d3ff614634152e9de2dd9b59be56b4060 (patch) | |
tree | e97c19ff78fd1a65b3506aa23d1fbc7d67cf8aaf /sci-libs/fftw | |
parent | ppc64 stable wrt #348509 (diff) | |
download | gentoo-2-e9a6639d3ff614634152e9de2dd9b59be56b4060.tar.gz gentoo-2-e9a6639d3ff614634152e9de2dd9b59be56b4060.tar.bz2 gentoo-2-e9a6639d3ff614634152e9de2dd9b59be56b4060.zip |
Removed old, restructured double building, fixed openmp check, #340469
(Portage version: 2.2.0_alpha15/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/fftw')
-rw-r--r-- | sci-libs/fftw/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-2.1.5-r5.ebuild | 11 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-2.1.5-r6.ebuild | 144 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-2.1.5-r7.ebuild | 64 |
4 files changed, 42 insertions, 185 deletions
diff --git a/sci-libs/fftw/ChangeLog b/sci-libs/fftw/ChangeLog index 5e8bcf0e2b17..a56fc8395752 100644 --- a/sci-libs/fftw/ChangeLog +++ b/sci-libs/fftw/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sci-libs/fftw -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.106 2010/12/02 21:50:49 jlec Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.107 2011/01/15 13:32:50 jlec Exp $ + + 15 Jan 2011; Justin Lecher <jlec@gentoo.org> fftw-2.1.5-r5.ebuild, + -fftw-2.1.5-r6.ebuild, fftw-2.1.5-r7.ebuild: + Removed old, restructured double building, fixed openmp check, #340469 *fftw-3.2.2-r1 (02 Dec 2010) diff --git a/sci-libs/fftw/fftw-2.1.5-r5.ebuild b/sci-libs/fftw/fftw-2.1.5-r5.ebuild index 9f70b2b73786..117b97ebe6db 100644 --- a/sci-libs/fftw/fftw-2.1.5-r5.ebuild +++ b/sci-libs/fftw/fftw-2.1.5-r5.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r5.ebuild,v 1.17 2010/04/09 18:41:27 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r5.ebuild,v 1.18 2011/01/15 13:32:50 jlec Exp $ inherit eutils flag-o-matic autotools toolchain-funcs @@ -26,16 +26,11 @@ pkg_setup() { if use x86; then is-flag "-fomit-frame-pointer" || append-flags "-fomit-frame-pointer" fi - if use openmp && - [[ $(tc-getCC)$ == *gcc* ]] && - ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] || - ! has_version sys-devel/gcc[openmp] ) - then + if use openmp && [[ $(tc-getCC) == *gcc* ]] && ! $(tc-has-openmp); then ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 " ewarn "If you want to build fftw with OpenMP, abort now," ewarn "and switch CC to an OpenMP capable compiler" ewarn "Otherwise the configure script will select POSIX threads." - epause 5 fi use openmp && [[ $(tc-getCC)$ == icc* ]] && append-ldflags $(no-as-needed) } diff --git a/sci-libs/fftw/fftw-2.1.5-r6.ebuild b/sci-libs/fftw/fftw-2.1.5-r6.ebuild deleted file mode 100644 index 5229c3872a2a..000000000000 --- a/sci-libs/fftw/fftw-2.1.5-r6.ebuild +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r6.ebuild,v 1.4 2010/07/01 06:58:03 grobian Exp $ - -EAPI="3" - -inherit autotools eutils flag-o-matic toolchain-funcs - -DESCRIPTION="Fast C library for the Discrete Fourier Transform" -SRC_URI="http://www.fftw.org/${P}.tar.gz" -HOMEPAGE="http://www.fftw.org" - -DEPEND="mpi? ( virtual/mpi )" -RDEPEND="${DEPEND}" - -SLOT="2.1" -LICENSE="GPL-2" -IUSE="doc float fortran mpi openmp threads" - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" - -pkg_setup() { - # this one is reported to cause trouble on pentium4 m series - filter-mfpmath "sse" - - # here I need (surprise) to increase optimization: - # --enable-i386-hacks requires -fomit-frame-pointer to work properly - if use x86; then - is-flag "-fomit-frame-pointer" || append-flags "-fomit-frame-pointer" - fi - if use openmp && - [[ $(tc-getCC)$ == *gcc* ]] && - ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] || - ! has_version sys-devel/gcc[openmp] ) - then - ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 " - ewarn "If you want to build fftw with OpenMP, abort now," - ewarn "and switch CC to an OpenMP capable compiler" - ewarn "Otherwise the configure script will select POSIX threads." - fi - use openmp && [[ $(tc-getCC)$ == icc* ]] && append-ldflags $(no-as-needed) -} - -src_prepare() { - # doc suggests installing single and double precision versions - # via separate compilations. will do in two separate source trees - # since some sed'ing is done during the build - # (?if --enable-type-prefix is set?) - - epatch "${FILESDIR}"/${P}-as-needed.patch - epatch "${FILESDIR}"/${P}-configure.in.patch - epatch "${FILESDIR}"/${P}-no-test.patch - - # fix info files - for infofile in doc/fftw*info*; do - cat >> ${infofile} <<-EOF - INFO-DIR-SECTION Libraries - START-INFO-DIR-ENTRY - * fftw: (fftw). ${DESCRIPTION} - END-INFO-DIR-ENTRY - EOF - done - - eautoreconf - - cd "${WORKDIR}" - cp -R ${P} ${P}-double - mv ${P} ${P}-single -} - -src_configure() { - local myconf=" - --enable-shared - --enable-type-prefix - --enable-vec-recurse - $(use_enable fortran) - $(use_enable mpi) - $(use_enable x86 i386-hacks)" - if use openmp; then - myconf="${myconf} - --enable-threads - --with-openmp" - elif use threads; then - myconf="${myconf} - --enable-threads - --without-openmp" - else - myconf="${myconf} - --disable-threads - --without-openmp" - fi - cd "${S}-single" - econf ${myconf} --enable-float || die "econf for float failed" - - cd "${S}-double" - econf ${myconf} || die "econf for double failed" -} - -src_compile() { - cd "${S}-single" - emake || die "emake for float failed" - - cd "${S}-double" - emake || die "emake for double failed" -} - -src_test() { - cd "${S}-single" - emake -j1 check || die "emake check single failed" - cd "${S}-double" - emake -j1 check || die "emake check double failed" -} - -src_install () { - # both builds are installed in the same place - # libs are distinguished by prefix (s or d), see docs for details - - cd "${S}-single" - emake DESTDIR="${D}" install || die "emake install float failed" - - cd "${S}-double" - emake DESTDIR="${D}" install || die "emake install double failed" - - insinto /usr/include - doins fortran/fftw_f77.i || die "doins failed" - dodoc AUTHORS ChangeLog NEWS TODO README README.hacks || die "dodoc failed" - use doc && dohtml doc/* - - if use float; then - for f in "${ED}"/usr/{include,$(get_libdir)}/*sfft*; do - ln -s $(basename ${f}) ${f/sfft/fft} - done - for f in "${ED}"/usr/{include,$(get_libdir)}/*srfft*; do - ln -s $(basename ${f}) ${f/srfft/rfft} - done - else - for f in "${ED}"/usr/{include,$(get_libdir)}/*dfft*; do - ln -s $(basename ${f}) ${f/dfft/fft} - done - for f in "${ED}"/usr/{include,$(get_libdir)}/*drfft*; do - ln -s $(basename ${f}) ${f/drfft/rfft} - done - fi -} diff --git a/sci-libs/fftw/fftw-2.1.5-r7.ebuild b/sci-libs/fftw/fftw-2.1.5-r7.ebuild index 625f5a00b148..f4a7e20fb115 100644 --- a/sci-libs/fftw/fftw-2.1.5-r7.ebuild +++ b/sci-libs/fftw/fftw-2.1.5-r7.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r7.ebuild,v 1.1 2010/11/03 07:02:32 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r7.ebuild,v 1.2 2011/01/15 13:32:50 jlec Exp $ EAPI="3" @@ -28,11 +28,7 @@ pkg_setup() { if use x86; then is-flag "-fomit-frame-pointer" || append-flags "-fomit-frame-pointer" fi - if use openmp && - [[ $(tc-getCC)$ == *gcc* ]] && - ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] || - ! has_version sys-devel/gcc[openmp] ) - then + if use openmp && [[ $(tc-getCC) == *gcc* ]] && ! $(tc-has-openmp); then ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 " ewarn "If you want to build fftw with OpenMP, abort now," ewarn "and switch CC to an OpenMP capable compiler" @@ -71,6 +67,7 @@ src_prepare() { } src_configure() { + local dir local myconf=" --enable-shared --enable-type-prefix @@ -91,42 +88,47 @@ src_configure() { --disable-threads --without-openmp" fi - cd "${S}-single" - econf ${myconf} \ - --enable-float \ - --with-gcc=$(tc-getCC) \ - || die "econf for float failed" - - cd "${S}-double" - econf ${myconf} \ - --with-gcc=$(tc-getCC) \ - || die "econf for double failed" + + for dir in "${S}-single" "${S}-double" + do + einfo "Running configuration in ${dir}" + cd ${dir} + econf ${myconf} \ + --enable-float \ + --with-gcc=$(tc-getCC) + done } src_compile() { - cd "${S}-single" - emake || die "emake for float failed" - - cd "${S}-double" - emake || die "emake for double failed" + local dir + for dir in "${S}-single" "${S}-double" + do + einfo "Running compilation in ${dir}" + cd ${dir} + emake || die "emake failed in ${dir}" + done } src_test() { - cd "${S}-single" - emake -j1 check || die "emake check single failed" - cd "${S}-double" - emake -j1 check || die "emake check double failed" + local dir + for dir in "${S}-single" "${S}-double" + do + einfo "Running tests in ${dir}" + cd ${dir} + emake -j1 check || die "test failed in ${dir}" + done } src_install () { # both builds are installed in the same place # libs are distinguished by prefix (s or d), see docs for details - cd "${S}-single" - emake DESTDIR="${D}" install || die "emake install float failed" - - cd "${S}-double" - emake DESTDIR="${D}" install || die "emake install double failed" + local dir + for dir in "${S}-single" "${S}-double" + do + cd ${dir} + emake DESTDIR="${D}" install || die "installation failed in ${dir}" + done insinto /usr/include doins fortran/fftw_f77.i || die "doins failed" |