From owner-svn-ports-head@freebsd.org Thu Feb 9 22:51:01 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7029CD8461; Thu, 9 Feb 2017 22:51:01 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 880C71220; Thu, 9 Feb 2017 22:51:01 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v19Mp0kH007095; Thu, 9 Feb 2017 22:51:00 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v19Mp0ZL007094; Thu, 9 Feb 2017 22:51:00 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201702092251.v19Mp0ZL007094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Thu, 9 Feb 2017 22:51:00 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r433775 - head/lang/gprolog X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2017 22:51:01 -0000 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 - -.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