aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieltourde <danieltourde@32389bae-6d03-0410-99cf-db05cde120eb>2008-05-12 18:53:59 +0000
committerdanieltourde <danieltourde@32389bae-6d03-0410-99cf-db05cde120eb>2008-05-12 18:53:59 +0000
commit9a3ff806c93545417888b8520b50867f914b4eff (patch)
tree74ec4fc27a950b07e20a2f83f087b73e5d323996
parentBump to opencascade-6.2-r1 (diff)
downloadsci-9a3ff806c93545417888b8520b50867f914b4eff.tar.gz
sci-9a3ff806c93545417888b8520b50867f914b4eff.tar.bz2
sci-9a3ff806c93545417888b8520b50867f914b4eff.zip
Updated to netgen-4.4-r1
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1053 32389bae-6d03-0410-99cf-db05cde120eb
-rw-r--r--sci-mathematics/netgen/ChangeLog4
-rw-r--r--sci-mathematics/netgen/Manifest9
-rw-r--r--sci-mathematics/netgen/files/debian-inspired-netgen_4.4-9.2.patch272
-rw-r--r--sci-mathematics/netgen/files/debian-inspired-netgen_4.4-9.patch301
-rw-r--r--sci-mathematics/netgen/files/icon/netgen-icon.pngbin0 -> 4220 bytes
-rw-r--r--sci-mathematics/netgen/files/icon/netgen.desktop9
-rw-r--r--sci-mathematics/netgen/files/togl_tk.patch16
-rw-r--r--sci-mathematics/netgen/netgen-4.4-r1.ebuild172
8 files changed, 780 insertions, 3 deletions
diff --git a/sci-mathematics/netgen/ChangeLog b/sci-mathematics/netgen/ChangeLog
index 15e0246dd..af4384dba 100644
--- a/sci-mathematics/netgen/ChangeLog
+++ b/sci-mathematics/netgen/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sci-mathematics/netgen
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 12 May 2008; Daniel Tourde <daniel.tourde@caelae.se>
+ +files/debian-inspired-netgen_4.4-9.patch, +files/debian-inspired-netgen_4.4-9.2.patch, +files/icon/netgen.desktop, +files/icon/netgen-icon.png +netgen-4.4-r1.ebuild:
+ General improvement, better amd64 support, icon in the menu etc..
+ Many thanks to Richard Westwell <garlicbread@ntlworld.com> and Sébastien Fabbro <bicatali@gentoo.org> for their inputs and their modifications.
15 Jan 2008; Sébastien Fabbro <bicatali@gentoo.org>
+files/debian-netgen_4.4-7.patch, +files/densemat.patch,
diff --git a/sci-mathematics/netgen/Manifest b/sci-mathematics/netgen/Manifest
index 0c22ba7c4..923948a30 100644
--- a/sci-mathematics/netgen/Manifest
+++ b/sci-mathematics/netgen/Manifest
@@ -1,8 +1,13 @@
+AUX debian-inspired-netgen_4.4-9.2.patch 8375 RMD160 7585f7613ec4107666cd5e46902d5c00d62c2cd5 SHA1 49b0938d7637a78668769affeef874c37d629804 SHA256 e1de4d1db6b19f66e5a54974e40722766286a371c78a492e1f0b74fad985baf1
+AUX debian-inspired-netgen_4.4-9.patch 9450 RMD160 3175aee439ee031f73d02d56a7c05880d8135fbc SHA1 37363f933ea20cc0085c2e011ef5610548742e79 SHA256 650c11307cf2319e7d63baa3daeb99d2e8e126f59cecbf5476682e2975f61a60
AUX debian-netgen_4.4-7.patch 9589 RMD160 7d30ea929859ba21ee27d7a36e727713c602bd58 SHA1 617ef9f5fb14830891f9685c8d3a2c1b5edaa632 SHA256 3023fb5098e21365e4eae8668b69f5db85123185e2a2a26f6ad8541959f1adfd
AUX densemat.patch 313 RMD160 d519fa27870608052f6867f38b77d3fa30f8cca7 SHA1 c301257702d7f1fe34bcb03b59e10a7c094b9e41 SHA256 fa900bc5c1015cf322e0250c82f67047fc96262b9153220a3277d0567be692d7
+AUX icon/netgen-icon.png 4220 RMD160 05fb7ef5da0075c7ccc77e7b6084974d2309e798 SHA1 eee96e5b55c62379580bfe3cd873d7ddc87dba05 SHA256 4db00f0c652265728d994fc5b9ab8d65a91b2704d1b939c334c789d358b10dd3
+AUX icon/netgen.desktop 176 RMD160 b0a5a7ad4d2b94304654998f66745984f04781ca SHA1 effa603fdccf692fa41f8e79537615ba8f0d427d SHA256 99c615672c37d4ce74c0f2f8c584820f47ba65c977a546f0b756a0fcc3d3dd8a
AUX meshtype.patch 251 RMD160 fa121b872ee3b06fb7bbdc98800929aeefeadaac SHA1 ec6c5d5aeedb71727620b0c5cceca69dabcbd83e SHA256 b750d8573b7b0bcde496c609b91bdfad11f1f1c33d62346c5d5898ce0e894856
-AUX togl_tk.patch 1885 RMD160 4b082fd52a8fd4af5f38ae75938d8b78adc8a6d4 SHA1 a0091884c6d4a7e8f8a1c8824b0f28940bc07b47 SHA256 28adef147ef2f5d97e59c45dcb6f0c2f51827aa65a2f9c73839a2a964b64a20f
+AUX togl_tk.patch 2606 RMD160 cb5956af8f10d18dd824c268626a77bd2199efcd SHA1 8d40e3bddd87bf8be239ea6c1a76416c35c2f2f8 SHA256 60f0a1819f1b5a9832575e7aeeafc678a6c49596206fdac5a883a0d4f8d34511
DIST download.cgi?ID=ngs44.tar.gz 3421202 RMD160 a4f193bcec237d54e28cca0d32c37046ddbaa350 SHA1 8b61cd720a7d1a1548c48c7d02ea6cd8d1a61740 SHA256 21e1ce63204a90f4a8d85cadc54847d9f1f58fb76d500a46baab2022fe7709d4
+EBUILD netgen-4.4-r1.ebuild 6470 RMD160 f6b9cf954e28c54221791002ed00db5933f84693 SHA1 f0a9b965e814e4dc416f85b016bb3cf04cb2533b SHA256 11103859c1de178f2310c11b2d1ce6ec55c3a6c313ce163a72eba4b9e8fdac66
EBUILD netgen-4.4.ebuild 5346 RMD160 8c83224390cb010acb51d1ab1126e1f8e6e65637 SHA1 09468d19a73725814543e4d59389d3163c2e333e SHA256 321efd85616d0062114bd2b50230411ccd1317defa887fb492919ee5270359df
-MISC ChangeLog 491 RMD160 f6622dbda41cabf0af393ed4779290ba1f8f401a SHA1 b4262570b5c1c3cb5ec930f051942dcd7c1b4d3d SHA256 da0c02ba514da02330ca8dff6735e2cfe52ca3376ea9b0e351cb73bc9672ebd6
+MISC ChangeLog 930 RMD160 dffabc46fa045e0ccd663c1a05828ea8094bfd91 SHA1 e2378a72cdd49ee77f2e3596e4aa74b53e7a7a85 SHA256 273e6ad511a317e897c6835630cd5a9a6269b82d8e8a873daf76a18d7306890f
MISC metadata.xml 169 RMD160 a8b2671842bbec7d36e587fbf53c4eb111498347 SHA1 604114857745acb6253b121cda619e3c35771cc7 SHA256 7a9f25879c1299572cfaf2a3efb47313412564a1ef12c828224194f4e96edcd0
diff --git a/sci-mathematics/netgen/files/debian-inspired-netgen_4.4-9.2.patch b/sci-mathematics/netgen/files/debian-inspired-netgen_4.4-9.2.patch
new file mode 100644
index 000000000..dede917eb
--- /dev/null
+++ b/sci-mathematics/netgen/files/debian-inspired-netgen_4.4-9.2.patch
@@ -0,0 +1,272 @@
+--- ./Makefile 2007-12-10 20:50:32.613584822 +0100
++++ ./Makefile 2007-12-10 20:52:07.118970377 +0100
+@@ -121,6 +121,7 @@
+ .PHONY : clean
+ clean:
+ -rm *.o ngtcltk/*.o togl/*.o lib/$(MACHINE)/lib*.a lib/$(MACHINE)/*.o ng
++ -rm ngsolve/evplapack.o ngsolve/fastmat.o
+ #
+ #
+ .PHONY : cleanapp
+--- ./libsrc/interface/Makefile 2004-07-06 13:10:58.000000000 +0000
++++ ./libsrc/interface/Makefile 2008-01-21 01:52:32.000000000 +0000
+@@ -1,4 +1,4 @@
+-src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp readuser.cpp importsolution.cpp
++src = nglib.cpp nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp readuser.cpp importsolution.cpp
+ #
+ lib = nginterface
+ libpath = libsrc/interface
+--- ./libsrc/makefile.inc 2006-01-04 20:35:21.000000000 +0100
++++ ./libsrc/makefile.inc 2008-02-08 10:04:40.000000000 +0100
+@@ -18,23 +18,34 @@
+ #
+ ARFLAGS = r
+ #
++LIBA=lib$(lib).so
+ LIBB=$(LIB_DIR)/lib$(lib).a
+ #
+ .PRECIOUS: .cpp .c
+-.SUFFIXES: .cpp .c .o
++.SUFFIXES: .cpp .c .o .lo
+ #
+ .cpp.o:
+ $(CPLUSPLUS) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGSLIBRARY) $<
+ .c.o:
+ $(CPLUSPLUS) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGSLIBRARY) $<
++.cpp.lo:
++ $(CPLUSPLUS) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGSLIBRARY) -fPIC -DPIC $< -o $@
++
++all: $(LIBA) $(LIBB)
++
+ #
+ #
++$(LIBA):: $(LIB_DIR)
+ $(LIBB):: $(LIB_DIR)
+ #
+ # make lib from sources:
+ #
+-$(LIBB):: $(src)
+- $(CPLUSPLUS) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGSLIBRARY) $?
++$(LIBA):: $(src:%.cpp=%.lo)
++ $(CPLUSPLUS) -shared -o $(LIB_DIR)/$@.4.4 *.lo -Wl,-soname,$@.4.4
++ ln -sf $@.4.4 $(LIB_DIR)/$@.4
++ ln -sf $@.4.4 $(LIB_DIR)/$@
++
++$(LIBB):: $(src:%.cpp=%.o)
+ @$(AR) $(ARFLAGS) $@ *.o
+ -@$(RM) *.o
+ -@$(RANLIB) $@
+--- ./libsrc/linalg/Makefile 2006-01-04 20:35:21.000000000 +0100
++++ ./libsrc/linalg/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = basemat.cpp densemat.cpp vector.cpp sparsmat.cpp polynomial.cpp
+ #
+-lib = la
++lib = netgen_linalg
+ libpath = libsrc/linalg
+ #
+ #
+--- ./libsrc/general/Makefile 2006-01-04 17:57:34.000000000 +0100
++++ ./libsrc/general/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -5,7 +5,7 @@
+ spbita2d.cpp seti.cpp optmem.cpp sort.cpp mystring.cpp parthreads.cpp \
+ moveablemem.cpp dynamicmem.cpp ngexception.cpp
+ #
+-lib = gen
++lib = netgen_general
+ libpath = libsrc/general
+ #
+ include ../makefile.inc
+--- ./libsrc/gprim/Makefile 2006-01-04 17:57:34.000000000 +0100
++++ ./libsrc/gprim/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -6,7 +6,7 @@
+
+ # reftrans.cpp rot3d.cpp
+ #
+-lib = gprim
++lib = netgen_gprim
+ libpath = libsrc/gprim
+ #
+ #
+--- ./libsrc/csg/Makefile 2006-01-04 17:57:34.000000000 +0100
++++ ./libsrc/csg/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -10,7 +10,7 @@
+ #
+ # lex.yy.cpp geometry.cpp
+ #
+-lib = csg
++lib = netgen_csg
+ libpath = libsrc/csg
+ #
+ #
+--- ./libsrc/geom2d/Makefile 2006-01-04 17:57:34.000000000 +0100
++++ ./libsrc/geom2d/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = spline2d.cpp geom2dmesh.cpp splinegeometry2.cpp genmesh2d.cpp
+ #
+-lib = geom2d
++lib = netgen_geom2d
+ libpath = libsrc/geom2d
+ #
+ #
+--- ./libsrc/stlgeom/Makefile 2006-01-04 17:57:34.000000000 +0100
++++ ./libsrc/stlgeom/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = stlgeom.cpp stltopology.cpp stlgeomchart.cpp stlgeommesh.cpp meshstlsurface.cpp stlline.cpp stltool.cpp
+ #
+-lib = stlgeom
++lib = netgen_stlgeom
+ libpath = libsrc/stlgeom
+ #
+ #
+--- ./libsrc/occ/Makefile 2006-01-04 17:57:34.000000000 +0100
++++ ./libsrc/occ/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = occgeom.cpp occmeshsurf.cpp occgenmesh.cpp
+
+-lib = occ
++lib = netgen_occ
+ libpath = libsrc/occ
+ #
+ #
+--- ./libsrc/meshing/Makefile 2006-01-04 17:57:34.000000000 +0100
++++ ./libsrc/meshing/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -9,7 +9,7 @@
+ boundarylayer.cpp specials.cpp msghandler.cpp \
+ pyramidrls.cpp pyramid2rls.cpp prism2rls.cpp curvedelems.cpp curvedelems2.cpp
+ #
+-lib = mesh
++lib = netgen_meshing
+ libpath = libsrc/meshing
+ #
+ include ../makefile.inc
+--- ./libsrc/opti/Makefile 2006-01-04 17:57:34.000000000 +0100
++++ ./libsrc/opti/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = bfgs.cpp linsearch.cpp linopt.cpp
+ #
+-lib = opti
++lib = netgen_opti
+ libpath = libsrc/opti
+ #
+ #
+--- ./libsrc/visualization/Makefile 2006-01-04 20:35:21.000000000 +0100
++++ ./libsrc/visualization/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = stlmeshing.cpp mvdraw.cpp vscsg.cpp vsmesh.cpp vsocc.cpp vssolution.cpp meshdoc.cpp
+ #
+-lib = vis
++lib = netgen_visualization
+ libpath = libsrc/visualization
+ #
+ #
+--- ./libsrc/interface/Makefile 2008-02-08 10:00:27.000000000 +0100
++++ ./libsrc/interface/Makefile 2008-02-08 10:00:27.000000000 +0100
+@@ -1,6 +1,6 @@
+ src = nglib.cpp nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp readuser.cpp importsolution.cpp
+ #
+-lib = nginterface
++lib = netgen_interface
+ libpath = libsrc/interface
+ #
+ include ../makefile.inc
+--- ./ngsolve/Makefile 2006-01-04 19:06:43.000000000 +0100
++++ ./ngsolve/Makefile 2008-02-08 10:06:15.000000000 +0100
+@@ -64,8 +64,10 @@
+ #
+ #
+ #
+-lib = ../lib/$(MACHINE)/libngsolve.a
+-lib2 = ../lib/$(MACHINE)/libngsolvebasic.a
++lib = ../lib/$(MACHINE)/libnetgen_solve.a
++slib = libnetgen_solve.so
++lib2 = ../lib/$(MACHINE)/libnetgen_solvebasic.a
++slib2 = libnetgen_solvebasic.so
+ libold = ../lib/$(MACHINE)/libngsolve_oldla.a
+ #
+ #
+@@ -74,7 +76,7 @@
+ #
+ #
+ # .PRECIOUS: .cpp .hh
+-# .SUFFIXES: .cpp .o
++.SUFFIXES: .cpp .o .lo
+ #
+ # .cpp.o:
+ # $(CPLUSPLUS) -c $<
+@@ -84,22 +86,35 @@
+ #
+ # make lib from sources:
+ #
+-goal: $(lib) $(lib2)
++goal: $(lib) $(lib2) ../lib/$(MACHINE)/$(slib) ../lib/$(MACHINE)/$(slib2)
+ #
+ pebblesinc = -I../../pebbles_old/libsrc/setup -I../../pebbles_old/libsrc/solver -I../../pebbles_old/libsrc/prepro -I../../pebbles_old/libsrc/parallel -I../../pebbles_old/libsrc
+ #
++.cpp.lo:
++ $(CPLUSPLUS) -c -I. -I../libsrc -I../libsrc/include -I../libsrc/interface -Iinclude $(pebblesinc) $(CPLUSPLUSFLAGS2) -DNETGEN_ELTRANS -fPIC -DPIC $< -o $@
++
+ $(lib):: $(src)
+ $(CPLUSPLUS) -c -I. -I../libsrc -I../libsrc/include -I../libsrc/interface -Iinclude $(pebblesinc) $(CPLUSPLUSFLAGS2) -DNETGEN_ELTRANS $?
+ $(AR) $(ARFLAGS) $@ *.o
+ mv *.o ../lib/$(MACHINE)
+ -$(RM) *.o
+ -@$(RANLIB) $@
+-#
++
++../lib/$(MACHINE)/$(slib):: $(src:%.cpp=%.lo)
++ $(CPLUSPLUS) -shared -o ../lib/$(MACHINE)/$(slib).4.4 $^ -Wl,-soname,$(slib).4.4
++ ln -sf $(slib).4.4 $@.4
++ ln -sf $(slib).4.4 $@
++
+ $(lib2):: $(src2)
+ $(CPLUSPLUS) -c -I. -I../libsrc/interface -Iinclude $(CPLUSPLUSFLAGS2) $?
+ $(AR) $(ARFLAGS) $@ *.o
+ -$(RM) *.o
+ -@$(RANLIB) $@
++
++../lib/$(MACHINE)/$(slib2):: $(src2:%.cpp=%.lo)
++ $(CPLUSPLUS) -shared -o ../lib/$(MACHINE)/$(slib2).4.4 $^ -Wl,-soname,$(slib2).4.4
++ ln -sf $(slib2).4.4 $@.4
++ ln -sf $(slib2).4.4 $@
+ #
+ #
+ #
+--- ./Makefile 2006-06-05 07:49:21.000000000 +0200
++++ ./Makefile 2008-02-08 10:03:42.000000000 +0100
+@@ -14,8 +14,8 @@
+ #
+ #
+ #
+-mylib = -lnginterface -lvis -lcsg -lstlgeom -lgeom2d -lmesh -lgprim -lopti \
+- -lla -lgen -locc
++mylib = -lnetgen_interface -lnetgen_visualization -lnetgen_csg -lnetgen_stlgeom -lnetgen_geom2d -lnetgen_meshing -lnetgen_gprim -lnetgen_opti \
++ -lnetgen_linalg -lnetgen_general -lnetgen_occ
+ #
+ #
+ # system libraries:
+--- ./libsrc/makefile.mach.LINUX 2006-02-01 08:46:48.000000000 +0100
++++ ./libsrc/makefile.mach.LINUX 2008-02-08 10:00:27.000000000 +0100
+@@ -36,4 +36,4 @@
+ # lapack = -llapack -lblas -lgmp -lg2c
+
+
+-appngs = lib/$(MACHINE)/*.o -lngsolvebasic
+\ No newline at end of file
++appngs = lib/$(MACHINE)/*.o -lnetgen_solvebasic
+\ No newline at end of file
+--- ./libsrc/include/mystdlib.h 2004-09-01 11:10:01.000000000 +0200
++++ ./libsrc/include/mystdlib.h 2008-03-15 22:38:05.000000000 +0100
+ #include <iomanip>
+ #include <fstream>
+ #include <sstream>
++#include <cstring>
+
+ #ifdef OLDCINCLUDE
+
diff --git a/sci-mathematics/netgen/files/debian-inspired-netgen_4.4-9.patch b/sci-mathematics/netgen/files/debian-inspired-netgen_4.4-9.patch
new file mode 100644
index 000000000..cf01a4a48
--- /dev/null
+++ b/sci-mathematics/netgen/files/debian-inspired-netgen_4.4-9.patch
@@ -0,0 +1,301 @@
+--- ./ngsolve/basiclinalg/calcinverse.cpp
++++ ./ngsolve/basiclinalg/calcinverse.cpp
+@@ -9,7 +9,7 @@
+ {
+ double sum = 0;
+ for (int i = 0; i < N; i++)
+- sum += abs(m(i,i));
++ sum += std::abs(m(i,i));
+ return sum;
+ }
+ inline double abs (double a)
+--- ./ng.tcl
++++ ./ng.tcl
+@@ -7,7 +7,7 @@
+
+ set progname "NETGEN"
+
+-set ngdir ""
++set ngdir "/usr/share/netgen"
+ if { [lsearch [array names env] NETGENDIR] != -1 } {
+ set ngdir $env(NETGENDIR)
+ }
+--- ./togl/LICENSE.togl
++++ ./togl/LICENSE.togl
+@@ -0,0 +1,27 @@
++This software is copyrighted by Brian Paul (brian@mesa3d.org)
++and Benjamin Bederson (bederson@cs.umd.edu). The following
++terms apply to all files associated with the software unless explicitly
++disclaimed in individual files.
++
++The authors hereby grant permission to use, copy, modify, distribute,
++and license this software and its documentation for any purpose, provided
++that existing copyright notices are retained in all copies and that this
++notice is included verbatim in any distributions. No written agreement,
++license, or royalty fee is required for any of the authorized uses.
++Modifications to this software may be copyrighted by their authors
++and need not follow the licensing terms described here, provided that
++the new terms are clearly indicated on the first page of each file where
++they apply.
++
++IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
++FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
++ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
++DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.
++
++THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
++INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
++IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
++NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
++MODIFICATIONS.
+--- ./togl/license.terms
++++ ./togl/license.terms
+@@ -0,0 +1,39 @@
++This software is copyrighted by the Regents of the University of
++California, Sun Microsystems, Inc., Scriptics Corporation,
++and other parties. The following terms apply to all files associated
++with the software unless explicitly disclaimed in individual files.
++
++The authors hereby grant permission to use, copy, modify, distribute,
++and license this software and its documentation for any purpose, provided
++that existing copyright notices are retained in all copies and that this
++notice is included verbatim in any distributions. No written agreement,
++license, or royalty fee is required for any of the authorized uses.
++Modifications to this software may be copyrighted by their authors
++and need not follow the licensing terms described here, provided that
++the new terms are clearly indicated on the first page of each file where
++they apply.
++
++IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
++FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
++ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
++DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
++POSSIBILITY OF SUCH DAMAGE.
++
++THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
++INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
++IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
++NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
++MODIFICATIONS.
++
++GOVERNMENT USE: If you are acquiring this software on behalf of the
++U.S. government, the Government shall have only "Restricted Rights"
++in the software and related documentation as defined in the Federal
++Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
++are acquiring the software on behalf of the Department of Defense, the
++software shall be classified as "Commercial Computer Software" and the
++Government shall have only "Restricted Rights" as defined in Clause
++252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
++authors grant the U.S. Government and others acting in its behalf
++permission to use and distribute the software in accordance with the
++terms specified in this license.
+--- ./ngtcltk/ngappinit.cpp
++++ ./ngtcltk/ngappinit.cpp
+@@ -77,7 +77,7 @@
+ if (getenv ("NETGENDIR") && strlen (getenv ("NETGENDIR")))
+ ngdir = getenv ("NETGENDIR");
+ else
+- ngdir = ".";
++ ngdir = "/usr/share/netgen";
+
+ verbose = parameters.GetDefineFlag ("V");
+
+--- ./ngtcltk/nghelp.tcl
++++ ./ngtcltk/nghelp.tcl
+@@ -1,6 +1,6 @@
+ proc print_commandline_help { } {
+
+- puts "Usage: ng { options }"
++ puts "Usage: netgen { options }"
+
+ puts "-geofile=filename Input geometry file (alternative: ng filename)"
+ puts "-meshfile=filename Output mesh file"
+--- ./libsrc/visualization/mvdraw.hpp
++++ ./libsrc/visualization/mvdraw.hpp
+@@ -250,6 +250,7 @@
+ int seltria;
+ };
+
++extern VisualSceneSTLMeshing vsstlmeshing;
+
+
+
+--- ./ngsolve/comp/postproc.cpp
++++ ./ngsolve/comp/postproc.cpp
+@@ -9,6 +9,7 @@
+ */
+
+ #include <comp.hpp>
++#include <fem.hpp>
+
+ namespace ngcomp
+ {
+@@ -274,8 +275,8 @@
+ if (dimflux > 1)
+ {
+ FlatMatrix<SCAL> elmat(dnumsflux.Size(), lh);
+- dynamic_cast<const BlockBilinearFormIntegrator&> (fluxbli)
+- . Block() . AssembleElementMatrix (felflux, eltrans, elmat, lh);
++ BlockBilinearFormIntegrator const& fluxbli_ref = dynamic_cast<const BlockBilinearFormIntegrator&> (fluxbli);
++ fluxbli_ref . Block() . AssembleElementMatrix (felflux, eltrans, elmat, lh);
+ CholeskyFactors<SCAL> invelmat(elmat);
+
+ FlatVector<SCAL> hv1(dnumsflux.Size(), lh);
+--- ./ngsolve/linalg/order.cpp
++++ ./ngsolve/linalg/order.cpp
+@@ -54,7 +54,7 @@
+ return ball.Alloc();
+ }
+
+- void CliqueEl :: operator delete (void * p, size_t)
++ void CliqueEl :: operator delete (void * p)
+ {
+ ball.Free (p);
+ }
+--- ./ngsolve/linalg/order.hpp
++++ ./ngsolve/linalg/order.hpp
+@@ -118,7 +118,7 @@
+ ///
+ void * operator new(size_t);
+ ///
+- void operator delete (void *, size_t);
++ void operator delete (void *);
+ };
+
+
+--- ./ngsolve/basiclinalg/expr3.hpp
++++ ./ngsolve/basiclinalg/expr3.hpp
+@@ -851,6 +851,16 @@
+ /**
+ Inner product
+ */
++inline double InnerProduct ( const double& a, const double& b )
++{
++ return a * b;
++}
++
++inline Complex InnerProduct ( const Complex& a, const Complex b)
++{
++ return a * b;
++}
++
+ template <class TA, class TB>
+ inline typename TA::TSCAL
+ InnerProduct (const MatExpr<TA> & a, const MatExpr<TB> & b)
+@@ -862,15 +872,6 @@
+ return sum;
+ }
+
+-inline double InnerProduct (double a, double b)
+-{
+- return a * b;
+-}
+-
+-inline Complex InnerProduct (Complex a, Complex b)
+-{
+- return a * b;
+-}
+
+
+ /* **************************** Trace **************************** */
+@@ -889,6 +890,16 @@
+ /* **************************** L2Norm **************************** */
+
+ /// Euklidean norm squared
++inline double L2Norm2 (const double& v)
++{
++ return v*v;
++}
++
++inline double L2Norm2 (Complex v)
++{
++ return v.real()*v.real()+v.imag()*v.imag();
++}
++
+ template <class TA>
+ inline double L2Norm2 (const MatExpr<TA> & v)
+ {
+@@ -899,17 +910,6 @@
+ return sum;
+ }
+
+-
+-inline double L2Norm2 (double v)
+-{
+- return v*v;
+-}
+-
+-inline double L2Norm2 (Complex v)
+-{
+- return v.real()*v.real()+v.imag()*v.imag();
+-}
+-
+ template <class TA>
+ inline double L2Norm (const MatExpr<TA> & v)
+ {
+--- ./Makefile
++++ ./Makefile
+@@ -29,7 +29,7 @@
+ # tcltklib = -ltix8.2 -ltk8.4 -ltcl8.4
+ #
+ #
+-syslib = $(tcltklib) -lGL -lGLU -lX11 -lXi -lm -ldl -lpthread $(SYSLIB2)
++syslib = $(tcltklib) -lGL -lGLU -lX11 -lm -ldl -lpthread $(SYSLIB2)
+ # (maybe you have to remove -ldl)
+ #
+ #
+@@ -49,6 +49,7 @@
+
+ # add libs in makefile.mach.$(MACHINE)
+ # occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL
++occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL -lTKTopAlgo -lTKG3d -lTKG2d -lTKXSBase -lTKOffset -lTKFillet -lTKGeomBase -lTKGeomAlgo -lTKShHealing -lTKBO -lTKPrim -lTKernel -lTKMath -lTKBool -lXxf86vm
+ #
+ include $(LIBSRC_DIR)/makefile.mach.$(MACHINE)
+ #
+@@ -117,7 +120,7 @@
+ #
+ .PHONY : clean
+ clean:
+- -@rm *.o ngtcltk/*.o togl/*.o lib/$(MACHINE)/lib*.a lib/$(MACHINE)/*.o
++ -rm *.o ngtcltk/*.o togl/*.o lib/$(MACHINE)/lib*.a lib/$(MACHINE)/*.o ng
+ #
+ #
+ .PHONY : cleanapp
+--- ./libsrc/makefile.mach.LINUX
++++ ./libsrc/makefile.mach.LINUX
+@@ -16,6 +16,11 @@
+
+ LINKFLAGS2 = -L/usr/openwin/lib -L/usr/X11R6/lib -L/usr/lib/GL3.5 -lstdc++
+
++OCC_DIR=/opt/OpenCASCADE5.2
++OCCINC_DIR=$(OCC_DIR)/ros/inc
++OCCLIB_DIR=$(OCC_DIR)/ros/lin/lib
++CPLUSPLUSFLAGS2 += -DOCCGEOMETRY -DOCC52 -DUSE_STL_STREAM -DHAVE_IOSTREAM -DHAVE_LIMITS -I$(OCCINC_DIR)
++LINKFLAGS2 += -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL -lTKTopAlgo -lTKG3d -lTKG2d -lTKXSBase -lTKOffset -lTKFillet -lTKGeomBase -lTKGeomAlgo -lTKShHealing -lTKBO -lTKPrim -lTKernel -lTKMath -lTKBool
+
+ goalngs=goalngs
+
+--- ./ngsolve/solve/shapetester.cpp
++++ ./ngsolve/solve/shapetester.cpp
+@@ -1,6 +1,7 @@
+
+ #include <solve.hpp>
+ // #include <nginterface.h>
++#include <cstdlib>
+
+
+ namespace ngsolve
+--- ./ngsolve/comp/fespace.cpp
++++ ./ngsolve/comp/fespace.cpp
+@@ -10,6 +10,8 @@
+
+ #include <comp.hpp>
+ #include <multigrid.hpp>
++#include <cstdlib>
++
+ using namespace ngmg;
+
+ namespace ngcomp
diff --git a/sci-mathematics/netgen/files/icon/netgen-icon.png b/sci-mathematics/netgen/files/icon/netgen-icon.png
new file mode 100644
index 000000000..cb2fd8466
--- /dev/null
+++ b/sci-mathematics/netgen/files/icon/netgen-icon.png
Binary files differ
diff --git a/sci-mathematics/netgen/files/icon/netgen.desktop b/sci-mathematics/netgen/files/icon/netgen.desktop
new file mode 100644
index 000000000..6eb5adc61
--- /dev/null
+++ b/sci-mathematics/netgen/files/icon/netgen.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Netgen
+Comment=3D modeling, Mesh generation.
+Exec=/usr/bin/ng
+Icon=netgen-icon
+Terminal=0
+Type=Application
+Categories=Graphics;Application;
diff --git a/sci-mathematics/netgen/files/togl_tk.patch b/sci-mathematics/netgen/files/togl_tk.patch
index 31a279a28..6a9440a0f 100644
--- a/sci-mathematics/netgen/files/togl_tk.patch
+++ b/sci-mathematics/netgen/files/togl_tk.patch
@@ -1,6 +1,6 @@
--- togl/togl.cpp.org 2004-09-29 19:48:06.000000000 +0200
+++ togl/togl.cpp 2006-10-13 21:39:50.000000000 +0200
-@@ -138,8 +138,36 @@
+@@ -138,8 +138,50 @@
# include "tkInt8.4p3.h"
#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==4
# include "tkInt8.4p4.h"
@@ -34,6 +34,20 @@
+# include "tkInt8.4p18.h"
+#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==19
+# include "tkInt8.4p19.h"
++#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==20
++# include "tkInt8.4p20.h"
++#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==21
++# include "tkInt8.4p21.h"
++#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==22
++# include "tkInt8.4p22.h"
++#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==23
++# include "tkInt8.4p23.h"
++#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==24
++# include "tkInt8.4p24.h"
++#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==25
++# include "tkInt8.4p25.h"
++#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==26
++# include "tkInt8.4p26.h"
#else
Sorry, you will have to edit togl.c to include the right tkInt.h file
#endif
diff --git a/sci-mathematics/netgen/netgen-4.4-r1.ebuild b/sci-mathematics/netgen/netgen-4.4-r1.ebuild
new file mode 100644
index 000000000..f953af834
--- /dev/null
+++ b/sci-mathematics/netgen/netgen-4.4-r1.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $ Header: $
+
+inherit eutils toolchain-funcs versionator flag-o-matic multilib
+
+MY_P="ngs$(delete_version_separator 1)"
+
+DESCRIPTION="NETGEN is an automatic 3d tetrahedral mesh generator"
+HOMEPAGE="http://www.hpfem.jku.at/netgen/"
+SRC_URI="http://www.hpfem.jku.at/cgi/download.cgi?ID=${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="~amd64 ~x86"
+IUSE="opencascade lapack gmp"
+SLOT="0"
+
+RDEPEND="opencascade? ( sci-libs/opencascade )
+ gmp? ( dev-libs/gmp )
+ virtual/opengl
+ >=dev-lang/tk-8.0
+ >=dev-lang/tcl-8.0
+ >=dev-tcltk/tix-8.1
+ x11-libs/libXmu "
+
+DEPEND="${RDEPEND}
+ lapack? ( dev-util/pkgconfig )"
+
+S="${WORKDIR}/netgen"
+
+src_unpack() {
+ ln -s "${DISTDIR}"/"download.cgi?ID=${MY_P}.tar.gz" ${MY_P}.tar.gz
+ unpack ./${MY_P}.tar.gz
+ cd "${WORKDIR}"
+ mv ${MY_P} netgen
+ cd "${S}"
+ epatch "${FILESDIR}"/togl_tk.patch
+ epatch "${FILESDIR}"/meshtype.patch
+ epatch "${FILESDIR}"/densemat.patch
+ epatch "${FILESDIR}"/debian-inspired-netgen_4.4-9.patch
+ epatch "${FILESDIR}"/debian-inspired-netgen_4.4-9.2.patch
+}
+
+src_compile() {
+ cd "${S}"
+ local LAPACK="-lg2c"
+ export MACHINE="LINUX"
+ # gcc>=4.0 does not have libg2c anymore
+ if version_is_at_least "4.0" $(gcc-version) ; then
+ LAPACK=""
+ fi
+
+ # Fix the Makefiles
+ local tk_version
+ tk_version=$(grep TK_VER /usr/include/tk.h | sed 's/^.*"\(.*\)".*/\1/')
+ local tk_release_serial
+ tk_release_serial=$(grep TK_RELEASE_SERIAL /usr/include/tk.h | awk '{print $3}')
+ local tix_version
+ tix_version=$(grep TIX_VER /usr/include/tix.h | sed 's/^.*"\(.*\)".*/\1/')
+
+ # The install location of libtix has changed from 8.2* to 8.4
+ if version_is_at_least "8.4" ${tix_version} ; then
+ tix_patch_level=$(sed -n '/TIX_PATCH_LEVEL/p' /usr/include/tix.h | sed -n '1p' | sed 's/^.*"\(.*\)".*/\1/')
+ sed -i -e "s:-ltix8.1.8.4:-L/usr/$(get_libdir)/Tix${tix_patch_level} -lTix${tix_patch_level}:g" ./Makefile
+ else
+ sed -i -e 's:tix8.1.8.4:tix:g' ./Makefile
+ fi
+
+ sed -i \
+ -e 's:tcl8.4:tcl:g' \
+ -e 's:tk8.4:tk:g' \
+ -e "s:CPP_DIR=.:CPP_DIR=${S}:g" ./Makefile \
+ || die "Correction of the tcl/tk flags and CPP_DIR value in Makefile failed"
+
+ sed -i \
+ -e "s:-O2:${CXXFLAGS}:g" \
+ -e 's:/usr/include/GL3.5:/usr/include/GL:g' \
+ -e "s:-L/usr/openwin/lib -L/usr/X11R6/lib -L/usr/lib/GL3.5:-L/usr/X11R6/$(get_libdir) -L/usr/$(get_libdir)/GL:g" ./libsrc/makefile.mach.LINUX \
+ || die "Correction of the GL patch in libsrc/makefile.mach.LINUX failed"
+
+ if use opencascade ; then
+ sed -i \
+ -e "s:/opt/OpenCASCADE5.2:$CASROOT/../:g" \
+ -e "s:/ros/lin/lib:/ros/lin/$(get_libdir):g" ./Makefile ./libsrc/makefile.mach.LINUX \
+ || die "Correction of the OpenCascade location in Makefile and libsrc/makefile.mach.LINUX failed"
+ else
+ sed -i \
+ -e 's:OCC_DIR=/opt/OpenCASCADE5.2:# OCC_DIR=/opt/OpenCASCADE5.2:g' \
+ -e "s:OCCINC_DIR=\$(OCC_DIR)/ros/inc:# OCCINC_DIR=\$(OCC_DIR)/ros/inc:g" \
+ -e "s:OCCLIB_DIR=\$(OCC_DIR)/ros/lin/lib:# OCCLIB_DIR=\$(OCC_DIR)/ros/lin/lib:g" ./Makefile ./libsrc/makefile.mach.LINUX \
+ || die "Commenting out of OpenCascade in Makefile and libsrc/makefile.mach.LINUX failed"
+ sed -i \
+ -e 's:CPLUSPLUSFLAGS2 += -DOCCGEOMETRY -DOCC52 -DUSE_STL_STREAM -DHAVE_IOSTREAM -DHAVE_LIMITS -I\$(OCCINC_DIR):# CPLUSPLUSFLAGS2 += -DOCCGEOMETRY -DOCC52 -DUSE_STL_STREAM -DHAVE_IOSTREAM -DHAVE_LIMITS -I\$(OCCINC_DIR):g' \
+ -e 's:LINKFLAGS2 += -L\$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL -lTKTopAlgo -lTKG3d -lTKG2d -lTKXSBase -lTKOffset -lTKFillet -lTKGeomBase -lTKGeomAlgo -lTKShHealing -lTKBO -lTKPrim -lTKernel -lTKMath -lTKBool:# LINKFLAGS2 += -L\$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL -lTKTopAlgo -lTKG3d -lTKG2d -lTKXSBase -lTKOffset -lTKFillet -lTKGeomBase -lTKGeomAlgo -lTKShHealing -lTKBO -lTKPrim -lTKernel -lTKMath -lTKBool:g' ./libsrc/makefile.mach.LINUX \
+ || die "Commenting out of OpenCascade C++ and Link flags in libsrc/makefile.mach.LINUX failed"
+ sed -i \
+ -e 's:-locc::g' \
+ -e 's:occlib:# occlib:g' ./Makefile \
+ || die "Commenting out of OpenCascade in Makefile failed"
+ fi
+
+ use lapack && LAPACK="${LAPACK} $(pkg-config --libs lapack)"
+ use gmp && LAPACK="${LAPACK} -lgmp"
+
+ sed -i \
+ -e "s:# lapack = -llapack -lblas -lgmp -lg2c:lapack = ${LAPACK}:g" ./Makefile ./libsrc/makefile.mach.LINUX \
+ || die "Lapack setup failed"
+
+ # Copy tkInt.h from the system to the source to correct the issue with togl.cpp
+ cp -p /usr/$(get_libdir)/tk${tk_version}/include/generic/tkInt.h ./togl/tkInt${tk_version}p${tk_release_serial}.h
+ cp -p /usr/$(get_libdir)/tk${tk_version}/include/generic/tkIntDecls.h ./togl/tkIntDecls${tk_version}p${tk_release_serial}.h
+ sed -i \
+ -e "s:tkIntDecls.h:./tkIntDecls${tk_version}p${tk_release_serial}.h:g" ./togl/tkInt${tk_version}p${tk_release_serial}.h \
+ || dies "togl.cpp vs. tkInt.h issue correction failed"
+
+ # Build 2 extra demo applications
+ #sed -i \
+ # -e "s:# appdemo:appdemo:g" \
+ # -e "s:# appaddon:appaddon:g" \
+ # -e "s:# appngs:appngs:g" \
+ # -e "s:# cd demoapp: cd demoapp:g" \
+ # -e "s:# cd ngsolve: cd ngsolve:g" ./Makefile \
+ #|| die "Extra demo applications. 'sed' failed"
+
+ make || die "make failed"
+}
+
+src_install() {
+ cd "${S}"
+ # The binaries
+ dobin ng
+ # The libraries
+ dolib ./lib/LINUX/*.a ./lib/LINUX/*.so*
+ # The docs
+ dodoc ./doc/ng4.pdf VERSION
+ # The headers
+ dodir /usr/include/${PN}
+ insinto /usr/include/${PN}
+ doins ./libsrc/include/*.hpp
+ # Ngsolve headers
+ dodir /usr/include/${PN}/ngsolve
+ insinto /usr/include/${PN}/ngsolve
+ doins ./ngsolve/*.hpp
+
+ for headers_dir in \
+ csg general geom2d gprim interface linalg \
+ meshing opti stlgeom visualization; do
+ dodir /usr/include/${PN}/${headers_dir}
+ insinto /usr/include/${PN}/${headers_dir}
+ doins ./libsrc/${headers_dir}/*.hpp
+ done
+ if use opencascade; then
+ dodir /usr/include/${PN}/occ
+ insinto /usr/include/${PN}/occ
+ doins ./libsrc/occ/*.hpp
+ fi
+ # The shared files
+ dodir /usr/share/doc/${PF}
+ insinto /usr/share/doc/${PF}
+ find . -name "*.tcl" -exec doins {} \;
+ dodir /usr/share/doc/${PF}/tutorials
+ insinto /usr/share/doc/${PF}/tutorials
+ doins ./tutorials/*
+ # Install icon and .desktop for menu entry
+ doicon "${FILESDIR}"/icon/${PN}-icon.png
+ domenu "${FILESDIR}"/icon/${PN}.desktop
+}
+
+pkg_postinst() {
+ einfo "Netgen ebuild needs further development. Please inform any problems or improvements in http://bugs.gentoo.org/show_bug.cgi?id=155424"
+}
+