mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-20 00:21:35 +00:00
- Unbreak with gcc-4.2 (some patches from the author, some inspired from
Debian); - Add IGES and STEP support with OpenCascade.
This commit is contained in:
parent
37218fa383
commit
db06906eac
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=192417
@ -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
|
||||
|
||||
|
@ -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 @@
|
||||
#
|
||||
#
|
||||
|
@ -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
|
||||
|
11
cad/netgen/files/patch-libsrc_csg_csg.hpp
Normal file
11
cad/netgen/files/patch-libsrc_csg_csg.hpp
Normal file
@ -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
|
||||
|
10
cad/netgen/files/patch-libsrc_linalg_densemat.hpp
Normal file
10
cad/netgen/files/patch-libsrc_linalg_densemat.hpp
Normal file
@ -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
|
11
cad/netgen/files/patch-libsrc_meshing_meshing.hpp
Normal file
11
cad/netgen/files/patch-libsrc_meshing_meshing.hpp
Normal file
@ -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
|
||||
|
11
cad/netgen/files/patch-libsrc_meshing_meshtype.hpp
Normal file
11
cad/netgen/files/patch-libsrc_meshing_meshtype.hpp
Normal file
@ -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;
|
10
cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp
Normal file
10
cad/netgen/files/patch-libsrc_visualization_mvdraw.hpp
Normal file
@ -0,0 +1,10 @@
|
||||
--- libsrc/visualization/mvdraw.hpp.orig
|
||||
+++ libsrc/visualization/mvdraw.hpp
|
||||
@@ -250,6 +250,7 @@
|
||||
int seltria;
|
||||
};
|
||||
|
||||
+extern VisualSceneSTLMeshing vsstlmeshing;
|
||||
|
||||
|
||||
|
13
cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp
Normal file
13
cad/netgen/files/patch-libsrc_visualization_tlmeshing.cpp
Normal file
@ -0,0 +1,13 @@
|
||||
--- libsrc/visualization/stlmeshing.cpp.orig
|
||||
+++ libsrc/visualization/stlmeshing.cpp
|
||||
@@ -1062,9 +1062,9 @@
|
||||
}
|
||||
|
||||
|
||||
+VisualSceneSTLMeshing vsstlmeshing;
|
||||
|
||||
|
||||
-VisualSceneSTLMeshing vsstlmeshing;
|
||||
|
||||
#endif
|
||||
|
11
cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp
Normal file
11
cad/netgen/files/patch-ngsolve_basiclinalg_calcinverse.cpp
Normal file
@ -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;
|
||||
}
|
||||
|
70
cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp
Normal file
70
cad/netgen/files/patch-ngsolve_basiclinalg_expr3.hpp
Normal file
@ -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>
|
21
cad/netgen/files/patch-ngsolve_comp_postproc.cpp
Normal file
21
cad/netgen/files/patch-ngsolve_comp_postproc.cpp
Normal file
@ -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);
|
11
cad/netgen/files/patch-ngsolve_linalg_order.cpp
Normal file
11
cad/netgen/files/patch-ngsolve_linalg_order.cpp
Normal file
@ -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);
|
||||
}
|
11
cad/netgen/files/patch-ngsolve_linalg_order.hpp
Normal file
11
cad/netgen/files/patch-ngsolve_linalg_order.hpp
Normal file
@ -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 *);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user