summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Luc2016-12-25 15:40:19 +1100
committerJean-Luc2016-12-25 17:00:39 +1100
commit858541641ee135e4b30a56c40e43d20e62246e74 (patch)
tree4780a7009c27c87e8a3f34bfac5ef37547c2290e
downloadaur-858541641ee135e4b30a56c40e43d20e62246e74.tar.gz
Added package files.
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD29
-rw-r--r--machine_cfg.py84
3 files changed, 133 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..126fa6736f4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = camfr
+ pkgdesc = CAMFR (CAvity Modelling FRamework) is a fast, flexible, friendly full-vectorial Maxwell solver.
+ pkgver = 20070717
+ pkgrel = 1
+ url = http://camfr.sourceforge.net/
+ arch = x86_64
+ license = GPL
+ makedepends = scons
+ makedepends = gcc-fortran
+ makedepends = lapack
+ makedepends = blitz
+ depends = python2-scipy
+ depends = python2-imaging
+ source = http://downloads.sourceforge.net/project/camfr/camfr/camfr-20070717/camfr-20070717.tgz
+ source = machine_cfg.py
+ md5sums = 3858d6b9e3be29aa3981c2b4fe595fe2
+ md5sums = db07413af39b15ff25d35b8dd89f2452
+
+pkgname = camfr
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..cc191bdfac9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Jean-Luc Tambasco <an.obscurity@gmail.com>
+pkgname=camfr
+pkgver=20070717
+pkgrel=1
+pkgdesc="CAMFR (CAvity Modelling FRamework) is a fast, flexible, friendly full-vectorial Maxwell solver."
+arch=('x86_64')
+url="http://camfr.sourceforge.net/"
+license=('GPL')
+depends=('python2-scipy'
+ 'python2-imaging')
+makedepends=('scons'
+ 'gcc-fortran'
+ 'lapack'
+ 'blitz')
+source=('http://downloads.sourceforge.net/project/camfr/camfr/camfr-20070717/camfr-20070717.tgz'
+ 'machine_cfg.py')
+md5sums=(3858d6b9e3be29aa3981c2b4fe595fe2
+ db07413af39b15ff25d35b8dd89f2452)
+
+build() {
+ cd "${pkgname}_${pkgver}"
+ mv ../machine_cfg.py .
+ python2 setup.py build
+}
+
+package() {
+ cd "${pkgname}_${pkgver}"
+ python2 setup.py install --user
+}
diff --git a/machine_cfg.py b/machine_cfg.py
new file mode 100644
index 00000000000..4acb1ad4e6a
--- /dev/null
+++ b/machine_cfg.py
@@ -0,0 +1,84 @@
+# This Python script contains all the machine dependent settings
+# needed during the build process.
+
+import sys
+import popen2, os
+
+# Get compiler flags from Gentoo's /etc/make.conf.
+
+r, w = popen2.popen2("source /etc/make.conf ; echo $CFLAGS")
+CXXFLAGS = r.readline().strip()
+r.close()
+w.close()
+
+# For gcc 4.2.1, filter the flags a bit.
+
+if "pentium-m" in CXXFLAGS or "pentium4" in CXXFLAGS:
+ CXXFLAGS = CXXFLAGS.replace("-O3", "-O2")
+
+# Compilers to be used.
+
+cc = "gcc"
+cxx = "g++"
+f77 = "gfortran -fPIC" # Workaround for scons bug.
+
+# 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 = "-DFORTRAN_SYMBOLS_WITH_SINGLE_TRAILING_UNDERSCORE -DNDEBUG "
+
+flags_noopt = base_flags
+
+flags = base_flags + " " + CXXFLAGS
+
+fflags = flags + " -fPIC "
+
+# Linker and linker flags to be used.
+
+link = cxx
+link_flags = ""
+
+# Include directories.
+
+include_dirs = []
+
+if os.path.isdir("/usr/include/python2.7"):
+ include_dirs.append("/usr/include/python2.7")
+ include_dirs.append("/usr/lib/python2.7/site-packages")
+elif 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()
+
+# Library directories.
+
+library_dirs = []
+#library_dirs = ["/opt/intel/mkl8/lib/32"]
+
+# Library names.
+
+libs = ["boost_python", "blitz", "lapack", "blas", "gfortran"]
+#libs = ["boost_python", "blitz", "mkl_lapack64", "mkl", "gfortran"]
+
+# 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"])]