aboutsummaryrefslogtreecommitdiff
path: root/graphics/opennurbs
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-08-24 17:28:31 +0000
committerJohn Marino <marino@FreeBSD.org>2014-08-24 17:28:31 +0000
commit942eb4c3b67db9bc772747836e75a46569d2bb91 (patch)
treed27a0d2987cd75770bee71d971c75899a677c588 /graphics/opennurbs
parent125b8337e196f81ca74c08524f95a44f452d1998 (diff)
downloadports-942eb4c3b67db9bc772747836e75a46569d2bb91.tar.gz
ports-942eb4c3b67db9bc772747836e75a46569d2bb91.zip
Notes
Diffstat (limited to 'graphics/opennurbs')
-rw-r--r--graphics/opennurbs/Makefile56
-rw-r--r--graphics/opennurbs/pkg-plist22
2 files changed, 67 insertions, 11 deletions
diff --git a/graphics/opennurbs/Makefile b/graphics/opennurbs/Makefile
index 2c268a51b4d6..a436b6d04d6c 100644
--- a/graphics/opennurbs/Makefile
+++ b/graphics/opennurbs/Makefile
@@ -3,20 +3,23 @@
PORTNAME= opennurbs
PORTVERSION= 20121024
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics
MASTER_SITES= http://files.na.mcneel.com/opennurbs/5.0/2012-10-24/
-MASTER_SITE_SUBDIR=${PORTNAME}_${PORTVERSION}
+MASTER_SITE_SUBDIR= ${PORTNAME}_${PORTVERSION}
DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= fernando.apesteguia@gmail.com
COMMENT= Tools to accurately transfer 3-D geometry between applications
+LICENSE_FILE= ${WRKSRC}/readme.txt
+
USES= iconv:build dos2unix gmake zip
MAKE_ARGS= CC="${CC}" CCC="${CXX}"
MAKEFILE= makefile
-EXAMPLESDIR= ${STAGEDIR}${PREFIX}/libexec/openNURBS
+BINEXAMPLESDIR= ${PREFIX}/libexec/openNURBS
+MKFILE= ${EXAMPLESDIR}/bsd.openNURBS.mk
.include <bsd.port.pre.mk>
@@ -25,17 +28,48 @@ MAKE_ARGS+= ON_GNU_OPTIMIZER_FLAGS="-g -fPIC"
.endif
pre-build:
- ${ICONV_CMD} -c -f utf-8 -t ascii ${WRKSRC}/opennurbs_version.h > ${WRKSRC}/opennurbs_version.h.tmp || ${TRUE}
- @${MV} ${WRKSRC}/opennurbs_version.h.tmp ${WRKSRC}/opennurbs_version.h
+ ${ICONV_CMD} -c -f utf-8 -t ascii ${WRKSRC}/opennurbs_version.h \
+ > ${WRKSRC}/opennurbs_version.h.tmp || ${TRUE}
+ ${MV} ${WRKSRC}/opennurbs_version.h.tmp ${WRKSRC}/opennurbs_version.h
do-install:
- @${INSTALL_DATA} ${WRKSRC}/libopenNURBS.a ${STAGEDIR}${PREFIX}/lib
- @${MKDIR} ${EXAMPLESDIR}
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} \
+ ${STAGEDIR}${BINEXAMPLESDIR} \
+ ${STAGEDIR}${PREFIX}/include/openNURBS/zlib
+ ${INSTALL_DATA} ${WRKSRC}/libopenNURBS.a ${STAGEDIR}${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/examples_linking_pragmas.h \
+ ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/opennurbs.h ${STAGEDIR}${EXAMPLESDIR}
+ ${PRINTF} "CFLAGS+=-I${PREFIX}/include/openNURBS -I$$\{.CURDIR\}\n" \
+ > ${STAGEDIR}${MKFILE}
+ @echo "LDADD+=-L${PREFIX}/lib -lm -lopenNURBS" >> ${STAGEDIR}${MKFILE}
+ ${PRINTF} ".PATH: $$\{.CURDIR\}/../example_userdata\n" \
+ >> ${STAGEDIR}${MKFILE}
+ echo "NO_MAN=YES" >> ${STAGEDIR}${MKFILE}
+ echo ".include <bsd.prog.mk>" >> ${STAGEDIR}${MKFILE}
+ ${PRINTF} "SUBDIR =" > ${STAGEDIR}${EXAMPLESDIR}/Makefile
.for i in brep read roundtrip userdata write
- @${INSTALL_PROGRAM} ${WRKSRC}/example_${i}/example_${i} ${EXAMPLESDIR}
+ ${PRINTF} " example_${i}" >> ${STAGEDIR}${EXAMPLESDIR}/Makefile
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/example_${i}
+ ${INSTALL_DATA} ${WRKSRC}/example_${i}/example_${i}.cpp \
+ ${STAGEDIR}${EXAMPLESDIR}/example_${i}/example_${i}.cc
+ echo "PROG_CXX=example_${i}" \
+ > ${STAGEDIR}${EXAMPLESDIR}/example_${i}/Makefile
+ echo "SRCS=example_${i}.cc example_ud.cc" \
+ >> ${STAGEDIR}${EXAMPLESDIR}/example_${i}/Makefile
+ echo ".include \"../bsd.openNURBS.mk\"" \
+ >> ${STAGEDIR}${EXAMPLESDIR}/example_${i}/Makefile
+ ${INSTALL_PROGRAM} ${WRKSRC}/example_${i}/example_${i} \
+ ${STAGEDIR}${BINEXAMPLESDIR}
.endfor
- @${MKDIR} ${STAGEDIR}${PREFIX}/include/openNURBS/zlib
- @${INSTALL_DATA} ${WRKSRC}/*.h ${STAGEDIR}${PREFIX}/include/openNURBS/
- @${INSTALL_DATA} ${WRKSRC}/zlib/*.h ${STAGEDIR}${PREFIX}/include/openNURBS/zlib
+ ${INSTALL_DATA} ${WRKSRC}/example_userdata/example_ud.cpp \
+ ${STAGEDIR}${EXAMPLESDIR}/example_userdata/example_ud.cc
+ ${INSTALL_DATA} ${WRKSRC}/example_userdata/example_ud.h \
+ ${STAGEDIR}${EXAMPLESDIR}/example_userdata/example_ud.h
+ ${PRINTF} "\n.include <bsd.subdir.mk>\n" \
+ >> ${STAGEDIR}${EXAMPLESDIR}/Makefile
+ ${INSTALL_DATA} ${WRKSRC}/*.h ${STAGEDIR}${PREFIX}/include/openNURBS/
+ ${INSTALL_DATA} ${WRKSRC}/zlib/*.h \
+ ${STAGEDIR}${PREFIX}/include/openNURBS/zlib
.include <bsd.port.post.mk>
diff --git a/graphics/opennurbs/pkg-plist b/graphics/opennurbs/pkg-plist
index 26e1d951cafd..8f54dc9cee4c 100644
--- a/graphics/opennurbs/pkg-plist
+++ b/graphics/opennurbs/pkg-plist
@@ -118,6 +118,28 @@ libexec/openNURBS/example_read
libexec/openNURBS/example_roundtrip
libexec/openNURBS/example_userdata
libexec/openNURBS/example_write
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bsd.openNURBS.mk
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/examples_linking_pragmas.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/opennurbs.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_brep/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_brep/example_brep.cc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_read/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_read/example_read.cc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_roundtrip/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_roundtrip/example_roundtrip.cc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_userdata/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_userdata/example_userdata.cc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_userdata/example_ud.cc
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_userdata/example_ud.h
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_write/Makefile
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_write/example_write.cc
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/example_write
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/example_userdata
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/example_roundtrip
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/example_read
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/example_brep
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
@dirrm libexec/openNURBS
@dirrm include/openNURBS/zlib
@dirrm include/openNURBS