aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieltourde <danieltourde@32389bae-6d03-0410-99cf-db05cde120eb>2008-05-20 22:48:06 +0000
committerdanieltourde <danieltourde@32389bae-6d03-0410-99cf-db05cde120eb>2008-05-20 22:48:06 +0000
commitd3fdeac8907c1b6ea06fdfb2e8f41daebc518fea (patch)
tree7dcec79d283be2865c3347df60feafbff18f24c4
parentInitial update. There is still some work to do but it starts to get shape! ;) (diff)
downloadsci-d3fdeac8907c1b6ea06fdfb2e8f41daebc518fea.tar.gz
sci-d3fdeac8907c1b6ea06fdfb2e8f41daebc518fea.tar.bz2
sci-d3fdeac8907c1b6ea06fdfb2e8f41daebc518fea.zip
Heavy rework of the ebuild and the associated epatches.
WARNING: At the moment, OpenCascade support is broken (at least on amd64) git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1080 32389bae-6d03-0410-99cf-db05cde120eb
-rw-r--r--sci-mathematics/netgen/ChangeLog4
-rw-r--r--sci-mathematics/netgen/Manifest15
-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.desktop9
-rw-r--r--sci-mathematics/netgen/files/netgen-4.4-datadir.patch22
-rw-r--r--sci-mathematics/netgen/files/netgen-4.4-declarations.patch167
-rw-r--r--sci-mathematics/netgen/files/netgen-4.4-makefiles.patch390
-rw-r--r--sci-mathematics/netgen/files/netgen-4.4-order.patch22
-rw-r--r--sci-mathematics/netgen/files/netgen-4.4-stdlib.patch115
-rw-r--r--sci-mathematics/netgen/files/netgen-4.4-tkversion.patch20
-rw-r--r--sci-mathematics/netgen/files/netgen.png (renamed from sci-mathematics/netgen/files/icon/netgen-icon.png)bin4220 -> 4220 bytes
-rw-r--r--sci-mathematics/netgen/netgen-4.4-r1.ebuild196
13 files changed, 821 insertions, 712 deletions
diff --git a/sci-mathematics/netgen/ChangeLog b/sci-mathematics/netgen/ChangeLog
index af4384dba..88c74cd89 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: $
+ 20 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-makefiles.patch, +netgen.png, +netgen-4.4-order.patch, +netgen-4.4-datadir.patch, +netgen-4.4-stdlib.patch, +netgen-4.4-declarations.patch, +netgen-4.4-tkversion.patch
+ Extensive rework of the ebuild and the epatches by Sébastien Fabbro <bicatali@gentoo.org>. At the moment, the OpenCascade support is broken.
+
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..
diff --git a/sci-mathematics/netgen/Manifest b/sci-mathematics/netgen/Manifest
index 923948a30..f9ad36e15 100644
--- a/sci-mathematics/netgen/Manifest
+++ b/sci-mathematics/netgen/Manifest
@@ -1,13 +1,16 @@
-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 netgen-4.4-datadir.patch 631 RMD160 6c968712202f76652083a20ae5f5636782c99488 SHA1 366ce4446626933c8dfbb40e4cd0515c74e19166 SHA256 66b652b63a917a0cef452629255e97dbe2136e8c54774cccb00fcdfeba9305eb
+AUX netgen-4.4-declarations.patch 4061 RMD160 37bff408301b4fc98711e8dd5a0b8ccf269ea4fa SHA1 90008a3951b2fea7c92e56683d4e767682f5f490 SHA256 7a9ffd320a1f23e4404da61f9633afffaad40116c00bc6a6f50efb935843cd1f
+AUX netgen-4.4-makefiles.patch 11481 RMD160 25a7c6cf9ec724b6f5ca4e985a6d9dd3b88235df SHA1 40cad5413799069df1aac5ba1c5de2b0be2ea5c6 SHA256 79882cf9b06a19773933445568c2273dbc082fd4c39ff7a3f586805ab61f685a
+AUX netgen-4.4-order.patch 605 RMD160 bb2e85cd6fb20472cfde269b6319eab222dc0bd9 SHA1 9a8c333abf9cb9f6cdc594c97b953c45fe656b7f SHA256 f51338d508ee121122c2ea994f2c56af1a79832465b0d89c49fd2d5e55676b0e
+AUX netgen-4.4-stdlib.patch 3226 RMD160 9432fa332b693fd4e2447c8c334e1c4745e70bf5 SHA1 774f08c2ed24b98bc94fafef1bc654f43b65f62a SHA256 f5a5d5fc228e37fe48f6a54e5a24ea80338db96c35f0da8dced765198d567689
+AUX netgen-4.4-tkversion.patch 834 RMD160 5ac31a57aeebabd51385b6718fac79d54f1886a0 SHA1 d9c04622a835c1167cad50ec258cfd7b13bf2bcc SHA256 91dfd3f5b375d0663dbec4ec7341209572727cb644efb5fc98baa058e5ad968a
+AUX netgen.png 4220 RMD160 05fb7ef5da0075c7ccc77e7b6084974d2309e798 SHA1 eee96e5b55c62379580bfe3cd873d7ddc87dba05 SHA256 4db00f0c652265728d994fc5b9ab8d65a91b2704d1b939c334c789d358b10dd3
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-r1.ebuild 3335 RMD160 07619cceb6b497da95bdae23fb930fa46af593f7 SHA1 b40f79735ced0dc613d9dbdab3bbc85a3cd51570 SHA256 51e41fcf15c9eb51d1c274599ed5f7cc627f2560f35a6fb6586fcc3013d1cafe
EBUILD netgen-4.4.ebuild 5346 RMD160 8c83224390cb010acb51d1ab1126e1f8e6e65637 SHA1 09468d19a73725814543e4d59389d3163c2e333e SHA256 321efd85616d0062114bd2b50230411ccd1317defa887fb492919ee5270359df
-MISC ChangeLog 930 RMD160 dffabc46fa045e0ccd663c1a05828ea8094bfd91 SHA1 e2378a72cdd49ee77f2e3596e4aa74b53e7a7a85 SHA256 273e6ad511a317e897c6835630cd5a9a6269b82d8e8a873daf76a18d7306890f
+MISC ChangeLog 1457 RMD160 7244958cbd11a751696e74d4c0566f6c5ea64e21 SHA1 9d3290d1ba88f30cdcf667a5c0effff43e8f06e6 SHA256 3e2a08e1c0740435629d5d368c9d6daeef6215acb856ed681e21fa27cc50cf91
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
deleted file mode 100644
index dede917eb..000000000
--- a/sci-mathematics/netgen/files/debian-inspired-netgen_4.4-9.2.patch
+++ /dev/null
@@ -1,272 +0,0 @@
---- ./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
deleted file mode 100644
index cf01a4a48..000000000
--- a/sci-mathematics/netgen/files/debian-inspired-netgen_4.4-9.patch
+++ /dev/null
@@ -1,301 +0,0 @@
---- ./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.desktop b/sci-mathematics/netgen/files/icon/netgen.desktop
deleted file mode 100644
index 6eb5adc61..000000000
--- a/sci-mathematics/netgen/files/icon/netgen.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[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/netgen-4.4-datadir.patch b/sci-mathematics/netgen/files/netgen-4.4-datadir.patch
new file mode 100644
index 000000000..ecfdf776f
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-4.4-datadir.patch
@@ -0,0 +1,22 @@
+--- ng.tcl.orig 2008-05-08 17:44:10.000000000 +0100
++++ ng.tcl 2008-05-09 08:50:56.000000000 +0100
+@@ -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)
+ }
+--- ngtcltk/ngappinit.cpp.orig 2008-05-08 17:44:10.000000000 +0100
++++ ngtcltk/ngappinit.cpp 2008-05-09 08:50:56.000000000 +0100
+@@ -77,7 +77,7 @@
+ if (getenv ("NETGENDIR") && strlen (getenv ("NETGENDIR")))
+ ngdir = getenv ("NETGENDIR");
+ else
+- ngdir = ".";
++ ngdir = "/usr/share/netgen";
+
+ verbose = parameters.GetDefineFlag ("V");
+
diff --git a/sci-mathematics/netgen/files/netgen-4.4-declarations.patch b/sci-mathematics/netgen/files/netgen-4.4-declarations.patch
new file mode 100644
index 000000000..52810a355
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-4.4-declarations.patch
@@ -0,0 +1,167 @@
+--- libsrc/linalg/densemat.hpp.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/linalg/densemat.hpp 2008-05-09 08:50:56.000000000 +0100
+@@ -14,6 +14,9 @@
+
+ #include <assert.h>
+
++class DenseMatrix;
++void CalcInverse (const DenseMatrix & m1, DenseMatrix & m2);
++
+ class DenseMatrix
+ {
+ protected:
+--- libsrc/meshing/meshtype.hpp.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/meshing/meshtype.hpp 2008-05-09 08:50:56.000000000 +0100
+@@ -955,7 +955,7 @@
+
+
+
+-
++ class Mesh;
+ /**
+ Identification of periodic surfaces, close surfaces, etc.
+ */
+--- libsrc/visualization/mvdraw.hpp.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/visualization/mvdraw.hpp 2008-05-09 08:50:56.000000000 +0100
+@@ -250,6 +250,7 @@
+ int seltria;
+ };
+
++extern VisualSceneSTLMeshing vsstlmeshing;
+
+
+
+--- ngsolve/comp/postproc.cpp.orig 2008-05-08 17:44:10.000000000 +0100
++++ ngsolve/comp/postproc.cpp 2008-05-09 08:50:56.000000000 +0100
+@@ -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);
+--- libsrc/interface/nglib.cpp.orig 2004-07-02 21:20:09.000000000 +0000
++++ libsrc/interface/nglib.cpp 2008-04-10 17:40:26.000000000 +0000
+@@ -24,10 +24,18 @@
+
+ // #include <FlexLexer.h>
+
++#include <tcl.h>
++#include <incvis.hpp>
++
+ namespace netgen {
+ extern void MeshFromSpline2D (SplineGeometry2d & geometry,
+ Mesh *& mesh,
+ MeshingParameters & mp);
++#include "../visualization/mvdraw.hpp"
++#include "../visualization/soldata.hpp"
++#include "../visualization/vssolution.hpp"
++ Tcl_Interp * tcl_interp;
++ VisualSceneSolution vssolution;
+ }
+
+
+--- libsrc/visualization/vssolution.cpp.orig 2004-11-10 13:22:09.000000000 +0000
++++ libsrc/visualization/vssolution.cpp 2008-04-10 17:41:56.000000000 +0000
+@@ -16,6 +16,19 @@
+ extern AutoPtr<Mesh> mesh;
+
+
++ SYMBOLTABLE<VisualScene*> & GetVisualizationScenes ()
++ {
++ static SYMBOLTABLE<VisualScene*> vss;
++ return vss;
++ }
++
++ void AddVisualizationScene (const string & name,
++ VisualScene * vs)
++ {
++ GetVisualizationScenes().Set (name.c_str(), vs);
++ }
++
++
+ VisualSceneSolution :: SolData :: SolData ()
+ : name (0), data (0), solclass(0)
+ { ; }
+--- ngsolve/basiclinalg/expr3.hpp.orig 2008-05-08 17:44:10.000000000 +0100
++++ ngsolve/basiclinalg/expr3.hpp 2008-05-09 08:50:56.000000000 +0100
+@@ -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)
+ {
diff --git a/sci-mathematics/netgen/files/netgen-4.4-makefiles.patch b/sci-mathematics/netgen/files/netgen-4.4-makefiles.patch
new file mode 100644
index 000000000..b08782561
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-4.4-makefiles.patch
@@ -0,0 +1,390 @@
+--- libsrc/csg/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/csg/Makefile 2008-05-10 08:03:31.000000000 +0100
+@@ -10,7 +10,7 @@
+ #
+ # lex.yy.cpp geometry.cpp
+ #
+-lib = csg
++lib = ngcsg
+ libpath = libsrc/csg
+ #
+ #
+--- libsrc/general/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/general/Makefile 2008-05-10 08:02:56.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 = nggen
+ libpath = libsrc/general
+ #
+ include ../makefile.inc
+--- libsrc/geom2d/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/geom2d/Makefile 2008-05-10 08:03:44.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = spline2d.cpp geom2dmesh.cpp splinegeometry2.cpp genmesh2d.cpp
+ #
+-lib = geom2d
++lib = nggeom2d
+ libpath = libsrc/geom2d
+ #
+ #
+--- libsrc/gprim/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/gprim/Makefile 2008-05-10 08:03:16.000000000 +0100
+@@ -6,7 +6,7 @@
+
+ # reftrans.cpp rot3d.cpp
+ #
+-lib = gprim
++lib = nggprim
+ libpath = libsrc/gprim
+ #
+ #
+--- libsrc/interface/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/interface/Makefile 2008-05-10 08:01:54.000000000 +0100
+@@ -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/linalg/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/linalg/Makefile 2008-05-10 07:59:05.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = basemat.cpp densemat.cpp vector.cpp sparsmat.cpp polynomial.cpp
+ #
+-lib = la
++lib = ngla
+ libpath = libsrc/linalg
+ #
+ #
+--- libsrc/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/Makefile 2008-05-10 09:35:09.000000000 +0100
+@@ -11,7 +11,9 @@
+ @ (cd csg; $(MAKE) -f Makefile)
+ @ (cd geom2d; $(MAKE) -f Makefile)
+ @ (cd stlgeom; $(MAKE) -f Makefile)
++ifdef WITH_OCC
+ @ (cd occ; $(MAKE) -f Makefile)
++endif
+ @ (cd meshing; $(MAKE) -f Makefile)
+ @ (cd opti; $(MAKE) -f Makefile)
+ @ (cd visualization; $(MAKE) -f Makefile)
+--- libsrc/makefile.mach.LINUX.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/makefile.mach.LINUX 2008-05-10 09:32:02.000000000 +0100
+@@ -4,11 +4,8 @@
+ #
+ # CC=/opt/gcc-dev/bin/gcc
+ # CC=/usr/local/bin/gcc
+-CC=gcc
+-CPLUSPLUS=$(CC)
+ AR=ar
+ LINK=$(CC)
+-MAKE=make
+ RM=rm
+ RANLIB=ranlib
+ #
+@@ -16,16 +12,23 @@
+ #
+ CFLAGS2 =
+
+-CPLUSPLUSFLAGS2 = -O2 -I/usr/include/GL3.5 -DLINUX -DOPENGL \
+- -ftemplate-depth-99 -finline-limit=20000 \
+- -funroll-loops -DNGSOLVE
+-
+-LINKFLAGS2 = -L/usr/openwin/lib -L/usr/X11R6/lib -L/usr/lib/GL3.5 -lstdc++
+-
++CPLUSPLUSFLAGS2 = $(CXXFLAGS) -I/usr/include/GL -D$(MACHINE) -DOPENGL -DNGSOLVE
++# -ftemplate-depth-99 -finline-limit=20000 \
++# -funroll-loops -DNGSOLVE
++
++LINKFLAGS2 =
++
++ifdef WITH_OCC
++OCC_DIR=$(CASROOT)/..
++OCCINC_DIR=$(OCC_DIR)/ros/inc
++OCCLIB_DIR=$(OCC_DIR)/ros/lin/lib
++CPLUSPLUSFLAGS2 += -DOCCGEOMETRY -DOCC52 -DUSE_STL_STREAM -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
++endif
+
+ goalngs=goalngs
+
+ # lapack = -llapack -lblas -lgmp -lg2c
+
+
+-appngs = lib/$(MACHINE)/*.o -lngsolvebasic
+\ No newline at end of file
++appngs = lib/$(MACHINE)/*.o -lngsolvebasic
+--- libsrc/meshing/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/meshing/Makefile 2008-05-10 08:04:41.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 = ngmesh
+ libpath = libsrc/meshing
+ #
+ include ../makefile.inc
+--- libsrc/occ/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/occ/Makefile 2008-05-10 08:04:28.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = occgeom.cpp occmeshsurf.cpp occgenmesh.cpp
+
+-lib = occ
++lib = ngocc
+ libpath = libsrc/occ
+ #
+ #
+--- libsrc/opti/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/opti/Makefile 2008-05-10 08:05:02.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = bfgs.cpp linsearch.cpp linopt.cpp
+ #
+-lib = opti
++lib = ngopti
+ libpath = libsrc/opti
+ #
+ #
+--- libsrc/stlgeom/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/stlgeom/Makefile 2008-05-10 08:04:12.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = stlgeom.cpp stltopology.cpp stlgeomchart.cpp stlgeommesh.cpp meshstlsurface.cpp stlline.cpp stltool.cpp
+ #
+-lib = stlgeom
++lib = ngstlgeom
+ libpath = libsrc/stlgeom
+ #
+ #
+--- libsrc/visualization/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ libsrc/visualization/Makefile 2008-05-10 08:05:20.000000000 +0100
+@@ -3,7 +3,7 @@
+ #
+ src = stlmeshing.cpp mvdraw.cpp vscsg.cpp vsmesh.cpp vsocc.cpp vssolution.cpp meshdoc.cpp
+ #
+-lib = vis
++lib = ngvis
+ libpath = libsrc/visualization
+ #
+ #
+--- Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ Makefile 2008-05-10 09:33:45.000000000 +0100
+@@ -14,14 +14,14 @@
+ #
+ #
+ #
+-mylib = -lnginterface -lvis -lcsg -lstlgeom -lgeom2d -lmesh -lgprim -lopti \
+- -lla -lgen -locc
++mylib = -lnginterface -lngvis -lngcsg -lngstlgeom -lnggeom2d -lngmesh -lnggprim -lngopti \
++ -lngla -lnggen
+ #
+ #
+ # system libraries:
+ #
+ #
+-tcltklib = -ltix8.1.8.4 -ltk8.4 -ltcl8.4
++tcltklib = -lTix -ltk -ltcl
+ # tcltklib = -ltix4.1.8.3 -ltk8.3 -ltcl8.3
+ # tcltklib = -ltix8.2 -ltk8.3 -ltcl8.3
+ # tcltklib = /usr/lib/libtix8.1.8.3.so -ltk8.3 -ltcl8.3
+@@ -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 -lXi -lm -ldl -lpthread $(SYSLIB2)
+ # (maybe you have to remove -ldl)
+ #
+ #
+@@ -43,12 +43,15 @@
+ # OCCINC_DIR=$(OCC_DIR)/inc
+ # OCCLIB_DIR=$(OCC_DIR)/lib
+ #
+-OCC_DIR=/opt/OpenCASCADE5.2
++OCC_DIR=$(CASROOT)/..
+ OCCINC_DIR=$(OCC_DIR)/ros/inc
+ OCCLIB_DIR=$(OCC_DIR)/ros/lin/lib
+
+ # add libs in makefile.mach.$(MACHINE)
+-# occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL
++ifdef WITH_OCC
++#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
++endif
+ #
+ include $(LIBSRC_DIR)/makefile.mach.$(MACHINE)
+ #
+@@ -66,7 +69,7 @@
+ CPLUSPLUSFLAGS = $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGS3)
+ #
+ .cpp.o:
+- $(CPLUSPLUS) $(CPLUSPLUSFLAGS) $< -o $(<:.cpp=.o)
++ $(CXX) $(CPLUSPLUSFLAGS) $< -o $(<:.cpp=.o)
+ #
+ #
+ #
+--- ngcore/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ ngcore/Makefile 2008-05-10 08:33:06.000000000 +0100
+@@ -116,14 +116,15 @@
+ #
+ #
+ .cpp.o:
+- gcc -c -O2 -w $< -o $(<:.cpp=.o) -I../libsrc/include -DNO_PARALLEL_THREADS
++ $(CXX) -c $(CXXFLAGS) -w $< -o $(<:.cpp=.o) -I../libsrc/include -DNO_PARALLEL_THREADS
++
+ #
+-$(main) : $(main).o libng.a
+- gcc -w -o $@ $(main).o -L. -lng -lm -lpthread -lstdc++
++$(main) : $(main).o libng.a libng.so
++ $(CXX) -w -o $@ $(main).o -L. -lng -lm -lpthread -lstdc++
+ #
+ #
+ libng.a : $(src:.cpp=.o)
+- ar r libng.a $(src:.cpp=.o)
++ $(AR) r libng.a $(src:.cpp=.o)
+ #
+ clean:
+ -@rm -r ngcore *.o */*.o */*/*.o */*/*/*.o */*/ii_files
+--- ngsolve/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ ngsolve/Makefile 2008-05-10 08:16:10.000000000 +0100
+@@ -66,6 +66,8 @@
+ #
+ lib = ../lib/$(MACHINE)/libngsolve.a
+ lib2 = ../lib/$(MACHINE)/libngsolvebasic.a
++slib = libngsolve.so
++slib2 = libngsolvebasic.so
+ libold = ../lib/$(MACHINE)/libngsolve_oldla.a
+ #
+ #
+@@ -74,32 +76,47 @@
+ #
+ #
+ # .PRECIOUS: .cpp .hh
+-# .SUFFIXES: .cpp .o
++.SUFFIXES: .cpp .o .lo
+ #
+ # .cpp.o:
+ # $(CPLUSPLUS) -c $<
+-#
+-#
++
++
+ #
+ #
+ # 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:
++ $(CXX) -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 $?
++ $(CXX) -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)
++ $(CXX) -shared -ltcl -lpthread -lm -lstdc++ -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) $?
++ $(CXX) -c -I. -I../libsrc/interface -Iinclude $(CPLUSPLUSFLAGS2) $?
+ $(AR) $(ARFLAGS) $@ *.o
+ -$(RM) *.o
+ -@$(RANLIB) $@
++
++../lib/$(MACHINE)/$(slib2):: $(src2:%.cpp=%.lo)
++ $(CXX) -shared -lm -lstdc++ -o ../lib/$(MACHINE)/$(slib2).4.4 $^ -Wl,-soname,$(slib2).4.4
++ ln -sf $(slib2).4.4 $@.4
++ ln -sf $(slib2).4.4 $@
++
+ #
+ #
+ #
+--- togl/Makefile.orig 2008-05-08 17:44:10.000000000 +0100
++++ togl/Makefile 2008-05-10 08:23:29.000000000 +0100
+@@ -64,13 +64,13 @@
+
+
+ # The C compiler:
+-CC = cc
++#CC = cc
+
+ # Compiler options:
+-COPTS = -c -O
++COPTS = -c
+
+ # Shared library linker command:
+-SHLINK = cc -G
++SHLINK = $(LINK) -shared
+
+ # Name for the shared lib:
+ #SH_LIB = libtogl.so.1.3
+@@ -91,7 +91,7 @@
+ #### Shouldn't have to change anything beyond this point ####
+
+
+-CFLAGS = $(COPTS) $(INCLUDES) $(TK_FLAGS) -DSTEREO -D__sgi
++CFLAGS := $(CFLAGS) $(COPTS) $(INCLUDES) $(TK_FLAGS) -DSTEREO -D__sgi
+
+ LFLAGS = $(LIBDIRS)
+
+--- libsrc/makefile.inc.orig 2008-05-19 21:57:27.000000000 +0100
++++ libsrc/makefile.inc 2008-05-19 21:56:36.000000000 +0100
+@@ -18,23 +18,35 @@
+ #
+ 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) $<
++ $(CXX) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGSLIBRARY) $<
+ .c.o:
+- $(CPLUSPLUS) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGSLIBRARY) $<
++ $(CXX) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGSLIBRARY) $<
++
++.cpp.lo:
++ $(CXX) $(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)
++ $(CXX) -shared $(CPLUSPLUSFLAGSLIBRARY) -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) $@
diff --git a/sci-mathematics/netgen/files/netgen-4.4-order.patch b/sci-mathematics/netgen/files/netgen-4.4-order.patch
new file mode 100644
index 000000000..57ec5ba4d
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-4.4-order.patch
@@ -0,0 +1,22 @@
+--- ngsolve/linalg/order.cpp.orig 2008-05-08 17:44:10.000000000 +0100
++++ ngsolve/linalg/order.cpp 2008-05-09 08:50:56.000000000 +0100
+@@ -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.orig 2008-05-08 17:44:10.000000000 +0100
++++ ngsolve/linalg/order.hpp 2008-05-09 08:50:56.000000000 +0100
+@@ -118,7 +118,7 @@
+ ///
+ void * operator new(size_t);
+ ///
+- void operator delete (void *, size_t);
++ void operator delete (void *);
+ };
+
+
diff --git a/sci-mathematics/netgen/files/netgen-4.4-stdlib.patch b/sci-mathematics/netgen/files/netgen-4.4-stdlib.patch
new file mode 100644
index 000000000..47599ff1b
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-4.4-stdlib.patch
@@ -0,0 +1,115 @@
+--- ngsolve/basiclinalg/calcinverse.cpp.orig 2008-05-08 17:44:10.000000000 +0100
++++ ngsolve/basiclinalg/calcinverse.cpp 2008-05-09 08:50:56.000000000 +0100
+@@ -10,7 +10,7 @@
+ {
+ double sum = 0;
+ for (int i = 0; i < N; i++)
+- sum += abs(m(i,i));
++ sum += std::abs(m(i,i));
+ return sum;
+ }
+
+--- ngsolve/comp/fespace.cpp.orig 2008-05-08 17:44:10.000000000 +0100
++++ ngsolve/comp/fespace.cpp 2008-05-09 08:50:56.000000000 +0100
+@@ -10,6 +10,8 @@
+
+ #include <comp.hpp>
+ #include <multigrid.hpp>
++#include <cstdlib>
++
+ using namespace ngmg;
+
+ namespace ngcomp
+--- ngsolve/solve/shapetester.cpp.orig 2008-05-08 17:44:10.000000000 +0100
++++ ngsolve/solve/shapetester.cpp 2008-05-09 08:50:56.000000000 +0100
+@@ -1,6 +1,7 @@
+
+ #include <solve.hpp>
+ // #include <nginterface.h>
++#include <cstdlib>
+
+
+ namespace ngsolve
+--- libsrc/include/mystdlib.h.orig 2008-04-07 10:33:54.000000000 +0200
++++ libsrc/include/mystdlib.h 2008-04-07 10:38:23.000000000 +0200
+@@ -6,6 +6,7 @@
+ #include <iomanip>
+ #include <fstream>
+ #include <sstream>
++#include <cstring>
+
+ #ifdef OLDCINCLUDE
+
+--- ngsolve/ngstd/array.hpp.orig 2008-04-07 10:33:54.000000000 +0200
++++ ngsolve/ngstd/array.hpp 2008-04-07 10:39:49.000000000 +0200
+@@ -7,6 +7,7 @@
+ /* Date: 01. Jun. 95 */
+ /**************************************************************************/
+
++#include <cstring>
+
+ /**
+ Exception thrown by array range check.
+@@ -291,7 +292,7 @@
+ T * p = new T[nsize];
+
+ int mins = (nsize < this->size) ? nsize : this->size;
+- memcpy (p, this->data, mins * sizeof(T));
++ std::memcpy (p, this->data, mins * sizeof(T));
+
+ if (ownmem)
+ delete [] this->data;
+--- ngsolve/linalg/basevector.cpp.orig 2008-04-07 10:33:55.000000000 +0200
++++ ngsolve/linalg/basevector.cpp 2008-04-07 10:39:13.000000000 +0200
+@@ -9,6 +9,7 @@
+ */
+
+ #include <la.hpp>
++#include <cstdlib>
+ namespace ngla
+ {
+ using namespace ngla;
+@@ -146,7 +147,7 @@
+ {
+ FlatVector<double> fv = FVDouble();
+ for (int i = 0; i < fv.Size(); i++)
+- fv(i) = double (rand()) / RAND_MAX;
++ fv(i) = double (std::rand()) / RAND_MAX;
+ }
+
+
+--- ngsolve/ngstd/flags.cpp.orig 2008-04-07 10:33:55.000000000 +0200
++++ ngsolve/ngstd/flags.cpp 2008-04-07 10:38:23.000000000 +0200
+@@ -5,7 +5,8 @@
+ /**************************************************************************/
+
+ #include <ngstd.hpp>
+-
++#include <cstring>
++#include <cstdlib>
+ namespace ngstd
+ {
+ using namespace ngstd;
+--- ngsolve/linalg/blockjacobi.cpp.orig 2006-04-07 09:27:13.000000000 +0200
++++ ngsolve/linalg/blockjacobi.cpp 2008-04-07 10:38:23.000000000 +0200
+@@ -7,7 +7,7 @@
+
+
+ #include <la.hpp>
+-
++#include <cstdlib>
+ namespace ngla
+ {
+ using namespace ngla;
+--- ngsolve/ngstd/ngstd.hpp.orig 2008-04-07 10:38:37.000000000 +0200
++++ ngsolve/ngstd/ngstd.hpp 2008-04-07 10:38:54.000000000 +0200
+@@ -1,6 +1,9 @@
+ #ifndef FILE_NGSTD
+ #define FILE_NGSTD
+
++#include <cstring>
++#include <cstdlib>
++
+ /*********************************************************************/
+ /* File: ngstd.hpp */
+ /* Author: Joachim Schoeberl */
diff --git a/sci-mathematics/netgen/files/netgen-4.4-tkversion.patch b/sci-mathematics/netgen/files/netgen-4.4-tkversion.patch
new file mode 100644
index 000000000..e36e6c217
--- /dev/null
+++ b/sci-mathematics/netgen/files/netgen-4.4-tkversion.patch
@@ -0,0 +1,20 @@
+--- togl/togl.cpp.orig 2008-05-19 20:36:06.000000000 +0100
++++ togl/togl.cpp 2008-05-19 20:40:30.000000000 +0100
+@@ -138,14 +138,14 @@
+ # include "tkInt8.4p3.h"
+ #elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==4
+ # include "tkInt8.4p4.h"
+-#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL==6
++#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==4 && TK_RELEASE_SERIAL>=6
+ # include "tkInt8.4p6.h"
+ #else
+- Sorry, you will have to edit togl.c to include the right tkInt.h file
++ #error Sorry, you will have to edit togl.c to include the right tkInt.h file
+ #endif
+ #elif defined(WIN32)
+ #if TK_MAJOR_VERSION<8
+- Sorry Windows version requires Tcl/Tk ver 8.0 or higher.
++ #error Sorry Windows version requires Tcl/Tk ver 8.0 or higher.
+ #endif
+ #include "tkInt.h"
+ #include "tkWinInt.h"
diff --git a/sci-mathematics/netgen/files/icon/netgen-icon.png b/sci-mathematics/netgen/files/netgen.png
index cb2fd8466..cb2fd8466 100644
--- a/sci-mathematics/netgen/files/icon/netgen-icon.png
+++ b/sci-mathematics/netgen/files/netgen.png
Binary files differ
diff --git a/sci-mathematics/netgen/netgen-4.4-r1.ebuild b/sci-mathematics/netgen/netgen-4.4-r1.ebuild
index f953af834..48fdedb5c 100644
--- a/sci-mathematics/netgen/netgen-4.4-r1.ebuild
+++ b/sci-mathematics/netgen/netgen-4.4-r1.ebuild
@@ -2,171 +2,119 @@
# Distributed under the terms of the GNU General Public License v2
# $ Header: $
-inherit eutils toolchain-funcs versionator flag-o-matic multilib
+inherit eutils versionator multilib
-MY_P="ngs$(delete_version_separator 1)"
+MY_P=ngs$(delete_version_separator 1)
-DESCRIPTION="NETGEN is an automatic 3d tetrahedral mesh generator"
+DESCRIPTION="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"
+IUSE="doc opencascade lapack gmp"
SLOT="0"
-RDEPEND="opencascade? ( sci-libs/opencascade )
- gmp? ( dev-libs/gmp )
+RDEPEND="dev-tcltk/tix
virtual/opengl
- >=dev-lang/tk-8.0
- >=dev-lang/tcl-8.0
- >=dev-tcltk/tix-8.1
- x11-libs/libXmu "
+ x11-libs/libXmu
+ gmp? ( dev-libs/gmp )
+ lapack? ( virtual/lapack )
+ opencascade? ( sci-libs/opencascade )"
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
+
+ # workaround bad downloaded file name (gone in 4.5?)
+ 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
-}
+ mv ${MY_P} ${P}
-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/')
+ # de-hardcode tcl/tk versions
+ epatch "${FILESDIR}"/${P}-tkversion.patch
+ # fix missing declarations of class and functions and templates
+ epatch "${FILESDIR}"/${P}-declarations.patch
+ # set default datadir in /usr/share/netgen
+ epatch "${FILESDIR}"/${P}-datadir.patch
+ # compatibility with c++ stdlib headers and namespace
+ epatch "${FILESDIR}"/${P}-stdlib.patch
+ # fix missing second argument in order.cpp
+ epatch "${FILESDIR}"/${P}-order.patch
+ # big patch for makefiles, more generic and allowing shared libs
+ epatch "${FILESDIR}"/${P}-makefiles.patch
# 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"
+ local tixver=$(grep -m1 TIX_PATCH_LEVEL /usr/include/tix.h | cut -d \" -f2)
+ [[ $(get_version_component_range 3 ${tixver}) = 0 ]] && \
+ tixver=$(get_version_component_range 1-2 ${tixver})
+ if version_is_at_least "8.4" ${tixver} ; then
+ sed -i -e "s:-lTix:-lTix${tixver}:" Makefile
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"
+ sed -i -e "s:Tix:tix${tixver}:" Makefile
fi
+}
- use lapack && LAPACK="${LAPACK} $(pkg-config --libs lapack)"
- use gmp && LAPACK="${LAPACK} -lgmp"
+src_compile() {
+ export MACHINE="LINUX"
+ # include math libraries
+ local mathlibs
+ use lapack && mathlibs="${mathlibs} $(pkg-config --libs lapack)"
+ use gmp && mathlibs="${mathlibs} -lgmp"
sed -i \
- -e "s:# lapack = -llapack -lblas -lgmp -lg2c:lapack = ${LAPACK}:g" ./Makefile ./libsrc/makefile.mach.LINUX \
- || die "Lapack setup failed"
+ -e "s:#.*lapack.*=*$:lapack = ${mathlibs}:g" \
+ Makefile libsrc/makefile.mach.LINUX \
+ || die "sed for math libraries 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"
+ local myconf
+ use opencascade && myconf="WITH_OCC=1"
+ emake ${myconf} || die "emake 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}
+ dobin ng || die "failed to install binary executable"
+ dolib lib/${MACHINE}/*.a lib/${MACHINE}/*.so* \
+ || die "failed to install libraries"
+ dodoc VERSION
+
+ # Headers
insinto /usr/include/${PN}
- doins ./libsrc/include/*.hpp
- # Ngsolve headers
- dodir /usr/include/${PN}/ngsolve
+ doins libsrc/include/*.hpp
insinto /usr/include/${PN}/ngsolve
- doins ./ngsolve/*.hpp
+ doins ngsolve/*.hpp
for headers_dir in \
- csg general geom2d gprim interface linalg \
- meshing opti stlgeom visualization; do
- dodir /usr/include/${PN}/${headers_dir}
+ csg general geom2d gprim interface linalg \
+ meshing opti stlgeom visualization; do
insinto /usr/include/${PN}/${headers_dir}
- doins ./libsrc/${headers_dir}/*.hpp
+ doins libsrc/${headers_dir}/*.hpp
done
if use opencascade; then
- dodir /usr/include/${PN}/occ
insinto /usr/include/${PN}/occ
- doins ./libsrc/occ/*.hpp
+ doins libsrc/occ/*.hpp
fi
- # The shared files
- dodir /usr/share/doc/${PF}
- insinto /usr/share/doc/${PF}
+
+ # tcl files, machine independent
+ insinto /usr/share/${PN}
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
+
+ # docs
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r doc/ng4.pdf tutorials || die "failed to install doc"
+ fi
+
+ # icon and menu entry
+ doicon "${FILESDIR}"/netgen.png
+ make_desktop_entry ng Netgen netgen.png "Science;NumericalAnalysis"
}
pkg_postinst() {
- einfo "Netgen ebuild needs further development. Please inform any problems or improvements in http://bugs.gentoo.org/show_bug.cgi?id=155424"
+ elog "Netgen ebuild is still under development."
+ elog "Help us improve the ebuild in:"
+ elog "http://bugs.gentoo.org/show_bug.cgi?id=155424"
}
-