summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Medinas <metalgod@gentoo.org>2006-07-02 22:59:39 +0000
committerLuis Medinas <metalgod@gentoo.org>2006-07-02 22:59:39 +0000
commit5e198d6e53cfa1c3aced2f98482a7912c9a8db5b (patch)
treedaa744d385a26b57bc4eb0f733665071db86f416 /sci-physics/camfr/files
parentsmall fixes, including pax fix (diff)
downloadgentoo-2-5e198d6e53cfa1c3aced2f98482a7912c9a8db5b.tar.gz
gentoo-2-5e198d6e53cfa1c3aced2f98482a7912c9a8db5b.tar.bz2
gentoo-2-5e198d6e53cfa1c3aced2f98482a7912c9a8db5b.zip
Moved from sci-misc/camfr to sci-physics/camfr.
Diffstat (limited to 'sci-physics/camfr/files')
-rw-r--r--sci-physics/camfr/files/SConstruct22
-rw-r--r--sci-physics/camfr/files/digest-camfr-1.23
-rw-r--r--sci-physics/camfr/files/machine_cfg.py57
-rw-r--r--sci-physics/camfr/files/throw_patch.diff29
4 files changed, 111 insertions, 0 deletions
diff --git a/sci-physics/camfr/files/SConstruct b/sci-physics/camfr/files/SConstruct
new file mode 100644
index 000000000000..349d068cd0bd
--- /dev/null
+++ b/sci-physics/camfr/files/SConstruct
@@ -0,0 +1,22 @@
+from machine_cfg import *
+
+SConsignFile() # Tell Scons not to write data all over the file system.
+
+Default("camfr")
+import os
+
+# Construct build environments.
+
+env = Environment(CPPPATH = include_dirs,
+ LIBPATH = library_dirs,
+ CC = cc, CCFLAGS = flags,
+ CXX = cxx, CXXFLAGS = flags,
+ F77 = f77, F77FLAGS = fflags,
+ LINK = link, LINKFLAGS = link_flags,
+ LIBS = libs, SHLIBPREFIX = "",
+ ENV = {'PATH' : os.environ['PATH']})
+
+env_noopt = env.Copy(CCFLAGS = flags_noopt, CXXFLAGS = flags_noopt)
+
+Export("env", "env_noopt")
+SConscript("camfr/SConscript") \ No newline at end of file
diff --git a/sci-physics/camfr/files/digest-camfr-1.2 b/sci-physics/camfr/files/digest-camfr-1.2
new file mode 100644
index 000000000000..7c2519eae7f3
--- /dev/null
+++ b/sci-physics/camfr/files/digest-camfr-1.2
@@ -0,0 +1,3 @@
+MD5 ae2a13bfb1eee556c9712ee8ecf4a27e camfr-1.2.tgz 717898
+RMD160 e7f259391a18fc946d42cf3d4637268cd2c13019 camfr-1.2.tgz 717898
+SHA256 5036f61bb34ff4b3fe2b08a21b408443edc1190814961d25e0c25079b7f4537d camfr-1.2.tgz 717898
diff --git a/sci-physics/camfr/files/machine_cfg.py b/sci-physics/camfr/files/machine_cfg.py
new file mode 100644
index 000000000000..698f9e8eaed2
--- /dev/null
+++ b/sci-physics/camfr/files/machine_cfg.py
@@ -0,0 +1,57 @@
+# This Python script contains all the machine dependent settings
+# needed during the build process.
+
+# Get compiler flags from Gentoo's /etc/make.conf.
+
+import popen2
+
+r, w = popen2.popen2("source /etc/make.conf ; echo $CXXFLAGS")
+CXXFLAGS = r.readline().strip()
+r.close()
+w.close()
+
+# Compilers to be used.
+
+cc = "gcc"
+cxx = "g++"
+f77 = "g77"
+
+link = cxx
+link_flags = ""
+
+# Compiler flags.
+#
+# Note: for the Fortran name definition you can define one of the following
+# preprocessor macros:
+#
+# FORTRAN_SYMBOLS_WITHOUT_TRAILING_UNDERSCORES
+# FORTRAN_SYMBOLS_WITH_SINGLE_TRAILING_UNDERSCORE
+# FORTRAN_SYMBOLS_WITH_DOUBLE_TRAILING_UNDERSCORES
+
+base_flags = "-ftemplate-depth-60 \
+ -DFORTRAN_SYMBOLS_WITH_SINGLE_TRAILING_UNDERSCORE -DNDEBUG"
+
+flags_noopt = base_flags
+flags = base_flags + CXXFLAGS
+fflags = flags
+
+# Include directories.
+
+include_dirs = ["/usr/include/python2.4"]
+
+# Library directories.
+
+library_dirs = [""]
+
+# Library names.
+
+libs = ["boost_python", "blitz", "lapack", "blas", "g2c"]
+
+# Command to strip library of excess symbols:
+
+dllsuffix = ".so"
+strip_command = "strip --strip-unneeded camfr/_camfr" + dllsuffix
+
+# Extra files to copy into installation directory.
+
+extra_files = [("doc", ["docs/camfr.pdf"])]
diff --git a/sci-physics/camfr/files/throw_patch.diff b/sci-physics/camfr/files/throw_patch.diff
new file mode 100644
index 000000000000..4830f99d6f02
--- /dev/null
+++ b/sci-physics/camfr/files/throw_patch.diff
@@ -0,0 +1,29 @@
+--- camfr_1.2/camfr/camfr_wrap.cpp 2003-11-03 16:03:13.000000000 +0100
++++ camfr_1.2_new/camfr/camfr_wrap.cpp 2006-02-23 15:29:36.000000000 +0100
+@@ -352,7 +352,7 @@
+ {
+ PyErr_SetString(PyExc_ValueError,
+ "set_inc_field_function only implemented for slabs.");
+- throw boost::python::argument_error();
++ exit (-1); //throw boost::python::argument_error();
+ }
+
+ PythonFunction f(o);
+@@ -395,7 +395,7 @@
+ {
+ PyErr_SetString(PyExc_ValueError,
+ "set_inc_field_gaussian only implemented for slabs.");
+- throw boost::python::argument_error();
++ exit (-1); //throw boost::python::argument_error();
+ }
+
+ GaussianFunction f(height,width,pos);
+@@ -442,7 +442,7 @@
+ {
+ PyErr_SetString(PyExc_ValueError,
+ "set_inc_field_plane_Wave only implemented for slabs.");
+- throw boost::python::argument_error();
++ exit (-1); //throw boost::python::argument_error();
+ }
+
+ Complex index = slab->get_core()->n();