diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2013-04-25 16:28:33 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2013-04-25 16:28:33 +0000 |
commit | bcc502201a1bb56e7ffdf79c8e567574035883bf (patch) | |
tree | 51009284cef11d8bb2efa1e86b32d92e33f5d1f6 /sci-libs | |
parent | Experimentally add --with-mibdirs="." (bug #249496). (diff) | |
download | historical-bcc502201a1bb56e7ffdf79c8e567574035883bf.tar.gz historical-bcc502201a1bb56e7ffdf79c8e567574035883bf.tar.bz2 historical-bcc502201a1bb56e7ffdf79c8e567574035883bf.zip |
Version bump
Package-Manager: portage-2.2.01.21890-prefix/cvs/Linux x86_64
Manifest-Sign-Key: 0x13CB1360
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/scipy/ChangeLog | 11 | ||||
-rw-r--r-- | sci-libs/scipy/Manifest | 18 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.12.0-blitz.patch | 28 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.12.0-cephes-missing-include.patch | 12 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.12.0-gerqf.patch | 12 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch | 15 | ||||
-rw-r--r-- | sci-libs/scipy/metadata.xml | 22 | ||||
-rw-r--r-- | sci-libs/scipy/scipy-0.12.0.ebuild | 131 |
8 files changed, 232 insertions, 17 deletions
diff --git a/sci-libs/scipy/ChangeLog b/sci-libs/scipy/ChangeLog index 916c76d3b461..7d6f69f94998 100644 --- a/sci-libs/scipy/ChangeLog +++ b/sci-libs/scipy/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sci-libs/scipy # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.89 2013/03/30 13:07:39 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.90 2013/04/25 16:27:31 bicatali Exp $ + +*scipy-0.12.0 (25 Apr 2013) + + 25 Apr 2013; SĂ©bastien Fabbro <bicatali@gentoo.org> + +files/scipy-0.12.0-blitz.patch, + +files/scipy-0.12.0-cephes-missing-include.patch, + +files/scipy-0.12.0-gerqf.patch, +files/scipy-0.12.0-restore-sys-argv.patch, + +scipy-0.12.0.ebuild, metadata.xml: + Version bump 30 Mar 2013; Mike Gilbert <floppym@gentoo.org> scipy-0.11.0-r1.ebuild: Quote patterns for python_gen_usedep. diff --git a/sci-libs/scipy/Manifest b/sci-libs/scipy/Manifest index 92605bc9c0d5..90cc490f8285 100644 --- a/sci-libs/scipy/Manifest +++ b/sci-libs/scipy/Manifest @@ -2,22 +2,30 @@ Hash: SHA256 AUX scipy-0.11.0-test_basic.patch 1574 SHA256 90b330b9768183b4fe67a92bdd096bada63524163b8812a45e1a21b897a4eecd SHA512 07750651ad123e3e0410a2fb42262f7a6a824926c13429c59ba4e6a60c74ab39d506214b0e149d17fcbd2af40ab970d281db689702bb38096f9e4d9277085770 WHIRLPOOL 9bfd97a2d2e22cfd428781a6696752a01fb6a61fa0fc45bb5bd1c1b27c875c21ba276c75a367f39cb29cbbd3d62415764f1617ff2dddaf9b73bd126e8e5e04c2 +AUX scipy-0.12.0-blitz.patch 731 SHA256 4f487a746aa62a39cdab9381dd4191cef0ccb912ed2e22065a7de02b85c8a269 SHA512 a788d08d34e13b02a0ec8127fd7918786cd26376ef5160f4acde585c6c1ac018a39652d9174b5e31173aa5c4e0c2f63101549de70806ea7ac56731abe3cb929c WHIRLPOOL ec00c2778e5e31a5d0ec4bc8099b4579e4eaa34a335653155da3c47e3c69fb3a8ff67b816cbeb769b81826c27ca687fc9fc22db11b91ddfadb6268c98890b302 +AUX scipy-0.12.0-cephes-missing-include.patch 394 SHA256 0263ba4e9f13c7be0e7160ae73ce98ea37f698ea7e06c3fc090bc4ff7732bc66 SHA512 a4f9adf9b29743b6ca7f42de0695af23ddf7791330a4a58a2f47cd5599af1361aee3b141a016ea1a81a3bc5b8bfcaa3f0478370a09acd37bcd8e519765701510 WHIRLPOOL 59651015bf540ad2218dd65764d68fb5f2b907116245e3e83d14084579314af6c58c34be3f74300166c2450e00833fa4ae6d6de057392d3e947a979555add1bc +AUX scipy-0.12.0-gerqf.patch 731 SHA256 1f3c2723f1094cb6834349f26d40d060ed4e09c722eea876e160fc9ce2b3ced2 SHA512 007bf3d85364c824c03532a07c2678e48c90858d82fa7248cb5139a6f74b853bc4a27e6932638a14bb61e72abbbfd95265e10502c4fd2eb363758f3132722a10 WHIRLPOOL c2d7de949048dcc76e1bf72f2165226b7a741212ef0c6cfc3709ddd91f11fd274ecfcdf62dd47fb11d824d73b41c57d468414b3ef9e8169f7841688f67bcf6af +AUX scipy-0.12.0-restore-sys-argv.patch 483 SHA256 c00daf7d49c042972d2c59bf645c21f3bc437459a745da758e2548a973000170 SHA512 7c439aa7e1e0ccc7444c2c091ef03d3d39f2999a33ef487224c78e74cd3a1b84bd18a9e92d84ab2cd3fc7578644beb3b667fdaacb20a239600cb9b1765eeb7fc WHIRLPOOL f0d4a84e40ee26399b121f0d9159914d480789c83f749cf060bc65f63df315f27718359df7c13c64ae7a04eea00470ea109b110310abeba79944a90b97ebb102 AUX scipy-0.9.0-qhull.patch 1675 SHA256 725a4c74ffe401ba4ae385bcd0a891b9c16d9656d3241204a2b84b88e4bbea95 SHA512 3c151e74dd8797723772c738e94f5591cdcc572d1be9729835245abb0a59690d010d629d46e7c58ff1de46de0827f049984764b90fd58653503e7d56adef5d34 WHIRLPOOL 155ff2f897195390c9f4739c117301ca524896afb94724caea003c2e97091a82563bf57f1ac91042e39a9f54a500fb4657b2bd3a5e05a3195a5299f19caa2ebd AUX scipy-0.9.0-superlu.patch 1526 SHA256 10b58353b0cdd6a8a6713ca7186cdb37c33c0ae4e42014322c5ad94465359e8f SHA512 1326cf779bffb9e2046106fd771309a93c3b0d7b15f8200f9a6652b425e7b0b642776feda488d10b2b69f6d16fb9fc1beeae4a1ff57b5e7181b9473c4de07232 WHIRLPOOL ceb430b6cca1036e8c07836b1f6ed71a75a9921bda787973ceb6f46673963d70a0bf07f46fed68d85587208aab51065fdebfce8bcd85d35dfa760fae012098e8 DIST scipy-0.11.0-html.zip 10831664 SHA256 d7a1dba159d13781a31bf88bcca3aec802ad7d0817c585140e05221722e17689 SHA512 dba923b632a063a1e437b77fc4b034df4b9d0936c17a48136857db14719de2ca88336500b663b781b443521cb71fd6bc3e7ff51779ed80ae2b34b7e655cba7ed WHIRLPOOL b25324c06b23e32797701485491696835d1b2878e025cd5f2cc38e3a998fb6bf62980c449f8fcf035035aa899754daf2e0985e872d918a1c7cc7ae2188a9c9b8 DIST scipy-0.11.0-ref.pdf 7382958 SHA256 04587215578188396723cea2eb7387460fd957706eec61ea1b67326822fdcb68 SHA512 520a75aed2e4b87296e864fde3387ea35978e96af86c3c3f92c0509db7ee0f8253c3c75f3e8de273e534aa400ff3dcca051fc8c83f9406af941da422f88fed70 WHIRLPOOL eae4c8b9fbffcd277b077175eaf9a1e136ec02cbec16c6d389735be5cbbc4300765bd9ce34427932dc1f9b58a0b16971235d89b60c02313d8902a82079bb9317 DIST scipy-0.11.0.tar.gz 6776998 SHA256 b2b74d56a2d58a4f032f91e8b91b1c2272d5eb0b5010082dd1e492e452f862ee SHA512 d4fdd62f2db5285cd133649bd1bfa5175cb9da8304323abd74e0ef1207d55e6152f0f944da1da75f73e9dafb0f3bb14efba3c0526c732c348a653e0bd223ccfa WHIRLPOOL 5ccdc68f968e58c43f56d7f1b8a281ab40a6b5077267c867bc371b0280d06512d9a726259cb2af0b89bae32ca2c636e7db0594624b3c8241d2887c42c4590765 +DIST scipy-0.12.0-html.zip 10831664 SHA256 d7a1dba159d13781a31bf88bcca3aec802ad7d0817c585140e05221722e17689 SHA512 dba923b632a063a1e437b77fc4b034df4b9d0936c17a48136857db14719de2ca88336500b663b781b443521cb71fd6bc3e7ff51779ed80ae2b34b7e655cba7ed WHIRLPOOL b25324c06b23e32797701485491696835d1b2878e025cd5f2cc38e3a998fb6bf62980c449f8fcf035035aa899754daf2e0985e872d918a1c7cc7ae2188a9c9b8 +DIST scipy-0.12.0-ref.pdf 7382958 SHA256 04587215578188396723cea2eb7387460fd957706eec61ea1b67326822fdcb68 SHA512 520a75aed2e4b87296e864fde3387ea35978e96af86c3c3f92c0509db7ee0f8253c3c75f3e8de273e534aa400ff3dcca051fc8c83f9406af941da422f88fed70 WHIRLPOOL eae4c8b9fbffcd277b077175eaf9a1e136ec02cbec16c6d389735be5cbbc4300765bd9ce34427932dc1f9b58a0b16971235d89b60c02313d8902a82079bb9317 +DIST scipy-0.12.0.tar.gz 9095801 SHA256 b967e802dafe2db043cfbdf0043e1312f9ce9c1386863e1c801a08ddfccf9de6 SHA512 80c8e137c3ccba86575d4263e144ba2c4684b94b5cd620e200f094c92d4e118ea6a631d27bdb259b0869771dfaeeae68c0fdd37fdd740b9027ee185026e921d4 WHIRLPOOL f5266327a53fac5b40456a2f4884ed5caaf11e2b9340bf29c8108d12bf80c5604a594774c3daf55b375c4a823a823eb31957f8641e622e9177291400c2b2bc29 DIST scipy-0.9-html.zip 8516420 SHA256 6f3148881502ca2cd2964fef7baf9bfec6fe2329ec3f1832e1e6d864aed0f889 DIST scipy-0.9-ref.pdf 5299022 SHA256 ed2641c180eef2f842536a611982fbd91c33c95a7e7e3c279d7ae6f10071be47 DIST scipy-0.9.0.tar.gz 6084552 SHA256 913089de94721be864e0a57fdab52603f3150250a2e0ce4ed6928ca1125f6b23 SHA512 2c9be17d4f9daea23dab7449282f522641a7bfc0bdb0005631f2a89da44681c4b4e98bdff8b76ee451c1ee36cf3dd2eaf45f670cfaff86c10d49bf5478ac3c43 WHIRLPOOL 0b58a0e0bc03f4759e5bbc3b24b36c6b53092a92c595ca65a79bf307332564b3204fc1d6244bb0a970bdb63f0092591b846cc14e8b4b6c73d9b09ffeb16815b4 EBUILD scipy-0.11.0-r1.ebuild 3364 SHA256 3d080cb8005ed85b930967b5d00efed57f42ca69d9c69ea35cc24daffb582413 SHA512 aa3262005084ffea6a625068555a869fdf82a12655b87e5230ca6caacc0bafa03f58ed3a1b30306a64f3f78dc10f6cb014e7aca3baf1113dae401dc9818dd998 WHIRLPOOL 7668e38afba971e725379c11b888203d154675e3c927969a13248d1d10fd8969b0ffcdf8e7b301ede1246dab5ec7b6c2ec177d7f98d192d7ffff30d7e83795f0 +EBUILD scipy-0.12.0.ebuild 3682 SHA256 77b819d1327f8c3c5b0a4046a4b8095c49fa7d0b0dd5d98c30edf9048a8b2e89 SHA512 d6e0f6a35500d3eff7be5920d4d35d4867f7fe93c1f83fa79e2d3d86c3362ae5686b0396a5fa3fca806379cb3ee0d8197fa48d5569ead371978a782ae6c5579c WHIRLPOOL 093683dfb7c1e03302c5f59541d161e176eba3d004f11d674c8fac6954291ae1c7921b01faf519cdc2d438443fac684e10b263866e425ad965b8cdd00ee32596 EBUILD scipy-0.9.0-r1.ebuild 4357 SHA256 11a7abe549534189fb92363d77dcd17716cc278d42f0a4b742c6b5a8fdd0e3ca SHA512 a0f540f4c07356ea90ccbbca02531c127c6e70cebe40979bc066c3403242dd81fda009eebc36058fb82e4f70fe4ab79c6a48721dab16a29332106145e287504e WHIRLPOOL 44f5c8a9a9ea573335ccf836d125ffdab7eb212b0102315e02baf6d42a63bfacb7fb493e4b99c2c49b60c1069a7050b47cda456d04cf44549e40102ec760f984 -MISC ChangeLog 17201 SHA256 94344fa1dddcf037183e5a47a40fe79afd9cb09244c59b13222919047c2820af SHA512 2b40804373f869ca7158df259122de3eba711d3dfc3dbf833b90cbd90f9bacdcfe5979295f37d47495d49fef7cf65f739298c753109448c7b4075cc3987ea2ed WHIRLPOOL 4b99e3cdbbb34411e39f376a1d3d807ec733f77b033a649803477223f13af35df08cbc0576c98a73352c81f299e8a6f6dc7942c9c24d0d8a941356a558256467 -MISC metadata.xml 779 SHA256 0585b23af57ed032f5fcbe48b3524a7c495fb494ad1f860e08adc442c6bbf243 SHA512 f855fd5ce9cc979846f1629db9950a24b86eb24cc185ee6c5ec530bdc6dc243b30ed9fa5d34baa73b6fb089d355e12dfdf8aa1987ee831ee1ba40d07f62c3816 WHIRLPOOL a189aa215aa1d58a7f5ff456ab14d31fcb43098e799150a66427c1bfb983a890c07a516cefce0dc3f86780b12ce5cb99805dfc8d1acc6c31e7028cb1d5efcbdf +MISC ChangeLog 17506 SHA256 0d5757639e6df03a43524ff88f9f18865fe2ccacbd1f19b245f93318f999963c SHA512 a3595a30c391bef5149b6fea4907952db04d3b6b35f132d690ec734fde6dfb8bb7cdcc67a0415c5d4f4c2417c8e45fe87386c21c8da1008d65adba59815cfe49 WHIRLPOOL c4b915a9d30f37217491ba16af74827cd95ee5dce4366154682635228257e1e646c9cb842434e600d09eebaf3d0f9dfe786365524673886070480ba2acc89746 +MISC metadata.xml 763 SHA256 1dbaf78b55e7058992c8dc5581d3748ac5654c23b04bc001ac97296b2b6a8f99 SHA512 578d468f27025151be446c8e0f621d32d1638142198278e3bf02c20893c5216bc4e62c6e1c7269810d44744de390d8b54093a55e209447caba702c4b5e5093d5 WHIRLPOOL a35c9ebad9820c7793e47423715d343176176df8215b8d00867a4e9907d84d6c7f98d6bf1c81d37b732d540821bd101300b93282faa721ef9a00e3203531780b -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iF4EAREIAAYFAlFW45wACgkQC77qH+pIQ6Q5sAEAkzZte95Ji/cUT4QbsDsCv4CD -S3X2KvDkoHrk0MVl3oUA/06AVvw3CHFUZ++V3HPpwNW3BV8R08iaT25DGf+7OiJ3 -=ulkF +iEUEAREIAAYFAlF5WaYACgkQ1ycZbhPLE2Cf1QCY41N0xGaNZ2yf8LWbGztToSaq +sQCdGWvqivblJ24l1P5RS6WcYLGAhd8= +=H3NO -----END PGP SIGNATURE----- diff --git a/sci-libs/scipy/files/scipy-0.12.0-blitz.patch b/sci-libs/scipy/files/scipy-0.12.0-blitz.patch new file mode 100644 index 000000000000..2817aa39b871 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.12.0-blitz.patch @@ -0,0 +1,28 @@ +Description: Fixes scipy.weave.inline compalition with g++ 4.3 and upwards +Author: Sameer Morar <smorar@gmail.com> +Forwarded: http://projects.scipy.org/scipy/scipy/ticket/739 +Bug-Debian: http://bugs.debian.org/598520 +Bug-Ubuntu: https://launchpad.net/bugs/302649 + +--- a/scipy/weave/blitz/blitz/blitz.h ++++ b/scipy/weave/blitz/blitz/blitz.h +@@ -65,6 +65,8 @@ + + #define BZ_THROW // Needed in <blitz/numinquire.h> + ++#include <cstdlib> ++ + BZ_NAMESPACE(blitz) + + #ifdef BZ_HAVE_STD +--- a/scipy/weave/blitz/blitz/prettyprint.h ++++ b/scipy/weave/blitz/blitz/prettyprint.h +@@ -22,6 +22,8 @@ + #ifndef BZ_PRETTYPRINT_H + #define BZ_PRETTYPRINT_H + ++#include <cstdlib> ++ + BZ_NAMESPACE(blitz) + + class prettyPrintFormat { diff --git a/sci-libs/scipy/files/scipy-0.12.0-cephes-missing-include.patch b/sci-libs/scipy/files/scipy-0.12.0-cephes-missing-include.patch new file mode 100644 index 000000000000..3bd93ad2bc41 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.12.0-cephes-missing-include.patch @@ -0,0 +1,12 @@ +Missing declarations resulting in insecure code +bicatali - gentoo - 04/2013 +--- scipy/special/cephes/gels.c.orig 2013-04-25 09:17:00.578809719 -0700 ++++ scipy/special/cephes/gels.c 2013-04-25 09:17:18.048916759 -0700 +@@ -63,6 +63,7 @@ + * C .................................................................. + * C + */ ++#include <math.h> + #include "protos.h" + + int gels(A, R, M, EPS, AUX) diff --git a/sci-libs/scipy/files/scipy-0.12.0-gerqf.patch b/sci-libs/scipy/files/scipy-0.12.0-gerqf.patch new file mode 100644 index 000000000000..cf93c0ec53f0 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.12.0-gerqf.patch @@ -0,0 +1,12 @@ +diff -up scipy-0.12.0/scipy/linalg/flapack.pyf.src.gerqf scipy-0.12.0/scipy/linalg/flapack.pyf.src +--- scipy-0.12.0/scipy/linalg/flapack.pyf.src.gerqf 2013-04-06 10:10:35.000000000 -0600 ++++ scipy-0.12.0/scipy/linalg/flapack.pyf.src 2013-04-15 17:03:37.290059000 -0600 +@@ -650,7 +650,7 @@ interface + <ftype> dimension(m,n),intent(in,out,copy,out=qr,aligned8) :: a + <ftype> dimension(MIN(m,n)),intent(out) :: tau + +- integer optional,intent(in),depend(n),check(lwork>=m||lwork==-1) :: lwork=3*m ++ integer optional,intent(in),depend(m),check(lwork>=m||lwork==-1) :: lwork=3*m + <ftype> dimension(MAX(lwork,1)),intent(out),depend(lwork) :: work + integer intent(out) :: info + end subroutine <prefix>gerqf diff --git a/sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch b/sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch new file mode 100644 index 000000000000..3eef739f93a8 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch @@ -0,0 +1,15 @@ +Description: restore sys.argv in case of exception +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500814 + +--- a/scipy/weave/build_tools.py ++++ b/scipy/weave/build_tools.py +@@ -283,6 +283,9 @@ def build_extension(module_path,compiler + configure_python_path(build_dir) + except SyntaxError: #TypeError: + success = 0 ++ except Exception, e: ++ restore_sys_argv() ++ raise e + + # restore argv after our trick... + restore_sys_argv() diff --git a/sci-libs/scipy/metadata.xml b/sci-libs/scipy/metadata.xml index 1020ae39f436..3fcc27d2e030 100644 --- a/sci-libs/scipy/metadata.xml +++ b/sci-libs/scipy/metadata.xml @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <herd>sci</herd> - <longdescription lang="en"> +<herd>sci</herd> +<longdescription lang="en"> SciPy is an open source library of scientific tools for Python. SciPy supplements the popular numpy module, gathering a variety of high level science and engineering modules together as a single package. - SciPy includes modules for graphics and plotting, optimization, integration, - special functions, signal and image processing, genetic algorithms, ODE - solvers, and others. + SciPy includes modules for graphics and plotting, optimization, + integration, special functions, signal and image processing, genetic + algorithms, ODE solvers, and others. </longdescription> - <use> - <flag name="umfpack">Adds support for sparse solving with <pkg>sci-libs/umfpack</pkg></flag> - </use> - <upstream> - <remote-id type="pypi">scipy</remote-id> - </upstream> +<use> + <flag name="umfpack">Adds support for sparse solving with <pkg>sci-libs/umfpack</pkg></flag> +</use> +<upstream> + <remote-id type="pypi">scipy</remote-id> +</upstream> </pkgmetadata> diff --git a/sci-libs/scipy/scipy-0.12.0.ebuild b/sci-libs/scipy/scipy-0.12.0.ebuild new file mode 100644 index 000000000000..aca06103b370 --- /dev/null +++ b/sci-libs/scipy/scipy-0.12.0.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.12.0.ebuild,v 1.1 2013/04/25 16:27:31 bicatali Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_5,2_6,2_7,3_2,3_3} ) + +inherit eutils fortran-2 distutils-r1 flag-o-matic multilib toolchain-funcs + +DESCRIPTION="Scientific algorithms library for Python" +HOMEPAGE="http://www.scipy.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz + doc? ( + http://docs.scipy.org/doc/${PN}/${PN}-html.zip -> ${P}-html.zip + http://docs.scipy.org/doc/${PN}/${PN}-ref.pdf -> ${P}-ref.pdf + )" + +LICENSE="BSD LGPL-2" +SLOT="0" +IUSE="doc sparse test" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +CDEPEND=" + dev-python/numpy[lapack,${PYTHON_USEDEP}] + sci-libs/arpack + virtual/cblas + virtual/lapack + sparse? ( sci-libs/umfpack )" +DEPEND="${CDEPEND} + dev-lang/swig + dev-python/cython[${PYTHON_USEDEP}] + virtual/pkgconfig + doc? ( app-arch/unzip ) + test? ( dev-python/nose[${PYTHON_USEDEP}] )" + +RDEPEND="${CDEPEND} + dev-python/imaging[$(python_gen_usedep 'python2*')]" + +DOCS=( HACKING.rst.txt README.txt THANKS.txt LATEST.txt TOCHANGE.txt ) + +DISTUTILS_IN_SOURCE_BUILD=1 + +src_unpack() { + unpack ${P}.tar.gz + if use doc; then + unzip -qo "${DISTDIR}"/${P}-html.zip -d html || die + fi +} + +pc_incdir() { + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \ + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' +} + +pc_libdir() { + $(tc-getPKG_CONFIG) --libs-only-L $@ | \ + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' +} + +pc_libs() { + $(tc-getPKG_CONFIG) --libs-only-l $@ | \ + sed -e 's/[ ]-l*\(pthread\|m\)[ ]*//g' \ + -e 's/^-l//' -e 's/[ ]*-l/,/g' +} + +python_prepare_all() { + # scipy automatically detects libraries by default + export {FFTW,FFTW3,UMFPACK}=None + use sparse && unset UMFPACK + # the missing symbols are in -lpythonX.Y, but since the version can + # differ, we just introduce the same scaryness as on Linux/ELF + [[ ${CHOST} == *-darwin* ]] \ + && append-ldflags -bundle "-undefined dynamic_lookup" \ + || append-ldflags -shared + [[ -z ${FC} ]] && export FC="$(tc-getFC)" + # hack to force F77 to be FC until bug #278772 is fixed + [[ -z ${F77} ]] && export F77="$(tc-getFC)" + export F90="${FC}" + export SCIPY_FCONFIG="config_fc --noopt --noarch" + append-fflags -fPIC + + local libdir="${EPREFIX}"/usr/$(get_libdir) + cat >> site.cfg <<-EOF + [blas] + include_dirs = $(pc_incdir cblas) + library_dirs = $(pc_libdir cblas blas):${libdir} + blas_libs = $(pc_libs cblas blas) + [lapack] + library_dirs = $(pc_libdir lapack):${libdir} + lapack_libs = $(pc_libs lapack) + EOF + + local PATCHES=( + "${FILESDIR}"/${P}-gerqf.patch + "${FILESDIR}"/${P}-blitz.patch + "${FILESDIR}"/${P}-restore-sys-argv.patch + "${FILESDIR}"/${P}-cephes-missing-include.patch + ) + distutils-r1_python_prepare_all +} + +python_compile() { + distutils-r1_python_compile ${SCIPY_FCONFIG} +} + +python_test() { + distutils_install_for_testing ${SCIPY_FCONFIG} + cd "${TEST_DIR}" || die "no ${TEST_DIR} available" + # nasty hack to remove weave tests because it is not python3 compat + [[ ${TEST_DIR} =~ python3 ]] && rm -r "${TEST_DIR}"/lib/scipy/weave +#r = scipy.test('full', verbose=10) + "${EPYTHON}" -c " +import scipy, sys +r = scipy.test('fast',verbose=2) +sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}" +} + +python_install() { + distutils-r1_python_install ${SCIPY_FCONFIG} + if use doc; then + dohtml -r "${WORKDIR}"/html/. + dodoc "${DISTDIR}"/${P}*pdf + fi +} + +pkg_postinst() { + elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER" + elog "to your prefered image viewer. Example:" + elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc" +} |