diff options
author | Markus Hovorka | 2016-05-01 21:10:56 +0200 |
---|---|---|
committer | Markus Hovorka | 2016-05-01 21:11:11 +0200 |
commit | 5dd1e5a4664c5a71ad676bb9fef29e61795571e6 (patch) | |
tree | be74f99ab0eed446a03b34d8c33cdd5de096b748 | |
download | aur-5dd1e5a4664c5a71ad676bb9fef29e61795571e6.tar.gz |
Add PKGBUILD, SRCINFO and patches
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 15 | ||||
-rw-r--r-- | PKGBUILD | 51 | ||||
-rw-r--r-- | occ-pi-constant.patch | 21 | ||||
-rw-r--r-- | occ-relativemode.patch | 36 |
5 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d51dc4c34c33 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = netgen-nogui + pkgdesc = NETGEN is an automatic 3d tetrahedral mesh generator + pkgver = 5.3.1 + pkgrel = 1 + url = https://sourceforge.net/projects/netgen-mesher + arch = i686 + arch = x86_64 + license = LGPL + depends = opencascade + depends = openmpi + depends = metis + provides = netgen + options = !libtool + source = https://sourceforge.net/projects/netgen-mesher/files/netgen-mesher/5.3/netgen-5.3.1.tar.gz/download + source = occ-pi-constant.patch + source = occ-relativemode.patch + md5sums = afd5a9b0b1296c242a9c554f06af6510 + md5sums = 0595a7f4d99d0662e44323932122b335 + md5sums = 5d40b3e7fd70bde4d9eef8cf89ac347b + +pkgname = netgen-nogui + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..3bfc6c94e009 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# ignore everything +* +!.gitignore + +# except PKGBUILD needed files +!PKGBUILD +!*.install +!ChangeLog +!.SRCINFO + +# common wing-man files +!*.diff +!*.patch + +# add files that don't have an online source diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1b72d09f21c1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Markus Hovorka <m.hovorka@live.de> +pkgname=netgen-nogui +pkgver=5.3.1 +pkgrel=1 +pkgdesc="NETGEN is an automatic 3d tetrahedral mesh generator" +arch=('i686' 'x86_64') +url="https://sourceforge.net/projects/netgen-mesher" +license=('LGPL') +depends=('opencascade' 'openmpi' 'metis') +provides=('netgen') +options=('!libtool') +source=("https://sourceforge.net/projects/netgen-mesher/files/netgen-mesher/5.3/netgen-$pkgver.tar.gz/download" + 'occ-pi-constant.patch' + 'occ-relativemode.patch') +md5sums=('afd5a9b0b1296c242a9c554f06af6510' + '0595a7f4d99d0662e44323932122b335' + '5d40b3e7fd70bde4d9eef8cf89ac347b') + +# out-of-source build directory +_builddir="build" + +prepare() { + cd "$srcdir/netgen-$pkgver" + patch -Np1 < ../occ-pi-constant.patch + patch -Np1 < ../occ-relativemode.patch +} + +build() { + cd "$srcdir/netgen-$pkgver" + + # create dir for out-of-source build + mkdir "$_builddir" && cd "$_builddir" + + CPPFLAGS="-I/usr/include/openmpi/ompi/mpi/cxx -I/opt/opencascade/inc/oce" + ../configure --prefix=/usr --with-occ=/opt/opencascade/ --enable-occ \ + --disable-gui --enable-nglib --datadir=/usr/share + make +} + +package() { + cd "$srcdir/netgen-$pkgver" + + # -C: change dir before install + make -C "$_builddir" DESTDIR="$pkgdir/" install + + install -D -m644 "$srcdir/netgen-$pkgver/doc/ng4.pdf" \ + "$pkgdir/usr/share/doc/netgen/ng4.pdf" + + # install libsrc/ needed by some packages (e.g. FreeCAD) + cp -R "libsrc/" "$pkgdir/usr/share/netgen" +} diff --git a/occ-pi-constant.patch b/occ-pi-constant.patch new file mode 100644 index 000000000000..7016bc33e2a2 --- /dev/null +++ b/occ-pi-constant.patch @@ -0,0 +1,21 @@ +diff -aur netgen-5.3.1/libsrc/occ/Partition_Loop2d.cxx netgen-5.3.1.patched/libsrc/occ/Partition_Loop2d.cxx +--- netgen-5.3.1/libsrc/occ/Partition_Loop2d.cxx 2014-08-29 11:54:03.000000000 +0200 ++++ netgen-5.3.1.patched/libsrc/occ/Partition_Loop2d.cxx 2016-04-29 10:35:56.633392514 +0200 +@@ -210,7 +210,7 @@ + Cc->D1(uc, PC, CTg1); + if (!isForward) CTg1.Reverse(); + +- Standard_Real anglemin = 3 * PI, tolAng = 1.e-8; ++ Standard_Real anglemin = 3 * M_PI, tolAng = 1.e-8; + + // select an edge whose first derivative is most left of CTg1 + // ie an angle between Tg1 and CTg1 is least +@@ -234,7 +234,7 @@ + // -PI < angle < PI + Standard_Real angle = Tg1.Angle(CTg1); + +- if (PI - Abs(angle) <= tolAng) ++ if (M_PI - Abs(angle) <= tolAng) + { + // an angle is too close to PI; assure that an angle sign really + // reflects an edge position: +PI - an edge is worst, diff --git a/occ-relativemode.patch b/occ-relativemode.patch new file mode 100644 index 000000000000..2faa1f2e504f --- /dev/null +++ b/occ-relativemode.patch @@ -0,0 +1,36 @@ +diff -aur netgen-5.3.1/libsrc/occ/occgeom.cpp netgen-5.3.1.patched/libsrc/occ/occgeom.cpp +--- netgen-5.3.1/libsrc/occ/occgeom.cpp 2014-08-29 11:54:03.000000000 +0200 ++++ netgen-5.3.1.patched/libsrc/occ/occgeom.cpp 2016-05-01 16:07:05.320269578 +0200 +@@ -1034,20 +1034,6 @@ +
+
+
+- void OCCGeometry :: WriteOCC_STL(char * filename)
+- {
+- cout << "writing stl..."; cout.flush();
+- StlAPI_Writer writer;
+- writer.RelativeMode() = Standard_False;
+-
+- writer.SetDeflection(0.02);
+- writer.Write(shape,filename);
+-
+- cout << "done" << endl;
+- }
+-
+-
+-
+ // Philippose - 23/02/2009
+ /* Special IGES File load function including the ability
+ to extract individual surface colours via the extended
+diff -aur netgen-5.3.1/libsrc/occ/occgeom.hpp netgen-5.3.1.patched/libsrc/occ/occgeom.hpp +--- netgen-5.3.1/libsrc/occ/occgeom.hpp 2014-08-29 11:54:03.000000000 +0200 ++++ netgen-5.3.1.patched/libsrc/occ/occgeom.hpp 2016-05-01 16:08:01.966629365 +0200 +@@ -385,8 +385,6 @@ + void GetNotDrawableFaces (stringstream & str);
+ bool ErrorInSurfaceMeshing ();
+
+- void WriteOCC_STL(char * filename);
+-
+ virtual int GenerateMesh (Mesh*& mesh, MeshingParameters & mparam,
+ int perfstepsstart, int perfstepsend);
+
|