math/triangle: Add -DTRILIBRARY for the shared library build, otherwise some symbols aren't defined; Add shared library stripping

This commit is contained in:
Yuri Victorovich 2018-08-05 05:10:50 +00:00
parent 49d85b6eb7
commit 010edb9819
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=476389

View File

@ -3,7 +3,7 @@
PORTNAME= triangle
PORTVERSION= 1.6
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= math
MASTER_SITES= NL/voronoi
DISTNAME= ${PORTNAME}
@ -26,13 +26,14 @@ PLIST_FILES= bin/${PORTNAME} bin/showme \
lib/lib${PORTNAME}.so.${PORTVERSION}
post-build:
@cd ${WRKSRC} && ${CC} ${CFLAGS} ${LDFLAGS} -shared -fPIC -Wl,-soname,lib${PORTNAME}.so.${PORTVERSION} -o lib${PORTNAME}.so.${PORTVERSION} ${PORTNAME}.c
@cd ${WRKSRC} && ${CC} ${CFLAGS} ${LDFLAGS} -DTRILIBRARY -shared -fPIC -Wl,-soname,lib${PORTNAME}.so.${PORTVERSION} -o lib${PORTNAME}.so.${PORTVERSION} ${PORTNAME}.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${WRKSRC}/showme ${STAGEDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.h ${STAGEDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/lib${PORTNAME}.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib
cd ${STAGEDIR}${PREFIX}/lib && ${LN} -s lib${PORTNAME}.so.${PORTVERSION} lib${PORTNAME}.so
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so.${PORTVERSION}
do-test: build
@cd ${INSTALL_WRKSRC} && ./${PORTNAME} -p A.poly && ./showme A.1.poly