2012-10-28 22:40:09 +01:00
|
|
|
# Created by: Fernando Apesteguia <fernando.apesteguia@gmail.com>
|
2012-02-18 15:03:47 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= opennurbs
|
2012-11-06 23:07:17 +01:00
|
|
|
PORTVERSION= 20121024
|
2015-02-06 21:14:06 +01:00
|
|
|
PORTREVISION= 3
|
2012-02-18 15:03:47 +01:00
|
|
|
CATEGORIES= graphics
|
2012-11-06 23:07:17 +01:00
|
|
|
MASTER_SITES= http://files.na.mcneel.com/opennurbs/5.0/2012-10-24/
|
2014-08-24 19:28:31 +02:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}_${PORTVERSION}
|
2012-02-18 15:03:47 +01:00
|
|
|
DISTNAME= ${PORTNAME}_${PORTVERSION}
|
|
|
|
|
|
|
|
MAINTAINER= fernando.apesteguia@gmail.com
|
|
|
|
COMMENT= Tools to accurately transfer 3-D geometry between applications
|
|
|
|
|
2014-08-24 19:28:31 +02:00
|
|
|
LICENSE_FILE= ${WRKSRC}/readme.txt
|
|
|
|
|
2014-03-10 15:49:26 +01:00
|
|
|
USES= iconv:build dos2unix gmake zip
|
2014-05-20 21:32:39 +02:00
|
|
|
MAKE_ARGS= CC="${CC}" CCC="${CXX}"
|
2012-02-18 15:03:47 +01:00
|
|
|
|
|
|
|
MAKEFILE= makefile
|
2014-08-24 19:28:31 +02:00
|
|
|
BINEXAMPLESDIR= ${PREFIX}/libexec/openNURBS
|
|
|
|
MKFILE= ${EXAMPLESDIR}/bsd.openNURBS.mk
|
2012-02-18 15:03:47 +01:00
|
|
|
|
2013-09-11 15:14:22 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2015-02-07 18:19:53 +01:00
|
|
|
.if !exists(${SRC_BASE}/lib/libz)
|
2015-02-07 18:09:45 +01:00
|
|
|
IGNORE= needs SRC_BASE to compile. Install base system sources and try again
|
|
|
|
.endif
|
|
|
|
|
2013-09-11 15:14:22 +02:00
|
|
|
.if ${ARCH} != i386
|
|
|
|
MAKE_ARGS+= ON_GNU_OPTIMIZER_FLAGS="-g -fPIC"
|
|
|
|
.endif
|
|
|
|
|
2012-02-18 15:03:47 +01:00
|
|
|
pre-build:
|
2014-08-24 19:28:31 +02:00
|
|
|
${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
|
2015-02-06 21:14:06 +01:00
|
|
|
${MV} ${WRKSRC}/zlib ${WRKSRC}/zlib_
|
2015-02-07 18:09:45 +01:00
|
|
|
${CP} -R ${SRC_BASE}/lib/libz ${WRKSRC}/zlib
|
2012-02-18 15:03:47 +01:00
|
|
|
|
|
|
|
do-install:
|
2014-08-24 19:28:31 +02:00
|
|
|
@${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
|
2012-10-28 22:40:09 +01:00
|
|
|
.for i in brep read roundtrip userdata write
|
2014-08-24 19:28:31 +02:00
|
|
|
${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}
|
2012-02-18 15:03:47 +01:00
|
|
|
.endfor
|
2014-08-24 19:28:31 +02:00
|
|
|
${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
|
2015-02-06 21:14:06 +01:00
|
|
|
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 900000
|
|
|
|
${TOUCH} ${STAGEDIR}${PREFIX}/include/openNURBS/zlib/gzguts.h
|
|
|
|
.endif
|
2012-02-18 15:03:47 +01:00
|
|
|
|
2013-09-11 15:14:22 +02:00
|
|
|
.include <bsd.port.post.mk>
|