aboutsummaryrefslogtreecommitdiff
path: root/cad
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2004-05-05 19:57:56 +0000
committerThierry Thomas <thierry@FreeBSD.org>2004-05-05 19:57:56 +0000
commit66cae882db8746b3f55c4b05ac2ef3972f12a4d6 (patch)
treedcaa35f91bed598a77cf19de619def0b170e7313 /cad
parente53a30beca898b1a893e0cd6cb16bf253d678ff4 (diff)
downloadports-66cae882db8746b3f55c4b05ac2ef3972f12a4d6.tar.gz
ports-66cae882db8746b3f55c4b05ac2ef3972f12a4d6.zip
Notes
Diffstat (limited to 'cad')
-rw-r--r--cad/Makefile1
-rw-r--r--cad/netgen/Makefile70
-rw-r--r--cad/netgen/distinfo2
-rw-r--r--cad/netgen/files/patch-Makefile56
-rw-r--r--cad/netgen/files/patch-demoapp::Makefile18
-rw-r--r--cad/netgen/files/patch-demoapp::demoapp.cpp13
-rw-r--r--cad/netgen/files/patch-libsrc::makefile.inc20
-rw-r--r--cad/netgen/files/patch-libsrc::makefile.mach.LINUX32
-rw-r--r--cad/netgen/files/patch-ngtcltk::ngappinit.cpp68
-rw-r--r--cad/netgen/pkg-descr8
-rw-r--r--cad/netgen/pkg-plist3
11 files changed, 291 insertions, 0 deletions
diff --git a/cad/Makefile b/cad/Makefile
index 490c7e06d71a..09aee053464f 100644
--- a/cad/Makefile
+++ b/cad/Makefile
@@ -32,6 +32,7 @@
SUBDIR += linux-eagle
SUBDIR += magic
SUBDIR += mars
+ SUBDIR += netgen
SUBDIR += ngspice_rework
SUBDIR += oregano
SUBDIR += pcb
diff --git a/cad/netgen/Makefile b/cad/netgen/Makefile
new file mode 100644
index 000000000000..5fbdc25f4a09
--- /dev/null
+++ b/cad/netgen/Makefile
@@ -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>
diff --git a/cad/netgen/distinfo b/cad/netgen/distinfo
new file mode 100644
index 000000000000..720b9034ee83
--- /dev/null
+++ b/cad/netgen/distinfo
@@ -0,0 +1,2 @@
+MD5 (ng431.tar.gz) = b676c33e6f499f78f53af5cd99929dab
+SIZE (ng431.tar.gz) = 1167326
diff --git a/cad/netgen/files/patch-Makefile b/cad/netgen/files/patch-Makefile
new file mode 100644
index 000000000000..41b7a480a74b
--- /dev/null
+++ b/cad/netgen/files/patch-Makefile
@@ -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)
diff --git a/cad/netgen/files/patch-demoapp::Makefile b/cad/netgen/files/patch-demoapp::Makefile
new file mode 100644
index 000000000000..9d9dabf76839
--- /dev/null
+++ b/cad/netgen/files/patch-demoapp::Makefile
@@ -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
+ #
diff --git a/cad/netgen/files/patch-demoapp::demoapp.cpp b/cad/netgen/files/patch-demoapp::demoapp.cpp
new file mode 100644
index 000000000000..2ae729ad2e02
--- /dev/null
+++ b/cad/netgen/files/patch-demoapp::demoapp.cpp
@@ -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"
diff --git a/cad/netgen/files/patch-libsrc::makefile.inc b/cad/netgen/files/patch-libsrc::makefile.inc
new file mode 100644
index 000000000000..b4ad55d4ef96
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc::makefile.inc
@@ -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) $@
diff --git a/cad/netgen/files/patch-libsrc::makefile.mach.LINUX b/cad/netgen/files/patch-libsrc::makefile.mach.LINUX
new file mode 100644
index 000000000000..6f888a8335f4
--- /dev/null
+++ b/cad/netgen/files/patch-libsrc::makefile.mach.LINUX
@@ -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++
diff --git a/cad/netgen/files/patch-ngtcltk::ngappinit.cpp b/cad/netgen/files/patch-ngtcltk::ngappinit.cpp
new file mode 100644
index 000000000000..7d785b8bd233
--- /dev/null
+++ b/cad/netgen/files/patch-ngtcltk::ngappinit.cpp
@@ -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);
+
diff --git a/cad/netgen/pkg-descr b/cad/netgen/pkg-descr
new file mode 100644
index 000000000000..688315642f94
--- /dev/null
+++ b/cad/netgen/pkg-descr
@@ -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/
diff --git a/cad/netgen/pkg-plist b/cad/netgen/pkg-plist
new file mode 100644
index 000000000000..6046a3e861ec
--- /dev/null
+++ b/cad/netgen/pkg-plist
@@ -0,0 +1,3 @@
+bin/ng
+%%DATADIR%%/demoapp.tcl
+@dirrm %%DATADIR%%