aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2017-02-02 17:01:24 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2017-02-02 17:01:24 +0800
commit28e5a0e365028d58a02cea589c9d0978612f6ca0 (patch)
tree63356db61b8220f488e8c798e6022898caa62752
parent5a9ce9ebdb58a7c4d63b2ba34bbb569fe71cfeca (diff)
downloadfreebsd-ports-gnome-28e5a0e365028d58a02cea589c9d0978612f6ca0.tar.gz
freebsd-ports-gnome-28e5a0e365028d58a02cea589c9d0978612f6ca0.tar.zst
freebsd-ports-gnome-28e5a0e365028d58a02cea589c9d0978612f6ca0.zip
- Add LICENSE
- Switch to options helpers
-rw-r--r--math/goblin/Makefile47
1 files changed, 25 insertions, 22 deletions
diff --git a/math/goblin/Makefile b/math/goblin/Makefile
index 8abac03569e4..c4e506eaf4e4 100644
--- a/math/goblin/Makefile
+++ b/math/goblin/Makefile
@@ -11,9 +11,11 @@ DISTNAME= ${PORTNAME}.${DISTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Graph Object Library for Network Programming Problems
-CONFLICTS= glpk-*
+LICENSE= LGPL21 GPLv2+ # GPLv2 for (optional) bundled glpk
+LICENSE_COMB= multi
+LICENSE_FILE_LGPL21= ${WRKSRC}/tcl/LGPL
-OPTIONS_DEFINE= DOCS EXAMPLES
+CONFLICTS= glpk-[0-9]*
USES= gmake tk tar:tgz
USE_LDCONFIG= yes
@@ -24,25 +26,26 @@ MAKE_ARGS= CC="${CC}" CCFLAGS="${CFLAGS}" \
prefix=${PREFIX}
ALL_TARGET= all shared
MAKE_JOBS_UNSAFE= yes
-PORTDOCS= *
-PORTEXAMPLES= *
CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VER} -I${LOCALBASE}/include/ \
-I${LOCALBASE}/include/tk${TK_VER} -fPIC
CXXFLAGS+= -fPIC
LIBS+= -L${LOCALBASE}/lib -ltcl${TCL_SHLIB_VER} -ltk${TK_SHLIB_VER} -lm -pthread
-.include <bsd.port.options.mk>
+PORTDOCS= *
+PORTEXAMPLES= *
+
+OPTIONS_DEFINE= DOCS EXAMPLES
post-patch:
- ${REINPLACE_CMD} -e 's|/usr/bin/wish|${WISH}|g' ${WRKSRC}/display
- ${REINPLACE_CMD} -e \
- 's|%%WISH%%|${WISH}|g; \
- s|%%PREFIX%%|${PREFIX}|g' \
- ${WRKSRC}/Makefile.conf
- ${REINPLACE_CMD} -e 's|\./gosh|${PREFIX}/bin/gosh|; \
- s|\[pwd\] tcl|${PREFIX}/lib/goblin|g' \
- ${WRKSRC}/goblet
+ @${REINPLACE_CMD} -e 's|/usr/bin/wish|${WISH}|g' ${WRKSRC}/display
+ @${REINPLACE_CMD} -e \
+ 's|%%WISH%%|${WISH}|g; \
+ s|%%PREFIX%%|${PREFIX}|g' \
+ ${WRKSRC}/Makefile.conf
+ @${REINPLACE_CMD} -e 's|\./gosh|${PREFIX}/bin/gosh|; \
+ s|\[pwd\] tcl|${PREFIX}/lib/goblin|g' \
+ ${WRKSRC}/goblet
@${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
's|malloc\.h|stdlib.h|g'
@@ -51,22 +54,22 @@ do-install:
${INSTALL_SCRIPT} ${WRKSRC}/bin/goblet ${STAGEDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/display ${STAGEDIR}${PREFIX}/bin/goblin-display
@${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}
- (cd ${WRKSRC}/include && ${COPYTREE_SHARE} \*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME})
+ (cd ${WRKSRC}/include && ${INSTALL_DATA} *.h ${STAGEDIR}${PREFIX}/include/${PORTNAME})
${INSTALL} -d ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
- (cd ${WRKSRC}/tcl && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/lib/${PORTNAME})
+ (cd ${WRKSRC}/tcl && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/lib/${PORTNAME})
${INSTALL_DATA} ${WRKSRC}/lib/libgoblin.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_LIB} ${WRKSRC}/libgoblin.so ${STAGEDIR}${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/lib/libglpk.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_LIB} ${WRKSRC}/libglpk.so ${STAGEDIR}${PREFIX}/lib
-.if ${PORT_OPTIONS:MDOCS}
+
+do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}/html
- (cd ${WRKSRC}/html && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}/html)
- (cd ${WRKSRC}/doku && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR})
-.endif
-.if ${PORT_OPTIONS:MEXAMPLES}
+ (cd ${WRKSRC}/html && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/html)
+ (cd ${WRKSRC}/doku && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
+
+do-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- (cd ${WRKSRC}/samples && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR})
-.endif
+ (cd ${WRKSRC}/samples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
.include <bsd.port.mk>