diff -udprN /usr/ports/math/tetgen/Makefile ./Makefile --- /usr/ports/math/tetgen/Makefile 2018-06-14 08:34:32.000000000 +0000 +++ ./Makefile 2018-08-28 16:38:06.836781000 +0000 @@ -3,6 +3,7 @@ PORTNAME= tetgen PORTVERSION= 1.5.0.20131104 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= http://wias-berlin.de/software/tetgen/1.5/src/ DISTNAME= ${PORTNAME}${PORTVERSION:R} @@ -22,6 +23,9 @@ PLIST_FILES= bin/tetgen include/tetgen.h OPTIONS_DEFINE= EXAMPLES +pre-patch: + ${REINPLACE_CMD} 's|x%lx|x%x|' ${WRKSRC}/tetgen.cxx + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/tetgen ${STAGEDIR}${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/tetgen.h ${STAGEDIR}${PREFIX}/include diff -udprN /usr/ports/math/tetgen/files/patch-makefile ./files/patch-makefile --- /usr/ports/math/tetgen/files/patch-makefile 2014-08-31 20:23:50.000000000 +0000 +++ ./files/patch-makefile 2018-08-28 16:38:06.842403000 +0000 @@ -1,5 +1,5 @@ ---- makefile.orig 2013-11-06 15:26:24.000000000 -0500 -+++ makefile 2014-08-29 10:51:57.000000000 -0500 +--- makefile.orig 2013-11-06 20:26:24 UTC ++++ makefile @@ -11,7 +11,7 @@ # CXX should be set to the name of your favorite C++ compiler. # =========================================================== @@ -9,7 +9,7 @@ #CXX = icpc #CXX = CC -@@ -19,7 +19,7 @@ +@@ -19,7 +19,7 @@ CXX = g++ # -O2, -O3 ... to find the best optimization level. # =================================================================== @@ -18,7 +18,7 @@ # PREDCXXFLAGS is for compiling J. Shewchuk's predicates. -@@ -36,7 +36,7 @@ +@@ -36,7 +36,7 @@ PREDCXXFLAGS = -O0 # down the speed of TetGen. They can be skipped by define the -DNDEBUG # switch. @@ -27,3 +27,21 @@ # RM should be set to the name of your favorite rm (file deletion program). +@@ -45,14 +45,14 @@ RM = /bin/rm + # The action starts here. + + tetgen: tetgen.cxx predicates.o +- $(CXX) $(CXXFLAGS) $(SWITCHES) -o tetgen tetgen.cxx predicates.o -lm ++ $(CXX) $(CXXFLAGS) $(SWITCHES) -o tetgen tetgen.cxx predicates.o -lm -fPIC + + tetlib: tetgen.cxx predicates.o +- $(CXX) $(CXXFLAGS) $(SWITCHES) -DTETLIBRARY -c tetgen.cxx ++ $(CXX) $(CXXFLAGS) $(SWITCHES) -DTETLIBRARY -c tetgen.cxx -fPIC + ar r libtet.a tetgen.o predicates.o + + predicates.o: predicates.cxx +- $(CXX) $(PREDCXXFLAGS) -c predicates.cxx ++ $(CXX) $(PREDCXXFLAGS) -c predicates.cxx -fPIC + + clean: + $(RM) *.o *.a tetgen *~