Index: head/graphics/opennurbs/Makefile =================================================================== --- head/graphics/opennurbs/Makefile +++ head/graphics/opennurbs/Makefile @@ -17,13 +17,18 @@ MAKE_ARGS= CC="${CC}" CCC="${CXX}" MAKEFILE= makefile -BINEXAMPLESDIR= ${PREFIX}/libexec/openNURBS -MKFILE= ${EXAMPLESDIR}/bsd.openNURBS.mk + +OPTIONS_DEFINE= EXAMPLES .include -.if !exists(${SRC_BASE}/lib/libz) -IGNORE= needs SRC_BASE to compile. Install base system sources and try again +# In r311275 zlib.h was moved to contrib/zlib/zlib.h from lib/libz/zlib.h +LIBZ= ${SRC_BASE}/contrib/zlib +.if !exists(${LIBZ}/zlib.h) +LIBZ:= ${SRC_BASE}/lib/libz +. if !exists(${LIBZ}/zlib.h) +IGNORE= needs SRC_BASE to compile. Install base system sources and try again +. endif .endif .if ${ARCH} != i386 @@ -31,50 +36,25 @@ .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 - ${MV} ${WRKSRC}/zlib ${WRKSRC}/zlib_ - ${CP} -R ${SRC_BASE}/lib/libz ${WRKSRC}/zlib + @${RM} -r ${WRKSRC}/zlib + ${CP} -R ${LIBZ} ${WRKSRC}/zlib do-install: - @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} \ - ${STAGEDIR}${BINEXAMPLESDIR} \ - ${STAGEDIR}${PREFIX}/include/openNURBS/zlib + @${MKDIR} ${STAGEDIR}${PREFIX}/include/openNURBS/zlib ${INSTALL_DATA} ${WRKSRC}/libopenNURBS.a ${STAGEDIR}${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/*.h ${STAGEDIR}${PREFIX}/include/openNURBS + ${INSTALL_DATA} ${WRKSRC}/zlib/*.h \ + ${STAGEDIR}${PREFIX}/include/openNURBS/zlib + +do-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${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 " >> ${STAGEDIR}${MKFILE} - ${PRINTF} "SUBDIR =" > ${STAGEDIR}${EXAMPLESDIR}/Makefile .for i in brep read roundtrip userdata write - ${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} + ${INSTALL_PROGRAM} ${WRKSRC}/example_${i}/example_${i} ${STAGEDIR}${EXAMPLESDIR}/example_${i} + cd ${WRKSRC}/example_${i} && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/example_${i} "-name *\.cpp -or -name *\.h" .endfor - ${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 \n" \ - >> ${STAGEDIR}${EXAMPLESDIR}/Makefile - ${INSTALL_DATA} ${WRKSRC}/*.h ${STAGEDIR}${PREFIX}/include/openNURBS/ - ${INSTALL_DATA} ${WRKSRC}/zlib/*.h \ - ${STAGEDIR}${PREFIX}/include/openNURBS/zlib .include Index: head/graphics/opennurbs/files/patch-opennurbs__system.h =================================================================== --- head/graphics/opennurbs/files/patch-opennurbs__system.h +++ head/graphics/opennurbs/files/patch-opennurbs__system.h @@ -1,4 +1,4 @@ ---- opennurbs_system.h.orig 2015-08-14 13:19:05 UTC +--- opennurbs_system.h.orig 2017-02-11 10:13:51 UTC +++ opennurbs_system.h @@ -219,11 +219,7 @@ Index: head/graphics/opennurbs/pkg-plist =================================================================== --- head/graphics/opennurbs/pkg-plist +++ head/graphics/opennurbs/pkg-plist @@ -116,24 +116,17 @@ include/openNURBS/zlib/zlib.h include/openNURBS/zlib/zutil.h lib/libopenNURBS.a -libexec/openNURBS/example_brep -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%%/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_ud.cc +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_brep/example_brep +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_brep/example_brep.cpp +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_read/example_read +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_read/example_read.cpp +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_roundtrip/example_roundtrip +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_roundtrip/example_roundtrip.cpp +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_userdata/example_ud.cpp %%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_userdata/example_ud.h -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_userdata/example_userdata.cc -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_write/Makefile -%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_write/example_write.cc +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_userdata/example_userdata +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_userdata/example_userdata.cpp +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_write/example_write +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_write/example_write.cpp %%PORTEXAMPLES%%%%EXAMPLESDIR%%/examples_linking_pragmas.h %%PORTEXAMPLES%%%%EXAMPLESDIR%%/opennurbs.h