summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2008-12-09 15:39:43 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2008-12-09 15:39:43 +0000
commit0c505e3b81af02928dda8340b86b635c0309cc7f (patch)
tree0a673f0fcd081f030cd6e277fadcb1390a08b638 /sci-physics
parentFix patch to not crash in certain situations with >10 tabs (diff)
downloadgentoo-2-0c505e3b81af02928dda8340b86b635c0309cc7f.tar.gz
gentoo-2-0c505e3b81af02928dda8340b86b635c0309cc7f.tar.bz2
gentoo-2-0c505e3b81af02928dda8340b86b635c0309cc7f.zip
Propagate LDFLAGS, FFLAGS for newer scons, avoid parsing make.conf
(Portage version: 2.2_rc17/cvs/Linux 2.6.25-gentoo-r7 x86_64)
Diffstat (limited to 'sci-physics')
-rw-r--r--sci-physics/camfr/ChangeLog6
-rw-r--r--sci-physics/camfr/camfr-20070717-r1.ebuild10
-rw-r--r--sci-physics/camfr/files/machine_cfg.py.gentoo46
3 files changed, 57 insertions, 5 deletions
diff --git a/sci-physics/camfr/ChangeLog b/sci-physics/camfr/ChangeLog
index 37068edbd6fc..c6ddcf10af22 100644
--- a/sci-physics/camfr/ChangeLog
+++ b/sci-physics/camfr/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sci-physics/camfr
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/camfr/ChangeLog,v 1.11 2008/07/07 23:47:57 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/camfr/ChangeLog,v 1.12 2008/12/09 15:39:43 bicatali Exp $
+
+ 09 Dec 2008; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/machine_cfg.py.gentoo, camfr-20070717-r1.ebuild:
+ Propagate LDFLAGS, FFLAGS for newer scons, avoid parsing make.conf
*camfr-20070717-r1 (07 Jul 2008)
diff --git a/sci-physics/camfr/camfr-20070717-r1.ebuild b/sci-physics/camfr/camfr-20070717-r1.ebuild
index 6aba83ae00c8..227fc889971c 100644
--- a/sci-physics/camfr/camfr-20070717-r1.ebuild
+++ b/sci-physics/camfr/camfr-20070717-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-physics/camfr/camfr-20070717-r1.ebuild,v 1.1 2008/07/07 23:47:57 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-physics/camfr/camfr-20070717-r1.ebuild,v 1.2 2008/12/09 15:39:43 bicatali Exp $
inherit eutils distutils fortran
@@ -33,7 +33,7 @@ pkg_setup() {
eerror "Set the tk USE flag and reinstall python and imaging before continuing."
die
fi
- FORTRAN="gfortran g77"
+ FORTRAN="gfortran ifc g77"
fortran_pkg_setup
}
@@ -41,8 +41,7 @@ src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${P}-gcc43.patch
- cp machine_cfg.py{.gentoo,} || die
- sed -i -e '/^library_dirs/d' -e '/^libs/d' machine_cfg.py || die
+ cp "${FILESDIR}"/machine_cfg.py.gentoo machine_cfg.py || die
local lapack_libs=
for x in $(pkg-config --libs-only-l lapack); do
lapack_libs="${lapack_libs}, \"${x#-l}\""
@@ -60,6 +59,9 @@ src_unpack() {
library_dirs = [${lapack_libdirs#,}]
libs = ["boost_python", "${libfort}", "blitz"${lapack_libs}]
EOF
+
+ # scons redefines F77 to FORTRAN for env variables
+ sed -i -e 's/F77/FORTRAN/g' SConstruct || die
}
src_test() {
diff --git a/sci-physics/camfr/files/machine_cfg.py.gentoo b/sci-physics/camfr/files/machine_cfg.py.gentoo
new file mode 100644
index 000000000000..673287ff2ad0
--- /dev/null
+++ b/sci-physics/camfr/files/machine_cfg.py.gentoo
@@ -0,0 +1,46 @@
+import os
+
+cc = os.getenv("CC")
+if cc == None:
+ cc = "gcc"
+cxx = os.getenv("CXX")
+if cxx == None:
+ cxx = "g++"
+f77 = os.getenv("F77")
+if f77 == None:
+ f77 = "gfortran"
+link = cxx
+flags = os.getenv("CXXFLAGS")
+if flags == None:
+ flags = "-O"
+fflags = os.getenv("FFLAGS")
+if fflags == None:
+ fflags = flags
+link_flags = os.getenv("LDFLAGS")
+if link_flags == None:
+ link_flags = ""
+
+base_flags = " -DFORTRAN_SYMBOLS_WITH_SINGLE_TRAILING_UNDERSCORE -DNDEBUG "
+flags_noopt = base_flags
+flags = flags + base_flags
+fflags = fflags + base_flags
+
+
+include_dirs = []
+
+if os.path.isdir("/usr/include/python2.5"):
+ include_dirs.append("/usr/include/python2.5")
+ include_dirs.append("/usr/lib/python2.5/site-packages")
+elif os.path.isdir("/usr/include/python2.4"):
+ include_dirs.append("/usr/include/python2.4")
+ include_dirs.append("/usr/lib/python2.4/site-packages")
+elif os.path.isdir("/usr/include/python2.3"):
+ include_dirs.append("/usr/include/python2.3")
+ include_dirs.append("/usr/lib/python2.3/site-packages")
+else:
+ print "Python dir not found!"
+ sys.exit()
+
+dllsuffix = ".so"
+strip_command = ""
+extra_files = [("doc", ["docs/camfr.pdf"])]