diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/fftw |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/fftw')
-rw-r--r-- | sci-libs/fftw/Manifest | 22 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-2.1.5-r8.ebuild | 156 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-2.1.5-r9.ebuild | 137 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-3.3.4.ebuild | 162 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-3.3.5-r1.ebuild | 193 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-3.3.5-r2.ebuild | 177 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-3.3.6_p1.ebuild | 181 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-3.3.6_p2.ebuild | 180 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-9999.ebuild | 185 | ||||
-rw-r--r-- | sci-libs/fftw/files/fftw-2.1.5-as-needed.patch | 112 | ||||
-rw-r--r-- | sci-libs/fftw/files/fftw-2.1.5-cc.patch | 19 | ||||
-rw-r--r-- | sci-libs/fftw/files/fftw-2.1.5-configure.in.patch | 226 | ||||
-rw-r--r-- | sci-libs/fftw/files/fftw-2.1.5-no-test.patch | 33 | ||||
-rw-r--r-- | sci-libs/fftw/files/fftw-2.1.5-parallel-tests.patch | 105 | ||||
-rw-r--r-- | sci-libs/fftw/files/fftw-2.1.5-texinfo5.1.patch | 21 | ||||
-rw-r--r-- | sci-libs/fftw/metadata.xml | 26 |
16 files changed, 1935 insertions, 0 deletions
diff --git a/sci-libs/fftw/Manifest b/sci-libs/fftw/Manifest new file mode 100644 index 000000000000..cc919f1cb2a0 --- /dev/null +++ b/sci-libs/fftw/Manifest @@ -0,0 +1,22 @@ +AUX fftw-2.1.5-as-needed.patch 4082 SHA256 ff1e90a0437ced34155708b0e5ceec15ae7546eb3f2fb32e0fcc7815ad2d4380 SHA512 9dc1b911bc8360b43c8b604cb3e823abd7c958e4c0aba596daa5fbd2c79d774f3a925d5fa253361f6b87c0e40be57e615bb47c52766acaf8be4bf1ef0787bc0b WHIRLPOOL 92a049fd4972682e6b44f708f005f7bfb028bb85016de0d7cf7959da43b388666cc36f0faefa8418147b6ff4d99a5a46598fd1229dc66c135cb5c2c341262512 +AUX fftw-2.1.5-cc.patch 546 SHA256 52b2ba8a140e46e9a1f1c71d8e85faaac70e6d783ba8e45f4423ba6f70f04dbe SHA512 f21ba12ec727a023d41df95b24d03273d416888b21f56dde8d2a256d15b9543a091a02f7100e86196bb7a38492d470b58ab293fed58a21e2417e2427f786368a WHIRLPOOL a333539e1bf7feee517818f9c9c7375d1c71a7792aa1662d18ba6727ab517c444a68375c0e1210f736f0e9dcd297f3ab64273777f5064afe3b724985dff4a641 +AUX fftw-2.1.5-configure.in.patch 8135 SHA256 43b156f0625fb0be177960eba3ad85786b9322df0ae1ff4484fc733b3317bb9d SHA512 ac8bdb6772c64b30a1da4308e612f09bca579b5608f8ddf216ee40db63a458218a7cc7c5df7655c2572a6e2c0c5e497a5e81dc4bdbd3f3e86c153b7e160cfcfd WHIRLPOOL e2635015977c3f9ca89238d68c27eb0a4c84b9725f52421e578a26720b96042310ddbf8657eb4164015eeb3f77ab0e5a970329657fef579058c8555ec116cadd +AUX fftw-2.1.5-no-test.patch 1028 SHA256 0c7fcea676ecfcca1d91b99e69b38d419b177715791a6e43764f510d99059a2c SHA512 cfc1efd51c5bd7d7f90ae823cb255192a9935ec436eeea60de41854348ce5ff5eb451a1ef00314caacbdc61f3a8b6f701693859237c9254e555ec817ee30cd45 WHIRLPOOL cd3ae7616b7e680792d54e35c0b7385561094fcd72df75e60463c0f54e9f857c9d3764b3e66a6734c1b7732c91bc3dc36406c2eba29e7393c129927bdd54e373 +AUX fftw-2.1.5-parallel-tests.patch 3720 SHA256 b8502275cdb7e07c5fd47f0d7de0bb59e390857200aaa6607ea028a2e15a1ae5 SHA512 2e02c69dcbae6c11b8bdf0edb1a49c9754c9a599438e1073eb2bcff04c52c38c1e76eb352f21957a0518d61ee2e32d302e5624e234d28344fc99036313394d3e WHIRLPOOL e95407297d223597d4dba8e9cecf426947bd87ef88a4c758011c235fa8f05cfd0e8a1e4195068f63c318671280f53ac6425c5c77f04d5f4d4a724eee963502cd +AUX fftw-2.1.5-texinfo5.1.patch 596 SHA256 00e61fd86bd0e742efb72212c005615964da4eade40c3024443504e50b9c7186 SHA512 71dd3c13784f9bd1b518827a6784e2619145377cbc88764c69830519096f61863140b90c8138d6a65e3994487cb12cd06baba826d48735c2cbddc1d2320a4214 WHIRLPOOL 9f382908ab6dac7c41c80c7e88a391bb2a71d1c3d8b0e38d153a5fdd8f48b46aee4a216860b599495275ef0f1e2c1501dbe2c12598eae0c637bb16f0878ce2a0 +DIST fftw-2.1.5.tar.gz 1256888 SHA256 f8057fae1c7df8b99116783ef3e94a6a44518d49c72e2e630c24b689c6022630 SHA512 8724a7f66aa19b271aa0ffb0e3762919f08082ac4400f52d11b50aef9b9d23a7d4fc5d6b2eae0ac166e2bb30a4d38a52c878e8bf8e24aba01ab1c3ddf5ebec15 WHIRLPOOL 2ea64d246c12e14962b93e05411c5f06dd193a887acb3fe5e7f63231a1a2f1f21b3a41f75951e18c332b25105865633c87150f2107169f5487b6b9983b968e10 +DIST fftw-3.3.4.tar.gz 3940427 SHA256 8f0cde90929bc05587c3368d2f15cd0530a60b8a9912a8e2979a72dbe5af0982 SHA512 1ee2c7bec3657f6846e63c6dfa71410563830d2b951966bf0123bd8f4f2f5d6b50f13b76d9a7b0eae70e44856f829ca6ceb3d080bb01649d1572c9f3f68e8eb1 WHIRLPOOL 2a5733f5537ff55a1830994431f1750dd790a4df3e8b3d1e9018c1afba2c5172f4e456eaee1c3427a2b170d23b6928da462e067a6f4e94792cfc7ff1cbc38938 +DIST fftw-3.3.5.tar.gz 4148447 SHA256 8ecfe1b04732ec3f5b7d279fdb8efcad536d555f9d1e8fabd027037d45ea8bcf SHA512 a81f02d884cfe4171fab479b0e5ec76eceb9c5da6d4eda1f89281b7e1efa2d8176c9ba87051595c402889eb32172d216ce40eb2bef41289c646f01002fb4ba8e WHIRLPOOL dc044c73dbb1b9fa595a0f1e71b5958d3e023c38cd6b1bb8a486adcad506fc6e411a3d8d0657a32346ff6636cf25396bd9bcdbcd720e8c799f6e40f1e04bfd65 +DIST fftw-3.3.6-pl1.tar.gz 4179807 SHA256 1ef4aa8427d9785839bc767f3eb6a84fcb5e9a37c31ed77a04e7e047519a183d SHA512 e2ed33fcb068a36a841bbd898d12ceec74f4e9a0a349e7c55959878b50224a69a0f87656347dad7d7e1448ebc50d28d8f34f6da7992c43072d26942fd97c0134 WHIRLPOOL 8ccd7a3dfc49be2053e8c3f334ea348a3455bcb6f84a636cd531f15822abd3452cfa50cd0bca4295b1dc922897e38613cf5cb865e60b83e9e357af396f2d9c99 +DIST fftw-3.3.6-pl2.tar.gz 4185261 SHA256 a5de35c5c824a78a058ca54278c706cdf3d4abba1c56b63531c2cb05f5d57da2 SHA512 e130309856752a1555b6d151c4d0ce9eb4b2c208fff7e3e89282ca8ef6104718f865cbb5e9c4af4367b3615b69b0d50fd001a26d74fd5324ff2faabe14fe3472 WHIRLPOOL 92b55473e1aaca71e07869c12b5f0e9b94e21317c1d8e37c2f0ae5e4ff1bb803a7f8c8104ad52ede56211964a6374e4cb054809ca2df9b22306bb1ca89e2bfa7 +EBUILD fftw-2.1.5-r8.ebuild 3877 SHA256 c7b7cb1a24c756921f83650cbaa434c837072d1a2d3a0f334a1df4e4aea4935b SHA512 5448e80c07ae6e299c8055752b2b9f0110d2b2df0010b5743fd041e3ea4263f74fbfad38137b170453cdb27f45923c480549456847a7aa001c47469e25119a76 WHIRLPOOL f5bcdd9b9df0874bd33cf03d753c7fcb1527be8e01aa2035baee432e9fe2c40f5f78e79154c00c6cf623aeda61da20fb1e041f029e0615d183e9a805a11f67ed +EBUILD fftw-2.1.5-r9.ebuild 3141 SHA256 a4ad424e4622a761d63e7d21ba7750647d30e6280f76d7b8bb24101eaad95838 SHA512 24787a4634e03f6a82ca6b14a43f30c7de70b88d844acd9261d2799ff09d19e693f83246209765bc8a174ebf5a9aec2900b1226c5d20034c9237eacd295bab2e WHIRLPOOL 6ef531a2e5be71ce60c1b4138e4cb3c983f62b40d10e0068212ca9f7a80ba20a4085fd63fe4e710e4b2742c72617f825f753f4af5d2817efae5979bcdbf9ef20 +EBUILD fftw-3.3.4.ebuild 4653 SHA256 f476e5b17cfd969bb78844880baa83e230ec86c618e4f8a4390b2e3c70c41bab SHA512 58b3d1b6ddbde93e41b4a3a3f6770919f381198de6702850850bff2cdff5148933e2c6a609b1058fab4f79364e9bea209aa3d2fc79a385696f90e0edaab24e78 WHIRLPOOL d919ac6a883f3363a0d134c14a6692b704fefb7c9c5921b5f5ed8812a00f73d224f114ac2139872600681bf6c73a0c81678855086f8830a717658dd8db07c3b6 +EBUILD fftw-3.3.5-r1.ebuild 4911 SHA256 44c12c8e5713ec78fb410308b5af9fafeb4e2d6e18486861d070905f0cfdb4d0 SHA512 a38bbd733d1f439f98ab2305a0e3c699c3e533f4444082a9326de21a7938c3b9d8cba395d6e0f695657534903caf6c098d655b88537a3c2f6e2a12e9fc609012 WHIRLPOOL 90f2322de1b52c3ad1f3a515dfc2f6ab71e0cbaf0d891ba83a95ecc27db626e062da6a39ff358e66a29b72b64e369d510ee29cebb862dfae351767f22188748d +EBUILD fftw-3.3.5-r2.ebuild 4460 SHA256 a1a5135af5ac106657ef6ac0b964c0151b22dc6c5956b33244ac6a19a5163e85 SHA512 b1ca80a4cab4f957ae0003df69dca2815881961ae9a0d16e4d088f36c6c6e9c315b7b8b2e2681b5d91c483952a42128bca12f47448eed676537b0b4f967a0dbc WHIRLPOOL 9b827ab174946cd093430f1c49701fd395d7e31a817c64fb81505b64d041d24a62b3178da019547460690368ceb4da3d9f835d977b69d5d57d9a06b0c62a22a5 +EBUILD fftw-3.3.6_p1.ebuild 4521 SHA256 3c415cec938036dd94354fcd76014925ee38f090278955520066383e69076631 SHA512 86b81e656cb1e7ac27bb6acb7f6410566120ff9977f8f2ebd0c361f6835c6084ea7e0779f78a84b4fef24f04e584db854822b374f461ec75959cf4424b14a28c WHIRLPOOL 8b885827bb7c62331972e72914286be5484891c06562965695f4b2be1724240d8e65a1212eb2593941d5ff2e85aa42a297ca4ca494dfd0316cf634f5ca9a8ef3 +EBUILD fftw-3.3.6_p2.ebuild 4434 SHA256 23468b92430e27d49e6b97d04ddc1141545da22c9fde2897f5cf1c7f1a42f33d SHA512 246e61630168ba8b4abf1fc2b9cf90a7b4c05f9c5ccedb0d562f70571eef240ce151e0426f0838bce1340f38246b6c4e2bced2d7cc6bafac3b0bd2d33d8a273c WHIRLPOOL 2b03ea78ca5cecf6b0af060f2bf8f2f773b7364a788600d682f3d522f321a006df72bb67d7bafde9691590145f03b6d5d863259b0d8b27d02fe45d8a3779c03d +EBUILD fftw-9999.ebuild 4741 SHA256 bd185c79ad8d1bc55722017d23b9d0f70c12225eb0df5cc60106e702f418f010 SHA512 f7af96b322dd7f965cdc392e53c634ab8e503a29d7008da724984ac4b93f65e1361461190ee1fe2e620bd349139324564fa13f452aca875098d34583e2fc0f00 WHIRLPOOL d078e24918aa403747c708437b8b9ab020638a31d79b600c5b59364d215ac9fef78d72fd86d5f25587108fbea6444096b5f9a3abda02afe4b26332cc4674db94 +MISC ChangeLog 5081 SHA256 3f41774677e5d9a887c6009745cbfe4ba73065c3805e7eb8ec7909fb650a1c24 SHA512 f05421138dcb24a50964f27e74092d9907d7ff86adccdd8619e0b13626add217877d3ca684c324dde7552b769a809c68e92d33a652f5f63ac3674f5968a28409 WHIRLPOOL 754b9f1ffceeeabc75badb06821a4a7287e808642aed066719191a11c6eb6c37bd4ba3af7be1a571750abcf9e77218883d17167304f4075538504df7ca4ea76e +MISC ChangeLog-2015 29549 SHA256 d0310914da994f706201ef395a30b4742fff3381472b591d45b18092007263d3 SHA512 0eef906b94217e969f6e79ba4a1cccf779a862137a8925085118291791f4d122be0aa4fbc8aa344aee8f3b0dcfd7949808676c70d21d3c70acd5d470d6b6ecf1 WHIRLPOOL 2218a1307e055d25628f8713ca7074e61d3a113494e269c046a18771dfc71099857ad32f2ff6c0c282cf0d8e091196daeeec886949b6de04c91693f948bd727a +MISC metadata.xml 1088 SHA256 24d7d7a2af6ba9f09552198457dd744b5d70a1b14f8c72086585d622995daad7 SHA512 df52860deccf7e7139affaad8cfb837b7f3770a22c621f668db24d916cee5b27acc1486884797e8d0881d8887874627b919816f8245101982e963a8db43f3c98 WHIRLPOOL 9b4d86568bee24ef436929ae87380a08b9d73a1e1f1cd8b9629752646d1ccb4ffed4e98cae08ff0775c067f61dd81b529a6521b1d8f9878fb2374ff2c868e709 diff --git a/sci-libs/fftw/fftw-2.1.5-r8.ebuild b/sci-libs/fftw/fftw-2.1.5-r8.ebuild new file mode 100644 index 000000000000..e889eba4d768 --- /dev/null +++ b/sci-libs/fftw/fftw-2.1.5-r8.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +FORTRAN_NEEDED=fortran + +inherit autotools eutils flag-o-matic fortran-2 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 static-libs" + +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +pkg_setup() { + use openmp && FORTRAN_NEED_OPENMP="1" + fortran-2_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* ]] && ! 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." + 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 \ + "${FILESDIR}"/${P}-configure.in.patch \ + "${FILESDIR}"/${P}-no-test.patch \ + "${FILESDIR}"/${P}-cc.patch \ + "${FILESDIR}"/${P}-texinfo5.1.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 + + sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.in || die + + eautoreconf + + cd "${WORKDIR}" + cp -R ${P} ${P}-double + mv ${P} ${P}-single + ln -s ${P}-single ${P} +} + +src_configure() { + local myconf=" + --enable-shared + --enable-type-prefix + --enable-vec-recurse + $(use_enable fortran) + $(use_enable mpi) + $(use_enable static-libs static) + $(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 \ + --with-gcc=$(tc-getCC) + + cd "${S}-double" + econf ${myconf} \ + --with-gcc=$(tc-getCC) +} + +src_compile() { + local dir + for dir in "${S}-single" "${S}-double" + do + einfo "Running compilation in ${dir}" + emake -C ${dir} + done +} + +src_test() { + local dir + for dir in "${S}-single" "${S}-double" + do + einfo "Running tests in ${dir}" + emake -C ${dir} -j1 check + done +} + +src_install () { + # both builds are installed in the same place + # libs are distinguished by prefix (s or d), see docs for details + + local dir + for dir in "${S}-single" "${S}-double" + do + emake DESTDIR="${D}" -C ${dir} install + done + + insinto /usr/include + doins fortran/fftw_f77.i + dodoc AUTHORS ChangeLog NEWS TODO README README.hacks + 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-r9.ebuild b/sci-libs/fftw/fftw-2.1.5-r9.ebuild new file mode 100644 index 000000000000..75696fb361ba --- /dev/null +++ b/sci-libs/fftw/fftw-2.1.5-r9.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +FORTRAN_NEEDED=fortran + +inherit autotools flag-o-matic fortran-2 multibuild toolchain-funcs + +DESCRIPTION="Fast C library for the Discrete Fourier Transform" +HOMEPAGE="http://www.fftw.org" +SRC_URI="http://www.fftw.org/${P}.tar.gz" + +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +LICENSE="GPL-2+" +SLOT="2.1" +IUSE="doc float fortran mpi openmp threads static-libs" + +RDEPEND="mpi? ( virtual/mpi )" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-as-needed.patch + "${FILESDIR}"/${P}-configure.in.patch + "${FILESDIR}"/${P}-no-test.patch + "${FILESDIR}"/${P}-cc.patch + "${FILESDIR}"/${P}-texinfo5.1.patch + "${FILESDIR}"/${P}-parallel-tests.patch +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp; then + tc-check-openmp + FORTRAN_NEED_OPENMP=1 + fi + + fortran-2_pkg_setup + + MULTIBUILD_VARIANTS=( single double ) +} + +src_prepare() { + default + + # fix info files + local infofile + for infofile in doc/fftw*info*; do + cat >> ${infofile} <<-EOF || die + INFO-DIR-SECTION Libraries + START-INFO-DIR-ENTRY + * fftw: (fftw). ${DESCRIPTION} + END-INFO-DIR-ENTRY + EOF + done + + mv configure.{in,ac} || die + sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die + + eautoreconf + + # 'FAQ' is actually a dir and causes issues with einstalldocs + rm -r FAQ || die + + multibuild_copy_sources +} + +fftw_src_configure() { + local myconf=( + --with-gcc=$(tc-getCC) + --enable-shared + --enable-type-prefix + --enable-vec-recurse + $(use_enable fortran) + $(use_enable mpi) + $(use_enable static-libs static) + $(use_enable x86 i386-hacks) + $(use_with openmp) + ) + + if use openmp || use threads; then + myconf+=( --enable-threads ) + else + myconf+=( --disable-threads ) + fi + + [[ $MULTIBUILD_VARIANT == single ]] && myconf+=( --enable-float ) + + econf "${myconf[@]}" +} + +src_configure() { + # 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 + use openmp && [[ $(tc-getCC)$ == icc* ]] && append-ldflags $(no-as-needed) + + multibuild_foreach_variant run_in_build_dir fftw_src_configure +} + +src_compile() { + multibuild_foreach_variant run_in_build_dir default_src_compile +} + +src_test() { + multibuild_foreach_variant run_in_build_dir default_src_test +} + +src_install () { + use doc && HTML_DOCS=( doc/*.{html,gif} ) + multibuild_foreach_variant run_in_build_dir default_src_install + + doheader fortran/fftw_f77.i + + create_fftw_symlinks() { + local i f letter=$1 + for i in fft rfft; do + for f in "${ED%/}"/usr/{include,$(get_libdir)}/*${letter}${i}*; do + ln -s $(basename ${f}) ${f/${letter}${i}/${i}} || die + done + done + } + create_fftw_symlinks $(usex float s d) + + if ! use static-libs; then + find "${D}" -name '*.la' -delete || die + fi +} diff --git a/sci-libs/fftw/fftw-3.3.4.ebuild b/sci-libs/fftw/fftw-3.3.4.ebuild new file mode 100644 index 000000000000..9174c474ef42 --- /dev/null +++ b/sci-libs/fftw/fftw-3.3.4.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +FORTRAN_NEEDED=fortran + +inherit autotools-multilib eutils flag-o-matic fortran-2 multibuild toolchain-funcs versionator + +DESCRIPTION="Fast C library for the Discrete Fourier Transform" +HOMEPAGE="http://www.fftw.org/" + +if [[ ${PV} = *9999 ]]; then + inherit git-2 + EGIT_REPO_URI="https://github.com/FFTW/fftw3.git" + KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86" + AUTOTOOLS_AUTORECONF=1 +else + SRC_URI="http://www.fftw.org/${P}.tar.gz" + KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +fi + +LICENSE="GPL-2+" +SLOT="3.0/3" +IUSE="altivec cpu_flags_x86_avx doc cpu_flags_x86_fma3 cpu_flags_x86_fma4 fortran mpi neon openmp quad cpu_flags_x86_sse cpu_flags_x86_sse2 static-libs test threads zbus" + +RDEPEND=" + mpi? ( virtual/mpi ) + abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r2 + !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )" +DEPEND="${RDEPEND} + test? ( dev-lang/perl )" + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp; then + if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then + ewarn "OpenMP is not available in your current selected gcc" + die "need openmp capable gcc" + fi + FORTRAN_NEED_OPENMP=1 + fi + + fortran-2_pkg_setup + + MULTIBUILD_VARIANTS=( single double longdouble ) + if use quad; then + if [[ $(tc-getCC) == *gcc ]] && ! version_is_at_least 4.6 $(gcc-version); then + ewarn "quad precision only available for gcc >= 4.6" + die "need quad precision capable gcc" + fi + MULTIBUILD_VARIANTS+=( quad ) + fi +} + +src_prepare() { + # fix info file for category directory + [[ ${PV} = *9999 ]] || sed -i \ + -e 's/Texinfo documentation system/Libraries/' \ + doc/fftw3."info" || die "failed to fix info file" + + autotools-utils_src_prepare +} + +src_configure() { + local x + + # filter -Os according to docs + replace-flags -Os -O2 + + my_configure() { + #a bit hacky improve after #483758 is solved + local x=${BUILD_DIR%-*} + x=${x##*-} + # there is no abi_x86_32 port of virtual/mpi right now + local enable_mpi=$(use_enable mpi) + multilib_is_native_abi || enable_mpi="--disable-mpi" + + #jlec reported USE=quad on abi_x86_32 has too less registers + #stub Makefiles + if [[ ${ABI} == x86 && ${x} == quad ]]; then + mkdir -p "${BUILD_DIR}/tests" || die + echo "all: ;" > "${BUILD_DIR}/Makefile" || die + echo "install: ;" >> "${BUILD_DIR}/Makefile" || die + echo "smallcheck: ;" > "${BUILD_DIR}/tests/Makefile" || die + return 0 + fi + + local myeconfargs=( + $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma) + $(use_enable fortran) + $(use_enable zbus mips-zbus-timer) + $(use_enable threads) + $(use_enable openmp) + ) + if [[ $x == single ]]; then + #altivec, sse, single-paired only work for single + myeconfargs+=( + --enable-single + $(use_enable altivec) + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_sse sse) + ${enable_mpi} + $(use_enable neon) + ) + elif [[ $x == double ]]; then + myeconfargs+=( + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_sse2 sse2) + ${enable_mpi} + ) + elif [[ $x == longdouble ]]; then + myeconfargs+=( + --enable-long-double + ${enable_mpi} + ) + elif [[ $x == quad ]]; then + #quad does not support mpi + myeconfargs+=( --enable-quad-precision ) + else + die "${x} precision not implemented in this ebuild" + fi + + autotools-utils_src_configure + } + + multibuild_foreach_variant multilib_parallel_foreach_abi my_configure +} + +src_compile() { + multibuild_foreach_variant autotools-multilib_src_compile +} + +src_test () { + # We want this to be a reasonably quick test, but that is still hard... + ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine" + # Do not increase the number of threads, it will not help your performance + #local testbase="perl check.pl --nthreads=1 --estimate" + # ${testbase} -${p}d || die "Failure: $n" + multibuild_foreach_variant autotools-multilib_src_compile -C tests smallcheck +} + +src_install () { + local u x + DOCS=( AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS ) + HTML_DOCS=( doc/html/ ) + + multibuild_foreach_variant multilib_foreach_abi autotools-utils_src_install + + if use doc; then + dodoc doc/*.pdf + insinto /usr/share/doc/${PF}/faq + doins -r doc/FAQ/fftw-faq.html/* + else + rm -r "${ED}"/usr/share/doc/${PF}/html + fi + + for x in "${ED}"/usr/lib*/pkgconfig/*.pc; do + for u in $(usev mpi) $(usev threads) $(usex openmp omp ""); do + sed -e "s|-lfftw3[flq]\?|&_$u &|" "$x" > "${x%.pc}_$u.pc" || die + done + done +} diff --git a/sci-libs/fftw/fftw-3.3.5-r1.ebuild b/sci-libs/fftw/fftw-3.3.5-r1.ebuild new file mode 100644 index 000000000000..8b95ce8b8ba9 --- /dev/null +++ b/sci-libs/fftw/fftw-3.3.5-r1.ebuild @@ -0,0 +1,193 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +FORTRAN_NEEDED=fortran + +inherit flag-o-matic fortran-2 toolchain-funcs versionator multibuild multilib-minimal + +DESCRIPTION="Fast C library for the Discrete Fourier Transform" +HOMEPAGE="http://www.fftw.org/" + +if [[ ${PV} = *9999 ]]; then + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/FFTW/fftw3.git" +else + SRC_URI="http://www.fftw.org/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +fi + +LICENSE="GPL-2+" +SLOT="3.0/3" +IUSE="altivec cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse cpu_flags_x86_sse2 doc fortran mpi neon openmp quad static-libs test threads zbus" + +RDEPEND=" + mpi? ( virtual/mpi )" +DEPEND="${RDEPEND} + test? ( dev-lang/perl )" + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp; then + if ! tc-has-openmp; then + ewarn "OpenMP is not available in your current selected compiler" + + if tc-is-clang; then + ewarn "OpenMP support in sys-devel/clang is provided by sys-libs/libomp," + ewarn "which you will need to build ${CATEGORY}/${PN} with USE=\"openmp\"" + fi + + die "need openmp capable compiler" + fi + FORTRAN_NEED_OPENMP=1 + fi + + fortran-2_pkg_setup + + MULTIBUILD_VARIANTS=( single double longdouble ) + if use quad; then + if tc-is-gcc && ! version_is_at_least 4.6 $(gcc-version); then + ewarn "quad precision only available for gcc >= 4.6" + die "need quad precision capable gcc" + fi + MULTIBUILD_VARIANTS+=( quad ) + fi +} + +src_prepare() { + default + + # fix info file for category directory + if [[ ${PV} = *9999 ]]; then + sed -i -e + 's/Texinfo documentation system/Libraries/' \ + doc/fftw3."info" || die "failed to fix info file" + + eautoreconf + fi +} + +multilib_src_configure() { + # there is no abi_x86_32 port of virtual/mpi right now, bug 519700 + local enable_mpi=$(multilib_native_use_enable mpi) + + # jlec reported USE=quad on abi_x86_32 has too few registers + # stub Makefiles + if [[ ${MULTILIB_ABI_FLAG} == abi_x86_32 && ${MULTIBUILD_ID} == quad-* ]]; then + mkdir -p "${BUILD_DIR}/tests" || die + echo "all: ;" > "${BUILD_DIR}/Makefile" || die + echo "install: ;" >> "${BUILD_DIR}/Makefile" || die + echo "smallcheck: ;" > "${BUILD_DIR}/tests/Makefile" || die + return 0 + fi + + local myconf=( + --enable-shared + $(use_enable static-libs static) + $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma) + $(use_enable fortran) + $(use_enable zbus mips-zbus-timer) + $(use_enable threads) + $(use_enable openmp) + ) + case "${MULTIBUILD_ID}" in + single-*) + #altivec, sse, single-paired only work for single + myconf+=( + --enable-single + $(use_enable altivec) + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_sse sse) + $(use_enable cpu_flags_x86_sse2 sse2) + $(use_enable neon) + ${enable_mpi} + ) + ;; + + double-*) + myconf+=( + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_sse2 sse2) + ${enable_mpi} + ) + ;; + + longdouble-*) + myconf+=( + --enable-long-double + ${enable_mpi} + ) + ;; + + quad-*) + #quad does not support mpi + myconf+=( + --enable-quad-precision + ) + ;; + + *) + die "${MULTIBUILD_ID%-*} precision not implemented in this ebuild" + ;; + esac + + ECONF_SOURCE="${S}" econf "${myconf[@]}" +} + +src_configure() { + multibuild_foreach_variant multilib-minimal_src_configure +} + +src_compile() { + multibuild_foreach_variant multilib-minimal_src_compile +} + +multilib_src_test() { + emake -C tests smallcheck +} + +src_test() { + # We want this to be a reasonably quick test, but that is still hard... + ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine" + # Do not increase the number of threads, it will not help your performance + # local testbase="perl check.pl --nthreads=1 --estimate" + # ${testbase} -${p}d || die "Failure: $n" + + multibuild_foreach_variant multilib-minimal_src_test +} + +src_install() { + DOCS=( AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS ) + HTML_DOCS=( doc/html/ ) + + #workaroud for bug #590446 + my_abi_install() { + pushd "${BUILD_DIR}" >/dev/null || die + emake DESTDIR="${D}" install + popd >/dev/null || die + } + multibuild_foreach_variant multilib_foreach_abi my_abi_install + + einstalldocs + + if use doc; then + dodoc doc/*.pdf + docinto faq + dodoc -r doc/FAQ/fftw-faq.html/. + else + rm -r "${ED}"/usr/share/doc/${PF}/html || die + fi + + local x + for x in "${ED}"/usr/lib*/pkgconfig/*.pc; do + local u + for u in $(usev mpi) $(usev threads) $(usex openmp omp ""); do + sed -e "s|-lfftw3[flq]\?|&_${u} &|" "$x" > "${x%.pc}_${u}.pc" || die + done + done + + # fftw uses pkg-config to record its private dependencies + find "${ED}" -name '*.la' -delete || die +} diff --git a/sci-libs/fftw/fftw-3.3.5-r2.ebuild b/sci-libs/fftw/fftw-3.3.5-r2.ebuild new file mode 100644 index 000000000000..07c2837181f1 --- /dev/null +++ b/sci-libs/fftw/fftw-3.3.5-r2.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +FORTRAN_NEEDED=fortran + +inherit flag-o-matic fortran-2 toolchain-funcs versionator multibuild multilib-minimal + +DESCRIPTION="Fast C library for the Discrete Fourier Transform" +HOMEPAGE="http://www.fftw.org/" + +if [[ ${PV} = *9999 ]]; then + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/FFTW/fftw3.git" +else + SRC_URI="http://www.fftw.org/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +fi + +LICENSE="GPL-2+" +SLOT="3.0/3" +IUSE="altivec cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse cpu_flags_x86_sse2 doc fortran mpi neon openmp quad static-libs test threads zbus" + +RDEPEND=" + mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + test? ( dev-lang/perl )" + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp; then + tc-check-openmp + FORTRAN_NEED_OPENMP=1 + fi + + fortran-2_pkg_setup + + MULTIBUILD_VARIANTS=( single double longdouble ) + if use quad; then + if tc-is-gcc && ! version_is_at_least 4.6 $(gcc-version); then + ewarn "quad precision only available for gcc >= 4.6" + die "need quad precision capable gcc" + fi + MULTIBUILD_VARIANTS+=( quad ) + fi +} + +src_prepare() { + default + + # fix info file for category directory + if [[ ${PV} = *9999 ]]; then + sed -i -e + 's/Texinfo documentation system/Libraries/' \ + doc/fftw3."info" || die "failed to fix info file" + + eautoreconf + fi +} + +multilib_src_configure() { + # jlec reported USE=quad on abi_x86_32 has too few registers + # stub Makefiles + if [[ ${MULTILIB_ABI_FLAG} == abi_x86_32 && ${MULTIBUILD_ID} == quad-* ]]; then + mkdir -p "${BUILD_DIR}/tests" || die + echo "all: ;" > "${BUILD_DIR}/Makefile" || die + echo "install: ;" >> "${BUILD_DIR}/Makefile" || die + echo "smallcheck: ;" > "${BUILD_DIR}/tests/Makefile" || die + return 0 + fi + + local myconf=( + --enable-shared + $(use_enable static-libs static) + $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma) + $(use_enable fortran) + $(use_enable zbus mips-zbus-timer) + $(use_enable threads) + $(use_enable openmp) + ) + case "${MULTIBUILD_ID}" in + single-*) + # altivec, sse, single-paired only work for single + myconf+=( + --enable-single + $(use_enable altivec) + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_sse sse) + $(use_enable cpu_flags_x86_sse2 sse2) + $(use_enable neon) + $(use_enable mpi) + ) + ;; + + double-*) + myconf+=( + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_sse2 sse2) + $(use_enable mpi) + ) + ;; + + longdouble-*) + myconf+=( + --enable-long-double + $(use_enable mpi) + ) + ;; + + quad-*) + # quad does not support mpi + myconf+=( + --enable-quad-precision + ) + ;; + + *) + die "${MULTIBUILD_ID%-*} precision not implemented in this ebuild" + ;; + esac + + ECONF_SOURCE="${S}" econf "${myconf[@]}" MPICC="$(tc-getCC -lmpi)" +} + +src_configure() { + multibuild_foreach_variant multilib-minimal_src_configure +} + +src_compile() { + multibuild_foreach_variant multilib-minimal_src_compile +} + +multilib_src_test() { + emake -C tests smallcheck +} + +src_test() { + # We want this to be a reasonably quick test, but that is still hard... + ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine" + # Do not increase the number of threads, it will not help your performance + # local testbase="perl check.pl --nthreads=1 --estimate" + # ${testbase} -${p}d || die "Failure: $n" + + multibuild_foreach_variant multilib-minimal_src_test +} + +src_install() { + DOCS=( AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS ) + HTML_DOCS=( doc/html/ ) + + multibuild_foreach_variant multilib-minimal_src_install + + if use doc; then + dodoc doc/*.pdf + docinto faq + dodoc -r doc/FAQ/fftw-faq.html/. + else + rm -r "${ED}"usr/share/doc/${PF}/html || die + fi + + local x + for x in "${ED}"usr/lib*/pkgconfig/*.pc; do + local u + for u in $(usev mpi) $(usev threads) $(usex openmp omp ""); do + sed -e "s|-lfftw3[flq]\?|&_${u} &|" "$x" > "${x%.pc}_${u}.pc" || die + done + done + + # fftw uses pkg-config to record its private dependencies + find "${ED}" -name '*.la' -delete || die +} diff --git a/sci-libs/fftw/fftw-3.3.6_p1.ebuild b/sci-libs/fftw/fftw-3.3.6_p1.ebuild new file mode 100644 index 000000000000..5b793c7a5ea2 --- /dev/null +++ b/sci-libs/fftw/fftw-3.3.6_p1.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +FORTRAN_NEEDED=fortran + +inherit flag-o-matic fortran-2 toolchain-funcs versionator multibuild multilib-minimal + +DESCRIPTION="Fast C library for the Discrete Fourier Transform" +HOMEPAGE="http://www.fftw.org/" + +MY_P=${PN}-${PV/_p/-pl} + +if [[ ${PV} = *9999 ]]; then + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/FFTW/fftw3.git" +else + SRC_URI="http://www.fftw.org/${PN}-${PV/_p/-pl}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +fi + +LICENSE="GPL-2+" +SLOT="3.0/3" +IUSE="altivec cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse cpu_flags_x86_sse2 doc fortran mpi neon openmp quad static-libs test threads zbus" + +RDEPEND=" + mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + test? ( dev-lang/perl )" + +S=${WORKDIR}/${MY_P} + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp; then + tc-check-openmp + FORTRAN_NEED_OPENMP=1 + fi + + fortran-2_pkg_setup + + MULTIBUILD_VARIANTS=( single double longdouble ) + if use quad; then + if tc-is-gcc && ! version_is_at_least 4.6 $(gcc-version); then + ewarn "quad precision only available for gcc >= 4.6" + die "need quad precision capable gcc" + fi + MULTIBUILD_VARIANTS+=( quad ) + fi +} + +src_prepare() { + default + + # fix info file for category directory + if [[ ${PV} = *9999 ]]; then + sed -i -e + 's/Texinfo documentation system/Libraries/' \ + doc/fftw3."info" || die "failed to fix info file" + + eautoreconf + fi +} + +multilib_src_configure() { + # jlec reported USE=quad on abi_x86_32 has too few registers + # stub Makefiles + if [[ ${MULTILIB_ABI_FLAG} == abi_x86_32 && ${MULTIBUILD_ID} == quad-* ]]; then + mkdir -p "${BUILD_DIR}/tests" || die + echo "all: ;" > "${BUILD_DIR}/Makefile" || die + echo "install: ;" >> "${BUILD_DIR}/Makefile" || die + echo "smallcheck: ;" > "${BUILD_DIR}/tests/Makefile" || die + return 0 + fi + + local myconf=( + --enable-shared + $(use_enable static-libs static) + $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma) + $(use_enable fortran) + $(use_enable zbus mips-zbus-timer) + $(use_enable threads) + $(use_enable openmp) + ) + case "${MULTIBUILD_ID}" in + single-*) + # altivec, sse, single-paired only work for single + myconf+=( + --enable-single + $(use_enable altivec) + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_sse sse) + $(use_enable cpu_flags_x86_sse2 sse2) + $(use_enable neon) + $(use_enable mpi) + ) + ;; + + double-*) + myconf+=( + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_sse2 sse2) + $(use_enable mpi) + ) + ;; + + longdouble-*) + myconf+=( + --enable-long-double + $(use_enable mpi) + ) + ;; + + quad-*) + # quad does not support mpi + myconf+=( + --enable-quad-precision + ) + ;; + + *) + die "${MULTIBUILD_ID%-*} precision not implemented in this ebuild" + ;; + esac + + ECONF_SOURCE="${S}" econf "${myconf[@]}" MPICC="$(tc-getCC -lmpi)" +} + +src_configure() { + multibuild_foreach_variant multilib-minimal_src_configure +} + +src_compile() { + multibuild_foreach_variant multilib-minimal_src_compile +} + +multilib_src_test() { + emake -C tests smallcheck +} + +src_test() { + # We want this to be a reasonably quick test, but that is still hard... + ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine" + # Do not increase the number of threads, it will not help your performance + # local testbase="perl check.pl --nthreads=1 --estimate" + # ${testbase} -${p}d || die "Failure: $n" + + multibuild_foreach_variant multilib-minimal_src_test +} + +src_install() { + DOCS=( AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS ) + HTML_DOCS=( doc/html/ ) + + multibuild_foreach_variant multilib-minimal_src_install + + if use doc; then + dodoc doc/*.pdf + docinto faq + dodoc -r doc/FAQ/fftw-faq.html/. + else + rm -r "${ED}"usr/share/doc/${PF}/html || die + fi + + local x + for x in "${ED}"usr/lib*/pkgconfig/*.pc; do + local u + for u in $(usev mpi) $(usev threads) $(usex openmp omp ""); do + sed -e "s|-lfftw3[flq]\?|&_${u} &|" "$x" > "${x%.pc}_${u}.pc" || die + done + done + + # fftw uses pkg-config to record its private dependencies + find "${ED}" -name '*.la' -delete || die +} diff --git a/sci-libs/fftw/fftw-3.3.6_p2.ebuild b/sci-libs/fftw/fftw-3.3.6_p2.ebuild new file mode 100644 index 000000000000..df20a22aee45 --- /dev/null +++ b/sci-libs/fftw/fftw-3.3.6_p2.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +FORTRAN_NEEDED=fortran + +inherit flag-o-matic fortran-2 toolchain-funcs versionator multibuild multilib-minimal + +DESCRIPTION="Fast C library for the Discrete Fourier Transform" +HOMEPAGE="http://www.fftw.org/" + +MY_P=${PN}-${PV/_p/-pl} + +if [[ ${PV} = *9999 ]]; then + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/FFTW/fftw3.git" +else + SRC_URI="http://www.fftw.org/${PN}-${PV/_p/-pl}.tar.gz" + KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +fi + +LICENSE="GPL-2+" +SLOT="3.0/3" +IUSE="altivec cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse cpu_flags_x86_sse2 doc fortran mpi neon openmp quad static-libs test threads zbus" + +RDEPEND=" + mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + test? ( dev-lang/perl )" + +S=${WORKDIR}/${MY_P} +HTML_DOCS=( doc/html/. ) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp; then + tc-check-openmp + FORTRAN_NEED_OPENMP=1 + fi + + fortran-2_pkg_setup + + MULTIBUILD_VARIANTS=( single double longdouble ) + if use quad; then + if ! tc-is-gcc; then + ewarn "quad precision only available for gcc >= 4.6" + die "need quad precision capable gcc" + fi + MULTIBUILD_VARIANTS+=( quad ) + fi +} + +src_prepare() { + default + + # fix info file for category directory + if [[ ${PV} = *9999 ]]; then + sed -i -e + 's/Texinfo documentation system/Libraries/' \ + doc/fftw3."info" || die "failed to fix info file" + + eautoreconf + fi +} + +multilib_src_configure() { + # jlec reported USE=quad on abi_x86_32 has too few registers + # stub Makefiles + if [[ ${MULTILIB_ABI_FLAG} == abi_x86_32 && ${MULTIBUILD_ID} == quad-* ]]; then + mkdir -p "${BUILD_DIR}/tests" || die + echo "all: ;" > "${BUILD_DIR}/Makefile" || die + echo "install: ;" >> "${BUILD_DIR}/Makefile" || die + echo "smallcheck: ;" > "${BUILD_DIR}/tests/Makefile" || die + return 0 + fi + + local myconf=( + --enable-shared + $(use_enable static-libs static) + $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma) + $(use_enable fortran) + $(use_enable zbus mips-zbus-timer) + $(use_enable threads) + $(use_enable openmp) + ) + case "${MULTIBUILD_ID}" in + single-*) + # altivec, sse, single-paired only work for single + myconf+=( + --enable-single + $(use_enable altivec) + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_sse sse) + $(use_enable cpu_flags_x86_sse2 sse2) + $(use_enable neon) + $(use_enable mpi) + ) + ;; + + double-*) + myconf+=( + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_sse2 sse2) + $(use_enable mpi) + ) + ;; + + longdouble-*) + myconf+=( + --enable-long-double + $(use_enable mpi) + ) + ;; + + quad-*) + # quad does not support mpi + myconf+=( + --enable-quad-precision + ) + ;; + + *) + die "${MULTIBUILD_ID%-*} precision not implemented in this ebuild" + ;; + esac + + ECONF_SOURCE="${S}" econf "${myconf[@]}" MPICC="$(tc-getCC -lmpi)" +} + +src_configure() { + multibuild_foreach_variant multilib-minimal_src_configure +} + +src_compile() { + multibuild_foreach_variant multilib-minimal_src_compile +} + +multilib_src_test() { + emake -C tests smallcheck +} + +src_test() { + # We want this to be a reasonably quick test, but that is still hard... + ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine" + # Do not increase the number of threads, it will not help your performance + # local testbase="perl check.pl --nthreads=1 --estimate" + # ${testbase} -${p}d || die "Failure: $n" + + multibuild_foreach_variant multilib-minimal_src_test +} + +src_install() { + multibuild_foreach_variant multilib-minimal_src_install + dodoc CONVENTIONS + + if use doc; then + dodoc doc/*.pdf + docinto faq + dodoc -r doc/FAQ/fftw-faq.html/. + else + rm -r "${ED%/}"/usr/share/doc/${PF}/html || die + fi + + local x + for x in "${ED%/}"/usr/lib*/pkgconfig/*.pc; do + local u + for u in $(usev mpi) $(usev threads) $(usex openmp omp ""); do + sed -e "s|-lfftw3[flq]\?|&_${u} &|" "$x" > "${x%.pc}_${u}.pc" || die + done + done + + # fftw uses pkg-config to record its private dependencies + find "${D}" -name '*.la' -delete || die +} diff --git a/sci-libs/fftw/fftw-9999.ebuild b/sci-libs/fftw/fftw-9999.ebuild new file mode 100644 index 000000000000..53961f54350e --- /dev/null +++ b/sci-libs/fftw/fftw-9999.ebuild @@ -0,0 +1,185 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +FORTRAN_NEEDED=fortran + +inherit flag-o-matic fortran-2 toolchain-funcs versionator multibuild multilib-minimal + +DESCRIPTION="Fast C library for the Discrete Fourier Transform" +HOMEPAGE="http://www.fftw.org/" + +if [[ ${PV} = *9999 ]]; then + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/FFTW/fftw3.git" +else + SRC_URI="http://www.fftw.org/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +fi + +LICENSE="GPL-2+" +SLOT="3.0/3" +IUSE="altivec cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse cpu_flags_x86_sse2 doc fortran mpi neon openmp quad static-libs test threads zbus" + +RDEPEND=" + mpi? ( virtual/mpi )" +DEPEND="${RDEPEND} + test? ( dev-lang/perl )" + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp; then + if ! tc-has-openmp; then + ewarn "OpenMP is not available in your current selected compiler" + + if tc-is-clang; then + ewarn "OpenMP support in sys-devel/clang is provided by sys-libs/libomp," + ewarn "which you will need to build ${CATEGORY}/${PN} with USE=\"openmp\"" + fi + + die "need openmp capable compiler" + fi + FORTRAN_NEED_OPENMP=1 + fi + + fortran-2_pkg_setup + + MULTIBUILD_VARIANTS=( single double longdouble ) + if use quad; then + if tc-is-gcc && ! version_is_at_least 4.6 $(gcc-version); then + ewarn "quad precision only available for gcc >= 4.6" + die "need quad precision capable gcc" + fi + MULTIBUILD_VARIANTS+=( quad ) + fi +} + +src_prepare() { + default + + # fix info file for category directory + if [[ ${PV} = *9999 ]]; then + sed -i -e + 's/Texinfo documentation system/Libraries/' \ + doc/fftw3."info" || die "failed to fix info file" + + eautoreconf + fi +} + +multilib_src_configure() { + # there is no abi_x86_32 port of virtual/mpi right now, bug 519700 + local enable_mpi=$(multilib_native_use_enable mpi) + + # jlec reported USE=quad on abi_x86_32 has too few registers + # stub Makefiles + if [[ ${MULTILIB_ABI_FLAG} == abi_x86_32 && ${MULTIBUILD_ID} == quad-* ]]; then + mkdir -p "${BUILD_DIR}/tests" || die + echo "all: ;" > "${BUILD_DIR}/Makefile" || die + echo "install: ;" >> "${BUILD_DIR}/Makefile" || die + echo "smallcheck: ;" > "${BUILD_DIR}/tests/Makefile" || die + return 0 + fi + + local myconf=( + --enable-shared + $(use_enable static-libs static) + $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma) + $(use_enable fortran) + $(use_enable zbus mips-zbus-timer) + $(use_enable threads) + $(use_enable openmp) + ) + case "${MULTIBUILD_ID}" in + single-*) + #altivec, sse, single-paired only work for single + myconf+=( + --enable-single + $(use_enable altivec) + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_sse sse) + $(use_enable cpu_flags_x86_sse2 sse2) + $(use_enable neon) + ${enable_mpi} + ) + ;; + + double-*) + myconf+=( + $(use_enable cpu_flags_x86_avx avx) + $(use_enable cpu_flags_x86_avx2 avx2) + $(use_enable cpu_flags_x86_sse2 sse2) + ${enable_mpi} + ) + ;; + + longdouble-*) + myconf+=( + --enable-long-double + ${enable_mpi} + ) + ;; + + quad-*) + #quad does not support mpi + myconf+=( + --enable-quad-precision + ) + ;; + + *) + die "${MULTIBUILD_ID%-*} precision not implemented in this ebuild" + ;; + esac + + ECONF_SOURCE="${S}" econf "${myconf[@]}" +} + +src_configure() { + multibuild_foreach_variant multilib-minimal_src_configure +} + +src_compile() { + multibuild_foreach_variant multilib-minimal_src_compile +} + +multilib_src_test() { + emake -C tests smallcheck +} + +src_test() { + # We want this to be a reasonably quick test, but that is still hard... + ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine" + # Do not increase the number of threads, it will not help your performance + # local testbase="perl check.pl --nthreads=1 --estimate" + # ${testbase} -${p}d || die "Failure: $n" + + multibuild_foreach_variant multilib-minimal_src_test +} + +src_install() { + DOCS=( AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS ) + HTML_DOCS=( doc/html/ ) + + multibuild_foreach_variant multilib-minimal_src_install + + if use doc; then + dodoc doc/*.pdf + docinto faq + dodoc -r doc/FAQ/fftw-faq.html/. + else + rm -r "${ED}"/usr/share/doc/${PF}/html || die + fi + + local x + for x in "${ED}"/usr/lib*/pkgconfig/*.pc; do + local u + for u in $(usev mpi) $(usev threads) $(usex openmp omp ""); do + sed -e "s|-lfftw3[flq]\?|&_${u} &|" "$x" > "${x%.pc}_${u}.pc" || die + done + done + + # fftw uses pkg-config to record its private dependencies + find "${ED}" -name '*.la' -delete || die +} diff --git a/sci-libs/fftw/files/fftw-2.1.5-as-needed.patch b/sci-libs/fftw/files/fftw-2.1.5-as-needed.patch new file mode 100644 index 000000000000..63f46dccc4fd --- /dev/null +++ b/sci-libs/fftw/files/fftw-2.1.5-as-needed.patch @@ -0,0 +1,112 @@ +--- a/rfftw/Makefile.am ++++ b/rfftw/Makefile.am +@@ -18,6 +18,7 @@ + rfftw.h + + lib@FFTW_PREFIX@rfftw_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ ++lib@FFTW_PREFIX@rfftw_la_LIBADD = ../fftw/lib@FFTW_PREFIX@fftw.la + MAINTAINERCLEANFILES = $(CODELETS) rconfig.c + DISTCLEANFILES = srfftw.h drfftw.h + +--- a/threads/Makefile.am ++++ b/threads/Makefile.am +@@ -28,6 +28,10 @@ + -version-info @SHARED_VERSION_INFO@ \ + -rpath $(libdir) + ++lib@FFTW_PREFIX@fftw_threads_la_LIBADD = \ ++ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la \ ++ @THREADLIBS@ ++ + @FFTW_PREFIX1@fftw_threads.h: fftw_threads.h + rm -f $@ + sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/fftw_threads.h > $@ +@@ -49,6 +53,11 @@ + -version-info @SHARED_VERSION_INFO@ \ + -rpath $(libdir) + ++lib@FFTW_PREFIX@rfftw_threads_la_LIBADD = \ ++ $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ ++ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la \ ++ @THREADLIBS@ ++ + @FFTW_PREFIX1@rfftw_threads.h: rfftw_threads.h + rm -f $@ + sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/rfftw_threads.h > $@ +--- a/mpi/Makefile.am ++++ b/mpi/Makefile.am +@@ -28,6 +28,9 @@ + -version-info @SHARED_VERSION_INFO@ \ + -rpath $(libdir) + ++lib@FFTW_PREFIX@fftw_mpi_la_LIBADD = \ ++ @MPILIBS@ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la ++ + @FFTW_PREFIX1@fftw_mpi.h: fftw_mpi.h + rm -f $@ + sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/fftw_mpi.h > $@ +@@ -39,32 +42,38 @@ + -version-info @SHARED_VERSION_INFO@ \ + -rpath $(libdir) + +-@FFTW_PREFIX1@rfftw_mpi.h: rfftw_mpi.h ++lib@FFTW_PREFIX@rfftw_mpi_la_LIBADD = \ ++ @MPILIBS@ \ ++ $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ ++ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la ++ ++@FFTW_PREFIX1@rfftw_mpi.h: rfftw_mpi.h + rm -f $@ + sed 's/\"fftw/\"@FFTW_PREFIX@fftw/g;s/\"rfftw/\"@FFTW_PREFIX@rfftw/g' $(srcdir)/rfftw_mpi.h > $@ + + CLEANFILES = @FFTW_PREFIX1@fftw_mpi.h @FFTW_PREFIX1@rfftw_mpi.h + + test_sched_SOURCES = test_sched.c +-test_sched_LDADD = lib@FFTW_PREFIX@fftw_mpi.la \ +- $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la @MPILIBS@ ++test_sched_LDADD = @MPILIBS@ lib@FFTW_PREFIX@fftw_mpi.la \ ++ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la + + test_transpose_mpi_SOURCES = test_transpose_mpi.c +-test_transpose_mpi_LDADD = lib@FFTW_PREFIX@fftw_mpi.la \ +- $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la @MPILIBS@ ++test_transpose_mpi_LDADD = @MPILIBS@ lib@FFTW_PREFIX@fftw_mpi.la \ ++ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la + + fftw_mpi_test_SOURCES = fftw_mpi_test.c + fftw_mpi_test_LDADD = ../tests/test_main.o \ ++ @MPILIBS@ \ + lib@FFTW_PREFIX@fftw_mpi.la \ +- $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la @MPILIBS@ ++ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la + + rfftw_mpi_test_SOURCES = rfftw_mpi_test.c + rfftw_mpi_test_LDADD = ../tests/test_main.o \ ++ @MPILIBS@ \ + lib@FFTW_PREFIX@rfftw_mpi.la \ + lib@FFTW_PREFIX@fftw_mpi.la \ + $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ +- $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la \ +- @MPILIBS@ ++ $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la + + # for some reason, automake tries to use autoheader in order to + # generate config.h.in, and fails because config.h.in is GNU-lly +--- a/mpi/test_sched.c ++++ b/mpi/test_sched.c +@@ -27,6 +27,8 @@ + int **sched; + int npes = -1, sortpe = -1, steps; + ++ /* needed to link with proper mpi libs */ ++ MPI_Init(&argc,&argv); + if (argc >= 2) { + npes = atoi(argv[1]); + if (npes <= 0) { +@@ -121,5 +123,6 @@ + } + } + ++ MPI_Finalize(); + return 0; + } diff --git a/sci-libs/fftw/files/fftw-2.1.5-cc.patch b/sci-libs/fftw/files/fftw-2.1.5-cc.patch new file mode 100644 index 000000000000..aa5c6db038c8 --- /dev/null +++ b/sci-libs/fftw/files/fftw-2.1.5-cc.patch @@ -0,0 +1,19 @@ +--- a/configure.in ++++ b/configure.in +@@ -25,6 +25,8 @@ + AC_ARG_WITH(gcc, [ --with-gcc use gcc instead of the native compiler cc], ok=$withval, ok=no) + if test "$ok" = "yes"; then + CC=gcc ++else ++ CC=$withval + fi + + AC_ARG_ENABLE(float, [ --enable-float compile fftw for single precision], enable_float=$enableval, enable_float=no) +@@ -96,6 +96,7 @@ + AM_PROG_LIBTOOL + AC_CHECK_PROG(PERL, perl, perl, echo perl) + AC_SUBST(PERL) ++AC_SUBST(CC) + + dnl ----------------------------------------------------------------------- + diff --git a/sci-libs/fftw/files/fftw-2.1.5-configure.in.patch b/sci-libs/fftw/files/fftw-2.1.5-configure.in.patch new file mode 100644 index 000000000000..7abe3e751d5d --- /dev/null +++ b/sci-libs/fftw/files/fftw-2.1.5-configure.in.patch @@ -0,0 +1,226 @@ +--- a/configure.in ++++ b/configure.in +@@ -1,6 +1,8 @@ ++ + dnl Process this file with autoconf to produce a configure script. + AC_INIT(fftw/planner.c) + AM_INIT_AUTOMAKE(fftw, 2.1.5) ++AM_MAINTAINER_MODE + + dnl This is the version info according to the libtool versioning system. + dnl It does *not* correspond to the release number. +@@ -27,7 +29,7 @@ + + AC_ARG_ENABLE(float, [ --enable-float compile fftw for single precision], enable_float=$enableval, enable_float=no) + if test "$enable_float" = "yes"; then +- AC_DEFINE(FFTW_ENABLE_FLOAT) ++ AC_DEFINE(FFTW_ENABLE_FLOAT,1,[Compile fftw for single precision]) + fi + + FFTW_PREFIX="" +@@ -56,27 +58,27 @@ + + AC_ARG_ENABLE(i386-hacks, [ --enable-i386-hacks enable gcc/x86 specific performance hacks], ok=$enableval, ok=no) + if test "$ok" = "yes"; then +- AC_DEFINE(FFTW_ENABLE_I386_HACKS) ++ AC_DEFINE(FFTW_ENABLE_I386_HACKS,1,[Enable x86 specific performance hacks]) + fi + + AC_ARG_ENABLE(pentium-timer, [ --enable-pentium-timer enable high resolution Pentium timer], ok=$enableval, ok=no) + if test "$ok" = "yes"; then +- AC_DEFINE(FFTW_ENABLE_PENTIUM_TIMER) ++ AC_DEFINE(FFTW_ENABLE_PENTIUM_TIMER,1,[Enable high resolution Pentium timer]) + fi + + AC_ARG_ENABLE(debug, [ --enable-debug compile fftw with extra runtime checks for debugging], ok=$enableval, ok=no) + if test "$ok" = "yes"; then +- AC_DEFINE(FFTW_DEBUG) ++ AC_DEFINE(FFTW_DEBUG,1,[Compile with extra rutime checks for debugging]) + fi + + AC_ARG_ENABLE(debug-alignment, [ --enable-debug-alignment enable runtime checks for alignment on x86], ok=$enableval, ok=no) + if test "$ok" = "yes"; then +- AC_DEFINE(FFTW_DEBUG_ALIGNMENT) ++ AC_DEFINE(FFTW_DEBUG_ALIGNMENT,1,[Enable rutime checks for alignment on x86]) + fi + + AC_ARG_ENABLE(vec-recurse, [ --enable-vec-recurse enable experimental performance hack], ok=$enableval, ok=no) + if test "$ok" = "yes"; then +- AC_DEFINE(FFTW_ENABLE_VECTOR_RECURSE) ++ AC_DEFINE(FFTW_ENABLE_VECTOR_RECURSE,1,[Enable experimental performance hack]) + fi + + dnl ----------------------------------------------------------------------- +@@ -90,7 +92,6 @@ + ACX_PROG_CC_EGCS + AC_PROG_INSTALL + AC_PROG_MAKE_SET +-AC_PROG_RANLIB + AC_PROG_LN_S + AM_PROG_LIBTOOL + AC_CHECK_PROG(PERL, perl, perl, echo perl) +@@ -115,7 +116,7 @@ + dnl ----------------------------------------------------------------------- + + AC_SUBST(SHARED_VERSION_INFO) +-AC_DEFINE_UNQUOTED(FFTW_VERSION, "$VERSION") ++AC_DEFINE_UNQUOTED(FFTW_VERSION, "$VERSION",[Fftw Version]) + + # Get the version number that will be appended to shared libraries: + SHARED_VERSION=`echo $SHARED_VERSION_INFO | awk -F':' '{ print $1 "." $3 "." $2 }'` +@@ -123,7 +124,7 @@ + + ACX_PROG_CC_MAXOPT + +-ACX_GCC_ALIGNS_STACK(AC_DEFINE(FFTW_GCC_ALIGNS_STACK), [ ++ACX_GCC_ALIGNS_STACK(AC_DEFINE(FFTW_GCC_ALIGNS_STACK,1,[Gcc align stack]), [ + if test "$enable_i386_hacks" = yes; then + if test "${acx_gcc_stack_align_bug-no}" = yes; then + # we are using a gcc with a stack alignment bug, and we should +@@ -183,7 +184,7 @@ + AC_TRY_LINK([#include <math.h> + ], if (!isnan(3.14159)) isnan(2.7183);, ok=yes, ok=no) + if test "$ok" = "yes"; then +- AC_DEFINE(HAVE_ISNAN) ++ AC_DEFINE(HAVE_ISNAN,1,[Have isnan]) + fi + AC_MSG_RESULT(${ok}) + +@@ -196,7 +197,7 @@ + #endif + ], [hrtime_t foobar;], ok=yes, ok=no) + if test "$ok" = "yes"; then +- AC_DEFINE(HAVE_HRTIME_T) ++ AC_DEFINE(HAVE_HRTIME_T,1,[Have hrtime_t type]) + fi + AC_MSG_RESULT(${ok}) + +@@ -205,7 +206,7 @@ + + AC_ARG_ENABLE(unsafe-mulmod, [ --enable-unsafe-mulmod risk overflow for large prime sizes], enable_unsafe_mulmod=$enableval, enable_unsafe_mulmod=no) + if test "$enable_unsafe_mulmod" = "yes"; then +- AC_DEFINE(FFTW_ENABLE_UNSAFE_MULMOD) ++ AC_DEFINE(FFTW_ENABLE_UNSAFE_MULMOD,1,[Risk overflow for lar prime sizes]) + fi + + +@@ -221,15 +222,25 @@ + FFTW_THREADS_INCLUDELIST="" + FFTW_THREADS_PROGLIST="" + THREADLIBS="" ++omp_enabler=unknown + if test "$enable_threads" = "yes"; then + if test "$with_openmp"x != nox; then + AC_MSG_CHECKING(how to enable OpenMP) +- omp_enabler=unknown + save_CFLAGS="$CFLAGS" + CFLAGS="$save_CFLAGS -omp" + AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS=" " + omp_enabler="$CC -omp") + if test -z "$THREADLIBS"; then ++ CFLAGS="$save_CFLAGS -fopenmp" ++ AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS="-lgomp" ++ omp_enabler="$CC -fopenmp") ++ fi ++ if test -z "$THREADLIBS"; then ++ CFLAGS="$save_CFLAGS -openmp" ++ AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS=" " ++ omp_enabler="$CC -openmp") ++ fi ++ if test -z "$THREADLIBS"; then + CFLAGS="$save_CFLAGS -mp" + AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS=" " + omp_enabler="$CC -mp") +@@ -240,68 +251,70 @@ + omp_enabler="automatic") + fi + AC_MSG_RESULT($omp_enabler) +- if test -z "$THREADLIBS"; then +- AC_MSG_ERROR([don't know how to enable OpenMP]) ++ if test x"$omp_enabler" != x"unknown"; then ++ AC_DEFINE(FFTW_USING_OPENMP_THREADS,1,[Using OpenMP threads]) ++ else ++ AC_MSG_WARN([don't know how to enable OpenMP, reverting to POSIX threads]) + fi +- AC_DEFINE(FFTW_USING_OPENMP_THREADS) ++ + fi + if test "$with_sgimp"x != nox; then + AC_MSG_CHECKING(how to enable SGI MP) + mp_enabler=unknown + save_CFLAGS="$CFLAGS" + CFLAGS="$save_CFLAGS -mp" +- AC_TRY_LINK_FUNC(mp_set_numthreads,THREADLIBS=" " ++ AC_TRY_LINK_FUNC(mp_set_numthreads,THREADLIBS="" + mp_enabler="$CC -mp") + if test -z "$THREADLIBS"; then + CFLAGS="$save_CFLAGS" +- AC_TRY_LINK_FUNC(mp_numthreads,THREADLIBS=" " ++ AC_TRY_LINK_FUNC(mp_numthreads,THREADLIBS="" + mp_enabler="automatic") + fi + AC_MSG_RESULT($mp_enabler) + if test -z "$THREADLIBS"; then + AC_MSG_ERROR([don't know how to enable SGI MP]) + fi +- AC_DEFINE(FFTW_USING_SGIMP_THREADS) ++ AC_DEFINE(FFTW_USING_SGIMP_THREADS,1,[Using SGIMP Threads]) + fi + + # POSIX threads, the default choice: +- if test -z "$THREADLIBS"; then ++ if test x"$omp_enabler" = x"unknown" ; then + sinclude(acx_pthread.m4) + ACX_PTHREAD([THREADLIBS="$PTHREAD_LIBS " + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + CC="$PTHREAD_CC" +- AC_DEFINE(FFTW_USING_POSIX_THREADS)]) ++ AC_DEFINE(FFTW_USING_POSIX_THREADS,1,[Using POSIX Threads])]) + fi + # Solaris threads: + if test -z "$THREADLIBS"; then + AC_CHECK_LIB(thread, thr_create, + [THREADLIBS="-lthread" +- AC_DEFINE(FFTW_USING_SOLARIS_THREADS)]) ++ AC_DEFINE(FFTW_USING_SOLARIS_THREADS,1,[Using SOLARIS Threads])]) + fi + # Mach C threads: + if test -z "$THREADLIBS"; then + AC_CHECK_FUNC(cthread_fork, + [THREADLIBS=" " +- AC_DEFINE(FFTW_USING_MACH_THREADS)]) ++ AC_DEFINE(FFTW_USING_MACH_THREADS,1,[Using Mach Threads])]) + AC_CHECK_HEADERS(mach/cthreads.h cthreads.h cthread.h) + fi + if test -z "$THREADLIBS"; then + AC_CHECK_LIB(cthread, cthread_fork, + [THREADLIBS="-lcthread" +- AC_DEFINE(FFTW_USING_MACH_THREADS)]) ++ AC_DEFINE(FFTW_USING_MACH_THREADS,1,[Using Mach Threads])]) + AC_CHECK_HEADERS(mach/cthreads.h cthreads.h cthread.h) + fi + if test -z "$THREADLIBS"; then + AC_CHECK_LIB(cthreads, cthread_fork, + [THREADLIBS="-lcthreads" +- AC_DEFINE(FFTW_USING_MACH_THREADS)]) ++ AC_DEFINE(FFTW_USING_MACH_THREADS,1,[Using Mach Threads])]) + AC_CHECK_HEADERS(mach/cthreads.h cthreads.h cthread.h) + fi + # BeOS threads: + if test -z "$THREADLIBS"; then + AC_CHECK_FUNC(spawn_thread, + [THREADLIBS=" " +- AC_DEFINE(FFTW_USING_BEOS_THREADS)]) ++ AC_DEFINE(FFTW_USING_BEOS_THREADS,1,[Using BEOS Threads])]) + fi + if test -z "$THREADLIBS"; then + AC_MSG_ERROR(couldn't find threads library for --enable-threads) +@@ -334,7 +347,7 @@ + CC="$MPICC" + ok=yes + AC_TRY_LINK([#include <mpi.h> +- ], [MPI_Comm_f2c(0);], [AC_DEFINE(HAVE_MPI_COMM_F2C)], [ok=no]) ++ ], [MPI_Comm_f2c(0);], [AC_DEFINE(HAVE_MPI_COMM_F2C,1,[Has MPI COMM F2C])], [ok=no]) + AC_MSG_RESULT($ok) + CC="$save_CC" + else diff --git a/sci-libs/fftw/files/fftw-2.1.5-no-test.patch b/sci-libs/fftw/files/fftw-2.1.5-no-test.patch new file mode 100644 index 000000000000..cc844a455e66 --- /dev/null +++ b/sci-libs/fftw/files/fftw-2.1.5-no-test.patch @@ -0,0 +1,33 @@ +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -1,4 +1,4 @@ +-noinst_PROGRAMS = fftw_test rfftw_test ++check_PROGRAMS = fftw_test rfftw_test + noinst_HEADERS = test_main.h + + FFTWDIR=../fftw +--- a/mpi/Makefile.am ++++ b/mpi/Makefile.am +@@ -4,8 +4,8 @@ + + lib_LTLIBRARIES = @FFTW_MPI_LIBLIST@ + include_HEADERS = @FFTW_MPI_INCLUDELIST@ +-noinst_PROGRAMS = @FFTW_MPI_PROGLIST@ ++check_PROGRAMS = @FFTW_MPI_PROGLIST@ + + EXTRA_LTLIBRARIES = lib@FFTW_PREFIX@fftw_mpi.la \ + lib@FFTW_PREFIX@rfftw_mpi.la + EXTRA_HEADERS = @FFTW_PREFIX@fftw_mpi.h @FFTW_PREFIX@rfftw_mpi.h +--- a/threads/Makefile.am ++++ b/threads/Makefile.am +@@ -4,9 +4,9 @@ + + lib_LTLIBRARIES = @FFTW_THREADS_LIBLIST@ + include_HEADERS = @FFTW_THREADS_INCLUDELIST@ +-noinst_PROGRAMS = @FFTW_THREADS_PROGLIST@ ++check_PROGRAMS = @FFTW_THREADS_PROGLIST@ + + EXTRA_LTLIBRARIES = lib@FFTW_PREFIX@fftw_threads.la \ + lib@FFTW_PREFIX@rfftw_threads.la + EXTRA_HEADERS = @FFTW_PREFIX@fftw_threads.h \ + @FFTW_PREFIX@rfftw_threads.h diff --git a/sci-libs/fftw/files/fftw-2.1.5-parallel-tests.patch b/sci-libs/fftw/files/fftw-2.1.5-parallel-tests.patch new file mode 100644 index 000000000000..b92e6dad299c --- /dev/null +++ b/sci-libs/fftw/files/fftw-2.1.5-parallel-tests.patch @@ -0,0 +1,105 @@ +Fix failure of parallel test suite. This is due to +misspecification of the test suite, which requires +first compiling $(check_PROGRAMS) and only then +running $(TESTS): + +* check-am: all-am +* $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +* $(MAKE) $(AM_MAKEFLAGS) check-TESTS + +The old build system never specified $(TESTS) and +erroneously made the check target depend on the +two tests. +See also: https://bugs.gentoo.org/show_bug.cgi?id=603352 + +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -12,22 +12,7 @@ + rfftw_test_LDADD = $(RFFTWDIR)/lib@FFTW_PREFIX@rfftw.la \ + $(FFTWDIR)/lib@FFTW_PREFIX@fftw.la + +-check: fftw-tests rfftw-tests ++TESTS = myfftwtests.sh myrfftwtests.sh + +-fftw-tests: fftw_test +- ./fftw_test -p 0 +- ./fftw_test -x 128 -a 0 +- ./fftw_test -x 32 -a 2 +- ./fftw_test -x 100 -r 0 +- @echo "--------------------------------------------------------------" +- @echo " FFTW complex-complex transforms passed tests!" +- @echo "--------------------------------------------------------------" +- +-rfftw-tests: rfftw_test +- ./rfftw_test -p 0 +- ./rfftw_test -x 128 -a 0 +- ./rfftw_test -x 32 -a 2 +- ./rfftw_test -x 100 -r 0 +- @echo "--------------------------------------------------------------" +- @echo " RFFTW real-complex transforms passed tests!" +- @echo "--------------------------------------------------------------" ++TEST_EXTENSIONS = .sh ++SH_LOG_COMPILER = $(SHELL) +--- a/tests/myfftwtests.sh ++++ b/tests/myfftwtests.sh +@@ -0,0 +1,4 @@ ++./fftw_test -p 0 && \ ++./fftw_test -x 128 -a 0 && \ ++./fftw_test -x 32 -a 2 && \ ++./fftw_test -x 100 -r 0 +--- a/tests/myrfftwtests.sh ++++ b/tests/myrfftwtests.sh +@@ -0,0 +1,4 @@ ++./rfftw_test -p 0 && \ ++./rfftw_test -x 128 -a 0 && \ ++./rfftw_test -x 32 -a 2 && \ ++./rfftw_test -x 100 -r 0 +--- a/threads/fftw_threads_test_check.sh ++++ b/threads/fftw_threads_test_check.sh +@@ -0,0 +1,4 @@ ++./fftw_threads_test 1 -x 100 -r 0 && \ ++./fftw_threads_test 2 -x 100 -r 0 && \ ++./fftw_threads_test 3 -x 100 -r 0 && \ ++./fftw_threads_test 10 -x 100 -r 0 +--- a/threads/Makefile.am ++++ b/threads/Makefile.am +@@ -78,29 +78,7 @@ + # incorrect. Just disable autoheader + AUTOHEADER=echo + +-check: @FFTW_THREADS_PROGLIST@ +- @set fnord $(MAKEFLAGS); amf=$$2; \ +- list='@FFTW_THREADS_PROGLIST@'; for prog in $$list; do \ +- target="$$prog""-check"; \ +- echo "Making $$target"; \ +- ($(MAKE) $$target) \ +- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ +- done && test -z "$$fail" ++TESTS = fftw_threads_test_check.sh rfftw_threads_test_check.sh + +-fftw_threads_test-check: fftw_threads_test +- ./fftw_threads_test 1 -x 100 -r 0 +- ./fftw_threads_test 2 -x 100 -r 0 +- ./fftw_threads_test 3 -x 100 -r 0 +- ./fftw_threads_test 10 -x 100 -r 0 +- @echo "--------------------------------------------------------------" +- @echo " FFTW complex-complex threads transforms passed tests!" +- @echo "--------------------------------------------------------------" +- +-rfftw_threads_test-check: rfftw_threads_test +- ./rfftw_threads_test 1 -x 100 -r 0 +- ./rfftw_threads_test 2 -x 100 -r 0 +- ./rfftw_threads_test 3 -x 100 -r 0 +- ./rfftw_threads_test 10 -x 100 -r 0 +- @echo "--------------------------------------------------------------" +- @echo " RFFTW real-complex threads transforms passed tests!" +- @echo "--------------------------------------------------------------" ++TEST_EXTENSIONS = .sh ++SH_LOG_COMPILER = $(SHELL) +--- a/threads/rfftw_threads_test_check.sh ++++ b/threads/rfftw_threads_test_check.sh +@@ -0,0 +1,4 @@ ++./rfftw_threads_test 1 -x 100 -r 0 && \ ++./rfftw_threads_test 2 -x 100 -r 0 && \ ++./rfftw_threads_test 3 -x 100 -r 0 && \ ++./rfftw_threads_test 10 -x 100 -r 0 diff --git a/sci-libs/fftw/files/fftw-2.1.5-texinfo5.1.patch b/sci-libs/fftw/files/fftw-2.1.5-texinfo5.1.patch new file mode 100644 index 000000000000..1947bef8f21f --- /dev/null +++ b/sci-libs/fftw/files/fftw-2.1.5-texinfo5.1.patch @@ -0,0 +1,21 @@ + doc/fftw.texi | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/doc/fftw.texi b/doc/fftw.texi +index 90e8bb6..85a7a53 100644 +--- a/doc/fftw.texi ++++ b/doc/fftw.texi +@@ -46,10 +46,10 @@ approved by the Free Software Foundation. + @titlepage + @sp 10 + @comment The title is printed in a large font. +-@title{FFTW User's Manual} ++@title FFTW User's Manual + @subtitle For version @value{VERSION}, @value{UPDATED} +-@author{Matteo Frigo} +-@author{Steven G. Johnson} ++@author Matteo Frigo ++@author Steven G. Johnson + + @c The following two commands start the copyright page. + @page diff --git a/sci-libs/fftw/metadata.xml b/sci-libs/fftw/metadata.xml new file mode 100644 index 000000000000..38679de9df3e --- /dev/null +++ b/sci-libs/fftw/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <longdescription lang="en"> + The Fastest Fourier Transform in the West is a C subroutine library + for computing the Discrete Fourier Transform (DFT) in one or more + dimensions, of both real and complex data, and of arbitrary input + size. It is becoming the FFT library of choice for most + applications. Benchmarks, performed on a variety of platforms, show + that FFTW's performance is typically superior to that of other + publicly available FFT software. +</longdescription> + <use> + <flag name="float">Link default library to single precision instead of + double (symlinks only and fftw-2.1)</flag> + <flag name="quad">Build quadruple precision lib</flag> + <flag name="zbus">Adds support for ZBus cycle-counter of mips</flag> + </use> + <upstream> + <remote-id type="freecode">fftw</remote-id> + </upstream> +</pkgmetadata> |