Package: netgen
Version: 4.4-8
Severity: wishlist
Tags: patch

Greetings,

Please add shared libs to netgen.  The attached patch should apply
cleanly against -8 if my patch to 461929 is applied first, otherwise
with fuzz 1.

It uses your library names, and produces libs with extension 4.4 (netgen
version number) in the package name and soname, which assumes that the
interface is tied to the upstream release version.

The netgen binary is linked to the shared libs (except netgen_solve,
whose objects are incorporated directly), and seems to run fine,
indicating no symbols are missing.

Thanks,
-Adam
-- 
GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Engineering consulting with open source tools
http://www.opennovation.com/
--- netgen-4.4/libsrc/makefile.inc~	2004-08-25 07:06:28.000000000 -0400
+++ netgen-4.4/libsrc/makefile.inc	2008-01-21 22:00:35.000000000 -0500
@@ -18,23 +18,33 @@
 #
 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)/[EMAIL PROTECTED] *.lo -Wl,-soname,[EMAIL PROTECTED]
+	ln -s [EMAIL PROTECTED] $(LIB_DIR)/$@
+
+$(LIBB):: $(src:%.cpp=%.o)
 	@$(AR) $(ARFLAGS) $@ *.o
 	[EMAIL PROTECTED](RM) *.o
 	[EMAIL PROTECTED](RANLIB) $@
--- netgen-4.4/debian/control~	2008-01-21 20:26:44.000000000 -0500
+++ netgen-4.4/debian/control	2008-01-21 20:55:27.000000000 -0500
@@ -42,3 +42,16 @@
  refinement.
  .
  This package contains the static libraries and header files.
+
+Package: libnetgen4.4
+Section: libs
+Architecture: any
+Description: Automatic 3d tetrahedral mesh generator development files
+ NETGEN is an automatic 3d tetrahedral mesh generator. It accepts
+ input from constructive solid geometry (CSG) or boundary
+ representation (BRep) from STL file format. The connection to a
+ geometry kernel allows the handling of IGES and STEP files. NETGEN
+ contains modules for mesh optimization and hierarchical mesh
+ refinement.
+ .
+ This package contains the shared libraries.
--- netgen-4.4/libsrc/linalg/Makefile~	2004-01-28 10:56:03.000000000 -0500
+++ netgen-4.4/libsrc/linalg/Makefile	2008-01-21 22:03:50.000000000 -0500
@@ -3,7 +3,7 @@
 #
 src = basemat.cpp densemat.cpp vector.cpp sparsmat.cpp polynomial.cpp
 #
-lib = la
+lib = netgen_linalg
 libpath = libsrc/linalg
 #
 #
--- netgen-4.4/libsrc/general/Makefile~	2004-01-28 10:55:17.000000000 -0500
+++ netgen-4.4/libsrc/general/Makefile	2008-01-21 22:04:35.000000000 -0500
@@ -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
--- netgen-4.4/libsrc/gprim/Makefile~	2004-01-28 10:55:00.000000000 -0500
+++ netgen-4.4/libsrc/gprim/Makefile	2008-01-21 22:05:41.000000000 -0500
@@ -6,7 +6,7 @@
 
 # reftrans.cpp rot3d.cpp
 #
-lib = gprim
+lib = netgen_gprim
 libpath = libsrc/gprim
 #
 #
--- netgen-4.4/libsrc/csg/Makefile~	2004-01-28 10:54:50.000000000 -0500
+++ netgen-4.4/libsrc/csg/Makefile	2008-01-21 22:08:52.000000000 -0500
@@ -10,7 +10,7 @@
 #
 #  lex.yy.cpp geometry.cpp
 # 
-lib = csg
+lib = netgen_csg
 libpath = libsrc/csg
 #
 #
--- netgen-4.4/libsrc/geom2d/Makefile~	2004-01-28 10:56:01.000000000 -0500
+++ netgen-4.4/libsrc/geom2d/Makefile	2008-01-21 22:09:04.000000000 -0500
@@ -3,7 +3,7 @@
 #
 src =  spline2d.cpp geom2dmesh.cpp splinegeometry2.cpp genmesh2d.cpp
 #
-lib = geom2d
+lib = netgen_geom2d
 libpath = libsrc/geom2d
 #
 #
--- netgen-4.4/libsrc/stlgeom/Makefile~	2004-01-28 10:55:15.000000000 -0500
+++ netgen-4.4/libsrc/stlgeom/Makefile	2008-01-21 22:09:49.000000000 -0500
@@ -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 
 #
 #
--- netgen-4.4/libsrc/occ/Makefile~	2004-01-28 10:54:53.000000000 -0500
+++ netgen-4.4/libsrc/occ/Makefile	2008-01-21 22:10:02.000000000 -0500
@@ -3,7 +3,7 @@
 #
 src =  occgeom.cpp occmeshsurf.cpp occgenmesh.cpp
 
-lib = occ
+lib = netgen_occ
 libpath = libsrc/occ
 #
 #
--- netgen-4.4/libsrc/meshing/Makefile~	2004-01-28 10:55:02.000000000 -0500
+++ netgen-4.4/libsrc/meshing/Makefile	2008-01-21 22:10:13.000000000 -0500
@@ -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
--- netgen-4.4/libsrc/opti/Makefile~	2004-01-28 10:54:54.000000000 -0500
+++ netgen-4.4/libsrc/opti/Makefile	2008-01-21 22:11:03.000000000 -0500
@@ -3,7 +3,7 @@
 #
 src = bfgs.cpp linsearch.cpp linopt.cpp 
 #
-lib = opti
+lib = netgen_opti
 libpath = libsrc/opti
 #
 #
--- netgen-4.4/libsrc/visualization/Makefile~	2004-11-07 11:08:00.000000000 -0500
+++ netgen-4.4/libsrc/visualization/Makefile	2008-01-21 22:11:29.000000000 -0500
@@ -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
 #
 #
--- netgen-4.4/libsrc/interface/Makefile~	2008-01-21 20:26:44.000000000 -0500
+++ netgen-4.4/libsrc/interface/Makefile	2008-01-21 22:11:50.000000000 -0500
@@ -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
--- netgen-4.4/ngsolve/Makefile~	2004-11-16 04:14:27.000000000 -0500
+++ netgen-4.4/ngsolve/Makefile	2008-01-21 23:02:25.000000000 -0500
@@ -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,33 @@
 #
 # 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
 	[EMAIL PROTECTED](RANLIB) $@
-#
+
+../lib/$(MACHINE)/$(slib):: $(src:%.cpp=%.lo)
+	$(CPLUSPLUS) -shared -o ../lib/$(MACHINE)/$(slib).4.4 $^ -Wl,-soname,$(slib).4.4
+	ln -s $(slib).4.4 $@
+
 $(lib2):: $(src2) 
 	$(CPLUSPLUS) -c -I. -I../libsrc/interface -Iinclude $(CPLUSPLUSFLAGS2) $?
 	$(AR) $(ARFLAGS) $@ *.o
 	-$(RM) *.o
 	[EMAIL PROTECTED](RANLIB) $@
+
+../lib/$(MACHINE)/$(slib2):: $(src2:%.cpp=%.lo)
+	$(CPLUSPLUS) -shared -o ../lib/$(MACHINE)/$(slib2).4.4 $^ -Wl,-soname,$(slib2).4.4
+	ln -s $(slib2).4.4 $@
 #
 #
 #
--- netgen-4.4/Makefile~	2008-01-21 20:26:44.000000000 -0500
+++ netgen-4.4/Makefile	2008-01-21 22:59:44.000000000 -0500
@@ -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:
--- netgen-4.4/debian/rules~	2008-01-21 20:26:44.000000000 -0500
+++ netgen-4.4/debian/rules	2008-01-21 22:35:17.000000000 -0500
@@ -37,19 +37,11 @@
 
 
 build/libnetgen-dev::
-	$(INSTALL_DATA) lib/LINUX/libgen.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_general.a
-	$(INSTALL_DATA) lib/LINUX/libcsg.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_csg.a
-	$(INSTALL_DATA) lib/LINUX/libgeom2d.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_geom2d.a
-	$(INSTALL_DATA) lib/LINUX/libgprim.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_gprim.a
-	$(INSTALL_DATA) lib/LINUX/libla.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_linalg.a
-	$(INSTALL_DATA) lib/LINUX/libmesh.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_meshing.a
-	$(INSTALL_DATA) lib/LINUX/libnginterface.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_interface.a
-	$(INSTALL_DATA) lib/LINUX/libocc.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_occ.a
-	$(INSTALL_DATA) lib/LINUX/libopti.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_opti.a
-	$(INSTALL_DATA) lib/LINUX/libstlgeom.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_stlgeom.a
-	$(INSTALL_DATA) lib/LINUX/libvis.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_visualization.a
-	$(INSTALL_DATA) lib/LINUX/libngsolve.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_solve.a
-	$(INSTALL_DATA) lib/LINUX/libngsolvebasic.a $(CURDIR)/debian/libnetgen-dev/usr/lib/libnetgen_solvebasic.a
+	install -d $(CURDIR)/debian/libnetgen-dev/usr/lib
+	$(INSTALL_DATA) lib/LINUX/*.a $(CURDIR)/debian/libnetgen-dev/usr/lib/
+	$(INSTALL_DATA) lib/LINUX/*.so $(CURDIR)/debian/libnetgen-dev/usr/lib/
+	install -d $(CURDIR)/debian/libnetgen4.4/usr/lib
+	$(INSTALL_DATA) lib/LINUX/*.so.* $(CURDIR)/debian/libnetgen4.4/usr/lib/
 	for i in libsrc/*; \
 	do \
 	if test -d $$i; then \
--- netgen-4.4/libsrc/makefile.mach.LINUX~	2008-01-22 05:45:42.000000000 -0500
+++ netgen-4.4/libsrc/makefile.mach.LINUX	2008-01-22 05:47:15.000000000 -0500
@@ -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

Reply via email to