Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Aug 2014 17:28:32 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r365980 - head/graphics/opennurbs
Message-ID:  <201408241728.s7OHSWUW027609@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Sun Aug 24 17:28:31 2014
New Revision: 365980
URL: http://svnweb.freebsd.org/changeset/ports/365980
QAT: https://qat.redports.org/buildarchive/r365980/

Log:
  graphics/opennurbs: Add license and examples (revbump)
  
  PR:		192751
  Submitted by:	maintainer (Fernando Apesteguia)

Modified:
  head/graphics/opennurbs/Makefile
  head/graphics/opennurbs/pkg-plist

Modified: head/graphics/opennurbs/Makefile
==============================================================================
--- head/graphics/opennurbs/Makefile	Sun Aug 24 17:26:29 2014	(r365979)
+++ head/graphics/opennurbs/Makefile	Sun Aug 24 17:28:31 2014	(r365980)
@@ -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 -
 .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>

Modified: head/graphics/opennurbs/pkg-plist
==============================================================================
--- head/graphics/opennurbs/pkg-plist	Sun Aug 24 17:26:29 2014	(r365979)
+++ head/graphics/opennurbs/pkg-plist	Sun Aug 24 17:28:31 2014	(r365980)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408241728.s7OHSWUW027609>