public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/
@ 2013-12-03 14:53 Justin Lecher
  0 siblings, 0 replies; 8+ messages in thread
From: Justin Lecher @ 2013-12-03 14:53 UTC (permalink / raw
  To: gentoo-commits

commit:     f50e31a1de22f65272d98b092b777c641cd36707
Author:     Christophe Paccolat <chr.paccolat <AT> mycable <DOT> ch>
AuthorDate: Mon Dec  3 13:20:18 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Dec  3 07:25:45 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=f50e31a1

sci-mathematics/netgen: Version bump

---
 .../netgen-5.x-compile-against-occ-6.5.x.patch     | 28 +++++++
 .../netgen/files/netgen-5.x-missing-define.patch   | 38 ++++++++++
 sci-mathematics/netgen/files/netgen.desktop        |  5 +-
 sci-mathematics/netgen/netgen-5.0.0.ebuild         | 88 ++++++++++++++++++++++
 4 files changed, 156 insertions(+), 3 deletions(-)

diff --git a/sci-mathematics/netgen/files/netgen-5.x-compile-against-occ-6.5.x.patch b/sci-mathematics/netgen/files/netgen-5.x-compile-against-occ-6.5.x.patch
new file mode 100644
index 0000000..ce581ce
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-5.x-compile-against-occ-6.5.x.patch
@@ -0,0 +1,28 @@
+--- libsrc/occ/Partition_Spliter.cxx.old	2012-11-14 16:14:39.440625195 +0100
++++ libsrc/occ/Partition_Spliter.cxx	2012-11-14 16:15:20.035646075 +0100
+@@ -1169,8 +1169,8 @@
+           for (; j<=nbj && ok; ++j) {
+             if (Extrema.IsMin(j)) {
+ 	      hasMin = Standard_True;
+-	      ok = Extrema.Value(j) <= tol;  // V6.3
+-	      // ok = Extrema.SquareDistance(j) <= tol;  // V6.5
++	      // ok = Extrema.Value(j) <= tol;  // V6.3
++	      ok = Extrema.SquareDistance(j) <= tol;  // V6.5
+ 	    }
+           }
+         }
+--- libsrc/occ/Partition_Inter3d.cxx.old	2012-11-14 16:13:11.149581085 +0100
++++ libsrc/occ/Partition_Inter3d.cxx	2012-11-14 16:14:20.017615214 +0100
+@@ -243,9 +243,9 @@
+       Standard_Integer i, nbExt = anExtPS.NbExt();
+       Extrema_POnSurf aPOnSurf;
+       for (i = 1; i <= nbExt; ++i )
+-	if (anExtPS.Value( i ) <= TolE)               // V6.3
+-	  // if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
+-	  {
++	//	if (anExtPS.Value( i ) <= TolE)               // V6.3
++	if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
++	{
+           aPOnSurf = anExtPS.Point( i );
+           break;
+         }

diff --git a/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch b/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch
new file mode 100644
index 0000000..4ad5c52
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch
@@ -0,0 +1,38 @@
+--- libsrc/occ/Partition_Loop2d.cxx.orig	2012-11-14 21:16:22.876287910 +0100
++++ libsrc/occ/Partition_Loop2d.cxx	2012-11-14 21:22:30.909650554 +0100
+@@ -13,6 +13,7 @@
+ 
+ //using namespace std;
+ #include <climits>
++#include <cmath>
+ #include "Partition_Loop2d.ixx"
+ 
+ #include "utilities.h"
+@@ -210,7 +211,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 +235,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,
+--- configure.ac.orig	2012-11-15 14:55:45.048938870 +0100
++++ configure.ac	2012-11-15 14:55:12.545923777 +0100
+@@ -14,6 +14,7 @@
+ AC_DISABLE_STATIC
+ 
+ AC_LANG([C++])
++AM_PROG_AR
+ AC_PROG_CXX
+ AC_PROG_LIBTOOL
+ LT_INIT

diff --git a/sci-mathematics/netgen/files/netgen.desktop b/sci-mathematics/netgen/files/netgen.desktop
index 9b48d69..714ba53 100644
--- a/sci-mathematics/netgen/files/netgen.desktop
+++ b/sci-mathematics/netgen/files/netgen.desktop
@@ -1,9 +1,8 @@
 [Desktop Entry]
-Encoding=UTF-8
 Name=Netgen
 Comment=3D modeling, Mesh generation.
 Exec=/usr/bin/netgen
 Icon=netgen
-Terminal=0
+Terminal=false
 Type=Application
-Categories=Graphics;Application;
+Categories=Graphics;

diff --git a/sci-mathematics/netgen/netgen-5.0.0.ebuild b/sci-mathematics/netgen/netgen-5.0.0.ebuild
new file mode 100644
index 0000000..f0588d5
--- /dev/null
+++ b/sci-mathematics/netgen/netgen-5.0.0.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:  $
+
+EAPI="2"
+
+inherit autotools eutils flag-o-matic multilib versionator
+
+MY_PN=${PN}-mesher
+MY_PV=$(get_version_component_range 1-2)
+DESCRIPTION="NETGEN is an automatic 3d tetrahedral mesh generator"
+HOMEPAGE="http://www.hpfem.jku.at/netgen/"
+SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}/${MY_PV}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64 ~x86"
+IUSE="-ffmpeg jpeg -mpi opencascade"
+SLOT="0"
+
+DEPEND="dev-tcltk/tix
+	dev-tcltk/togl:1.7
+	virtual/opengl
+	x11-libs/libXmu
+	opencascade? ( sci-libs/opencascade )
+	ffmpeg? ( media-video/ffmpeg )
+	jpeg? ( virtual/jpeg )
+	mpi? ( virtual/mpi ) "
+RDEPEND="${DEPEND}"
+# Note, MPI has not be tested.
+
+src_prepare()
+{
+	# Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824
+	epatch "${FILESDIR}/${PN}-5.x-compile-against-occ-6.5.x.patch"
+	epatch "${FILESDIR}/${PN}-5.x-missing-define.patch"
+	eautoreconf
+}
+
+src_configure() {
+	# This is not the most clever way to deal with these flags
+	# but --disable-xxx does not seem to work correcly, so...
+	sed -i -e 's:-lTogl:-lTogl1.7:' ng/Makefile.am || die
+	local myconf="--with-togl=/usr/$(get_libdir)/Togl1.7"
+
+	if use opencascade; then
+		myconf="${myconf} --enable-occ --with-occ=$CASROOT"
+		append-ldflags -L$CASROOT/lin/$(get_libdir)
+	fi
+
+	use mpi && myconf="${myconf} --enable-parallel"
+	use ffmpeg && myconf="${myconf} --enable-ffmpeg"
+	use jpeg && myconf="${myconf} --enable-jpeglib"
+
+	append-cppflags -I/usr/include/togl-1.7
+
+	econf \
+		${myconf}
+
+	# This would be the more elegant way:
+# 	econf \
+# 		$(use_enable opencascade occ) \
+# 		$(use_with opencascade "occ=$CASROOT") \
+# 		$(use_enable mpi parallel) \
+# 		$(use_enable ffmpeg) \
+# 		$(use_enable jpeg jpeglib)
+}
+
+src_install() {
+	local NETGENDIR="/usr/share/netgen"
+
+	echo -e "NETGENDIR=${NETGENDIR} \nLDPATH=/usr/$(get_libdir)/Togl1.7" > ./99netgen
+	doenvd 99netgen
+
+	emake DESTDIR="${D}" install || die "make install failed"
+	mv "${D}"/usr/bin/{*.tcl,*.ocf} "${D}${NETGENDIR}"
+
+	# Install icon and .desktop for menu entry
+	doicon "${FILESDIR}"/${PN}.png || die "doicon failed"
+	domenu "${FILESDIR}"/${PN}.desktop || die "domenu failed"
+}
+
+pkg_postinst() {
+	elog "Please make sure to update your environment variables:"
+	elog "env-update && source /etc/profile"
+	elog "Netgen ebuild is still under development."
+	elog "Help us improve the ebuild in:"
+	elog "http://bugs.gentoo.org/show_bug.cgi?id=155424"
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/
@ 2016-02-22  8:38 Justin Lecher
  0 siblings, 0 replies; 8+ messages in thread
From: Justin Lecher @ 2016-02-22  8:38 UTC (permalink / raw
  To: gentoo-commits

commit:     ff32a770a509011f0f527f2972e7f4825d3f6281
Author:     Grégory Salvan <apieum <AT> gmail <DOT> com>
AuthorDate: Sat Feb 20 21:18:33 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 08:36:31 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=ff32a770

added fedora metis patch

 .../netgen/files/netgen-5.x-fedora-metis.patch     | 93 ++++++++++++++++++++++
 sci-mathematics/netgen/netgen-5.3.1.ebuild         |  2 +
 2 files changed, 95 insertions(+)

diff --git a/sci-mathematics/netgen/files/netgen-5.x-fedora-metis.patch b/sci-mathematics/netgen/files/netgen-5.x-fedora-metis.patch
new file mode 100644
index 0000000..68b3396
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-5.x-fedora-metis.patch
@@ -0,0 +1,93 @@
+--- ./netgen-5.3.1/libsrc/meshing/parallelmesh.cpp	2016-02-20 21:55:59.227450843 +0100
++++ ./netgen/libsrc/meshing/parallelmesh.cpp	2016-02-20 21:46:32.331435233 +0100
+@@ -14,7 +14,7 @@
+ 
+ #if METIS_VER_MAJOR >= 5
+ #define METIS5
+-    typedef idx_t idxtype;   
++    typedef metis::idx_t idxtype;
+ #else
+ #define METIS4
+     typedef idxtype idx_t;  
+@@ -794,10 +794,10 @@
+     eptr.Append (eind.Size());
+     Array<idx_t> epart(ne), npart(nn);
+ 
+-    int nparts = ntasks-1;
+-    int edgecut;
++    metis::idx_t nparts = ntasks-1;
++    metis::idx_t edgecut;
+ 
+-    int ncommon = 3;
++    metis::idx_t ncommon = 3;
+     METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &ncommon, &nparts,
+ 			NULL, NULL,
+ 			&edgecut, &epart[0], &npart[0]);
+@@ -1029,11 +1029,11 @@
+     eptr.Append (eind.Size());
+     Array<idx_t> epart(ne), npart(nn);
+ 
+-    int nparts = ntasks-1;
+-    int edgecut;
++    metis::idx_t nparts = ntasks-1;
++    metis::idx_t edgecut;
+ 
+ 
+-    int ncommon = 3;
++    metis::idx_t ncommon = 3;
+     METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &nwgt[0], NULL, &ncommon, &nparts,
+ 			NULL, NULL,
+ 			&edgecut, &epart[0], &npart[0]);
+@@ -1266,7 +1266,7 @@
+ 
+     for ( int vert = 0; vert < nn; vert++ )
+       {
+-	FlatArray<int> array ( cnt[vert], &adjacency[ xadj[vert] ] );
++	FlatArray<metis::idx_t> array ( cnt[vert], &adjacency[ xadj[vert] ] );
+ 	BubbleSort(array);
+       }
+ 
+@@ -1377,7 +1377,7 @@
+ 
+     for ( int el = 0; el < ne; el++ )
+       {
+-	FlatArray<int> array ( cnt[el], &adjacency[ xadj[el] ] );
++	FlatArray<metis::idx_t> array ( cnt[el], &adjacency[ xadj[el] ] );
+ 	BubbleSort(array);
+       }
+ 
+@@ -1428,8 +1428,8 @@
+   void Mesh :: PartDualHybridMesh2D ( ) 
+   {
+ #ifdef METIS
+-    int ne = GetNSE();
+-    int nv = GetNV();
++    metis::idx_t ne = GetNSE();
++    metis::idx_t nv = GetNV();
+ 
+     Array<idxtype> xadj(ne+1);
+     Array<idxtype> adjacency(ne*4);
+@@ -1484,18 +1484,18 @@
+ 
+     idxtype *v_weights = NULL, *e_weights = NULL;
+ 
+-    int weightflag = 0;
+-    int numflag = 0;
+-    int nparts = ntasks - 1;
++    metis::idx_t weightflag = 0;
++    metis::idx_t numflag = 0;
++    metis::idx_t nparts = ntasks - 1;
+ 
+-    int edgecut;
++    metis::idx_t edgecut;
+     Array<idxtype> part(ne);
+ 
+     for ( int el = 0; el < ne; el++ )
+       BubbleSort (adjacency.Range (xadj[el], xadj[el+1]));
+ 
+ #ifdef METIS4	
+-    int options[5];
++    metis::idx_t options[5];
+     options[0] = 0;
+     METIS_PartGraphKway ( &ne, &xadj[0], &adjacency[0], v_weights, e_weights, &weightflag, 
+ 			  &numflag, &nparts, options, &edgecut, &part[0] );

diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild
index 9a1f35c..cf09c82 100644
--- a/sci-mathematics/netgen/netgen-5.3.1.ebuild
+++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild
@@ -36,6 +36,8 @@ src_prepare() {
 	# Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824
 	epatch "${FILESDIR}/${PN}-5.x-missing-define.patch"
 	epatch "${FILESDIR}/${PN}-5.x-metis-numflag.patch"
+	# Taken from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_metis.patch
+	epatch "${FILESDIR}/${PN}-5.x-fedora-metis.patch"
 	epatch "${FILESDIR}/${PN}-5.x-occ-stl-api-change.patch"
 	if use mpi; then
 		export CC=mpicc


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/
@ 2016-02-22  8:38 Justin Lecher
  0 siblings, 0 replies; 8+ messages in thread
From: Justin Lecher @ 2016-02-22  8:38 UTC (permalink / raw
  To: gentoo-commits

commit:     3addb11abe96717bdd72e01ee5dff2a47aa3f9e7
Author:     Grégory Salvan <apieum <AT> gmail <DOT> com>
AuthorDate: Sat Feb 13 11:40:48 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 08:36:31 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=3addb11a

patch netgen for occ to integrate version 5.3.1 see #436

 .../files/netgen-5.x-occ-stl-api-change.patch      | 94 ++++++++++++++++++++++
 sci-mathematics/netgen/netgen-5.3.1.ebuild         | 16 +++-
 2 files changed, 109 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch b/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch
new file mode 100644
index 0000000..05f3a54
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch
@@ -0,0 +1,94 @@
+--- libsrc/occ/occgeom.cpp	2014-08-29 11:54:03.000000000 +0200
++++ libsrc/occ/occgeom.cpp	2016-02-12 21:14:49.258982206 +0100
+@@ -149,7 +149,7 @@
+ 
+          for (exp0.Init (shape, TopAbs_FACE); exp0.More(); exp0.Next())
+          {
+-            // Variable to hold the colour (if there exists one) of 
++            // Variable to hold the colour (if there exists one) of
+             // the current face being processed
+             Quantity_Color face_colour;
+ 
+@@ -190,7 +190,7 @@
+                rebuild->Replace(face, newface, Standard_False);
+             }
+ 
+-            // Set the original colour of the face to the newly created 
++            // Set the original colour of the face to the newly created
+             // face (after the healing process)
+             face = TopoDS::Face (exp0.Current());
+             face_colours->SetColor(face,face_colour,XCAFDoc_ColorSurf);
+@@ -815,11 +815,11 @@
+       face_maxh.SetSize (fmap.Extent());
+       face_maxh = mparam.maxh;
+ 
+-      // Philippose - 15/01/2010      
+-      face_maxh_modified.DeleteAll();      
+-      face_maxh_modified.SetSize(fmap.Extent());      
++      // Philippose - 15/01/2010
++      face_maxh_modified.DeleteAll();
++      face_maxh_modified.SetSize(fmap.Extent());
+       face_maxh_modified = 0;
+-      
++
+ 
+       // Philippose - 17/01/2009
+       face_sel_status.DeleteAll();
+@@ -845,7 +845,7 @@
+       cout << "Trying to sew faces ..." << flush;
+ 
+       BRepOffsetAPI_Sewing sewedObj(1);
+- 
++
+       for (int i = 1; i <= fmap.Extent(); i++)
+       {
+          TopoDS_Face face = TopoDS::Face (fmap(i));
+@@ -1038,9 +1038,6 @@
+    {
+       cout << "writing stl..."; cout.flush();
+       StlAPI_Writer writer;
+-      writer.RelativeMode() = Standard_False;
+-
+-      writer.SetDeflection(0.02);
+       writer.Write(shape,filename);
+ 
+       cout << "done" << endl;
+@@ -1109,7 +1106,7 @@
+       }
+ 
+ 
+-      // For the IGES Reader, all the shapes can be exported as one compund shape 
++      // For the IGES Reader, all the shapes can be exported as one compund shape
+       // using the "OneShape" member
+       occgeo->shape = reader.OneShape();
+       occgeo->face_colours = iges_colour_contents;
+@@ -1187,7 +1184,7 @@
+       }
+ 
+ 
+-      // For the STEP File Reader in OCC, the 1st Shape contains the entire 
++      // For the STEP File Reader in OCC, the 1st Shape contains the entire
+       // compound geometry as one shape
+       occgeo->shape = step_shape_contents->GetShape(step_shapes.Value(1));
+       occgeo->face_colours = step_colour_contents;
+@@ -1218,7 +1215,7 @@
+       }
+ 
+       // Philippose - 23/02/2009
+-      // Fixed a bug in the OpenCascade XDE Colour handling when 
++      // Fixed a bug in the OpenCascade XDE Colour handling when
+       // opening BREP Files, since BREP Files have no colour data.
+       // Hence, the face_colours Handle needs to be created as a NULL handle.
+       occgeo->face_colours = Handle_XCAFDoc_ColorTool();
+@@ -1236,9 +1233,9 @@
+   void OCCGeometry :: Save (string sfilename) const
+   {
+     const char * filename = sfilename.c_str();
+-    if (strlen(filename) < 4) 
++    if (strlen(filename) < 4)
+       throw NgException ("illegal filename");
+-    
++
+     if (strcmp (&filename[strlen(filename)-3], "igs") == 0)
+       {
+ 	IGESControl_Writer writer("millimeters", 1);

diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild
index 8a2f60b..16441ff 100644
--- a/sci-mathematics/netgen/netgen-5.3.1.ebuild
+++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild
@@ -25,7 +25,7 @@ DEPEND="
 	opencascade? ( sci-libs/opencascade:* )
 	ffmpeg? ( media-video/ffmpeg )
 	jpeg? ( virtual/jpeg:0= )
-	mpi? ( virtual/mpi ( || ( sci-libs/parmetis sci-libs/metis ) ) ) "
+	mpi? ( virtual/mpi ( || ( sci-libs/parmetis <sci-libs/metis-5.0 ) ) sci-libs/hdf5[mpi] ) "
 RDEPEND="${DEPEND}"
 # Note, MPI has not be tested.
 
@@ -33,6 +33,14 @@ src_prepare() {
 	# Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824
 	epatch "${FILESDIR}/${PN}-5.x-missing-define.patch"
 	epatch "${FILESDIR}/${PN}-5.x-metis-numflag.patch"
+	epatch "${FILESDIR}/${PN}-5.x-occ-stl-api-change.patch"
+	if use mpi; then
+		export CC=mpicc
+		export CXX=mpic++
+		export FC=mpif90
+		export F90=mpif90
+		export F77=mpif77
+	fi
 	eautoreconf
 }
 
@@ -47,8 +55,14 @@ src_configure() {
 		append-ldflags -L$CASROOT/lin/$(get_libdir)
 	fi
 	if use mpi; then
+		ewarn "*************************************************************************"
+		ewarn ""
+		ewarn "MPI has not been tested, you should probably deactivate the mpi use flag"
+		ewarn ""
+		ewarn "*************************************************************************"
 		myconf="${myconf} --enable-parallel"
 		append-cppflags -I/usr/include/metis
+		append-ldflags -L/usr/$(get_libdir)/openmpi/
 	fi
 	use ffmpeg && myconf="${myconf} --enable-ffmpeg"
 	use jpeg && myconf="${myconf} --enable-jpeglib"


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/
@ 2016-02-22  8:38 Justin Lecher
  0 siblings, 0 replies; 8+ messages in thread
From: Justin Lecher @ 2016-02-22  8:38 UTC (permalink / raw
  To: gentoo-commits

commit:     903b613b84b3e2622dd16d94dbee41d368ba8fe3
Author:     Grégory Salvan <apieum <AT> gmail <DOT> com>
AuthorDate: Sun Feb 21 00:52:54 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 08:36:31 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=903b613b

Added fedora fixes patch

 .../netgen/files/netgen-5.x-fedora-fixes.patch     | 223 +++++++++++++++++++++
 sci-mathematics/netgen/netgen-5.3.1.ebuild         |   2 +
 2 files changed, 225 insertions(+)

diff --git a/sci-mathematics/netgen/files/netgen-5.x-fedora-fixes.patch b/sci-mathematics/netgen/files/netgen-5.x-fedora-fixes.patch
new file mode 100644
index 0000000..5cb399e
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-5.x-fedora-fixes.patch
@@ -0,0 +1,223 @@
+diff -uwrN netgen-5.3.1/libsrc/meshing/meshtype.cpp netgen/libsrc/meshing/meshtype.cpp
+--- netgen-5.3.1/libsrc/meshing/meshtype.cpp	2016-02-20 21:55:59.226450843 +0100
++++ netgen/libsrc/meshing/meshtype.cpp	2016-02-20 23:54:12.293646166 +0100
+@@ -1,4 +1,5 @@
+ #include <mystdlib.h>
++#include <float.h> // to get DBL_MIN defined
+ 
+ #include "meshing.hpp"  
+ 
+@@ -666,7 +667,8 @@
+ 
+         double det = trans.Det();
+ 
+-        if (det <= 0)
++        // if (det <= 0)
++        if (det <= DBL_MIN) // avoid FPE
+           err += 1e12;
+         else
+           err += frob * frob / det;
+@@ -722,7 +724,8 @@
+ 
+             double det = trans(0,0)*trans(1,1)-trans(1,0)*trans(0,1);
+ 
+-            if (det <= 0)
++            // if (det <= 0)
++            if (det <= DBL_MIN)  // avoid FPE
+               {
+                 dd = 0;
+                 return 1e12;
+@@ -806,7 +809,8 @@
+           = dtrans(0,0) * trans(1,1) - trans(0,1) * dtrans(1,0)
+           + trans(0,0) * dtrans(1,1) - dtrans(0,1) * trans(1,0);
+ 
+-        if (det <= 0)
++        // if (det <= 0)
++        if (det <= DBL_MIN) // avoid FPE
+           err += 1e12;
+         else
+           {
+@@ -856,7 +860,8 @@
+         frob /= 2;
+ 
+         double det = trans.Det();
+-        if (det <= 0)
++        //if (det <= 0)
++        if (det <= DBL_MIN) // avoid FPE
+           err += 1e12;
+         else
+           err += frob * frob / det;
+@@ -1864,7 +1869,8 @@
+       case PYRAMID:
+         {
+           double noz = 1-p(2);
+-          if (noz == 0.0) noz = 1e-10;
++          //if (noz == 0.0) noz = 1e-10;
++          if (noz <= DBL_MIN) noz = 1e-10; // avoid FPE
+ 
+           double xi  = p(0) / noz;
+           double eta = p(1) / noz;
+@@ -2513,10 +2519,10 @@
+ 
+   MeshingParameters :: MeshingParameters ()
+   {
+-    optimize3d = "cmdmustm";
++    optimize3d = (char*)"cmdmustm"; // optimize3d = "cmdmustm";
+     //optimize3d = "cmdmstm";
+     optsteps3d = 3;
+-    optimize2d = "smsmsmSmSmSm";
++    optimize2d = (char*)"smsmsmSmSmSm"; // optimize2d = "smsmsmSmSmSm";
+     optsteps2d = 3;
+     opterrpow = 2;
+     blockfill = 1;
+diff -uwrN netgen-5.3.1/libsrc/meshing/meshtype.hpp netgen/libsrc/meshing/meshtype.hpp
+--- netgen-5.3.1/libsrc/meshing/meshtype.hpp	2016-02-20 21:55:59.226450843 +0100
++++ netgen/libsrc/meshing/meshtype.hpp	2016-02-20 23:54:12.295646166 +0100
+@@ -15,6 +15,7 @@
+     Classes for NETGEN
+   */
+ 
++class Mesh; // added due to compilation errors on some platforms
+ 
+ 
+   enum ELEMENT_TYPE { 
+diff -uwrN netgen-5.3.1/libsrc/meshing/smoothing2.cpp netgen/libsrc/meshing/smoothing2.cpp
+--- netgen-5.3.1/libsrc/meshing/smoothing2.cpp	2016-02-20 21:55:59.228450843 +0100
++++ netgen/libsrc/meshing/smoothing2.cpp	2016-02-20 23:54:12.298646166 +0100
+@@ -361,7 +361,8 @@
+     vgrad = 0;
+     double badness = 0;
+ 
+-    ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
++    //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
++    n = ld.normal;
+     pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2;
+ 
+     //  meshthis -> ProjectPoint (surfi, pp1);
+@@ -577,7 +578,8 @@
+     vgrad = 0;
+     badness = 0;
+ 
+-    ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
++    //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
++    n = ld.normal;
+ 
+     pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2;
+ 
+@@ -649,7 +651,8 @@
+     vgrad = 0;
+     badness = 0;
+ 
+-    ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
++    //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
++    n = ld.normal;
+ 
+     // pp1 = sp1;
+     //    pp1.Add2 (x.Get(1), t1, x.Get(2), t2);
+diff -uwrN netgen-5.3.1/libsrc/occ/occconstruction.cpp netgen/libsrc/occ/occconstruction.cpp
+--- netgen-5.3.1/libsrc/occ/occconstruction.cpp	2016-02-20 21:53:44.420447131 +0100
++++ netgen/libsrc/occ/occconstruction.cpp	2016-02-20 23:54:12.299646166 +0100
+@@ -28,7 +28,7 @@
+ #include <BRepAlgoAPI_Common.hxx>
+ #include <BRepAlgoAPI_Fuse.hxx>
+ #include <BRepAlgoAPI_Section.hxx>
+-#include <BRepOffsetAPI_Sewing.hxx>
++//#include <BRepOffsetAPI_Sewing.hxx>
+ //#include <BRepAlgo_Sewing.hxx>
+ #include <BRepOffsetAPI_MakeOffsetShape.hxx>
+ #include <ShapeFix_Shape.hxx>
+diff -uwrN netgen-5.3.1/libsrc/occ/occmeshsurf.cpp netgen/libsrc/occ/occmeshsurf.cpp
+--- netgen-5.3.1/libsrc/occ/occmeshsurf.cpp	2016-02-20 21:53:44.421447131 +0100
++++ netgen/libsrc/occ/occmeshsurf.cpp	2016-02-20 23:54:12.310646166 +0100
+@@ -6,6 +6,7 @@
+ #include <meshing.hpp>
+ #include <GeomLProp_SLProps.hxx>
+ #include <ShapeAnalysis_Surface.hxx>
++#include <GeomAPI_ProjectPointOnCurve.hxx> // -- moved here from occgeom.hpp
+ 
+ 
+ namespace netgen
+@@ -689,7 +691,7 @@
+       }
+   
+     newp = hnewp;
+-  }
++  }//; -- to compile with -Wall -pedantic
+ 
+ 
+   void OCCRefinementSurfaces ::  
+ 
+ 
+diff -uwrN netgen-5.3.1/libsrc/occ/Partition_Inter3d.cxx netgen/libsrc/occ/Partition_Inter3d.cxx
+--- netgen-5.3.1/libsrc/occ/Partition_Inter3d.cxx	2016-02-20 21:53:44.418447131 +0100
++++ netgen/libsrc/occ/Partition_Inter3d.cxx	2016-02-20 23:54:12.311646166 +0100
+@@ -243,8 +243,10 @@
+       Standard_Integer i, nbExt = anExtPS.NbExt();
+       Extrema_POnSurf aPOnSurf;
+       for (i = 1; i <= nbExt; ++i )
++       // porting to OCCT6.5.1
+ 	  // if (anExtPS.Value( i ) <= TolE)               // V6.3
+-	  if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
++       // if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
++       if (anExtPS.SquareDistance( i ) <= TolE * TolE)
+ 	  {
+           aPOnSurf = anExtPS.Point( i );
+           break;
+diff -uwrN netgen-5.3.1/libsrc/occ/Partition_Spliter.cxx netgen/libsrc/occ/Partition_Spliter.cxx
+--- netgen-5.3.1/libsrc/occ/Partition_Spliter.cxx	2016-02-20 21:53:44.420447131 +0100
++++ netgen/libsrc/occ/Partition_Spliter.cxx	2016-02-20 23:54:12.313646166 +0100
+@@ -1169,8 +1169,10 @@
+           for (; j<=nbj && ok; ++j) {
+             if (Extrema.IsMin(j)) {
+ 	      hasMin = Standard_True;
++	      // porting to OCCT6.5.1
+ 	      // ok = Extrema.Value(j) <= tol;  // V6.3
+-	      ok = Extrema.SquareDistance(j) <= tol;  // V6.5
++	      // ok = Extrema.SquareDistance(j) <= tol;  // V6.5
++	      ok = Extrema.SquareDistance(j) <= tol * tol;
+ 	    }
+           }
+         }
+diff -uwrN netgen-5.3.1/libsrc/occ/utilities.h netgen/libsrc/occ/utilities.h
+--- netgen-5.3.1/libsrc/occ/utilities.h	2016-02-20 21:53:44.421447131 +0100
++++ netgen/libsrc/occ/utilities.h	2016-02-20 23:54:12.314646166 +0100
+@@ -33,6 +33,7 @@
+ 
+ #include <string>
+ #include <iostream>
++#include <iomanip>
+ #include <cstdlib>
+ // #include "SALOME_Log.hxx"
+ 
+diff -uwrN netgen-5.3.1/libsrc/stlgeom/stlgeommesh.cpp netgen/libsrc/stlgeom/stlgeommesh.cpp
+--- netgen-5.3.1/libsrc/stlgeom/stlgeommesh.cpp	2016-02-20 21:55:59.234450844 +0100
++++ netgen/libsrc/stlgeom/stlgeommesh.cpp	2016-02-20 23:54:12.315646166 +0100
+@@ -1435,7 +1435,8 @@
+ 	  /*
+ 	  if (!optstring || strlen(optstring) == 0)
+ 	    {
+-	      mparam.optimize2d = "smcm";
++	      //mparam.optimize2d = (char*)"smcm";
++              mparam.optimize2d = (char*)"smcm";
+ 	    }
+ 	  else
+ 	    {
+@@ -1453,7 +1454,7 @@
+ 	      mesh -> LoadLocalMeshSize (mparam.meshsizefilename);	      
+ 	      mesh -> CalcLocalHFromSurfaceCurvature (mparam.grading, 
+ 						      stlparam.resthsurfmeshcurvfac);
+-	      mparam.optimize2d = "cmsmSm";
++	      mparam.optimize2d = "(char*)cmsmSm";
+ 	      STLSurfaceOptimization (*stlgeometry, *mesh, mparam);
+ #ifdef STAT_STREAM
+ 	      (*statout) << GetTime() << " & ";
+@@ -1560,7 +1561,8 @@
+ 	  /*
+ 	  if (!optstring || strlen(optstring) == 0)
+ 	    {
+-	      mparam.optimize3d = "cmdmstm";
++              //mparam.optimize3d = "cmdmstm";
++	      mparam.optimize3d = (char*)"cmdmstm";
+ 	    }
+ 	  else
+ 	    {

diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild
index 1161cbd..3d5b624 100644
--- a/sci-mathematics/netgen/netgen-5.3.1.ebuild
+++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild
@@ -40,6 +40,8 @@ src_prepare() {
 	epatch "${FILESDIR}/${PN}-5.x-occ-stl-api-change.patch"
 	# Taken from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.1_build.patch
 	epatch "${FILESDIR}/${PN}-5.3.1_build.patch"
+	# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_fixes.patch
+	epatch "${FILESDIR}/${PN}-5.x-fedora-fixes.patch"
 	if use mpi; then
 		export CC=mpicc
 		export CXX=mpic++


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/
@ 2016-02-22  8:38 Justin Lecher
  0 siblings, 0 replies; 8+ messages in thread
From: Justin Lecher @ 2016-02-22  8:38 UTC (permalink / raw
  To: gentoo-commits

commit:     77890639257266037035bd07c0edebd3a7e6b26d
Author:     Grégory Salvan <apieum <AT> gmail <DOT> com>
AuthorDate: Sun Feb 21 20:38:46 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 08:36:31 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=77890639

Added includes fixes patch

 .../netgen/files/netgen-5.x-includes-fixes.patch   | 29 ++++++++++++++++++++++
 sci-mathematics/netgen/netgen-5.3.1.ebuild         |  1 +
 2 files changed, 30 insertions(+)

diff --git a/sci-mathematics/netgen/files/netgen-5.x-includes-fixes.patch b/sci-mathematics/netgen/files/netgen-5.x-includes-fixes.patch
new file mode 100644
index 0000000..650b575
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-5.x-includes-fixes.patch
@@ -0,0 +1,29 @@
+diff -uwrN -x.git netgen-5.3.1/libsrc/include/meshing.hpp netgen/libsrc/include/meshing.hpp
+--- netgen-5.3.1/libsrc/include/meshing.hpp	2016-02-21 20:12:55.885186643 +0100
++++ netgen/libsrc/include/meshing.hpp	2016-02-21 20:09:26.275180871 +0100
+@@ -1 +1 @@
+-#include <../meshing/meshing.hpp>
++#include "../meshing/meshing.hpp"
+diff -uwrN -x.git netgen-5.3.1/libsrc/include/myadt.hpp netgen/libsrc/include/myadt.hpp
+--- netgen-5.3.1/libsrc/include/myadt.hpp	2016-02-21 20:12:55.886186643 +0100
++++ netgen/libsrc/include/myadt.hpp	2016-02-21 20:09:26.275180871 +0100
+@@ -1 +1 @@
+-#include <../general/myadt.hpp>
++#include "../general/myadt.hpp"
+diff -uwrN -x.git netgen-5.3.1/libsrc/include/stlgeom.hpp netgen/libsrc/include/stlgeom.hpp
+--- netgen-5.3.1/libsrc/include/stlgeom.hpp	2016-02-21 20:12:55.886186643 +0100
++++ netgen/libsrc/include/stlgeom.hpp	2016-02-21 20:09:26.275180871 +0100
+@@ -1 +1 @@
+-#include <../stlgeom/stlgeom.hpp>
++#include "../stlgeom/stlgeom.hpp"
+diff -uwrN -x.git netgen-5.3.1/libsrc/meshing/parallelmesh.cpp netgen/libsrc/meshing/parallelmesh.cpp
+--- netgen-5.3.1/libsrc/meshing/parallelmesh.cpp	2016-02-21 20:12:55.888186643 +0100
++++ netgen/libsrc/meshing/parallelmesh.cpp	2016-02-21 20:09:26.276180871 +0100
+@@ -1,6 +1,6 @@
+ #ifdef PARALLEL
+ 
+-#include <meshing.hpp>
++#include "meshing.hpp"
+ #include "paralleltop.hpp"
+ 
+ // #define METIS4

diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild
index 4cc2cd9..d3cf9f9 100644
--- a/sci-mathematics/netgen/netgen-5.3.1.ebuild
+++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild
@@ -43,6 +43,7 @@ src_prepare() {
 	epatch "${FILESDIR}/${PN}-5.3.1_build.patch"
 	# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_fixes.patch
 	epatch "${FILESDIR}/${PN}-5.x-fedora-fixes.patch"
+	epatch "${FILESDIR}/${PN}-5.x-includes-fixes.patch"
 	if use mpi; then
 		export CC=mpicc
 		export CXX=mpic++


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/
@ 2016-02-22  8:38 Justin Lecher
  0 siblings, 0 replies; 8+ messages in thread
From: Justin Lecher @ 2016-02-22  8:38 UTC (permalink / raw
  To: gentoo-commits

commit:     7882cf4cfd2995f94b03c608ceb7090b97258cf2
Author:     Grégory Salvan <apieum <AT> gmail <DOT> com>
AuthorDate: Sat Feb 20 22:42:39 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 08:36:31 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=7882cf4c

Added build patch from fedora (fix Mesh :: ParallelMetis linking error...)

 .../netgen/files/netgen-5.3.1_build.patch          | 372 +++++++++++++++++++++
 sci-mathematics/netgen/netgen-5.3.1.ebuild         |   2 +
 2 files changed, 374 insertions(+)

diff --git a/sci-mathematics/netgen/files/netgen-5.3.1_build.patch b/sci-mathematics/netgen/files/netgen-5.3.1_build.patch
new file mode 100644
index 0000000..dd8d395
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-5.3.1_build.patch
@@ -0,0 +1,372 @@
+diff -rupN netgen-5.3.1/configure.ac netgen-5.3.1-new/configure.ac
+--- netgen-5.3.1/configure.ac	2014-10-07 21:38:21.990021106 +0200
++++ netgen-5.3.1-new/configure.ac	2014-10-07 21:39:14.530034275 +0200
+@@ -35,15 +35,15 @@ AC_ARG_WITH([occ],
+         [AC_HELP_STRING([--with-occ=dir],[use OpenCascade installed in directory dir])],
+         [occdir=$withval] 
+ 	[occon=true],
+-	[occdir=/opt/OpenCASCADE]
++	[occdir=/usr]
+         )
+ 
+ 
+ 
+ if test a$occon = atrue ; then
+ 
+-	AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I$occdir/inc -I/usr/include/opencascade"])
+-	AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"])
++	AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I/usr/include/oce"])
++	AC_SUBST([OCCLIBS], ["-lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"])
+ 
+ #  -lTKDCAF
+ 
+@@ -89,18 +89,18 @@ AC_ARG_ENABLE([gui],
+         [AC_HELP_STRING([--disable-gui],[don't build netgen with GUI])],
+         [if test "$enableval" = yes; then ngguion=true; else ngguion=false; fi])
+ 
+-metisdir=/usr/local
++metisdir=/usr
+ AC_ARG_WITH([metis], 
+         [AC_HELP_STRING([--with-metis=dir],[path to metis 5.x])],
+         [metisdir=$withval],
+-        [metisdir=/usr/local]
++        [metisdir=/usr]
+ 	)
+ 
+ AC_ARG_ENABLE([parallel],
+         [AC_HELP_STRING([--enable-parallel],[enable mpi parallelization])],
+-	[AC_SUBST([MPI_INCLUDES], "-I$metisdir/include -DMETIS")]
++	[AC_SUBST([MPI_INCLUDES], "-DMETIS")]
+         [CXXFLAGS="$CXXFLAGS -DPARALLEL"]
+-	[AC_SUBST([MPI_LIBS], "-L$metisdir/lib -lmetis")]
++	[AC_SUBST([MPI_LIBS], "-lmetis")]
+         )       
+ #          -DVTRACE
+ #          -lvt-hyb
+diff -rupN netgen-5.3.1/libsrc/csg/Makefile.am netgen-5.3.1-new/libsrc/csg/Makefile.am
+--- netgen-5.3.1/libsrc/csg/Makefile.am	2014-10-07 21:38:21.787017193 +0200
++++ netgen-5.3.1-new/libsrc/csg/Makefile.am	2014-10-07 21:39:14.530034275 +0200
+@@ -8,24 +8,24 @@ revolution.hpp spline3d.hpp vscsg.hpp
+ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include  $(TCL_INCLUDES)
+ METASOURCES = AUTO
+ 
+-lib_LTLIBRARIES = libcsg.la
++lib_LTLIBRARIES = libngcsg.la
+ 
+ 
+-libcsg_la_SOURCES = algprim.cpp brick.cpp   \
++libngcsg_la_SOURCES = algprim.cpp brick.cpp   \
+ bspline2d.cpp csgeom.cpp csgparser.cpp curve2d.cpp edgeflw.cpp	       \
+ explicitcurve2d.cpp extrusion.cpp gencyl.cpp genmesh.cpp identify.cpp  \
+ manifold.cpp meshsurf.cpp polyhedra.cpp revolution.cpp singularref.cpp \
+ solid.cpp specpoin.cpp spline3d.cpp surface.cpp triapprox.cpp
+ 
+-libcsg_la_LIBADD =  $(top_builddir)/libsrc/meshing/libmesh.la
++libngcsg_la_LIBADD =  $(top_builddir)/libsrc/meshing/libngmesh.la
+ 
+ 
+ 
+ if NGGUI
+-lib_LTLIBRARIES += libcsgvis.la 
++lib_LTLIBRARIES += libngcsgvis.la
+ 
+-libcsgvis_la_SOURCES = vscsg.cpp csgpkg.cpp
+-libcsgvis_la_LIBADD = libcsg.la
++libngcsgvis_la_SOURCES = vscsg.cpp csgpkg.cpp
++libngcsgvis_la_LIBADD = libngcsg.la
+ endif
+ 
+ #   $(top_builddir)/libsrc/geom2d/libgeom2d.la 
+diff -rupN netgen-5.3.1/libsrc/general/Makefile.am netgen-5.3.1-new/libsrc/general/Makefile.am
+--- netgen-5.3.1/libsrc/general/Makefile.am	2014-10-07 21:38:21.638014320 +0200
++++ netgen-5.3.1-new/libsrc/general/Makefile.am	2014-10-07 21:39:14.531034296 +0200
+@@ -4,8 +4,8 @@ include_HEADERS = ngexception.hpp
+ 
+ AM_CPPFLAGS =  $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
+ METASOURCES = AUTO
+-noinst_LTLIBRARIES = libgen.la
+-libgen_la_SOURCES = array.cpp bitarray.cpp dynamicmem.cpp flags.cpp \
++noinst_LTLIBRARIES = libnggen.la
++libnggen_la_SOURCES = array.cpp bitarray.cpp dynamicmem.cpp flags.cpp \
+ 	hashtabl.cpp mystring.cpp ngexception.cpp optmem.cpp parthreads.cpp \
+ 	profiler.cpp seti.cpp sort.cpp spbita2d.cpp symbolta.cpp table.cpp \
+ 	mpi_interface.cpp gzstream.cpp
+diff -rupN netgen-5.3.1/libsrc/geom2d/Makefile.am netgen-5.3.1-new/libsrc/geom2d/Makefile.am
+--- netgen-5.3.1/libsrc/geom2d/Makefile.am	2014-10-07 21:38:21.832018060 +0200
++++ netgen-5.3.1-new/libsrc/geom2d/Makefile.am	2014-10-07 21:39:14.531034296 +0200
+@@ -4,18 +4,18 @@ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/inc
+ 
+ METASOURCES = AUTO
+ 
+-lib_LTLIBRARIES = libgeom2d.la 
++lib_LTLIBRARIES = libnggeom2d.la 
+ 
+ if NGGUI
+-lib_LTLIBRARIES += libgeom2dvis.la 
++lib_LTLIBRARIES += libnggeom2dvis.la 
+ endif
+ 
+ 
+ 
+-libgeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp
+-libgeom2d_la_LIBADD = 	$(top_builddir)/libsrc/meshing/libmesh.la
++libnggeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp
++libnggeom2d_la_LIBADD = $(top_builddir)/libsrc/meshing/libngmesh.la $(MPI_LIBS)
+ 
+-libgeom2dvis_la_SOURCES = geom2dpkg.cpp vsgeom2d.cpp
+-libgeom2dvis_la_LIBADD = libgeom2d.la
++libnggeom2dvis_la_SOURCES = geom2dpkg.cpp vsgeom2d.cpp
++libnggeom2dvis_la_LIBADD = libnggeom2d.la -lGL $(MPI_LIBS)
+ 
+ 
+diff -rupN netgen-5.3.1/libsrc/gprim/Makefile.am netgen-5.3.1-new/libsrc/gprim/Makefile.am
+--- netgen-5.3.1/libsrc/gprim/Makefile.am	2014-10-07 21:38:21.719015882 +0200
++++ netgen-5.3.1-new/libsrc/gprim/Makefile.am	2014-10-07 21:39:14.531034296 +0200
+@@ -2,6 +2,6 @@ noinst_HEADERS = adtree.hpp  geom3d.hpp
+ 
+ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include
+ METASOURCES = AUTO
+-noinst_LTLIBRARIES = libgprim.la
+-libgprim_la_SOURCES = adtree.cpp geom2d.cpp geom3d.cpp geomfuncs.cpp \
++noinst_LTLIBRARIES = libnggprim.la
++libnggprim_la_SOURCES = adtree.cpp geom2d.cpp geom3d.cpp geomfuncs.cpp \
+ 	geomtest3d.cpp transform3d.cpp spline.cpp splinegeometry.cpp
+diff -rupN netgen-5.3.1/libsrc/interface/Makefile.am netgen-5.3.1-new/libsrc/interface/Makefile.am
+--- netgen-5.3.1/libsrc/interface/Makefile.am	2014-10-07 21:38:21.846018330 +0200
++++ netgen-5.3.1-new/libsrc/interface/Makefile.am	2014-10-07 21:44:17.523887314 +0200
+@@ -2,14 +2,14 @@ noinst_HEADERS = writeuser.hpp
+ 
+ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface  $(MPI_INCLUDES) $(TCL_INCLUDES) -DOPENGL
+ METASOURCES = AUTO
+-lib_LTLIBRARIES = libinterface.la
+-libinterface_la_SOURCES = nginterface.cpp nginterface_v2.cpp \
++lib_LTLIBRARIES = libnginterface.la
++libnginterface_la_SOURCES = nginterface.cpp nginterface_v2.cpp \
+ 	read_fnf_mesh.cpp readtetmesh.cpp readuser.cpp writeabaqus.cpp writediffpack.cpp \
+ 	writedolfin.cpp writeelmer.cpp writefeap.cpp writefluent.cpp writegmsh.cpp writejcm.cpp \
+ 	writepermas.cpp writetecplot.cpp writetet.cpp writetochnog.cpp writeuser.cpp \
+ 	wuchemnitz.cpp writegmsh2.cpp writeOpenFOAM15x.cpp 
+ 
+ 
+-libinterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
++libnginterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libngmesh.la
+ 
+ # libinterface_la_LDFLAGS = -rdynamic
+diff -rupN netgen-5.3.1/libsrc/linalg/Makefile.am netgen-5.3.1-new/libsrc/linalg/Makefile.am
+--- netgen-5.3.1/libsrc/linalg/Makefile.am	2014-10-07 21:38:21.667014879 +0200
++++ netgen-5.3.1-new/libsrc/linalg/Makefile.am	2014-10-07 21:39:14.532034315 +0200
+@@ -1,8 +1,8 @@
+ noinst_HEADERS = densemat.hpp linalg.hpp polynomial.hpp vector.hpp opti.hpp
+ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include
+ METASOURCES = AUTO
+-noinst_LTLIBRARIES = libla.la
+-libla_la_SOURCES = densemat.cpp polynomial.cpp bfgs.cpp linopt.cpp linsearch.cpp
++noinst_LTLIBRARIES = libngla.la
++libngla_la_SOURCES = densemat.cpp polynomial.cpp bfgs.cpp linopt.cpp linsearch.cpp
+ 
+ #  vector.cpp
+ 
+diff -rupN netgen-5.3.1/libsrc/meshing/Makefile.am netgen-5.3.1-new/libsrc/meshing/Makefile.am
+--- netgen-5.3.1/libsrc/meshing/Makefile.am	2014-10-07 21:38:21.895019275 +0200
++++ netgen-5.3.1-new/libsrc/meshing/Makefile.am	2014-10-07 21:39:14.532034315 +0200
+@@ -15,9 +15,9 @@ clusters.hpp hprefinement.hpp improve3.h
+ 
+ METASOURCES = AUTO
+ 
+-lib_LTLIBRARIES = libmesh.la
++lib_LTLIBRARIES = libngmesh.la
+ 
+-libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \
++libngmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \
+ 	clusters.cpp curvedelems.cpp delaunay.cpp delaunay2d.cpp	    \
+ 	geomsearch.cpp global.cpp hprefinement.cpp improve2.cpp		    \
+ 	improve2gen.cpp improve3.cpp localh.cpp meshclass.cpp		    \
+@@ -30,8 +30,8 @@ libmesh_la_SOURCES = adfront2.cpp adfron
+ 	topology.cpp triarls.cpp validate.cpp zrefine.cpp bcfunctions.cpp   \
+ 	parallelmesh.cpp  paralleltop.cpp  paralleltop.hpp basegeom.cpp 
+ 
+-libmesh_la_LIBADD =  $(top_builddir)/libsrc/linalg/libla.la \
+-	$(top_builddir)/libsrc/gprim/libgprim.la \
+-	$(top_builddir)/libsrc/general/libgen.la \
+-	-lz
++libngmesh_la_LIBADD =  $(top_builddir)/libsrc/linalg/libngla.la \
++	$(top_builddir)/libsrc/gprim/libnggprim.la \
++	$(top_builddir)/libsrc/general/libnggen.la \
++	$(MPI_LIBS) -lz
+ 
+diff -rupN netgen-5.3.1/libsrc/occ/Makefile.am netgen-5.3.1-new/libsrc/occ/Makefile.am
+--- netgen-5.3.1/libsrc/occ/Makefile.am	2014-10-07 21:38:21.739016267 +0200
++++ netgen-5.3.1-new/libsrc/occ/Makefile.am	2014-10-07 21:39:14.533034334 +0200
+@@ -14,20 +14,20 @@ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/inc
+ 
+ METASOURCES = AUTO
+ 
+-lib_LTLIBRARIES = libocc.la
++lib_LTLIBRARIES = libngocc.la
+ 
+ if NGGUI
+-lib_LTLIBRARIES += liboccvis.la 
++lib_LTLIBRARIES += libngoccvis.la 
+ endif
+ 
+ 
+-libocc_la_SOURCES = Partition_Inter2d.cxx Partition_Inter3d.cxx \
++libngocc_la_SOURCES = Partition_Inter2d.cxx Partition_Inter3d.cxx \
+ 	Partition_Loop.cxx Partition_Loop2d.cxx Partition_Loop3d.cxx Partition_Spliter.cxx \
+ 	occconstruction.cpp occgenmesh.cpp occgeom.cpp occmeshsurf.cpp
+ 
+-libocc_la_LIBADD = $(OCCLIBS)
++libngocc_la_LIBADD = $(OCCLIBS)
+ 
+-liboccvis_la_SOURCES = occpkg.cpp vsocc.cpp
+-liboccvis_la_LIBADD = libocc.la
++libngoccvis_la_SOURCES = occpkg.cpp vsocc.cpp
++libngoccvis_la_LIBADD = libngocc.la $(TCL_LIB_SPEC)
+ 
+ 
+diff -rupN netgen-5.3.1/libsrc/stlgeom/Makefile.am netgen-5.3.1-new/libsrc/stlgeom/Makefile.am
+--- netgen-5.3.1/libsrc/stlgeom/Makefile.am	2014-10-07 21:38:21.683015188 +0200
++++ netgen-5.3.1-new/libsrc/stlgeom/Makefile.am	2014-10-07 21:39:14.533034334 +0200
+@@ -4,18 +4,18 @@ stltool.hpp stltopology.hpp vsstl.hpp
+ AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
+ METASOURCES = AUTO
+ 
+-lib_LTLIBRARIES = libstl.la 
++lib_LTLIBRARIES = libngstl.la 
+ 
+ if NGGUI
+-lib_LTLIBRARIES += libstlvis.la 
++lib_LTLIBRARIES += libngstlvis.la 
+ endif
+ 
+-libstl_la_SOURCES = meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp \
++libngstl_la_SOURCES = meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp \
+ 	stlgeommesh.cpp stlline.cpp stltool.cpp stltopology.cpp
+ 
+ 
+-libstlvis_la_SOURCES = stlpkg.cpp vsstl.cpp
+-libstlvis_la_LIBADD = libstl.la
+-libstl_la_LIBADD =  $(top_builddir)/libsrc/meshing/libmesh.la
++libngstlvis_la_SOURCES = stlpkg.cpp vsstl.cpp
++libngstlvis_la_LIBADD = libngstl.la  -lGL $(MPI_LIBS) $(TCL_LIB_SPEC)
++libngstl_la_LIBADD = $(top_builddir)/libsrc/meshing/libngmesh.la $(MPI_LIBS)
+ # libstlvis_la_LIBADD = libstl.la $(top_builddir)/libsrc/linalg/libla.la 
+ 
+diff -rupN netgen-5.3.1/libsrc/visualization/Makefile.am netgen-5.3.1-new/libsrc/visualization/Makefile.am
+--- netgen-5.3.1/libsrc/visualization/Makefile.am	2014-10-07 21:38:21.822017867 +0200
++++ netgen-5.3.1-new/libsrc/visualization/Makefile.am	2014-10-07 21:39:14.533034334 +0200
+@@ -7,11 +7,11 @@ AM_CPPFLAGS =  $(MPI_INCLUDES) -I$(top_s
+ METASOURCES = AUTO
+ 
+ if NGGUI
+-noinst_LTLIBRARIES = libvisual.la
++noinst_LTLIBRARIES = libngvisual.la
+ endif
+ 
+ 
+-libvisual_la_SOURCES = meshdoc.cpp mvdraw.cpp \
++libngvisual_la_SOURCES = meshdoc.cpp mvdraw.cpp \
+ 	vsfieldlines.cpp vsmesh.cpp vssolution.cpp importsolution.cpp
+ 
+-
++libngvisual_la_LIBADD = -lGL
+diff -rupN netgen-5.3.1/ng/Makefile.am netgen-5.3.1-new/ng/Makefile.am
+--- netgen-5.3.1/ng/Makefile.am	2014-10-07 21:38:21.973020778 +0200
++++ netgen-5.3.1-new/ng/Makefile.am	2014-10-07 21:39:14.534034353 +0200
+@@ -17,21 +17,18 @@ MKL_LIBS = -L$(MKLROOT)/lib/intel64  -lm
+ endif
+ # -lpardiso500-GNU472-X86-64 -lgfortran
+ 
+-netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.la \
+-	$(top_builddir)/libsrc/csg/libcsgvis.la \
+-	$(top_builddir)/libsrc/csg/libcsg.la \
+-	$(top_builddir)/libsrc/interface/libinterface.la \
+-	$(top_builddir)/libsrc/meshing/libmesh.la \
+-	-L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS) $(MKL_LIBS) 
+-
+-
+-#
+-#	$(top_builddir)/libsrc/occ/liboccvis.la 
+-#	$(top_builddir)/libsrc/occ/libocc.la 
+-#	$(top_builddir)/libsrc/stlgeom/libstlvis.la 
+-#	$(top_builddir)/libsrc/stlgeom/libstl.la 
+-#	$(top_builddir)/libsrc/geom2d/libgeom2d.la 
+-#	$(top_builddir)/libsrc/geom2d/libgeom2dvis.la 
++netgen_LDADD = $(top_builddir)/libsrc/visualization/libngvisual.la \
++	$(top_builddir)/libsrc/csg/libngcsgvis.la \
++	$(top_builddir)/libsrc/csg/libngcsg.la \
++	$(top_builddir)/libsrc/interface/libnginterface.la \
++	$(top_builddir)/libsrc/meshing/libngmesh.la \
++	$(top_builddir)/libsrc/occ/libngoccvis.la \
++	$(top_builddir)/libsrc/occ/libngocc.la \
++	$(top_builddir)/libsrc/stlgeom/libngstlvis.la \
++	$(top_builddir)/libsrc/stlgeom/libngstl.la \
++	$(top_builddir)/libsrc/geom2d/libnggeom2d.la \
++	$(top_builddir)/libsrc/geom2d/libnggeom2dvis.la \
++	-L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 -ldl -lX11 $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS) $(MKL_LIBS)
+ 
+ 
+ # add for static linkage of ngsolve:
+diff -rupN netgen-5.3.1/nglib/Makefile.am netgen-5.3.1-new/nglib/Makefile.am
+--- netgen-5.3.1/nglib/Makefile.am	2014-10-07 21:38:21.552012662 +0200
++++ netgen-5.3.1-new/nglib/Makefile.am	2014-10-07 21:39:27.915292493 +0200
+@@ -8,15 +8,15 @@ lib_LTLIBRARIES = libnglib.la
+ libnglib_la_SOURCES = nglib.cpp 
+ 
+ libnglib_la_LIBADD = \
+-	$(top_builddir)/libsrc/interface/libinterface.la \
+-	$(top_builddir)/libsrc/geom2d/libgeom2d.la \
+-	$(top_builddir)/libsrc/csg/libcsg.la \
+-	$(top_builddir)/libsrc/stlgeom/libstl.la \
+-	$(top_builddir)/libsrc/occ/libocc.la \
+-	$(top_builddir)/libsrc/meshing/libmesh.la \
++	$(top_builddir)/libsrc/interface/libnginterface.la \
++	$(top_builddir)/libsrc/geom2d/libnggeom2d.la \
++	$(top_builddir)/libsrc/csg/libngcsg.la \
++	$(top_builddir)/libsrc/stlgeom/libngstl.la \
++	$(top_builddir)/libsrc/occ/libngocc.la \
++	$(top_builddir)/libsrc/meshing/libngmesh.la \
+ 	$(OCCLIBS) $(MPI_LIBS)
+ 
+-libnglib_la_LDFLAGS = -avoid-version
++libnglib_la_LDFLAGS = -release $(PACKAGE_VERSION)
+ #  -rdynamic
+ 
+ 
+@@ -25,24 +25,24 @@ bin_PROGRAMS = ng_vol ng_stl
+ 
+ ng_vol_SOURCES = ng_vol.cpp
+ ng_vol_LDADD = libnglib.la \
+-	$(top_builddir)/libsrc/interface/libinterface.la \
+-	$(top_builddir)/libsrc/geom2d/libgeom2d.la \
+-	$(top_builddir)/libsrc/csg/libcsg.la \
+-	$(top_builddir)/libsrc/stlgeom/libstl.la \
+-	$(top_builddir)/libsrc/occ/libocc.la \
+-	$(top_builddir)/libsrc/meshing/libmesh.la \
++	$(top_builddir)/libsrc/interface/libnginterface.la \
++	$(top_builddir)/libsrc/geom2d/libnggeom2d.la \
++	$(top_builddir)/libsrc/csg/libngcsg.la \
++	$(top_builddir)/libsrc/stlgeom/libngstl.la \
++	$(top_builddir)/libsrc/occ/libngocc.la \
++	$(top_builddir)/libsrc/meshing/libngmesh.la \
+ 	$(OCCLIBS) $(MPI_LIBS)
+ 
+ 
+ 
+ ng_stl_SOURCES = ng_stl.cpp
+ ng_stl_LDADD = libnglib.la \
+-	$(top_builddir)/libsrc/interface/libinterface.la \
+-	$(top_builddir)/libsrc/geom2d/libgeom2d.la \
+-	$(top_builddir)/libsrc/csg/libcsg.la \
+-	$(top_builddir)/libsrc/stlgeom/libstl.la \
+-	$(top_builddir)/libsrc/occ/libocc.la \
+-	$(top_builddir)/libsrc/meshing/libmesh.la \
++	$(top_builddir)/libsrc/interface/libnginterface.la \
++	$(top_builddir)/libsrc/geom2d/libnggeom2d.la \
++	$(top_builddir)/libsrc/csg/libngcsg.la \
++	$(top_builddir)/libsrc/stlgeom/libngstl.la \
++	$(top_builddir)/libsrc/occ/libngocc.la \
++	$(top_builddir)/libsrc/meshing/libngmesh.la \
+ 	$(OCCLIBS) $(MPI_LIBS)
+ 
+ # ng_occ_SOURCES = ng_occ.cpp

diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild
index 0c2da7d..5cdb4ab 100644
--- a/sci-mathematics/netgen/netgen-5.3.1.ebuild
+++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild
@@ -38,6 +38,8 @@ src_prepare() {
 	# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_metis.patch
 	epatch "${FILESDIR}/${PN}-5.x-metis-fixes.patch"
 	epatch "${FILESDIR}/${PN}-5.x-occ-stl-api-change.patch"
+	# Taken from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.1_build.patch
+	epatch "${FILESDIR}/${PN}-5.3.1_build.patch"
 	if use mpi; then
 		export CC=mpicc
 		export CXX=mpic++


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/
@ 2016-02-22  8:38 Justin Lecher
  0 siblings, 0 replies; 8+ messages in thread
From: Justin Lecher @ 2016-02-22  8:38 UTC (permalink / raw
  To: gentoo-commits

commit:     7a9027cbd4c3510b8e5010422505a70e1420b7a4
Author:     Grégory Salvan <apieum <AT> gmail <DOT> com>
AuthorDate: Sun Feb 21 23:58:20 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Mon Feb 22 08:36:31 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=7a9027cb

fix parallelmetis for metis version 4

 .../files/netgen-5.x-parallelmetis4-fix.patch      | 36 ++++++++++++++++++++++
 sci-mathematics/netgen/netgen-5.3.1.ebuild         |  1 +
 2 files changed, 37 insertions(+)

diff --git a/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch b/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch
new file mode 100644
index 0000000..0170fb8
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch
@@ -0,0 +1,36 @@
+diff -uwrN -x.git netgen-5.3.1/libsrc/meshing/parallelmesh.cpp netgen/libsrc/meshing/parallelmesh.cpp
+--- netgen-5.3.1/libsrc/meshing/parallelmesh.cpp	2016-02-22 00:22:28.885598956 +0100
++++ netgen/libsrc/meshing/parallelmesh.cpp	2016-02-22 00:46:17.030638283 +0100
+@@ -962,10 +962,15 @@
+   }
+   
+ 
+-#ifdef METIS5
++#ifdef METIS
+   void Mesh :: ParallelMetis (Array<int> & volume_weights , Array<int> & surface_weights, Array<int> & segment_weights)  
+   {
++
++  	#ifdef METIS5
+     PrintMessage (3, "call metis 5 with weights ...");
++    #else
++    PrintMessage (3, "call metis 4 with weights ...");
++    #endif
+     
+     // cout << "segment_weights " << segment_weights << endl;
+     // cout << "surface_weights " << surface_weights << endl;
+@@ -1034,9 +1039,15 @@
+ 
+ 
+     metis::idx_t ncommon = 3;
++    #ifdef METIS5
+     METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &nwgt[0], NULL, &ncommon, &nparts,
+ 			NULL, NULL,
+ 			&edgecut, &epart[0], &npart[0]);
++    #else
++    int numflag = 0;
++    METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &numflag, &nparts,
++    	&edgecut, &epart[0], &npart[0]);
++    #endif
+     /*
+     METIS_PartMeshNodal (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &nparts,
+ 			 NULL, NULL,

diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild
index d39d45c..9aac92d 100644
--- a/sci-mathematics/netgen/netgen-5.3.1.ebuild
+++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild
@@ -44,6 +44,7 @@ src_prepare() {
 	# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_fixes.patch
 	epatch "${FILESDIR}/${PN}-5.x-fedora-fixes.patch"
 	epatch "${FILESDIR}/${PN}-5.x-includes-fixes.patch"
+	epatch "${FILESDIR}/${PN}-5.x-parallelmetis4-fix.patch"
 	if use mpi; then
 		export CC=mpicc
 		export CXX=mpic++


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/
@ 2022-01-13 14:19 Andrew Ammerlaan
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Ammerlaan @ 2022-01-13 14:19 UTC (permalink / raw
  To: gentoo-commits

commit:     eba68f56ba8542eff2e545451a3285f44f8546ce
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 13 14:19:31 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Thu Jan 13 14:19:31 2022 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=eba68f56

sci-mathematics/netgen: cleanup old

Closes: https://bugs.gentoo.org/670050
Closes: https://bugs.gentoo.org/502962
Bug: https://bugs.gentoo.org/688120
Package-Manager: Portage-3.0.30, Repoman-3.0.3
RepoMan-Options: --force
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../netgen-5.x-compile-against-occ-6.5.x.patch     |  28 --
 .../netgen/files/netgen-5.x-fedora-fixes.patch     | 223 -----------
 .../netgen/files/netgen-5.x-includes-fixes.patch   |  29 --
 .../netgen/files/netgen-5.x-makefiles-fixes.patch  | 412 ---------------------
 .../netgen/files/netgen-5.x-metis-fixes.patch      | 102 -----
 .../netgen/files/netgen-5.x-missing-define.patch   |  38 --
 .../files/netgen-5.x-occ-stl-api-change.patch      |  94 -----
 .../files/netgen-5.x-parallelmetis4-fix.patch      |  36 --
 sci-mathematics/netgen/netgen-5.3.1.ebuild         | 121 ------
 sci-mathematics/netgen/netgen-6.0_beta.ebuild      | 121 ------
 10 files changed, 1204 deletions(-)

diff --git a/sci-mathematics/netgen/files/netgen-5.x-compile-against-occ-6.5.x.patch b/sci-mathematics/netgen/files/netgen-5.x-compile-against-occ-6.5.x.patch
deleted file mode 100644
index ce581cee3..000000000
--- a/sci-mathematics/netgen/files/netgen-5.x-compile-against-occ-6.5.x.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- libsrc/occ/Partition_Spliter.cxx.old	2012-11-14 16:14:39.440625195 +0100
-+++ libsrc/occ/Partition_Spliter.cxx	2012-11-14 16:15:20.035646075 +0100
-@@ -1169,8 +1169,8 @@
-           for (; j<=nbj && ok; ++j) {
-             if (Extrema.IsMin(j)) {
- 	      hasMin = Standard_True;
--	      ok = Extrema.Value(j) <= tol;  // V6.3
--	      // ok = Extrema.SquareDistance(j) <= tol;  // V6.5
-+	      // ok = Extrema.Value(j) <= tol;  // V6.3
-+	      ok = Extrema.SquareDistance(j) <= tol;  // V6.5
- 	    }
-           }
-         }
---- libsrc/occ/Partition_Inter3d.cxx.old	2012-11-14 16:13:11.149581085 +0100
-+++ libsrc/occ/Partition_Inter3d.cxx	2012-11-14 16:14:20.017615214 +0100
-@@ -243,9 +243,9 @@
-       Standard_Integer i, nbExt = anExtPS.NbExt();
-       Extrema_POnSurf aPOnSurf;
-       for (i = 1; i <= nbExt; ++i )
--	if (anExtPS.Value( i ) <= TolE)               // V6.3
--	  // if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
--	  {
-+	//	if (anExtPS.Value( i ) <= TolE)               // V6.3
-+	if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
-+	{
-           aPOnSurf = anExtPS.Point( i );
-           break;
-         }

diff --git a/sci-mathematics/netgen/files/netgen-5.x-fedora-fixes.patch b/sci-mathematics/netgen/files/netgen-5.x-fedora-fixes.patch
deleted file mode 100644
index 5cb399edb..000000000
--- a/sci-mathematics/netgen/files/netgen-5.x-fedora-fixes.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-diff -uwrN netgen-5.3.1/libsrc/meshing/meshtype.cpp netgen/libsrc/meshing/meshtype.cpp
---- netgen-5.3.1/libsrc/meshing/meshtype.cpp	2016-02-20 21:55:59.226450843 +0100
-+++ netgen/libsrc/meshing/meshtype.cpp	2016-02-20 23:54:12.293646166 +0100
-@@ -1,4 +1,5 @@
- #include <mystdlib.h>
-+#include <float.h> // to get DBL_MIN defined
- 
- #include "meshing.hpp"  
- 
-@@ -666,7 +667,8 @@
- 
-         double det = trans.Det();
- 
--        if (det <= 0)
-+        // if (det <= 0)
-+        if (det <= DBL_MIN) // avoid FPE
-           err += 1e12;
-         else
-           err += frob * frob / det;
-@@ -722,7 +724,8 @@
- 
-             double det = trans(0,0)*trans(1,1)-trans(1,0)*trans(0,1);
- 
--            if (det <= 0)
-+            // if (det <= 0)
-+            if (det <= DBL_MIN)  // avoid FPE
-               {
-                 dd = 0;
-                 return 1e12;
-@@ -806,7 +809,8 @@
-           = dtrans(0,0) * trans(1,1) - trans(0,1) * dtrans(1,0)
-           + trans(0,0) * dtrans(1,1) - dtrans(0,1) * trans(1,0);
- 
--        if (det <= 0)
-+        // if (det <= 0)
-+        if (det <= DBL_MIN) // avoid FPE
-           err += 1e12;
-         else
-           {
-@@ -856,7 +860,8 @@
-         frob /= 2;
- 
-         double det = trans.Det();
--        if (det <= 0)
-+        //if (det <= 0)
-+        if (det <= DBL_MIN) // avoid FPE
-           err += 1e12;
-         else
-           err += frob * frob / det;
-@@ -1864,7 +1869,8 @@
-       case PYRAMID:
-         {
-           double noz = 1-p(2);
--          if (noz == 0.0) noz = 1e-10;
-+          //if (noz == 0.0) noz = 1e-10;
-+          if (noz <= DBL_MIN) noz = 1e-10; // avoid FPE
- 
-           double xi  = p(0) / noz;
-           double eta = p(1) / noz;
-@@ -2513,10 +2519,10 @@
- 
-   MeshingParameters :: MeshingParameters ()
-   {
--    optimize3d = "cmdmustm";
-+    optimize3d = (char*)"cmdmustm"; // optimize3d = "cmdmustm";
-     //optimize3d = "cmdmstm";
-     optsteps3d = 3;
--    optimize2d = "smsmsmSmSmSm";
-+    optimize2d = (char*)"smsmsmSmSmSm"; // optimize2d = "smsmsmSmSmSm";
-     optsteps2d = 3;
-     opterrpow = 2;
-     blockfill = 1;
-diff -uwrN netgen-5.3.1/libsrc/meshing/meshtype.hpp netgen/libsrc/meshing/meshtype.hpp
---- netgen-5.3.1/libsrc/meshing/meshtype.hpp	2016-02-20 21:55:59.226450843 +0100
-+++ netgen/libsrc/meshing/meshtype.hpp	2016-02-20 23:54:12.295646166 +0100
-@@ -15,6 +15,7 @@
-     Classes for NETGEN
-   */
- 
-+class Mesh; // added due to compilation errors on some platforms
- 
- 
-   enum ELEMENT_TYPE { 
-diff -uwrN netgen-5.3.1/libsrc/meshing/smoothing2.cpp netgen/libsrc/meshing/smoothing2.cpp
---- netgen-5.3.1/libsrc/meshing/smoothing2.cpp	2016-02-20 21:55:59.228450843 +0100
-+++ netgen/libsrc/meshing/smoothing2.cpp	2016-02-20 23:54:12.298646166 +0100
-@@ -361,7 +361,8 @@
-     vgrad = 0;
-     double badness = 0;
- 
--    ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
-+    //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
-+    n = ld.normal;
-     pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2;
- 
-     //  meshthis -> ProjectPoint (surfi, pp1);
-@@ -577,7 +578,8 @@
-     vgrad = 0;
-     badness = 0;
- 
--    ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
-+    //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
-+    n = ld.normal;
- 
-     pp1 = ld.sp1 + x(0) * ld.t1 + x(1) * ld.t2;
- 
-@@ -649,7 +651,8 @@
-     vgrad = 0;
-     badness = 0;
- 
--    ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
-+    //normal already computed: ld.meshthis -> GetNormalVector (ld.surfi, ld.sp1, ld.gi1, n);
-+    n = ld.normal;
- 
-     // pp1 = sp1;
-     //    pp1.Add2 (x.Get(1), t1, x.Get(2), t2);
-diff -uwrN netgen-5.3.1/libsrc/occ/occconstruction.cpp netgen/libsrc/occ/occconstruction.cpp
---- netgen-5.3.1/libsrc/occ/occconstruction.cpp	2016-02-20 21:53:44.420447131 +0100
-+++ netgen/libsrc/occ/occconstruction.cpp	2016-02-20 23:54:12.299646166 +0100
-@@ -28,7 +28,7 @@
- #include <BRepAlgoAPI_Common.hxx>
- #include <BRepAlgoAPI_Fuse.hxx>
- #include <BRepAlgoAPI_Section.hxx>
--#include <BRepOffsetAPI_Sewing.hxx>
-+//#include <BRepOffsetAPI_Sewing.hxx>
- //#include <BRepAlgo_Sewing.hxx>
- #include <BRepOffsetAPI_MakeOffsetShape.hxx>
- #include <ShapeFix_Shape.hxx>
-diff -uwrN netgen-5.3.1/libsrc/occ/occmeshsurf.cpp netgen/libsrc/occ/occmeshsurf.cpp
---- netgen-5.3.1/libsrc/occ/occmeshsurf.cpp	2016-02-20 21:53:44.421447131 +0100
-+++ netgen/libsrc/occ/occmeshsurf.cpp	2016-02-20 23:54:12.310646166 +0100
-@@ -6,6 +6,7 @@
- #include <meshing.hpp>
- #include <GeomLProp_SLProps.hxx>
- #include <ShapeAnalysis_Surface.hxx>
-+#include <GeomAPI_ProjectPointOnCurve.hxx> // -- moved here from occgeom.hpp
- 
- 
- namespace netgen
-@@ -689,7 +691,7 @@
-       }
-   
-     newp = hnewp;
--  }
-+  }//; -- to compile with -Wall -pedantic
- 
- 
-   void OCCRefinementSurfaces ::  
- 
- 
-diff -uwrN netgen-5.3.1/libsrc/occ/Partition_Inter3d.cxx netgen/libsrc/occ/Partition_Inter3d.cxx
---- netgen-5.3.1/libsrc/occ/Partition_Inter3d.cxx	2016-02-20 21:53:44.418447131 +0100
-+++ netgen/libsrc/occ/Partition_Inter3d.cxx	2016-02-20 23:54:12.311646166 +0100
-@@ -243,8 +243,10 @@
-       Standard_Integer i, nbExt = anExtPS.NbExt();
-       Extrema_POnSurf aPOnSurf;
-       for (i = 1; i <= nbExt; ++i )
-+       // porting to OCCT6.5.1
- 	  // if (anExtPS.Value( i ) <= TolE)               // V6.3
--	  if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
-+       // if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
-+       if (anExtPS.SquareDistance( i ) <= TolE * TolE)
- 	  {
-           aPOnSurf = anExtPS.Point( i );
-           break;
-diff -uwrN netgen-5.3.1/libsrc/occ/Partition_Spliter.cxx netgen/libsrc/occ/Partition_Spliter.cxx
---- netgen-5.3.1/libsrc/occ/Partition_Spliter.cxx	2016-02-20 21:53:44.420447131 +0100
-+++ netgen/libsrc/occ/Partition_Spliter.cxx	2016-02-20 23:54:12.313646166 +0100
-@@ -1169,8 +1169,10 @@
-           for (; j<=nbj && ok; ++j) {
-             if (Extrema.IsMin(j)) {
- 	      hasMin = Standard_True;
-+	      // porting to OCCT6.5.1
- 	      // ok = Extrema.Value(j) <= tol;  // V6.3
--	      ok = Extrema.SquareDistance(j) <= tol;  // V6.5
-+	      // ok = Extrema.SquareDistance(j) <= tol;  // V6.5
-+	      ok = Extrema.SquareDistance(j) <= tol * tol;
- 	    }
-           }
-         }
-diff -uwrN netgen-5.3.1/libsrc/occ/utilities.h netgen/libsrc/occ/utilities.h
---- netgen-5.3.1/libsrc/occ/utilities.h	2016-02-20 21:53:44.421447131 +0100
-+++ netgen/libsrc/occ/utilities.h	2016-02-20 23:54:12.314646166 +0100
-@@ -33,6 +33,7 @@
- 
- #include <string>
- #include <iostream>
-+#include <iomanip>
- #include <cstdlib>
- // #include "SALOME_Log.hxx"
- 
-diff -uwrN netgen-5.3.1/libsrc/stlgeom/stlgeommesh.cpp netgen/libsrc/stlgeom/stlgeommesh.cpp
---- netgen-5.3.1/libsrc/stlgeom/stlgeommesh.cpp	2016-02-20 21:55:59.234450844 +0100
-+++ netgen/libsrc/stlgeom/stlgeommesh.cpp	2016-02-20 23:54:12.315646166 +0100
-@@ -1435,7 +1435,8 @@
- 	  /*
- 	  if (!optstring || strlen(optstring) == 0)
- 	    {
--	      mparam.optimize2d = "smcm";
-+	      //mparam.optimize2d = (char*)"smcm";
-+              mparam.optimize2d = (char*)"smcm";
- 	    }
- 	  else
- 	    {
-@@ -1453,7 +1454,7 @@
- 	      mesh -> LoadLocalMeshSize (mparam.meshsizefilename);	      
- 	      mesh -> CalcLocalHFromSurfaceCurvature (mparam.grading, 
- 						      stlparam.resthsurfmeshcurvfac);
--	      mparam.optimize2d = "cmsmSm";
-+	      mparam.optimize2d = "(char*)cmsmSm";
- 	      STLSurfaceOptimization (*stlgeometry, *mesh, mparam);
- #ifdef STAT_STREAM
- 	      (*statout) << GetTime() << " & ";
-@@ -1560,7 +1561,8 @@
- 	  /*
- 	  if (!optstring || strlen(optstring) == 0)
- 	    {
--	      mparam.optimize3d = "cmdmstm";
-+              //mparam.optimize3d = "cmdmstm";
-+	      mparam.optimize3d = (char*)"cmdmstm";
- 	    }
- 	  else
- 	    {

diff --git a/sci-mathematics/netgen/files/netgen-5.x-includes-fixes.patch b/sci-mathematics/netgen/files/netgen-5.x-includes-fixes.patch
deleted file mode 100644
index 650b575c9..000000000
--- a/sci-mathematics/netgen/files/netgen-5.x-includes-fixes.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -uwrN -x.git netgen-5.3.1/libsrc/include/meshing.hpp netgen/libsrc/include/meshing.hpp
---- netgen-5.3.1/libsrc/include/meshing.hpp	2016-02-21 20:12:55.885186643 +0100
-+++ netgen/libsrc/include/meshing.hpp	2016-02-21 20:09:26.275180871 +0100
-@@ -1 +1 @@
--#include <../meshing/meshing.hpp>
-+#include "../meshing/meshing.hpp"
-diff -uwrN -x.git netgen-5.3.1/libsrc/include/myadt.hpp netgen/libsrc/include/myadt.hpp
---- netgen-5.3.1/libsrc/include/myadt.hpp	2016-02-21 20:12:55.886186643 +0100
-+++ netgen/libsrc/include/myadt.hpp	2016-02-21 20:09:26.275180871 +0100
-@@ -1 +1 @@
--#include <../general/myadt.hpp>
-+#include "../general/myadt.hpp"
-diff -uwrN -x.git netgen-5.3.1/libsrc/include/stlgeom.hpp netgen/libsrc/include/stlgeom.hpp
---- netgen-5.3.1/libsrc/include/stlgeom.hpp	2016-02-21 20:12:55.886186643 +0100
-+++ netgen/libsrc/include/stlgeom.hpp	2016-02-21 20:09:26.275180871 +0100
-@@ -1 +1 @@
--#include <../stlgeom/stlgeom.hpp>
-+#include "../stlgeom/stlgeom.hpp"
-diff -uwrN -x.git netgen-5.3.1/libsrc/meshing/parallelmesh.cpp netgen/libsrc/meshing/parallelmesh.cpp
---- netgen-5.3.1/libsrc/meshing/parallelmesh.cpp	2016-02-21 20:12:55.888186643 +0100
-+++ netgen/libsrc/meshing/parallelmesh.cpp	2016-02-21 20:09:26.276180871 +0100
-@@ -1,6 +1,6 @@
- #ifdef PARALLEL
- 
--#include <meshing.hpp>
-+#include "meshing.hpp"
- #include "paralleltop.hpp"
- 
- // #define METIS4

diff --git a/sci-mathematics/netgen/files/netgen-5.x-makefiles-fixes.patch b/sci-mathematics/netgen/files/netgen-5.x-makefiles-fixes.patch
deleted file mode 100644
index b6c8fd4c1..000000000
--- a/sci-mathematics/netgen/files/netgen-5.x-makefiles-fixes.patch
+++ /dev/null
@@ -1,412 +0,0 @@
-diff -uwrN -x.git netgen-5.3.1/configure.ac netgen/configure.ac
---- netgen-5.3.1/configure.ac	2016-02-21 21:40:41.852331652 +0100
-+++ netgen/configure.ac	2016-02-21 21:39:31.355329711 +0100
-@@ -14,7 +14,6 @@
- AC_DISABLE_STATIC
- 
- AC_LANG([C++])
--AM_PROG_AR
- AC_PROG_CXX
- 
- AC_OPENMP
-@@ -36,15 +35,15 @@
-         [AC_HELP_STRING([--with-occ=dir],[use OpenCascade installed in directory dir])],
-         [occdir=$withval] 
- 	[occon=true],
--	[occdir=/opt/OpenCASCADE]
-+	[occdir=$CASROOT]
-         )
- 
- 
- 
- if test a$occon = atrue ; then
- 
--	AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I$occdir/inc -I/usr/include/opencascade"])
--	AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"])
-+	AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I$occdir/inc"])
-+	AC_SUBST([OCCLIBS], ["-lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"])
- 
- #  -lTKDCAF
- 
-@@ -90,18 +89,18 @@
-         [AC_HELP_STRING([--disable-gui],[don't build netgen with GUI])],
-         [if test "$enableval" = yes; then ngguion=true; else ngguion=false; fi])
- 
--metisdir=/usr/local
-+metisdir=/usr
- AC_ARG_WITH([metis], 
-         [AC_HELP_STRING([--with-metis=dir],[path to metis 5.x])],
-         [metisdir=$withval],
--        [metisdir=/usr/local]
-+        [metisdir=/usr]
- 	)
- 
- AC_ARG_ENABLE([parallel],
-         [AC_HELP_STRING([--enable-parallel],[enable mpi parallelization])],
--	[AC_SUBST([MPI_INCLUDES], "-I$metisdir/include -DMETIS")]
-+	[AC_SUBST([MPI_INCLUDES], "-DMETIS")]
-         [CXXFLAGS="$CXXFLAGS -DPARALLEL"]
--	[AC_SUBST([MPI_LIBS], "-L$metisdir/lib -lmetis")]
-+	[AC_SUBST([MPI_LIBS], "-lmetis")]
-         )       
- #          -DVTRACE
- #          -lvt-hyb
-diff -uwrN -x.git netgen-5.3.1/libsrc/csg/Makefile.am netgen/libsrc/csg/Makefile.am
---- netgen-5.3.1/libsrc/csg/Makefile.am	2016-02-21 21:40:41.852331652 +0100
-+++ netgen/libsrc/csg/Makefile.am	2016-02-21 21:39:31.355329711 +0100
-@@ -8,24 +8,24 @@
- AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include  $(TCL_INCLUDES)
- METASOURCES = AUTO
- 
--lib_LTLIBRARIES = libcsg.la
-+lib_LTLIBRARIES = libngcsg.la
- 
- 
--libcsg_la_SOURCES = algprim.cpp brick.cpp   \
-+libngcsg_la_SOURCES = algprim.cpp brick.cpp   \
- bspline2d.cpp csgeom.cpp csgparser.cpp curve2d.cpp edgeflw.cpp	       \
- explicitcurve2d.cpp extrusion.cpp gencyl.cpp genmesh.cpp identify.cpp  \
- manifold.cpp meshsurf.cpp polyhedra.cpp revolution.cpp singularref.cpp \
- solid.cpp specpoin.cpp spline3d.cpp surface.cpp triapprox.cpp
- 
--libcsg_la_LIBADD =  $(top_builddir)/libsrc/meshing/libmesh.la
-+libngcsg_la_LIBADD =  $(top_builddir)/libsrc/meshing/libngmesh.la
- 
- 
- 
- if NGGUI
--lib_LTLIBRARIES += libcsgvis.la 
-+lib_LTLIBRARIES += libngcsgvis.la
- 
--libcsgvis_la_SOURCES = vscsg.cpp csgpkg.cpp
--libcsgvis_la_LIBADD = libcsg.la
-+libngcsgvis_la_SOURCES = vscsg.cpp csgpkg.cpp
-+libngcsgvis_la_LIBADD = libngcsg.la
- endif
- 
- #   $(top_builddir)/libsrc/geom2d/libgeom2d.la 
-diff -uwrN -x.git netgen-5.3.1/libsrc/general/Makefile.am netgen/libsrc/general/Makefile.am
---- netgen-5.3.1/libsrc/general/Makefile.am	2016-02-21 21:40:41.852331652 +0100
-+++ netgen/libsrc/general/Makefile.am	2016-02-21 21:39:31.356329711 +0100
-@@ -4,8 +4,8 @@
- 
- AM_CPPFLAGS =  $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
- METASOURCES = AUTO
--noinst_LTLIBRARIES = libgen.la
--libgen_la_SOURCES = array.cpp bitarray.cpp dynamicmem.cpp flags.cpp \
-+noinst_LTLIBRARIES = libnggen.la
-+libnggen_la_SOURCES = array.cpp bitarray.cpp dynamicmem.cpp flags.cpp \
- 	hashtabl.cpp mystring.cpp ngexception.cpp optmem.cpp parthreads.cpp \
- 	profiler.cpp seti.cpp sort.cpp spbita2d.cpp symbolta.cpp table.cpp \
- 	mpi_interface.cpp gzstream.cpp
-diff -uwrN -x.git netgen-5.3.1/libsrc/geom2d/Makefile.am netgen/libsrc/geom2d/Makefile.am
---- netgen-5.3.1/libsrc/geom2d/Makefile.am	2016-02-21 21:40:41.852331652 +0100
-+++ netgen/libsrc/geom2d/Makefile.am	2016-02-21 21:39:31.356329711 +0100
-@@ -4,18 +4,18 @@
- 
- METASOURCES = AUTO
- 
--lib_LTLIBRARIES = libgeom2d.la 
-+lib_LTLIBRARIES = libnggeom2d.la 
- 
- if NGGUI
--lib_LTLIBRARIES += libgeom2dvis.la 
-+lib_LTLIBRARIES += libnggeom2dvis.la 
- endif
- 
- 
- 
--libgeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp
--libgeom2d_la_LIBADD = 	$(top_builddir)/libsrc/meshing/libmesh.la
-+libnggeom2d_la_SOURCES = genmesh2d.cpp geom2dmesh.cpp geometry2d.cpp
-+libnggeom2d_la_LIBADD = $(top_builddir)/libsrc/meshing/libngmesh.la $(MPI_LIBS)
- 
--libgeom2dvis_la_SOURCES = geom2dpkg.cpp vsgeom2d.cpp
--libgeom2dvis_la_LIBADD = libgeom2d.la
-+libnggeom2dvis_la_SOURCES = geom2dpkg.cpp vsgeom2d.cpp
-+libnggeom2dvis_la_LIBADD = libnggeom2d.la -lGL $(MPI_LIBS)
- 
- 
-diff -uwrN -x.git netgen-5.3.1/libsrc/gprim/Makefile.am netgen/libsrc/gprim/Makefile.am
---- netgen-5.3.1/libsrc/gprim/Makefile.am	2016-02-21 21:40:41.853331652 +0100
-+++ netgen/libsrc/gprim/Makefile.am	2016-02-21 21:39:31.357329711 +0100
-@@ -2,6 +2,6 @@
- 
- AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include
- METASOURCES = AUTO
--noinst_LTLIBRARIES = libgprim.la
--libgprim_la_SOURCES = adtree.cpp geom2d.cpp geom3d.cpp geomfuncs.cpp \
-+noinst_LTLIBRARIES = libnggprim.la
-+libnggprim_la_SOURCES = adtree.cpp geom2d.cpp geom3d.cpp geomfuncs.cpp \
- 	geomtest3d.cpp transform3d.cpp spline.cpp splinegeometry.cpp
-diff -uwrN -x.git netgen-5.3.1/libsrc/interface/Makefile.am netgen/libsrc/interface/Makefile.am
---- netgen-5.3.1/libsrc/interface/Makefile.am	2016-02-21 21:40:41.853331652 +0100
-+++ netgen/libsrc/interface/Makefile.am	2016-02-21 21:39:31.357329711 +0100
-@@ -2,14 +2,14 @@
- 
- AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface  $(MPI_INCLUDES) $(TCL_INCLUDES) -DOPENGL
- METASOURCES = AUTO
--lib_LTLIBRARIES = libinterface.la
--libinterface_la_SOURCES = nginterface.cpp nginterface_v2.cpp \
-+lib_LTLIBRARIES = libnginterface.la
-+libnginterface_la_SOURCES = nginterface.cpp nginterface_v2.cpp \
- 	read_fnf_mesh.cpp readtetmesh.cpp readuser.cpp writeabaqus.cpp writediffpack.cpp \
- 	writedolfin.cpp writeelmer.cpp writefeap.cpp writefluent.cpp writegmsh.cpp writejcm.cpp \
- 	writepermas.cpp writetecplot.cpp writetet.cpp writetochnog.cpp writeuser.cpp \
- 	wuchemnitz.cpp writegmsh2.cpp writeOpenFOAM15x.cpp 
- 
- 
--libinterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la
-+libnginterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libngmesh.la
- 
- # libinterface_la_LDFLAGS = -rdynamic
-diff -uwrN -x.git netgen-5.3.1/libsrc/linalg/Makefile.am netgen/libsrc/linalg/Makefile.am
---- netgen-5.3.1/libsrc/linalg/Makefile.am	2016-02-21 21:40:41.853331652 +0100
-+++ netgen/libsrc/linalg/Makefile.am	2016-02-21 21:39:31.357329711 +0100
-@@ -1,8 +1,8 @@
- noinst_HEADERS = densemat.hpp linalg.hpp polynomial.hpp vector.hpp opti.hpp
- AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include
- METASOURCES = AUTO
--noinst_LTLIBRARIES = libla.la
--libla_la_SOURCES = densemat.cpp polynomial.cpp bfgs.cpp linopt.cpp linsearch.cpp
-+noinst_LTLIBRARIES = libngla.la
-+libngla_la_SOURCES = densemat.cpp polynomial.cpp bfgs.cpp linopt.cpp linsearch.cpp
- 
- #  vector.cpp
- 
-diff -uwrN -x.git netgen-5.3.1/libsrc/meshing/Makefile.am netgen/libsrc/meshing/Makefile.am
---- netgen-5.3.1/libsrc/meshing/Makefile.am	2016-02-21 21:40:41.853331652 +0100
-+++ netgen/libsrc/meshing/Makefile.am	2016-02-21 21:39:31.358329711 +0100
-@@ -15,9 +15,9 @@
- 
- METASOURCES = AUTO
- 
--lib_LTLIBRARIES = libmesh.la
-+lib_LTLIBRARIES = libngmesh.la
- 
--libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \
-+libngmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \
- 	clusters.cpp curvedelems.cpp delaunay.cpp delaunay2d.cpp	    \
- 	geomsearch.cpp global.cpp hprefinement.cpp improve2.cpp		    \
- 	improve2gen.cpp improve3.cpp localh.cpp meshclass.cpp		    \
-@@ -30,8 +30,8 @@
- 	topology.cpp triarls.cpp validate.cpp zrefine.cpp bcfunctions.cpp   \
- 	parallelmesh.cpp  paralleltop.cpp  paralleltop.hpp basegeom.cpp 
- 
--libmesh_la_LIBADD =  $(top_builddir)/libsrc/linalg/libla.la \
--	$(top_builddir)/libsrc/gprim/libgprim.la \
--	$(top_builddir)/libsrc/general/libgen.la \
--	-lz
-+libngmesh_la_LIBADD =  $(top_builddir)/libsrc/linalg/libngla.la \
-+	$(top_builddir)/libsrc/gprim/libnggprim.la \
-+	$(top_builddir)/libsrc/general/libnggen.la \
-+	$(MPI_LIBS) -lz
- 
-diff -uwrN -x.git netgen-5.3.1/libsrc/occ/Makefile.am netgen/libsrc/occ/Makefile.am
---- netgen-5.3.1/libsrc/occ/Makefile.am	2016-02-21 21:40:41.853331652 +0100
-+++ netgen/libsrc/occ/Makefile.am	2016-02-21 21:39:31.358329711 +0100
-@@ -14,20 +14,20 @@
- 
- METASOURCES = AUTO
- 
--lib_LTLIBRARIES = libocc.la
-+lib_LTLIBRARIES = libngocc.la
- 
- if NGGUI
--lib_LTLIBRARIES += liboccvis.la 
-+lib_LTLIBRARIES += libngoccvis.la 
- endif
- 
- 
--libocc_la_SOURCES = Partition_Inter2d.cxx Partition_Inter3d.cxx \
-+libngocc_la_SOURCES = Partition_Inter2d.cxx Partition_Inter3d.cxx \
- 	Partition_Loop.cxx Partition_Loop2d.cxx Partition_Loop3d.cxx Partition_Spliter.cxx \
- 	occconstruction.cpp occgenmesh.cpp occgeom.cpp occmeshsurf.cpp
- 
--libocc_la_LIBADD = $(OCCLIBS)
-+libngocc_la_LIBADD = $(OCCLIBS)
- 
--liboccvis_la_SOURCES = occpkg.cpp vsocc.cpp
--liboccvis_la_LIBADD = libocc.la
-+libngoccvis_la_SOURCES = occpkg.cpp vsocc.cpp
-+libngoccvis_la_LIBADD = libngocc.la $(TCL_LIB_SPEC)
- 
- 
-diff -uwrN -x.git netgen-5.3.1/libsrc/stlgeom/Makefile.am netgen/libsrc/stlgeom/Makefile.am
---- netgen-5.3.1/libsrc/stlgeom/Makefile.am	2016-02-21 21:40:41.854331653 +0100
-+++ netgen/libsrc/stlgeom/Makefile.am	2016-02-21 21:39:31.359329711 +0100
-@@ -4,18 +4,18 @@
- AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES)
- METASOURCES = AUTO
- 
--lib_LTLIBRARIES = libstl.la 
-+lib_LTLIBRARIES = libngstl.la 
- 
- if NGGUI
--lib_LTLIBRARIES += libstlvis.la 
-+lib_LTLIBRARIES += libngstlvis.la 
- endif
- 
--libstl_la_SOURCES = meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp \
-+libngstl_la_SOURCES = meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp \
- 	stlgeommesh.cpp stlline.cpp stltool.cpp stltopology.cpp
- 
- 
--libstlvis_la_SOURCES = stlpkg.cpp vsstl.cpp
--libstlvis_la_LIBADD = libstl.la
--libstl_la_LIBADD =  $(top_builddir)/libsrc/meshing/libmesh.la
-+libngstlvis_la_SOURCES = stlpkg.cpp vsstl.cpp
-+libngstlvis_la_LIBADD = libngstl.la  -lGL $(MPI_LIBS) $(TCL_LIB_SPEC)
-+libngstl_la_LIBADD = $(top_builddir)/libsrc/meshing/libngmesh.la $(MPI_LIBS)
- # libstlvis_la_LIBADD = libstl.la $(top_builddir)/libsrc/linalg/libla.la 
- 
-diff -uwrN -x.git netgen-5.3.1/libsrc/visualization/Makefile.am netgen/libsrc/visualization/Makefile.am
---- netgen-5.3.1/libsrc/visualization/Makefile.am	2016-02-21 21:40:41.854331653 +0100
-+++ netgen/libsrc/visualization/Makefile.am	2016-02-21 21:39:31.359329711 +0100
-@@ -7,11 +7,11 @@
- METASOURCES = AUTO
- 
- if NGGUI
--noinst_LTLIBRARIES = libvisual.la
-+noinst_LTLIBRARIES = libngvisual.la
- endif
- 
- 
--libvisual_la_SOURCES = meshdoc.cpp mvdraw.cpp \
-+libngvisual_la_SOURCES = meshdoc.cpp mvdraw.cpp \
- 	vsfieldlines.cpp vsmesh.cpp vssolution.cpp importsolution.cpp
- 
--
-+libngvisual_la_LIBADD = -lGL
-diff -uwrN -x.git netgen-5.3.1/libsrc/visualization/Makefile.in netgen/libsrc/visualization/Makefile.in
---- netgen-5.3.1/libsrc/visualization/Makefile.in	2016-02-21 21:40:41.855331653 +0100
-+++ netgen/libsrc/visualization/Makefile.in	2016-02-21 21:39:31.360329711 +0100
-@@ -275,7 +275,7 @@
- visual.hpp vssolution.hpp
- 
- include_HEADERS = soldata.hpp
--AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include  -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(OCCFLAGS) $(TCL_INCLUDES)
-+AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include  -DOPENGL $(OCCFLAGS) $(TCL_INCLUDES)
- METASOURCES = AUTO
- @NGGUI_TRUE@noinst_LTLIBRARIES = libvisual.la
- libvisual_la_SOURCES = meshdoc.cpp mvdraw.cpp \
-diff -uwrN -x.git netgen-5.3.1/ng/Makefile.am netgen/ng/Makefile.am
---- netgen-5.3.1/ng/Makefile.am	2016-02-21 21:40:41.855331653 +0100
-+++ netgen/ng/Makefile.am	2016-02-21 21:39:31.360329711 +0100
-@@ -1,6 +1,6 @@
- include_HEADERS = 
- 
--AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL  -D$(TOGL_WINDOWINGSYSTEM)  $(TCL_INCLUDES) $(MPI_INCLUDES) $(FFMPEG_INCLUDES) $(JPEGLIB_INCLUDES) 
-+AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL $(TCL_INCLUDES) $(MPI_INCLUDES) $(FFMPEG_INCLUDES) $(JPEGLIB_INCLUDES) 
- 
- 
- if NGGUI
-@@ -17,21 +17,18 @@
- endif
- # -lpardiso500-GNU472-X86-64 -lgfortran
- 
--netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.la \
--	$(top_builddir)/libsrc/csg/libcsgvis.la \
--	$(top_builddir)/libsrc/csg/libcsg.la \
--	$(top_builddir)/libsrc/interface/libinterface.la \
--	$(top_builddir)/libsrc/meshing/libmesh.la \
--	-L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS) $(MKL_LIBS) 
--
--
--#
--#	$(top_builddir)/libsrc/occ/liboccvis.la 
--#	$(top_builddir)/libsrc/occ/libocc.la 
--#	$(top_builddir)/libsrc/stlgeom/libstlvis.la 
--#	$(top_builddir)/libsrc/stlgeom/libstl.la 
--#	$(top_builddir)/libsrc/geom2d/libgeom2d.la 
--#	$(top_builddir)/libsrc/geom2d/libgeom2dvis.la 
-+netgen_LDADD = $(top_builddir)/libsrc/visualization/libngvisual.la \
-+	$(top_builddir)/libsrc/csg/libngcsgvis.la \
-+	$(top_builddir)/libsrc/csg/libngcsg.la \
-+	$(top_builddir)/libsrc/interface/libnginterface.la \
-+	$(top_builddir)/libsrc/meshing/libngmesh.la \
-+	$(top_builddir)/libsrc/occ/libngoccvis.la \
-+	$(top_builddir)/libsrc/occ/libngocc.la \
-+	$(top_builddir)/libsrc/stlgeom/libngstlvis.la \
-+	$(top_builddir)/libsrc/stlgeom/libngstl.la \
-+	$(top_builddir)/libsrc/geom2d/libnggeom2d.la \
-+	$(top_builddir)/libsrc/geom2d/libnggeom2dvis.la \
-+	-L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 -ldl -lX11 $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS) $(MKL_LIBS)
- 
- 
- # add for static linkage of ngsolve:
-diff -uwrN -x.git netgen-5.3.1/ng/Makefile.in netgen/ng/Makefile.in
---- netgen-5.3.1/ng/Makefile.in	2016-02-21 21:40:41.856331653 +0100
-+++ netgen/ng/Makefile.in	2016-02-21 21:39:31.361329711 +0100
-@@ -302,7 +302,7 @@
- include_HEADERS = 
- AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include \
- 	-I$(top_srcdir)/libsrc/interface -DOPENGL \
--	-D$(TOGL_WINDOWINGSYSTEM) $(TCL_INCLUDES) $(MPI_INCLUDES) \
-+	$(TCL_INCLUDES) $(MPI_INCLUDES) \
- 	$(FFMPEG_INCLUDES) $(JPEGLIB_INCLUDES) $(am__append_1)
- netgen_SOURCES = demoview.cpp ngappinit.cpp onetcl.cpp parallelfunc.cpp ngpkg.cpp demoview.hpp parallelfunc.hpp togl_1_7.h
- @NGMKL_TRUE@MKL_LIBS = -L$(MKLROOT)/lib/intel64  -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lmkl_def
-diff -uwrN -x.git netgen-5.3.1/nglib/Makefile.am netgen/nglib/Makefile.am
---- netgen-5.3.1/nglib/Makefile.am	2016-02-21 21:40:41.856331653 +0100
-+++ netgen/nglib/Makefile.am	2016-02-21 21:39:31.362329711 +0100
-@@ -8,15 +8,15 @@
- libnglib_la_SOURCES = nglib.cpp 
- 
- libnglib_la_LIBADD = \
--	$(top_builddir)/libsrc/interface/libinterface.la \
--	$(top_builddir)/libsrc/geom2d/libgeom2d.la \
--	$(top_builddir)/libsrc/csg/libcsg.la \
--	$(top_builddir)/libsrc/stlgeom/libstl.la \
--	$(top_builddir)/libsrc/occ/libocc.la \
--	$(top_builddir)/libsrc/meshing/libmesh.la \
-+	$(top_builddir)/libsrc/interface/libnginterface.la \
-+	$(top_builddir)/libsrc/geom2d/libnggeom2d.la \
-+	$(top_builddir)/libsrc/csg/libngcsg.la \
-+	$(top_builddir)/libsrc/stlgeom/libngstl.la \
-+	$(top_builddir)/libsrc/occ/libngocc.la \
-+	$(top_builddir)/libsrc/meshing/libngmesh.la \
- 	$(OCCLIBS) $(MPI_LIBS)
- 
--libnglib_la_LDFLAGS = -avoid-version
-+libnglib_la_LDFLAGS = -release $(PACKAGE_VERSION)
- #  -rdynamic
- 
- 
-@@ -25,24 +25,24 @@
- 
- ng_vol_SOURCES = ng_vol.cpp
- ng_vol_LDADD = libnglib.la \
--	$(top_builddir)/libsrc/interface/libinterface.la \
--	$(top_builddir)/libsrc/geom2d/libgeom2d.la \
--	$(top_builddir)/libsrc/csg/libcsg.la \
--	$(top_builddir)/libsrc/stlgeom/libstl.la \
--	$(top_builddir)/libsrc/occ/libocc.la \
--	$(top_builddir)/libsrc/meshing/libmesh.la \
-+	$(top_builddir)/libsrc/interface/libnginterface.la \
-+	$(top_builddir)/libsrc/geom2d/libnggeom2d.la \
-+	$(top_builddir)/libsrc/csg/libngcsg.la \
-+	$(top_builddir)/libsrc/stlgeom/libngstl.la \
-+	$(top_builddir)/libsrc/occ/libngocc.la \
-+	$(top_builddir)/libsrc/meshing/libngmesh.la \
- 	$(OCCLIBS) $(MPI_LIBS)
- 
- 
- 
- ng_stl_SOURCES = ng_stl.cpp
- ng_stl_LDADD = libnglib.la \
--	$(top_builddir)/libsrc/interface/libinterface.la \
--	$(top_builddir)/libsrc/geom2d/libgeom2d.la \
--	$(top_builddir)/libsrc/csg/libcsg.la \
--	$(top_builddir)/libsrc/stlgeom/libstl.la \
--	$(top_builddir)/libsrc/occ/libocc.la \
--	$(top_builddir)/libsrc/meshing/libmesh.la \
-+	$(top_builddir)/libsrc/interface/libnginterface.la \
-+	$(top_builddir)/libsrc/geom2d/libnggeom2d.la \
-+	$(top_builddir)/libsrc/csg/libngcsg.la \
-+	$(top_builddir)/libsrc/stlgeom/libngstl.la \
-+	$(top_builddir)/libsrc/occ/libngocc.la \
-+	$(top_builddir)/libsrc/meshing/libngmesh.la \
- 	$(OCCLIBS) $(MPI_LIBS)
- 
- # ng_occ_SOURCES = ng_occ.cpp

diff --git a/sci-mathematics/netgen/files/netgen-5.x-metis-fixes.patch b/sci-mathematics/netgen/files/netgen-5.x-metis-fixes.patch
deleted file mode 100644
index cf59613e4..000000000
--- a/sci-mathematics/netgen/files/netgen-5.x-metis-fixes.patch
+++ /dev/null
@@ -1,102 +0,0 @@
---- netgen-5.3.1.ORIG/libsrc/meshing/parallelmesh.cpp	2014-08-29 11:54:05.000000000 +0200
-+++ netgen/libsrc/meshing/parallelmesh.cpp	2016-02-20 23:07:00.350568182 +0100
-@@ -14,7 +14,7 @@
- 
- #if METIS_VER_MAJOR >= 5
- #define METIS5
--    typedef idx_t idxtype;   
-+    typedef metis::idx_t idxtype;
- #else
- #define METIS4
-     typedef idxtype idx_t;  
-@@ -794,10 +794,10 @@
-     eptr.Append (eind.Size());
-     Array<idx_t> epart(ne), npart(nn);
- 
--    int nparts = ntasks-1;
--    int edgecut;
-+    metis::idx_t nparts = ntasks-1;
-+    metis::idx_t edgecut;
- 
--    int ncommon = 3;
-+    metis::idx_t ncommon = 3;
-     METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &ncommon, &nparts,
- 			NULL, NULL,
- 			&edgecut, &epart[0], &npart[0]);
-@@ -1029,11 +1029,11 @@
-     eptr.Append (eind.Size());
-     Array<idx_t> epart(ne), npart(nn);
- 
--    int nparts = ntasks-1;
--    int edgecut;
-+    metis::idx_t nparts = ntasks-1;
-+    metis::idx_t edgecut;
- 
- 
--    int ncommon = 3;
-+    metis::idx_t ncommon = 3;
-     METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &nwgt[0], NULL, &ncommon, &nparts,
- 			NULL, NULL,
- 			&edgecut, &epart[0], &npart[0]);
-@@ -1266,7 +1266,7 @@
- 
-     for ( int vert = 0; vert < nn; vert++ )
-       {
--	FlatArray<int> array ( cnt[vert], &adjacency[ xadj[vert] ] );
-+	FlatArray<metis::idx_t> array ( cnt[vert], &adjacency[ xadj[vert] ] );
- 	BubbleSort(array);
-       }
- 
-@@ -1318,7 +1318,7 @@
-     idxtype  *xadj, * adjacency, *v_weights = NULL, *e_weights = NULL;
- 
-     int weightflag = 0;
--    // int numflag = 0;
-+    int numflag = 0;
-     int nparts = ntasks - 1;
- 
-     int options[5];
-@@ -1377,7 +1377,7 @@
- 
-     for ( int el = 0; el < ne; el++ )
-       {
--	FlatArray<int> array ( cnt[el], &adjacency[ xadj[el] ] );
-+	FlatArray<metis::idx_t> array ( cnt[el], &adjacency[ xadj[el] ] );
- 	BubbleSort(array);
-       }
- 
-@@ -1428,8 +1428,8 @@
-   void Mesh :: PartDualHybridMesh2D ( ) 
-   {
- #ifdef METIS
--    int ne = GetNSE();
--    int nv = GetNV();
-+    metis::idx_t ne = GetNSE();
-+    metis::idx_t nv = GetNV();
- 
-     Array<idxtype> xadj(ne+1);
-     Array<idxtype> adjacency(ne*4);
-@@ -1484,18 +1484,18 @@
- 
-     idxtype *v_weights = NULL, *e_weights = NULL;
- 
--    int weightflag = 0;
--    // int numflag = 0;
--    int nparts = ntasks - 1;
-+    metis::idx_t weightflag = 0;
-+    metis::idx_t numflag = 0;
-+    metis::idx_t nparts = ntasks - 1;
- 
--    int edgecut;
-+    metis::idx_t edgecut;
-     Array<idxtype> part(ne);
- 
-     for ( int el = 0; el < ne; el++ )
-       BubbleSort (adjacency.Range (xadj[el], xadj[el+1]));
- 
- #ifdef METIS4	
--    int options[5];
-+    metis::idx_t options[5];
-     options[0] = 0;
-     METIS_PartGraphKway ( &ne, &xadj[0], &adjacency[0], v_weights, e_weights, &weightflag, 
- 			  &numflag, &nparts, options, &edgecut, &part[0] );

diff --git a/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch b/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch
deleted file mode 100644
index d9d8f99ef..000000000
--- a/sci-mathematics/netgen/files/netgen-5.x-missing-define.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/libsrc/occ/Partition_Loop2d.cxx	2012-11-14 21:16:22.876287910 +0100
-+++ b/libsrc/occ/Partition_Loop2d.cxx	2012-11-14 21:22:30.909650554 +0100
-@@ -13,6 +13,7 @@
- 
- //using namespace std;
- #include <climits>
-+#include <cmath>
- #include "Partition_Loop2d.ixx"
- 
- #include "utilities.h"
-@@ -210,7 +211,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 +235,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,
---- a/configure.ac	2012-11-15 14:55:45.048938870 +0100
-+++ b/configure.ac	2012-11-15 14:55:12.545923777 +0100
-@@ -14,6 +14,7 @@
- AC_DISABLE_STATIC
- 
- AC_LANG([C++])
-+AM_PROG_AR
- AC_PROG_CXX
- AC_PROG_LIBTOOL
- LT_INIT

diff --git a/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch b/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch
deleted file mode 100644
index 0452d6b73..000000000
--- a/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch
+++ /dev/null
@@ -1,94 +0,0 @@
---- a/libsrc/occ/occgeom.cpp	2014-08-29 11:54:03.000000000 +0200
-+++ b/libsrc/occ/occgeom.cpp	2016-02-12 21:14:49.258982206 +0100
-@@ -149,7 +149,7 @@
- 
-          for (exp0.Init (shape, TopAbs_FACE); exp0.More(); exp0.Next())
-          {
--            // Variable to hold the colour (if there exists one) of 
-+            // Variable to hold the colour (if there exists one) of
-             // the current face being processed
-             Quantity_Color face_colour;
- 
-@@ -190,7 +190,7 @@
-                rebuild->Replace(face, newface, Standard_False);
-             }
- 
--            // Set the original colour of the face to the newly created 
-+            // Set the original colour of the face to the newly created
-             // face (after the healing process)
-             face = TopoDS::Face (exp0.Current());
-             face_colours->SetColor(face,face_colour,XCAFDoc_ColorSurf);
-@@ -815,11 +815,11 @@
-       face_maxh.SetSize (fmap.Extent());
-       face_maxh = mparam.maxh;
- 
--      // Philippose - 15/01/2010      
--      face_maxh_modified.DeleteAll();      
--      face_maxh_modified.SetSize(fmap.Extent());      
-+      // Philippose - 15/01/2010
-+      face_maxh_modified.DeleteAll();
-+      face_maxh_modified.SetSize(fmap.Extent());
-       face_maxh_modified = 0;
--      
-+
- 
-       // Philippose - 17/01/2009
-       face_sel_status.DeleteAll();
-@@ -845,7 +845,7 @@
-       cout << "Trying to sew faces ..." << flush;
- 
-       BRepOffsetAPI_Sewing sewedObj(1);
-- 
-+
-       for (int i = 1; i <= fmap.Extent(); i++)
-       {
-          TopoDS_Face face = TopoDS::Face (fmap(i));
-@@ -1038,9 +1038,6 @@
-    {
-       cout << "writing stl..."; cout.flush();
-       StlAPI_Writer writer;
--      writer.RelativeMode() = Standard_False;
--
--      writer.SetDeflection(0.02);
-       writer.Write(shape,filename);
- 
-       cout << "done" << endl;
-@@ -1109,7 +1106,7 @@
-       }
- 
- 
--      // For the IGES Reader, all the shapes can be exported as one compund shape 
-+      // For the IGES Reader, all the shapes can be exported as one compund shape
-       // using the "OneShape" member
-       occgeo->shape = reader.OneShape();
-       occgeo->face_colours = iges_colour_contents;
-@@ -1187,7 +1184,7 @@
-       }
- 
- 
--      // For the STEP File Reader in OCC, the 1st Shape contains the entire 
-+      // For the STEP File Reader in OCC, the 1st Shape contains the entire
-       // compound geometry as one shape
-       occgeo->shape = step_shape_contents->GetShape(step_shapes.Value(1));
-       occgeo->face_colours = step_colour_contents;
-@@ -1218,7 +1215,7 @@
-       }
- 
-       // Philippose - 23/02/2009
--      // Fixed a bug in the OpenCascade XDE Colour handling when 
-+      // Fixed a bug in the OpenCascade XDE Colour handling when
-       // opening BREP Files, since BREP Files have no colour data.
-       // Hence, the face_colours Handle needs to be created as a NULL handle.
-       occgeo->face_colours = Handle_XCAFDoc_ColorTool();
-@@ -1236,9 +1233,9 @@
-   void OCCGeometry :: Save (string sfilename) const
-   {
-     const char * filename = sfilename.c_str();
--    if (strlen(filename) < 4) 
-+    if (strlen(filename) < 4)
-       throw NgException ("illegal filename");
--    
-+
-     if (strcmp (&filename[strlen(filename)-3], "igs") == 0)
-       {
- 	IGESControl_Writer writer("millimeters", 1);

diff --git a/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch b/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch
deleted file mode 100644
index 0170fb8c3..000000000
--- a/sci-mathematics/netgen/files/netgen-5.x-parallelmetis4-fix.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -uwrN -x.git netgen-5.3.1/libsrc/meshing/parallelmesh.cpp netgen/libsrc/meshing/parallelmesh.cpp
---- netgen-5.3.1/libsrc/meshing/parallelmesh.cpp	2016-02-22 00:22:28.885598956 +0100
-+++ netgen/libsrc/meshing/parallelmesh.cpp	2016-02-22 00:46:17.030638283 +0100
-@@ -962,10 +962,15 @@
-   }
-   
- 
--#ifdef METIS5
-+#ifdef METIS
-   void Mesh :: ParallelMetis (Array<int> & volume_weights , Array<int> & surface_weights, Array<int> & segment_weights)  
-   {
-+
-+  	#ifdef METIS5
-     PrintMessage (3, "call metis 5 with weights ...");
-+    #else
-+    PrintMessage (3, "call metis 4 with weights ...");
-+    #endif
-     
-     // cout << "segment_weights " << segment_weights << endl;
-     // cout << "surface_weights " << surface_weights << endl;
-@@ -1034,9 +1039,15 @@
- 
- 
-     metis::idx_t ncommon = 3;
-+    #ifdef METIS5
-     METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &nwgt[0], NULL, &ncommon, &nparts,
- 			NULL, NULL,
- 			&edgecut, &epart[0], &npart[0]);
-+    #else
-+    int numflag = 0;
-+    METIS_PartMeshDual (&ne, &nn, &eptr[0], &eind[0], &numflag, &nparts,
-+    	&edgecut, &epart[0], &npart[0]);
-+    #endif
-     /*
-     METIS_PartMeshNodal (&ne, &nn, &eptr[0], &eind[0], NULL, NULL, &nparts,
- 			 NULL, NULL,

diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild
deleted file mode 100644
index 3cd4d956d..000000000
--- a/sci-mathematics/netgen/netgen-5.3.1.ebuild
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools desktop flag-o-matic xdg
-
-MY_PN=${PN}-mesher
-MY_PV=$(ver_cut 1-2)
-
-DESCRIPTION="Automatic 3d tetrahedral mesh generator"
-HOMEPAGE="https://sourceforge.net/projects/netgen/"
-SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}/${MY_PV}/${P}.tar.gz"
-
-SLOT="0"
-LICENSE="LGPL-2.1"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="ffmpeg jpeg mpi opencascade openmp"
-
-DEPEND="
-	dev-lang/tcl:0
-	dev-lang/tk:0
-	dev-tcltk/tix
-	dev-tcltk/togl:1.7
-	virtual/opengl
-	x11-libs/libX11
-	x11-libs/libXmu
-	opencascade? ( sci-libs/opencascade:* )
-	ffmpeg? ( media-video/ffmpeg )
-	jpeg? ( virtual/jpeg:0= )
-	mpi? ( virtual/mpi sci-libs/parmetis opencascade? ( sci-libs/hdf5[mpi] ) )
-"
-RDEPEND="${DEPEND}"
-# Note, MPI has not be tested.
-
-PATCHES=(
-	# Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824
-	"${FILESDIR}"/${PN}-5.x-missing-define.patch
-	# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_metis.patch
-	"${FILESDIR}"/${PN}-5.x-metis-fixes.patch
-	"${FILESDIR}"/${PN}-5.x-occ-stl-api-change.patch
-	# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.1_build.patch
-	"${FILESDIR}"/${PN}-5.x-makefiles-fixes.patch
-	# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_fixes.patch
-	"${FILESDIR}"/${PN}-5.x-fedora-fixes.patch
-	"${FILESDIR}"/${PN}-5.x-includes-fixes.patch
-	"${FILESDIR}"/${PN}-5.x-parallelmetis4-fix.patch
-)
-
-src_prepare() {
-	default
-	if use mpi; then
-		export CC=mpicc
-		export CXX=mpic++
-		export FC=mpif90
-		export F90=mpif90
-		export F77=mpif77
-	fi
-	eautoreconf
-}
-
-src_configure() {
-	# This is not the most clever way to deal with these flags
-	# but --disable-xxx does not seem to work correcly, so...
-	local myconf=( --with-togl=/usr/$(get_libdir)/Togl1.7 )
-
-	myconf+=( $(use_enable openmp) )
-
-	if use opencascade; then
-		myconf+=( --enable-occ --with-occ=$CASROOT )
-		append-ldflags -L$CASROOT/$(get_libdir)
-	fi
-	if use mpi; then
-		ewarn "*************************************************************************"
-		ewarn ""
-		ewarn "MPI has not been tested, you should probably deactivate the mpi use flag"
-		ewarn ""
-		ewarn "*************************************************************************"
-		myconf+=( --enable-parallel )
-		append-cppflags -I/usr/include/metis
-		append-ldflags -L/usr/$(get_libdir)/openmpi/
-	fi
-	use ffmpeg && myconf+=( --enable-ffmpeg )
-	use jpeg && myconf+=( --enable-jpeglib )
-	append-cppflags -I/usr/include/togl-1.7
-
-	econf \
-		${myconf[@]}
-
-	# This would be the more elegant way:
-# 	econf \
-# 		$(use_enable opencascade occ) \
-# 		$(use_with opencascade "occ=$CASROOT") \
-# 		$(use_enable mpi parallel) \
-# 		$(use_enable ffmpeg) \
-# 		$(use_enable jpeg jpeglib)
-}
-
-src_install() {
-	local NETGENDIR="/usr/share/netgen"
-
-	echo -e "NETGENDIR=${NETGENDIR} \nLDPATH=/usr/$(get_libdir)/Togl1.7" > ./99netgen
-	doenvd 99netgen
-
-	default
-	mv "${D}"/usr/bin/{*.tcl,*.ocf} "${D}${NETGENDIR}" || die
-
-	# Install icon and .desktop for menu entry
-	doicon "${FILESDIR}"/${PN}.png
-	domenu "${FILESDIR}"/${PN}.desktop
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	elog "Please make sure to update your environment variables:"
-	elog "env-update && source /etc/profile"
-	elog "Netgen ebuild is still under development."
-	elog "Help us improve the ebuild in:"
-	elog "https://bugs.gentoo.org/show_bug.cgi?id=155424"
-}

diff --git a/sci-mathematics/netgen/netgen-6.0_beta.ebuild b/sci-mathematics/netgen/netgen-6.0_beta.ebuild
deleted file mode 100644
index 8acc255d4..000000000
--- a/sci-mathematics/netgen/netgen-6.0_beta.ebuild
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools desktop flag-o-matic xdg
-
-MY_PN=${PN}-mesher
-MY_PV=${PV//_/-}
-
-DESCRIPTION="Automatic 3d tetrahedral mesh generator"
-HOMEPAGE="https://sourceforge.net/projects/netgen/"
-SRC_URI="mirror://sourceforge/project/${MY_PN}/${MY_PN}/$(ver_cut 1-2)/${PN}-${MY_PV}.tar.gz"
-
-SLOT="0"
-LICENSE="LGPL-2.1"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="ffmpeg jpeg mpi opencascade openmp"
-
-DEPEND="
-	dev-lang/tcl:0
-	dev-lang/tk:0
-	dev-tcltk/tix
-	dev-tcltk/togl:1.7
-	virtual/opengl
-	x11-libs/libX11
-	x11-libs/libXmu
-	opencascade? ( sci-libs/opencascade:* )
-	ffmpeg? ( media-video/ffmpeg )
-	jpeg? ( virtual/jpeg:0= )
-	mpi? ( virtual/mpi sci-libs/parmetis opencascade? ( sci-libs/hdf5[mpi] ) )
-"
-RDEPEND="${DEPEND}"
-# Note, MPI has not be tested.
-
-PATCHES=(
-	# Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824
-
-	# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_metis.patch
-	"${FILESDIR}"/${PN}-5.x-metis-fixes.patch
-	"${FILESDIR}"/${PN}-5.x-occ-stl-api-change.patch
-	# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.1_build.patch
-	# Adapted from http://pkgs.fedoraproject.org/cgit/rpms/netgen-mesher.git/tree/netgen-5.3.0_fixes.patch
-	"${FILESDIR}"/${PN}-5.x-includes-fixes.patch
-	"${FILESDIR}"/${PN}-5.x-parallelmetis4-fix.patch
-)
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-src_prepare() {
-	default
-	if use mpi; then
-		export CC=mpicc
-		export CXX=mpic++
-		export FC=mpif90
-		export F90=mpif90
-		export F77=mpif77
-	fi
-	eautoreconf
-}
-
-src_configure() {
-	# This is not the most clever way to deal with these flags
-	# but --disable-xxx does not seem to work correcly, so...
-	local myconf=( --with-togl=/usr/$(get_libdir)/Togl1.7 )
-
-	myconf+=( $(use_enable openmp) )
-
-	if use opencascade; then
-		myconf+=( --enable-occ --with-occ=$CASROOT )
-		append-ldflags -L$CASROOT/$(get_libdir)
-	fi
-	if use mpi; then
-		ewarn "*************************************************************************"
-		ewarn ""
-		ewarn "MPI has not been tested, you should probably deactivate the mpi use flag"
-		ewarn ""
-		ewarn "*************************************************************************"
-		myconf+=( --enable-parallel )
-		append-cppflags -I/usr/include/metis
-		append-ldflags -L/usr/$(get_libdir)/openmpi/
-	fi
-	use ffmpeg && myconf+=( --enable-ffmpeg )
-	use jpeg && myconf+=( --enable-jpeglib )
-	append-cppflags -I/usr/include/togl-1.7
-
-	econf \
-		${myconf[@]}
-
-	# This would be the more elegant way:
-# 	econf \
-# 		$(use_enable opencascade occ) \
-# 		$(use_with opencascade "occ=$CASROOT") \
-# 		$(use_enable mpi parallel) \
-# 		$(use_enable ffmpeg) \
-# 		$(use_enable jpeg jpeglib)
-}
-
-src_install() {
-	local NETGENDIR="/usr/share/netgen"
-
-	echo -e "NETGENDIR=${NETGENDIR} \nLDPATH=/usr/$(get_libdir)/Togl1.7" > ./99netgen
-	doenvd 99netgen
-
-	default
-	mv "${D}"/usr/bin/{*.tcl,*.ocf} "${D}${NETGENDIR}" || die
-
-	# Install icon and .desktop for menu entry
-	doicon "${FILESDIR}"/${PN}.png
-	domenu "${FILESDIR}"/${PN}.desktop
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	elog "Please make sure to update your environment variables:"
-	elog "env-update && source /etc/profile"
-	elog "Netgen ebuild is still under development."
-	elog "Help us improve the ebuild in:"
-	elog "https://bugs.gentoo.org/show_bug.cgi?id=155424"
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-13 14:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22  8:38 [gentoo-commits] proj/sci:master commit in: sci-mathematics/netgen/files/, sci-mathematics/netgen/ Justin Lecher
  -- strict thread matches above, loose matches on Subject: below --
2022-01-13 14:19 Andrew Ammerlaan
2016-02-22  8:38 Justin Lecher
2016-02-22  8:38 Justin Lecher
2016-02-22  8:38 Justin Lecher
2016-02-22  8:38 Justin Lecher
2016-02-22  8:38 Justin Lecher
2013-12-03 14:53 Justin Lecher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox