Date: Mon, 27 Jan 2014 07:29:33 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r341332 - in head/Mk: . Uses Message-ID: <201401270729.s0R7TXQs076735@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Mon Jan 27 07:29:32 2014 New Revision: 341332 URL: http://svnweb.freebsd.org/changeset/ports/341332 QAT: https://qat.redports.org/buildarchive/r341332/ Log: Add USES=desthack This allow to pass DESTDIR through configure --prefix to ports that are not destdir aware Obtained from: OpenBSD ports tree (discussed in Malta with Marc Espie) Added: head/Mk/Uses/desthack.mk (contents, props changed) Modified: head/Mk/bsd.port.mk Added: head/Mk/Uses/desthack.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/Uses/desthack.mk Mon Jan 27 07:29:32 2014 (r341332) @@ -0,0 +1,29 @@ +# +# $FreeBSD$ +# +# Handle gnu configure that does not properly support DESTDIR +# +# MAINTAINER: portmgr@FreeBSD.org +# +# Feature: desthack +# Usage: USES=desthack +# Valide ARGS: none +# + +.if !defined(_INCLUDE_USES_DESTHACK_MK) +_INCLUDE_USES_DESTHACK_MK= yes + +.if defined(_desthack_ARGS) +IGNORE= USES=desthack does not require args +.endif + +_USES_POST= desthack +GNU_CONFIGURE_PREFIX= \$${${DESTDIRNAME}}${PREFIX} +GNU_CONFIGURE_MANPREFIX= \$${${DESTDIRNAME}}${MANPREFIX} +.endif + +.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_DESTHACK_POST_MK) +_INCLUDE_USES_DESTHACK_POST_MK= yes +post-stage: + @${SED} -i '' -e 's,${STAGEDIR},,g' ${STAGEDIR}${PREFIX}/lib/*.la +.endif Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Mon Jan 27 07:23:07 2014 (r341331) +++ head/Mk/bsd.port.mk Mon Jan 27 07:29:32 2014 (r341332) @@ -2780,6 +2780,7 @@ CONFIGURE_FAIL_MESSAGE?= "Please report CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax .endif GNU_CONFIGURE_PREFIX?= ${PREFIX} +GNU_CONFIGURE_MANPREFIX?= ${MANPREFIX} CONFIG_SITE?= ${PORTSDIR}/Templates/config.site CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX} $${_LATE_CONFIGURE_ARGS} CONFIGURE_ENV+= CONFIG_SITE=${CONFIG_SITE} lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN} @@ -2788,10 +2789,10 @@ HAS_CONFIGURE= yes SET_LATE_CONFIGURE_ARGS= \ _LATE_CONFIGURE_ARGS="" ; \ if [ ! -z "`./${CONFIGURE_SCRIPT} --help 2>&1 | ${GREP} -- '--mandir'`" ]; then \ - _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --mandir=${MANPREFIX}/man" ; \ + _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --mandir=${GNU_CONFIGURE_MANPREFIX}/man" ; \ fi ; \ if [ ! -z "`./${CONFIGURE_SCRIPT} --help 2>&1 | ${GREP} -- '--infodir'`" ]; then \ - _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --infodir=${PREFIX}/${INFO_PATH}/${INFO_SUBDIR}" ; \ + _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --infodir=${GNU_CONFIGURE_PREFIX}/${INFO_PATH}/${INFO_SUBDIR}" ; \ fi ; \ if [ -z "`./${CONFIGURE_SCRIPT} --version 2>&1 | ${EGREP} -i '(autoconf.*2\.13|Unrecognized option)'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --build=${CONFIGURE_TARGET}" ; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401270729.s0R7TXQs076735>