Date: Thu, 9 Feb 2017 22:51:00 +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: r433775 - head/lang/gprolog Message-ID: <201702092251.v19Mp0ZL007094@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marino Date: Thu Feb 9 22:51:00 2017 New Revision: 433775 URL: https://svnweb.freebsd.org/changeset/ports/433775 Log: lang/gprolog: Clean up port (fix build with non-default options) The no-docs and no-examples options weren't correct. The configuration value in those causes were no absolute paths as apparently expected, but relative to STAGEDIR. Fix by letting them install and use post-install option targets to remove if necessary. Do other cleanup such as wrap to 80 (when possible) and use options framework. Also remove option-dependent packagename; that isn't conventional. Also make configure target generic by platform. Modified: head/lang/gprolog/Makefile Modified: head/lang/gprolog/Makefile ============================================================================== --- head/lang/gprolog/Makefile Thu Feb 9 21:49:33 2017 (r433774) +++ head/lang/gprolog/Makefile Thu Feb 9 22:51:00 2017 (r433775) @@ -3,7 +3,7 @@ PORTNAME= gprolog PORTVERSION= 1.4.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= lang MASTER_SITES= http://www.gprolog.org/ @@ -19,44 +19,36 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVER USES= gmake USE_GCC= any USE_AUTOTOOLS= autoconf +PORTDOCS= * +PORTEXAMPLES= * CFLAGS+= -O3 # gcc5/gcc6 + -O2 = pl2wam hangs -CONFIGURE_ARGS= --with-c-flags="${CFLAGS}" -CONFIGURE_TARGET= ${ARCH:S/amd64/x86_64/}-portbld-freebsd${OSREL} +PLIST_SUB= GPROLOG_VER=${PORTVERSION} +CONFIGURE_ARGS= --with-c-flags="${CFLAGS}" \ + --with-doc-dir="${DOCSDIR}" \ + --with-examples-dir="${EXAMPLESDIR}" +CONFIGURE_TARGET= ${ARCH:S/amd64/x86_64/}-portbld-${OPSYS:tl}${OSREL} MAKE_JOBS_UNSAFE= yes -PLIST_SUB+= GPROLOG_VER=${PORTVERSION} +OPTIONS_DEFINE= FD DOCS EXAMPLES +OPTIONS_DEFAULT= FD +OPTIONS_SUB= yes -OPTIONS_DEFINE= FD DOCS EXAMPLES -OPTIONS_DEFAULT=FD -FD_DESC= Enable finite domain constraint solver +FD_DESC= Enable finite domain constraint solver +FD_CONFIGURE_OFF= --disable-fd-solver -.include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MDOCS} -PORTDOCS= * -CONFIGURE_ARGS+=--with-doc-dir="${DOCSDIR}" -.else -CONFIGURE_ARGS+=--with-doc-dir="${WRKDIR}/docs" -.endif +post-configure: + ${REINPLACE_CMD} \ + -E 's|^(INSTALL_PROGRAM *= *install +-s +-m) 555|\1 755|g' \ + ${WRKSRC}/Makefile + ${REINPLACE_CMD} -E 's|^(INSTALL_DATA *= *install +-m) 444|\1 644|g' \ + ${WRKSRC}/Makefile + ${REINPLACE_CMD} 's|$$(LN_S) $$(INSTALL_DIR)/bin|$$(LN_S) ../${PORTNAME}-${PORTVERSION}/bin|g' \ + ${WRKSRC}/Makefile -.if ${PORT_OPTIONS:MEXAMPLES} -PORTEXAMPLES= * -CONFIGURE_ARGS+=--with-examples-dir="${EXAMPLESDIR}" -.else -CONFIGURE_ARGS+=--with-examples-dir="${WRKDIR}/examples" -.endif - -.if empty(PORT_OPTIONS:MFD) -CONFIGURE_ARGS+=--disable-fd-solver -PLIST_SUB+= FD="@comment " -PKGNAMESUFFIX= -nofd -.else -PLIST_SUB+= FD="" -.endif +post-install-EXAMPLES-off: + ${RM} -r ${STAGEDIR}${EXAMPLESDIR} -post-configure: - ${REINPLACE_CMD} -E 's|^(INSTALL_PROGRAM *= *install +-s +-m) 555|\1 755|g' ${WRKSRC}/Makefile - ${REINPLACE_CMD} -E 's|^(INSTALL_DATA *= *install +-m) 444|\1 644|g' ${WRKSRC}/Makefile - ${REINPLACE_CMD} 's|$$(LN_S) $$(INSTALL_DIR)/bin|$$(LN_S) ../${PORTNAME}-${PORTVERSION}/bin|g' ${WRKSRC}/Makefile +post-install-DOCS-off: + ${RM} -r ${STAGEDIR}${DOCSDIR} .include <bsd.port.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702092251.v19Mp0ZL007094>