1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

Add netgen 4.3.1, an automatic 3D tetrahedral mesh generator.

This commit is contained in:
Thierry Thomas 2004-05-05 19:57:56 +00:00
parent e53a30beca
commit 66cae882db
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=108482
11 changed files with 291 additions and 0 deletions

View File

@ -32,6 +32,7 @@
SUBDIR += linux-eagle
SUBDIR += magic
SUBDIR += mars
SUBDIR += netgen
SUBDIR += ngspice_rework
SUBDIR += oregano
SUBDIR += pcb

70
cad/netgen/Makefile Normal file
View File

@ -0,0 +1,70 @@
# New ports collection makefile for: netgen
# Date created: 29 April 2004
# Whom: Thierry Thomas <thierry@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= netgen
PORTVERSION= 4.3.1
CATEGORIES= cad
MASTER_SITES= http://www.hpfem.jku.at/netgen/
DISTNAME= ng${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_GL= yes
USE_REINPLACE= yes
ALL_TARGET= ng
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}/tutorials
PORTDOCS= 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
.include <bsd.port.pre.mk>
TK_VER?= 8.4
SHORT_TK_VER= ${TK_VER:S/.//}
TCL_VER?= ${TK_VER}
SHORT_TCL_VER= ${TCL_VER:S/.//}
LIB_DEPENDS+= tcl${SHORT_TCL_VER}:${PORTSDIR}/lang/tcl${SHORT_TCL_VER} \
tk${SHORT_TK_VER}:${PORTSDIR}/x11-toolkits/tk${SHORT_TK_VER}
unames!= ${UNAME} -s
MACHINE= ${unames:U}
MAKE_ENV= TK_VER=${TK_VER} TCL_VER=${TCL_VER} \
MACHINE=${MACHINE} MAKE=${GMAKE} \
PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS}
pre-configure:
@${MV} ${WRKSRC}/libsrc/makefile.mach.LINUX \
${WRKSRC}/libsrc/makefile.mach.${MACHINE}
@${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|" \
${WRKSRC}/ngtcltk/ngappinit.cpp
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/ng ${PREFIX}/bin
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/demoapp/demoapp.tcl ${DATADIR}
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
. for doc in ${PORTDOCS}
@${INSTALL_DATA} ${WRKSRC}/tutorials/${doc} ${DOCSDIR}
. endfor
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
.endif
.include <bsd.port.post.mk>

2
cad/netgen/distinfo Normal file
View File

@ -0,0 +1,2 @@
MD5 (ng431.tar.gz) = b676c33e6f499f78f53af5cd99929dab
SIZE (ng431.tar.gz) = 1167326

View File

@ -0,0 +1,56 @@
--- Makefile.orig Thu Feb 12 11:46:45 2004
+++ Makefile Mon May 3 21:56:38 2004
@@ -16,13 +16,13 @@
# system libraries:
#
# olymp
- tcltklib = -ltix8.1.8.4 -ltk8.4 -ltcl8.4
+tcltklib = `echo $(TIX_BUILD_LIB_SPEC)` `echo $(TK_LIB_SPEC)` `echo $(TCL_LIB_FLAG)`
#tcltklib = -L. -ltix8.1.8.4 -ltk8.4 -ltcl8.4
# tcltklib = -ltix4.1.8.0 -ltk8.0 -ltcl8.0
# tcltklib = -ltix8.2 -ltk8.3 -ltcl8.3
#
#
-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)
#
#
@@ -33,9 +33,7 @@
OCCINC_DIR=$(OCC_DIR)/inc
OCCLIB_DIR=$(OCC_DIR)/lib
#
-# occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP
-#
-CPLUSPLUSFLAGS3 = -I$(LIBSRC_DIR)/step
+# occlib = -L$(OCCLIB_DIR) -lTKIGES -lTKBRep -lTKSTEP
#
include $(LIBSRC_DIR)/makefile.mach.$(MACHINE)
#
@@ -44,7 +42,7 @@
.SUFFIXES: .cpp .o
#
#
-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -DOPENGL
+CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -DOPENGL $(PTHREAD_CFLAGS)
LINKFLAGS1 = -lGL -lGLU -lX11 -lXext -lXmu
#
#
@@ -59,7 +57,7 @@
# Additional NETGEN Applications:
#
# the demo add-on application:
-# appdemo = -L./demoapp -ldemoapp
+appdemo = -L./demoapp -ldemoapp
#
# appaddon = -L./addon -laddon
@@ -86,7 +84,7 @@
cd libsrc; $(MAKE)
#
applib:
-# cd demoapp; $(MAKE);
+ cd demoapp; $(MAKE);
# cd addon; $(MAKE)
# cd ngsolve; $(MAKE);
# cd metis; $(MAKE)

View File

@ -0,0 +1,18 @@
--- demoapp/Makefile.orig Tue Feb 3 11:47:04 2004
+++ demoapp/Makefile Mon May 3 22:16:08 2004
@@ -10,13 +10,13 @@
.SUFFIXES: .cc .o
#
.cc.o:
- $(CPLUSPLUS) -c -O2 $<
+ $(CPLUSPLUS) -c $(CPLUSPLUSFLAGS2) $<
#
#
# make lib from sources:
#
$(lib):: $(src)
- $(CPLUSPLUS) -c -O2 -I../libsrc/interface $(CPLUSPLUSFLAGS2) $?
+ $(CPLUSPLUS) -c -I../libsrc/interface $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGS3) $?
$(AR) $(ARFLAGS) $@ *.o
-$(RM) *.o
#

View File

@ -0,0 +1,13 @@
--- demoapp/demoapp.cpp.orig Tue Feb 3 11:47:04 2004
+++ demoapp/demoapp.cpp Mon May 3 22:22:41 2004
@@ -3,8 +3,8 @@
*/
-#include <iostream.h>
-
+#include <iostream>
+using namespace std;
// for tcltk ...
#include "../libsrc/include/incvis.hpp"

View File

@ -0,0 +1,20 @@
--- libsrc/makefile.inc.orig Tue Feb 3 11:47:07 2004
+++ libsrc/makefile.inc Mon May 3 10:51:35 2004
@@ -24,7 +24,7 @@
.SUFFIXES: .cpp .o
#
.cpp.o:
- $(CPLUSPLUS) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGSLIBRARY) $<
+ $(CPLUSPLUS) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGS3) $(CPLUSPLUSFLAGSLIBRARY) $<
#
#
$(LIBB):: $(LIB_DIR)
@@ -32,7 +32,7 @@
# make lib from sources:
#
$(LIBB):: $(src)
- $(CPLUSPLUS) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGSLIBRARY) $?
+ $(CPLUSPLUS) $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGS3) $(CPLUSPLUSFLAGSLIBRARY) $?
@$(AR) $(ARFLAGS) $@ *.o
-@$(RM) *.o
-@$(RANLIB) $@

View File

@ -0,0 +1,32 @@
--- libsrc/makefile.mach.LINUX.orig Thu Feb 12 11:43:23 2004
+++ libsrc/makefile.mach.LINUX Mon May 3 13:41:03 2004
@@ -2,19 +2,25 @@
# Machine dependent make include file for gcc
#
#
-CC=gcc
+#CC=gcc
CPLUSPLUS=$(CC)
AR=ar
LINK=$(CC)
-MAKE=make
+#MAKE=make
RM=rm
RANLIB=ranlib
#
# Machine dependent flags:
#
+include $(LOCALBASE)/lib/tixConfig.sh
+include $(LOCALBASE)/lib/tcl$(TCL_VER)/tclConfig.sh
+include $(LOCALBASE)/lib/tk$(TK_VER)/tkConfig.sh
+tcltklib = `echo $(TIX_BUILD_LIB_SPEC)` `echo $(TK_LIB_SPEC)` `echo $(TCL_LIB_FLAG)`
+
CFLAGS2 =
-CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL
+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)`
#
-LINKFLAGS2 = -L/usr/openwin/lib -L/usr/X11R6/lib
+LINKFLAGS2 = -L$(LOCALBASE)/lib -L$(X11BASE)/lib
SYSLIB2 = -lstdc++

View File

@ -0,0 +1,68 @@
--- ngtcltk/ngappinit.cpp.orig Tue Feb 10 10:01:01 2004
+++ ngtcltk/ngappinit.cpp Wed May 5 19:51:54 2004
@@ -3,10 +3,12 @@
This file is a modification of tkAppInit.c from the Tcl/Tk package
*/
+using namespace std;
+
#include <mystdlib.h>
#include "incvis.hpp"
#include <meshing.hpp>
-
+#include <math.h>
namespace netgen
{
@@ -26,7 +28,7 @@
* The following variable is a special hack that is needed in order for
* Sun shared libraries to be used for Tcl.
*/
-// extern "C" int matherr();
+extern "C" int matherr();
int *tclDummyMathPtr = (int *) matherr;
@@ -169,20 +171,22 @@
// For adding an application, parse the file here,
// and call the init-procedure below
- // #define DEMOAPP
+#define DEMOAPP
#ifdef DEMOAPP
- // Tcl_EvalFile (myinterp, "demoapp/demoapp.tcl");
+ Tcl_EvalFile (myinterp, "%%DATADIR%%/demoapp.tcl");
#endif
+// #define METIS
+
#ifdef ADDON
Tcl_EvalFile (myinterp, "addon/addon.tcl");
#endif
// start event-loop
Tk_MainLoop();
- Tcl_DeleteInterp (myinterp);
+ Tcl_DeleteInterp (myinterp);
- return 0;
+ return 0;
}
@@ -268,6 +272,7 @@
// #define NGSOLVE
// #undef NGSOLVE
+/*
#ifdef NGSOLVE
extern int NGSolve_Init (Tcl_Interp * interp);
if (NGSolve_Init(interp) == TCL_ERROR)
@@ -277,6 +282,7 @@
return TCL_ERROR;
}
#endif
+*/
Tcl_StaticPackage(interp, "Tk", Tk_Init, 0);

8
cad/netgen/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
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.
WWW: http://www.hpfem.jku.at/netgen/

3
cad/netgen/pkg-plist Normal file
View File

@ -0,0 +1,3 @@
bin/ng
%%DATADIR%%/demoapp.tcl
@dirrm %%DATADIR%%