summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurizio D'Addona2015-06-08 10:18:12 +0200
committerMaurizio D'Addona2015-06-08 10:18:12 +0200
commit33ca0950dd3054b3c396d89592a3b4882de88feb (patch)
tree89fd2ca92631666534129388233582f858d79d37
downloadaur-33ca0950dd3054b3c396d89592a3b4882de88feb.tar.gz
Initial commit
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD62
-rw-r--r--calculix_2.8_archlinux.patch56
3 files changed, 147 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3e0a4a09ba14
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = calculix
+ pkgdesc = CalculiX: 3D finite element solver and post-processor (executables)
+ pkgver = 2.8
+ pkgrel = 2
+ url = http://www.calculix.de/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = gcc-fortran
+ depends = arpack
+ depends = spooles
+ depends = libsnl-svn
+ depends = blas
+ depends = freeglut
+ depends = mesa
+ depends = glu
+ depends = libxmu
+ optdepends = calculix-doc: documentation and examples
+ options = !makeflags
+ options = !buildflags
+ source = http://www.dhondt.de/ccx_2.8.src.tar.bz2
+ source = http://www.dhondt.de/cgx_2.8.all.tar.bz2
+ source = calculix_2.8_archlinux.patch
+ sha256sums = 4b1d032afbc7e24658824cd0dcf6b4279adb9b1788a0d75111b58cdc40219ced
+ sha256sums = 8e605df835f62748b2d7bba00d7c9ef0a2b797fb7f4ba4a8614062c1f0ba0875
+ sha256sums = 591ae8473400f522a8d45924e0e3be6c92c39c3f9403f9efc93e933dc07cc63a
+
+pkgname = calculix
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f8d66dfd3abb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Maurizio D'Addona <mauritiusdadd@gmail.com>
+# Contributor: Sven Niese <Fd3querm@yahoo.de>
+# Contributor: Daniel Murphy <mosquitogang201@gmail.com>
+
+pkgname=calculix
+pkgver=2.8
+pkgrel=2
+pkgdesc="CalculiX: 3D finite element solver and post-processor (executables)"
+arch=('i686' 'x86_64')
+options=(!makeflags !buildflags)
+url="http://www.calculix.de/"
+license=('GPL2')
+depends=('arpack' 'spooles' 'libsnl-svn' 'blas' 'freeglut' 'mesa' 'glu' 'libxmu' )
+optdepends=('calculix-doc: documentation and examples')
+makedepends=('gcc-fortran')
+
+_mainver=${pkgver:0:3}
+
+source=("http://www.dhondt.de/ccx_${pkgver}.src.tar.bz2"
+ "http://www.dhondt.de/cgx_${pkgver}.all.tar.bz2"
+ "calculix_${_mainver}_archlinux.patch")
+
+sha256sums=('4b1d032afbc7e24658824cd0dcf6b4279adb9b1788a0d75111b58cdc40219ced'
+ '8e605df835f62748b2d7bba00d7c9ef0a2b797fb7f4ba4a8614062c1f0ba0875'
+ '591ae8473400f522a8d45924e0e3be6c92c39c3f9403f9efc93e933dc07cc63a')
+
+prepare()
+{
+ msg "Patching makefiles..."
+ cd "${srcdir}"
+ rm -rf CalculiX/libSNL
+ patch -p0 -f -l -s -i calculix_${_mainver}_archlinux.patch
+ msg2 "Done"
+}
+
+build()
+{
+ msg "Building..."
+
+ msg2 "Building solver..."
+ cd "${srcdir}/CalculiX/ccx_${_mainver}/src"
+ make
+
+ msg2 "Building gui..."
+ cd "${srcdir}/CalculiX/cgx_${_mainver}/src"
+ make
+
+ msg2 "Build complete"
+}
+
+
+package()
+{
+ msg "Copying files"
+
+ install -d ${pkgdir}/usr/bin
+
+ install -Dm755 ${srcdir}/CalculiX/ccx_${pkgver}/src/ccx_${pkgver} ${pkgdir}/usr/bin/ccx
+ install -Dm755 ${srcdir}/CalculiX/cgx_${pkgver}/src/cgx ${pkgdir}/usr/bin/cgx
+
+ msg2 "Done"
+}
diff --git a/calculix_2.8_archlinux.patch b/calculix_2.8_archlinux.patch
new file mode 100644
index 000000000000..c48e9665463e
--- /dev/null
+++ b/calculix_2.8_archlinux.patch
@@ -0,0 +1,56 @@
+diff -ur CalculiX_orig/ccx_2.8/src/Makefile CalculiX/ccx_2.8/src/Makefile
+--- CalculiX_orig/ccx_2.8/src/Makefile
++++ CalculiX/ccx_2.8/src/Makefile
+@@ -2,2 +2,2 @@
+-CFLAGS = -Wall -O3 -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE
++CFLAGS = -Wall -O3 -I /usr/include/spooles -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE
+ FFLAGS = -Wall -O3 -fopenmp
+@@ -21,6 +21,1 @@
+-DIR=../../../SPOOLES.2.2
+-
+-LIBS = \
+- $(DIR)/spooles.a \
+- ../../../ARPACK/libarpack_INTEL.a \
+- -lpthread -lm -lc
++LIBS = -lpthread -lm -lc -lspooles -larpack -lblas
+diff -ur CalculiX_orig/cgx_2.8/src/Makefile CalculiX/cgx_2.8/src/Makefile
+--- CalculiX_orig/cgx_2.8/src/Makefile
++++ CalculiX/cgx_2.8/src/Makefile
+@@ -1,14 +1,8 @@
+ CFLAGS = -O3 -Wall \
+ -I./ \
+- -I/usr/include \
+- -I/usr/include/GL \
+- -I../../libSNL/src \
+- -I../../glut-3.5/src \
+- -I/usr/X11/include
++ -I/usr/include/libSNL \
++ -I../../glut-3.5/src
+
+-LFLAGS = \
+- -L/usr/lib64 -lGL -lGLU \
+- -L/usr/X11R6/lib64 -lX11 -lXi -lXmu -lXext -lXt -lSM -lICE \
+- -lm -lpthread -lrt
++LFLAGS = -lGL -lGLU -lX11 -lXi -lXmu -lXext -lXt -lSM -lICE -lSNL -lm -lpthread -lrt
+
+
+@@ -59,1 +53,1 @@
+- ../../libSNL/src/*.cpp
++# ../../libSNL/src/*.cpp
+diff -ur CalculiX_orig/cgx_2.8/src/cgx.h CalculiX/cgx_2.8/src/cgx.h
+--- CalculiX_orig/cgx_2.8/src/cgx.h
++++ CalculiX/cgx_2.8/src/cgx.h
+@@ -81,8 +81,8 @@
+ #elif defined AFLIB
+- #define HELPFILE {"/usr/local/CalculiX/cgx_2.8/doc/cgx/cgx.html",\
+- "/usr/local/CalculiX/ccx_2.8/doc/ccx/ccx.html",\
+- "/usr/local/CalculiX/cgx_2.8/doc/aflib/aflib.pdf"}
++ #define HELPFILE {"/usr/share/doc/cgx/cgx.html",\
++ "/usr/share/doc/doc/ccx/ccx.html",\
++ "/usr/share/doc/doc/aflib/aflib.pdf"}
+ #else
+- #define HELPFILE {"/usr/local/CalculiX/cgx_2.8/doc/cgx/cgx.html",\
+- "/usr/local/CalculiX/ccx_2.8/doc/ccx/ccx.html"}
++ #define HELPFILE {"/usr/share/doc/cgx/cgx.html",\
++ "/usr/share/doc/ccx/ccx.html"}
+ #endif