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/camfr/files
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/camfr/files')
-rw-r--r--sci-physics/camfr/files/machine_cfg.py.gentoo46
1 files changed, 46 insertions, 0 deletions
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"])]