From efcaad3f6666f4954dfda367669e049d408ae1cc Mon Sep 17 00:00:00 2001 From: ler Date: Thu, 23 Mar 2017 01:27:34 +0000 Subject: fix finding of the zlib sources. PR: 216212 Submitted by: mdmi3 Approved by: fernando.apesteguia@gmail.com, phk, adamw (mentor) Differential Revision: https://reviews.freebsd.org/D10110 --- graphics/opennurbs/Makefile | 60 ++++++++-------------- graphics/opennurbs/files/patch-opennurbs__system.h | 2 +- graphics/opennurbs/pkg-plist | 29 ++++------- 3 files changed, 32 insertions(+), 59 deletions(-) (limited to 'graphics') diff --git a/graphics/opennurbs/Makefile b/graphics/opennurbs/Makefile index cd2e1f743b66..215ee63a0467 100644 --- a/graphics/opennurbs/Makefile +++ b/graphics/opennurbs/Makefile @@ -17,13 +17,18 @@ USES= iconv:build dos2unix gmake zip 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 @@ 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 - ${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 diff --git a/graphics/opennurbs/files/patch-opennurbs__system.h b/graphics/opennurbs/files/patch-opennurbs__system.h index cdd74a4ff801..9202b8e1c73e 100644 --- a/graphics/opennurbs/files/patch-opennurbs__system.h +++ b/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 @@ diff --git a/graphics/opennurbs/pkg-plist b/graphics/opennurbs/pkg-plist index 7f1f0fb3dc04..4da695bad35d 100644 --- a/graphics/opennurbs/pkg-plist +++ b/graphics/opennurbs/pkg-plist @@ -116,24 +116,17 @@ include/openNURBS/zlib/zconf.h 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 -- cgit