aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2006-04-10 10:48:49 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2006-04-10 10:48:49 +0000
commitde81bcb1c4133430f47a70e650d9867dd11252ca (patch)
tree001fd23c251e612d5a59f42be6813a99ea31855e
parenteabec9dd09dbfdfb3d6dc3e80528ea4cff4a3a4b (diff)
downloadports-de81bcb1c4133430f47a70e650d9867dd11252ca.tar.gz
ports-de81bcb1c4133430f47a70e650d9867dd11252ca.zip
Notes
-rw-r--r--math/Makefile1
-rw-r--r--math/cgal/Makefile79
-rw-r--r--math/cgal/distinfo6
-rw-r--r--math/cgal/files/patch-include_CGAL_number__type__basic.h12
-rw-r--r--math/cgal/files/patch-install__cgal45
-rw-r--r--math/cgal/files/patch-src_makefile__lib10
-rw-r--r--math/cgal/files/patch-src_makefile__sharedlib10
-rw-r--r--math/cgal/pkg-descr22
8 files changed, 185 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 47b3a8ef91d1..16ac4fb49c94 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -30,6 +30,7 @@
SUBDIR += calcoo
SUBDIR += calctool
SUBDIR += ccmath
+ SUBDIR += cgal
SUBDIR += chryzodus
SUBDIR += clarence
SUBDIR += cln
diff --git a/math/cgal/Makefile b/math/cgal/Makefile
new file mode 100644
index 000000000000..c0ee29532747
--- /dev/null
+++ b/math/cgal/Makefile
@@ -0,0 +1,79 @@
+# New ports collection makefile for: cgal
+# Date created: 10 Apr 2006
+# Whom: Jean-Yves Lefort <jylefort@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= cgal
+PORTVERSION= 3.1
+CATEGORIES= math
+MASTER_SITES= ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/
+DISTNAME= CGAL-${PORTVERSION}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}-doc_html${EXTRACT_SUFX}
+
+MAINTAINER= jylefort@FreeBSD.org
+COMMENT= A computational geometry library
+
+BUILD_DEPENDS= ${LOCALBASE}/include/boost/tuple/tuple.hpp:${PORTSDIR}/devel/boost
+RUN_DEPENDS= ${LOCALBASE}/include/boost/tuple/tuple.hpp:${PORTSDIR}/devel/boost
+
+INSTALLS_SHLIB= yes
+SHLIB_VERSION= 0
+
+HAS_CONFIGURE= yes
+CONFIGURE_SCRIPT= install_cgal
+CONFIGURE_ENV= SHLIB_VERSION="${SHLIB_VERSION}"
+CONFIGURE_ARGS= -ni "${CXX}" --CUSTOM_CXXFLAGS "${CXXFLAGS} -I${LOCALBASE}/include"
+
+PLIST= ${WRKDIR}/pkg-plist
+PLIST_FILES= lib/libCGAL.a lib/libCGAL.so lib/libCGAL.so.${SHLIB_VERSION}
+PORTDOCS= *
+
+INVOKE= cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS}
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+IGNORE= does not build on FreeBSD 4.x
+.endif
+
+post-patch:
+ @for d in ${WRKSRC}/include/CGAL ${WRKSRC}/examples ${WRKDIR}/doc_html/cgal_manual; do \
+ ${FIND} $$d -name '*.orig' -delete; \
+ done
+
+do-build:
+.for t in lib sharedlib
+ @cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} makefile_${t} ${MAKE_ARGS}
+.endfor
+
+pre-install:
+ @${RM} -f ${PLIST}
+ @${INVOKE} cgal-plist SRC=include/CGAL DST=include/CGAL
+ @${INVOKE} cgal-plist SRC=examples DST=%%EXAMPLESDIR%%
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/src/libCGAL.a ${PREFIX}/lib
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/libCGAL.so.${SHLIB_VERSION} ${PREFIX}/lib
+ ${LN} -sf libCGAL.so.${SHLIB_VERSION} ${PREFIX}/lib/libCGAL.so
+ @${INVOKE} cgal-install SRC=${WRKSRC}/include/CGAL DST=${PREFIX}/include/CGAL
+ @${INVOKE} cgal-install SRC=${WRKSRC}/examples DST=${EXAMPLESDIR}
+.if !defined(NOPORTDOCS)
+ @${INVOKE} cgal-install SRC=${WRKDIR}/doc_html/cgal_manual DST=${DOCSDIR}
+.endif
+
+cgal-plist:
+ @cd ${WRKSRC}/${SRC} && \
+ ${FIND} * -type f | ${SORT} \
+ | ${SED} -e 's|^|${DST}/|' >> ${PLIST} && \
+ ${FIND} * -type d | ${SORT} -r \
+ | ${SED} -e 's|^|@dirrm ${DST}/|' >> ${PLIST}
+ @${ECHO_CMD} '@dirrm ${DST}' >> ${PLIST}
+
+cgal-install:
+ cd ${SRC} && \
+ ${FIND} * -type d -exec ${MKDIR} "${DST}/{}" \; && \
+ ${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DST}/{}" \;
+
+.include <bsd.port.post.mk>
diff --git a/math/cgal/distinfo b/math/cgal/distinfo
new file mode 100644
index 000000000000..f60301e5e4e2
--- /dev/null
+++ b/math/cgal/distinfo
@@ -0,0 +1,6 @@
+MD5 (CGAL-3.1.tar.gz) = b37fb174c18f7beab197a470554007d0
+SHA256 (CGAL-3.1.tar.gz) = 4e516b12fe870fffa734925e42eb82d33b70628026f04bc15cd42212a9551f95
+SIZE (CGAL-3.1.tar.gz) = 9177453
+MD5 (CGAL-3.1-doc_html.tar.gz) = 286b32a674576a791b7c30d23244c4cb
+SHA256 (CGAL-3.1-doc_html.tar.gz) = dd1d592fc48e80f10f1fa8c7b89a011188e602193e0db8c60187ab25ede7648d
+SIZE (CGAL-3.1-doc_html.tar.gz) = 3185328
diff --git a/math/cgal/files/patch-include_CGAL_number__type__basic.h b/math/cgal/files/patch-include_CGAL_number__type__basic.h
new file mode 100644
index 000000000000..31890823dcca
--- /dev/null
+++ b/math/cgal/files/patch-include_CGAL_number__type__basic.h
@@ -0,0 +1,12 @@
+--- include/CGAL/number_type_basic.h.orig Mon Apr 10 07:51:20 2006
++++ include/CGAL/number_type_basic.h Mon Apr 10 07:51:36 2006
+@@ -404,7 +404,9 @@
+ // Integer and Double from _QP_solver
+
+ CGAL_END_NAMESPACE
++#ifdef CGAL_USE_GMP
+ #include <CGAL/_QP_solver/Double.h>
++#endif
+ CGAL_BEGIN_NAMESPACE
+
+
diff --git a/math/cgal/files/patch-install__cgal b/math/cgal/files/patch-install__cgal
new file mode 100644
index 000000000000..57359c7a460a
--- /dev/null
+++ b/math/cgal/files/patch-install__cgal
@@ -0,0 +1,45 @@
+--- install_cgal.orig Mon Dec 20 18:06:41 2004
++++ install_cgal Mon Apr 10 10:36:58 2006
+@@ -1011,7 +1011,7 @@
+ ;;
+ *)
+ #### settings for unknown compiler
+- CGAL_SHARED_LIB_CREATE="`compiler_bin` -G"
++ CGAL_SHARED_LIB_CREATE="`compiler_bin` -shared"
+ ;;
+ esac
+ # Remove *.moc files too, on all platforms
+@@ -1339,6 +1339,8 @@
+ cleanup_after_compile
+ cleanup_after_link_run
+ done
++ sed -e "s|CGAL/compiler_config\.h|CGAL/config/${CGAL_OS_COMPILER}/&|" ${CGAL_INCL_DIR}/CGAL/config.h > ${CGAL_INCL_DIR}/CGAL/config.h.tmp
++ mv -f ${CGAL_INCL_DIR}/CGAL/config.h.tmp ${CGAL_INCL_DIR}/CGAL/config.h
+ cd ${CGAL_DIR}
+ CONFIG_TEST_PASSED='y'
+ }
+@@ -5675,7 +5677,7 @@
+ # CGAL_LIB_CXXFLAGS
+ #
+ ${_printf} "%s\\\\\n" "CGAL_LIB_CXXFLAGS = " >> ${FILE}
+- makefile_print_line "${CGAL_LIB_CXXFLAGS} -O2" >> ${FILE}
++ makefile_print_line "${CGAL_LIB_CXXFLAGS}" >> ${FILE}
+ ${_printf} "\t%s\n" "\$(CGAL_CXXFLAGS)" >> ${FILE}
+
+ #
+@@ -5693,13 +5695,13 @@
+ #
+ # CGAL_SHARED_LIB
+ #
+- ${_printf} "%s\n" "CGAL_SHARED_LIB = libCGAL${SHARED_LIB_EXT}" >> ${FILE}
++ ${_printf} "%s\n" "CGAL_SHARED_LIB = libCGAL${SHARED_LIB_EXT}.${SHLIB_VERSION}" >> ${FILE}
+
+ #
+ # CGAL_SHARED_LIB_CXXFLAGS
+ #
+ ${_printf} "%s\\\\\n" "CGAL_SHARED_LIB_CXXFLAGS = " >> ${FILE}
+- makefile_print_line "${CGAL_SHARED_LIB_CXXFLAGS} -O2" >> ${FILE}
++ makefile_print_line "${CGAL_SHARED_LIB_CXXFLAGS}" >> ${FILE}
+ ${_printf} "\t%s\n" "\$(CGAL_CXXFLAGS)" >> ${FILE}
+
+ #
diff --git a/math/cgal/files/patch-src_makefile__lib b/math/cgal/files/patch-src_makefile__lib
new file mode 100644
index 000000000000..559c124a2cc0
--- /dev/null
+++ b/math/cgal/files/patch-src_makefile__lib
@@ -0,0 +1,10 @@
+--- src/makefile_lib.orig Mon Apr 10 07:54:15 2006
++++ src/makefile_lib Mon Apr 10 07:54:20 2006
+@@ -51,7 +51,6 @@
+ #---------------------------------------------------------------------#
+
+ lib: lib_no_install
+- mv $(CGAL_LIB) $(CGAL_LIB_DESTINATION)
+
+ lib_no_install: $(CGAL_OBJECTS) $(CGAL_EXTRA_OBJECTS)
+ $(CGAL_LIB_CREATE)$(CGAL_LIB) \
diff --git a/math/cgal/files/patch-src_makefile__sharedlib b/math/cgal/files/patch-src_makefile__sharedlib
new file mode 100644
index 000000000000..dd131d547f40
--- /dev/null
+++ b/math/cgal/files/patch-src_makefile__sharedlib
@@ -0,0 +1,10 @@
+--- src/makefile_sharedlib.orig Mon Apr 10 07:54:27 2006
++++ src/makefile_sharedlib Mon Apr 10 07:54:42 2006
+@@ -54,7 +54,6 @@
+ $(CGAL_SHARED_LIB_CREATE)$(CGAL_SHARED_LIB) \
+ `ls *$(OBJ_EXT) | awk '{for (i=1; i<=NF;++i){printf "$(CGAL_OBJ_PREFIX)";print $$i}}'`\
+ $(CGAL_SHARED_LIB_LDFLAGS)
+- mv $(CGAL_SHARED_LIB) '$(CGAL_LIB_DESTINATION)'
+ rm $(CGAL_OBJECTS) $(CGAL_EXTRA_OBJECTS)
+
+
diff --git a/math/cgal/pkg-descr b/math/cgal/pkg-descr
new file mode 100644
index 000000000000..4a0060d13ed1
--- /dev/null
+++ b/math/cgal/pkg-descr
@@ -0,0 +1,22 @@
+CGAL is a collaborative effort of several sites in Europe and Israel. The goal
+is to make the most important of the solutions and methods developed in
+computational geometry available to users in industry and academia in a C++
+library. The goal is to provide easy access to useful, reliable geometric
+algorithms.
+
+The CGAL library contains:
+
+ * the Kernel with geometric primitives such as points, vectors, lines,
+ predicates for testing things such as relative positions of points, and
+ operations such as intersections and distance calculation.
+ * the Basic Library which is a collection of standard data structures and
+ geometric algorithms, such as convex hull in 2D/3D, (Delaunay)
+ triangulation in 2D/3D, planar map, polyhedron, smallest enclosing
+ circle, and multidimensional query structures.
+ * the Support Library which offers interfaces to other packages, e.g., for
+ visualisation, and I/O, and other support facilities.
+
+WWW: http://www.cgal.org/
+
+- Jean-Yves Lefort
+jylefort@FreeBSD.org