Index: head/cad/netgen/Makefile =================================================================== --- head/cad/netgen/Makefile (revision 192416) +++ head/cad/netgen/Makefile (revision 192417) @@ -1,78 +1,91 @@ # New ports collection makefile for: netgen # Date created: 29 April 2004 # Whom: Thierry Thomas # # $FreeBSD$ # PORTNAME= netgen PORTVERSION= 4.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= cad MASTER_SITES= http://www.hpfem.jku.at/cgi/download.cgi?ID= DISTNAME= ngs${PORTVERSION:S/.//g} MAINTAINER= ports@FreeBSD.org COMMENT= An automatic 3D tetrahedral mesh generator LIB_DEPENDS= tix8184:${PORTSDIR}/x11-toolkits/tix -USE_GCC= 3.3+ USE_GMAKE= yes USE_TK= yes USE_TK_BUILD= yes USE_GL= yes ALL_TARGET= ng FETCH_BEFORE_ARGS+= -o ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} +.if !defined(WITHOUT_OCC) +LIB_DEPENDS+= TKernel.0:${PORTSDIR}/cad/opencascade +CXXFLAGS+= -DOCCGEOMETRY -DOCC52 -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H -D${ARCH} -I${LOCALBASE}/OpenCAS/ros/inc +.endif + TUTOS= boxcyl.geo cone.geo cube.geo cubeandspheres.geo cubemcyl.geo \ cubemsphere.geo cylinder.geo cylsphere.geo demo2d.in2d ellipsoid.geo \ ellipticcyl.geo fichera.geo hinge.stl lshape3d.geo manyholes.geo \ matrix.geo part1.stl period.geo sculpture.geo shaft.geo sphere.geo \ sphereincube.geo square.in2d test.msz trafo.geo twobricks.geo \ twocubes.geo twocyl.geo DIRTCL= demoapp ngsolve ngtcltk -.include - -.if ${OSVERSION} >= 700042 -BROKEN= Broken with gcc 4.2 -.endif - -.if ${ARCH} == "sparc64" -BROKEN= internal gcc error (Bug 23159) -.endif - MACHINE= ${OPSYS:U} MAKE_ENV= TK_VER=${TK_VER} TCL_VER=${TCL_VER} \ TCL_INCLUDEDIR="${TCL_INCLUDEDIR}" \ TK_INCLUDEDIR="${TK_INCLUDEDIR}" \ MACHINE=${MACHINE} MAKE=${GMAKE} \ PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS} +.include + +.if ${ARCH} == "sparc64" +BROKEN= internal gcc error (Bug 23159) +.endif + +pre-everything:: + @${ECHO_MSG} + @${ECHO_MSG} "Define WITHOUT_OCC if IGES and STEP support is not required." + @${ECHO_MSG} + pre-configure: - @${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|" \ + ${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|" \ ${WRKSRC}/ngtcltk/ngappinit.cpp +.if !defined(WITHOUT_OCC) + ${REINPLACE_CMD} -e 's|^# occlib|occlib|;s|-pthread|${PTHREAD_LIBS}|' \ + ${WRKSRC}/libsrc/makefile.mach.FREEBSD \ + ${WRKSRC}/Makefile + ${REINPLACE_CMD} -e 's|^#OCC|OCC|;s|ros/lin/|ros/bsd/|; \ + s|/opt/OpenCASCADE5.2|${LOCALBASE}/OpenCAS|' \ + ${WRKSRC}/Makefile +.endif do-install: ${MKDIR} ${DIRTCL:S|^|${PREFIX}/netgen/|g} ${INSTALL_PROGRAM} ${WRKSRC}/ng ${PREFIX}/netgen ${LN} -s ${PREFIX}/netgen/ng ${PREFIX}/bin .for tcls in . ${DIRTCL} ${CP} ${WRKSRC}/${tcls}/*.tcl ${PREFIX}/netgen/${tcls} .endfor .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR}/tutorials ${DOCSDIR}/ngsolve - @${INSTALL_DATA} ${WRKSRC}/doc/ng4.pdf ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/ng4.pdf ${DOCSDIR} . for doc in ${TUTOS} - @${INSTALL_DATA} ${WRKSRC}/tutorials/${doc} ${DOCSDIR}/tutorials + ${INSTALL_DATA} ${WRKSRC}/tutorials/${doc} ${DOCSDIR}/tutorials . endfor - @${CP} ${WRKSRC}/ngsolve/doc/* ${DOCSDIR}/ngsolve + ${CP} ${WRKSRC}/ngsolve/doc/* ${DOCSDIR}/ngsolve @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}." .endif .include Property changes on: head/cad/netgen/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.14 \ No newline at end of property +1.15 \ No newline at end of property Index: head/cad/netgen/files/patch-Makefile =================================================================== --- head/cad/netgen/files/patch-Makefile (revision 192416) +++ head/cad/netgen/files/patch-Makefile (revision 192417) @@ -1,60 +1,64 @@ --- Makefile.orig Tue Nov 16 15:29:39 2004 -+++ Makefile Thu Nov 18 00:05:27 2004 ++++ Makefile Mon May 28 22:20:53 2007 @@ -21,7 +21,7 @@ # system libraries: # # -tcltklib = -ltix8.1.8.4 -ltk8.4 -ltcl8.4 +tcltklib = `echo $(TIX_BUILD_LIB_SPEC)` `echo $(TK_LIB_SPEC)` `echo $(TCL_LIB_FLAG)` # 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 $(PTHREAD_LIBS) $(SYSLIB2) # (maybe you have to remove -ldl) # # -@@ -43,9 +43,9 @@ +@@ -43,12 +43,12 @@ # OCCINC_DIR=$(OCC_DIR)/inc # OCCLIB_DIR=$(OCC_DIR)/lib # -OCC_DIR=/opt/OpenCASCADE5.2 -OCCINC_DIR=$(OCC_DIR)/ros/inc -OCCLIB_DIR=$(OCC_DIR)/ros/lin/lib +#OCC_DIR=/opt/OpenCASCADE5.2 +#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 +-# occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL ++# occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL -pthread + # + include $(LIBSRC_DIR)/makefile.mach.$(MACHINE) + # @@ -58,7 +58,7 @@ # # # -CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -I./ngsolve/include -Ilibsrc/interface -DOPENGL $(METISINC) +CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -I./ngsolve/include -Ilibsrc/interface -DOPENGL $(METISINC) $(PTHREAD_CFLAGS) # LINKFLAGS1 = -lGL -lGLU -lX11 -lXext -lXmu # @@ -74,7 +74,7 @@ # Additional NETGEN Applications: # # the demo add-on application: -# appdemo = -L./demoapp -ldemoapp +appdemo = -L./demoapp -ldemoapp # # appaddon = -L./addon -laddon @@ -102,7 +102,7 @@ cd libsrc; $(MAKE) # applib: -# cd demoapp; $(MAKE); + cd demoapp; $(MAKE); # cd addon; $(MAKE) # cd ngsolve; $(MAKE); # cd metis; $(MAKE) Property changes on: head/cad/netgen/files/patch-Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD =================================================================== --- head/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD (revision 192416) +++ head/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD (revision 192417) @@ -1,20 +1,22 @@ ---- libsrc/makefile.mach.FREEBSD.orig Wed May 5 23:24:29 2004 -+++ libsrc/makefile.mach.FREEBSD Tue Jul 4 22:56:34 2006 -@@ -18,9 +18,15 @@ +--- ./libsrc/makefile.mach.FREEBSD.orig Wed May 5 23:24:29 2004 ++++ ./libsrc/makefile.mach.FREEBSD Mon May 28 22:11:10 2007 +@@ -18,9 +18,17 @@ tcltklib = `echo $(TIX_BUILD_LIB_SPEC)` `echo $(TK_LIB_SPEC)` `echo $(TCL_LIB_FLAG)` CFLAGS2 = -CPLUSPLUSFLAGS2 = $(CXXFLAGS) -I$(X11BASE)/include -DLINUX -DOPENGL -CPLUSPLUSFLAGS3 = -I$(LIBSRC_DIR)/step `echo $(TCL_INCLUDE_SPEC)` `echo -I$(TK_PREFIX)`/include/tk`echo $(TK_VERSION)` -+CPLUSPLUSFLAGS2 = $(CXXFLAGS) -I$(X11BASE)/include -DLINUX -DOPENGL -DNGSOLVE \ ++CPLUSPLUSFLAGS2 = $(CXXFLAGS) -I$(X11BASE)/include -DFREEBSD -DOPENGL -DNGSOLVE \ + -ftemplate-depth-99 -finline-limit=20000 \ + -funroll-loops + +CPLUSPLUSFLAGS3 = -I$(LIBSRC_DIR)/step -I$(TCL_INCLUDEDIR) -I$(TK_INCLUDEDIR) # LINKFLAGS2 = -L$(LOCALBASE)/lib -L$(X11BASE)/lib SYSLIB2 = -lstdc++ + +appngs = lib/$(MACHINE)/*.o -lngsolvebasic +goalngs = goalngs ++ ++# occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL -pthread Property changes on: head/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/cad/netgen/files/patch-libsrc_csg_csg.hpp =================================================================== --- head/cad/netgen/files/patch-libsrc_csg_csg.hpp (nonexistent) +++ head/cad/netgen/files/patch-libsrc_csg_csg.hpp (revision 192417) @@ -0,0 +1,11 @@ +--- ./libsrc/csg/csg.hpp.orig Thu Oct 7 00:10:13 2004 ++++ ./libsrc/csg/csg.hpp Tue May 29 22:54:13 2007 +@@ -22,7 +22,7 @@ + #ifndef SMALLLIB + #define _INCLUDE_MORE + #endif +-#ifdef LINUX ++#if defined(LINUX ) || defined(FREEBSD) + #define _INCLUDE_MORE + #endif + Property changes on: head/cad/netgen/files/patch-libsrc_csg_csg.hpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/cad/netgen/files/patch-libsrc_linalg_densemat.hpp =================================================================== --- head/cad/netgen/files/patch-libsrc_linalg_densemat.hpp (nonexistent) +++ head/cad/netgen/files/patch-libsrc_linalg_densemat.hpp (revision 192417) @@ -0,0 +1,10 @@ +--- libsrc/linalg/densemat.hpp.orig Wed Nov 10 14:22:43 2004 ++++ libsrc/linalg/densemat.hpp Tue May 29 18:45:09 2007 +@@ -255,6 +255,6 @@ + + + +- ++extern void CalcInverse (const DenseMatrix & m1, DenseMatrix & m2); + + #endif Property changes on: head/cad/netgen/files/patch-libsrc_linalg_densemat.hpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/cad/netgen/files/patch-libsrc_meshing_meshing.hpp =================================================================== --- head/cad/netgen/files/patch-libsrc_meshing_meshing.hpp (nonexistent) +++ head/cad/netgen/files/patch-libsrc_meshing_meshing.hpp (revision 192417) @@ -0,0 +1,11 @@ +--- ./libsrc/meshing/meshing.hpp.orig Thu Oct 7 00:23:46 2004 ++++ ./libsrc/meshing/meshing.hpp Tue May 29 22:55:52 2007 +@@ -34,7 +34,7 @@ + #ifndef SMALLLIB + #define _INCLUDE_MORE + #endif +-#ifdef LINUX ++#if defined(LINUX ) || defined(FREEBSD) + #define _INCLUDE_MORE + #endif + Property changes on: head/cad/netgen/files/patch-libsrc_meshing_meshing.hpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/cad/netgen/files/patch-libsrc_meshing_meshtype.hpp =================================================================== --- head/cad/netgen/files/patch-libsrc_meshing_meshtype.hpp (nonexistent) +++ head/cad/netgen/files/patch-libsrc_meshing_meshtype.hpp (revision 192417) @@ -0,0 +1,11 @@ +--- libsrc/meshing/meshtype.hpp.orig Sun Nov 7 17:12:10 2004 ++++ libsrc/meshing/meshtype.hpp Tue May 29 18:43:39 2007 +@@ -962,7 +962,7 @@ + class Identifications + { + private: +- Mesh & mesh; ++ class Mesh & mesh; + + /// identify points (thin layers, periodic b.c.) + INDEX_2_HASHTABLE * identifiedpoints; Property changes on: head/cad/netgen/files/patch-libsrc_meshing_meshtype.hpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp =================================================================== --- head/cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp (nonexistent) +++ head/cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp (revision 192417) @@ -0,0 +1,10 @@ +--- libsrc/visualization/mvdraw.hpp.orig ++++ libsrc/visualization/mvdraw.hpp +@@ -250,6 +250,7 @@ + int seltria; + }; + ++extern VisualSceneSTLMeshing vsstlmeshing; + + + Property changes on: head/cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp =================================================================== --- head/cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp (nonexistent) +++ head/cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp (revision 192417) @@ -0,0 +1,13 @@ +--- libsrc/visualization/stlmeshing.cpp.orig ++++ libsrc/visualization/stlmeshing.cpp +@@ -1062,9 +1062,9 @@ + } + + ++VisualSceneSTLMeshing vsstlmeshing; + + +-VisualSceneSTLMeshing vsstlmeshing; + + #endif + Property changes on: head/cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp =================================================================== --- head/cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp (nonexistent) +++ head/cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp (revision 192417) @@ -0,0 +1,11 @@ +--- ngsolve/basiclinalg/calcinverse.cpp.orig Tue Nov 16 09:38:35 2004 ++++ ngsolve/basiclinalg/calcinverse.cpp Tue May 29 19:27:48 2007 +@@ -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; + } + Property changes on: head/cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp =================================================================== --- head/cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp (nonexistent) +++ head/cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp (revision 192417) @@ -0,0 +1,70 @@ +--- ngsolve/basiclinalg/expr3.hpp.orig Sat Oct 2 10:26:56 2004 ++++ ngsolve/basiclinalg/expr3.hpp Tue May 29 19:33:11 2007 +@@ -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 + inline typename TA::TSCAL + InnerProduct (const MatExpr & a, const MatExpr & b) +@@ -862,16 +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,16 +889,6 @@ + /* **************************** L2Norm **************************** */ + + /// Euklidean norm squared +-template +-inline double L2Norm2 (const MatExpr & v) +-{ +- typedef typename TA::TSCAL TSCAL; +- double sum = 0; +- for (int i = 0; i < v.Height(); i++) +- sum += L2Norm2 (v.Spec()(i)); // REval +- return sum; +-} +- + + inline double L2Norm2 (double v) + { +@@ -908,6 +898,16 @@ + inline double L2Norm2 (Complex v) + { + return v.real()*v.real()+v.imag()*v.imag(); ++} ++ ++template ++inline double L2Norm2 (const MatExpr & v) ++{ ++ typedef typename TA::TSCAL TSCAL; ++ double sum = 0; ++ for (int i = 0; i < v.Height(); i++) ++ sum += L2Norm2 (v.Spec()(i)); // REval ++ return sum; + } + + template Property changes on: head/cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/cad/netgen/files/patch-ngsolve_comp_postproc.cpp =================================================================== --- head/cad/netgen/files/patch-ngsolve_comp_postproc.cpp (nonexistent) +++ head/cad/netgen/files/patch-ngsolve_comp_postproc.cpp (revision 192417) @@ -0,0 +1,21 @@ +--- ngsolve/comp/postproc.cpp.orig ++++ ngsolve/comp/postproc.cpp +@@ -9,6 +9,7 @@ + */ + + #include ++#include + + namespace ngcomp + { +@@ -274,8 +275,8 @@ + if (dimflux > 1) + { + FlatMatrix elmat(dnumsflux.Size(), lh); +- dynamic_cast (fluxbli) +- . Block() . AssembleElementMatrix (felflux, eltrans, elmat, lh); ++ BlockBilinearFormIntegrator const& fluxbli_ref = dynamic_cast (fluxbli); ++ fluxbli_ref . Block() . AssembleElementMatrix (felflux, eltrans, elmat, lh); + CholeskyFactors invelmat(elmat); + + FlatVector hv1(dnumsflux.Size(), lh); Property changes on: head/cad/netgen/files/patch-ngsolve_comp_postproc.cpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/cad/netgen/files/patch-ngsolve_linalg_order.cpp =================================================================== --- head/cad/netgen/files/patch-ngsolve_linalg_order.cpp (nonexistent) +++ head/cad/netgen/files/patch-ngsolve_linalg_order.cpp (revision 192417) @@ -0,0 +1,11 @@ +--- ngsolve/linalg/order.cpp.orig ++++ 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); + } Property changes on: head/cad/netgen/files/patch-ngsolve_linalg_order.cpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/cad/netgen/files/patch-ngsolve_linalg_order.hpp =================================================================== --- head/cad/netgen/files/patch-ngsolve_linalg_order.hpp (nonexistent) +++ head/cad/netgen/files/patch-ngsolve_linalg_order.hpp (revision 192417) @@ -0,0 +1,11 @@ +--- ngsolve/linalg/order.hpp.orig ++++ ngsolve/linalg/order.hpp +@@ -118,7 +118,7 @@ + /// + void * operator new(size_t); + /// +- void operator delete (void *, size_t); ++ void operator delete (void *); + }; + + Property changes on: head/cad/netgen/files/patch-ngsolve_linalg_order.hpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property