diff options
-rw-r--r-- | cad/netgen/Makefile | 45 | ||||
-rw-r--r-- | cad/netgen/files/patch-Makefile | 10 | ||||
-rw-r--r-- | cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD | 10 | ||||
-rw-r--r-- | cad/netgen/files/patch-libsrc_csg_csg.hpp | 11 | ||||
-rw-r--r-- | cad/netgen/files/patch-libsrc_linalg_densemat.hpp | 10 | ||||
-rw-r--r-- | cad/netgen/files/patch-libsrc_meshing_meshing.hpp | 11 | ||||
-rw-r--r-- | cad/netgen/files/patch-libsrc_meshing_meshtype.hpp | 11 | ||||
-rw-r--r-- | cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp | 10 | ||||
-rw-r--r-- | cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp | 13 | ||||
-rw-r--r-- | cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp | 11 | ||||
-rw-r--r-- | cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp | 70 | ||||
-rw-r--r-- | cad/netgen/files/patch-ngsolve_comp_postproc.cpp | 21 | ||||
-rw-r--r-- | cad/netgen/files/patch-ngsolve_linalg_order.cpp | 11 | ||||
-rw-r--r-- | cad/netgen/files/patch-ngsolve_linalg_order.hpp | 11 |
14 files changed, 232 insertions, 23 deletions
diff --git a/cad/netgen/Makefile b/cad/netgen/Makefile index b2fe2fc61018..1f718f5cb1ac 100644 --- a/cad/netgen/Makefile +++ b/cad/netgen/Makefile @@ -7,7 +7,7 @@ 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} @@ -17,7 +17,6 @@ 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 @@ -27,6 +26,11 @@ 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 \ @@ -36,16 +40,6 @@ TUTOS= boxcyl.geo cone.geo cube.geo cubeandspheres.geo cubemcyl.geo \ DIRTCL= demoapp ngsolve ngtcltk -.include <bsd.port.pre.mk> - -.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} \ @@ -54,9 +48,28 @@ MAKE_ENV= TK_VER=${TK_VER} TCL_VER=${TCL_VER} \ MACHINE=${MACHINE} MAKE=${GMAKE} \ PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS} +.include <bsd.port.pre.mk> + +.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} @@ -67,11 +80,11 @@ do-install: .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 diff --git a/cad/netgen/files/patch-Makefile b/cad/netgen/files/patch-Makefile index 1c7b286f9e42..09311a5c64d5 100644 --- a/cad/netgen/files/patch-Makefile +++ b/cad/netgen/files/patch-Makefile @@ -1,5 +1,5 @@ --- 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: # @@ -18,7 +18,7 @@ # (maybe you have to remove -ldl) # # -@@ -43,9 +43,9 @@ +@@ -43,12 +43,12 @@ # OCCINC_DIR=$(OCC_DIR)/inc # OCCLIB_DIR=$(OCC_DIR)/lib # @@ -30,7 +30,11 @@ +#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 @@ # # diff --git a/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD b/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD index c2f72da916e3..5632330da7a2 100644 --- a/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD +++ b/cad/netgen/files/patch-libsrc::makefile.mach.FREEBSD @@ -1,12 +1,12 @@ ---- 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 + @@ -18,3 +18,5 @@ + +appngs = lib/$(MACHINE)/*.o -lngsolvebasic +goalngs = goalngs ++ ++# occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP -lTKSTL -pthread diff --git a/cad/netgen/files/patch-libsrc_csg_csg.hpp b/cad/netgen/files/patch-libsrc_csg_csg.hpp new file mode 100644 index 000000000000..a190167a5388 --- /dev/null +++ b/cad/netgen/files/patch-libsrc_csg_csg.hpp @@ -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 + diff --git a/cad/netgen/files/patch-libsrc_linalg_densemat.hpp b/cad/netgen/files/patch-libsrc_linalg_densemat.hpp new file mode 100644 index 000000000000..ec3d7c0b9d2e --- /dev/null +++ b/cad/netgen/files/patch-libsrc_linalg_densemat.hpp @@ -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 diff --git a/cad/netgen/files/patch-libsrc_meshing_meshing.hpp b/cad/netgen/files/patch-libsrc_meshing_meshing.hpp new file mode 100644 index 000000000000..22f742e085b3 --- /dev/null +++ b/cad/netgen/files/patch-libsrc_meshing_meshing.hpp @@ -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 + diff --git a/cad/netgen/files/patch-libsrc_meshing_meshtype.hpp b/cad/netgen/files/patch-libsrc_meshing_meshtype.hpp new file mode 100644 index 000000000000..8d28315775bd --- /dev/null +++ b/cad/netgen/files/patch-libsrc_meshing_meshtype.hpp @@ -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<int> * identifiedpoints; diff --git a/cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp b/cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp new file mode 100644 index 000000000000..828ed76ff080 --- /dev/null +++ b/cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp @@ -0,0 +1,10 @@ +--- libsrc/visualization/mvdraw.hpp.orig ++++ libsrc/visualization/mvdraw.hpp +@@ -250,6 +250,7 @@ + int seltria; + }; + ++extern VisualSceneSTLMeshing vsstlmeshing; + + + diff --git a/cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp b/cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp new file mode 100644 index 000000000000..c61dc641e7ca --- /dev/null +++ b/cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp @@ -0,0 +1,13 @@ +--- libsrc/visualization/stlmeshing.cpp.orig ++++ libsrc/visualization/stlmeshing.cpp +@@ -1062,9 +1062,9 @@ + } + + ++VisualSceneSTLMeshing vsstlmeshing; + + +-VisualSceneSTLMeshing vsstlmeshing; + + #endif + diff --git a/cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp b/cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp new file mode 100644 index 000000000000..0e2ac09956b8 --- /dev/null +++ b/cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp @@ -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; + } + diff --git a/cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp b/cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp new file mode 100644 index 000000000000..74d85379a040 --- /dev/null +++ b/cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp @@ -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 <class TA, class TB> + inline typename TA::TSCAL + InnerProduct (const MatExpr<TA> & a, const MatExpr<TB> & 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 <class TA> +-inline double L2Norm2 (const MatExpr<TA> & 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 <class TA> ++inline double L2Norm2 (const MatExpr<TA> & 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 <class TA> diff --git a/cad/netgen/files/patch-ngsolve_comp_postproc.cpp b/cad/netgen/files/patch-ngsolve_comp_postproc.cpp new file mode 100644 index 000000000000..551ae710c376 --- /dev/null +++ b/cad/netgen/files/patch-ngsolve_comp_postproc.cpp @@ -0,0 +1,21 @@ +--- ngsolve/comp/postproc.cpp.orig ++++ 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); diff --git a/cad/netgen/files/patch-ngsolve_linalg_order.cpp b/cad/netgen/files/patch-ngsolve_linalg_order.cpp new file mode 100644 index 000000000000..1ef838fbae60 --- /dev/null +++ b/cad/netgen/files/patch-ngsolve_linalg_order.cpp @@ -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); + } diff --git a/cad/netgen/files/patch-ngsolve_linalg_order.hpp b/cad/netgen/files/patch-ngsolve_linalg_order.hpp new file mode 100644 index 000000000000..ba1ad8341acb --- /dev/null +++ b/cad/netgen/files/patch-ngsolve_linalg_order.hpp @@ -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 *); + }; + + |