ports/58885: [PATCH] bsd.port.mk: include dynamically generated scripts/message into packages
Oliver Eikemeier
eikemeier at fillmore-labs.com
Mon Nov 3 16:40:24 UTC 2003
>Number: 58885
>Category: ports
>Synopsis: [PATCH] bsd.port.mk: include dynamically generated scripts/message into packages
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 03 08:40:19 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Oliver Eikemeier
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 5.1-CURRENT
>Description:
If a port creates pkg-install, pkg-deinstall, pkg-req or pkg-message dynamically, i.e.:
PKGMESSAGE=${WRKDIR}/pkg-message
${SED} -e "s,%%PREFIX%%,${PREFIX},g" ${PKGDIR}/pkg-message >${PKGMESSAGE}
`make package' does not include these files, because bsd.port.mk tests for their
existence before the build step is performed.
>How-To-Repeat:
cd /usr/ports/security/cyrus-sasl2; make package
pkg_info -i 'cyrus-sasl-2*'
pkg_info -i /usr/ports/packages/All/cyrus-sasl-2.*
>Fix:
A workaround is to use
make install; make package
because for the second call the dynamically generated files exist.
Bento does not do this. The following patch is ugly, but may help:
--- bsd.port.mk.patch begins here ---
--- bsd.port.mk 3 Sep 2003 19:50:24 -0000 1.468
+++ bsd.port.mk 3 Nov 2003 16:13:06 -0000
@@ -1803,19 +1803,11 @@
DISABLE_CONFLICTS= YES
.endif
.if !defined(PKG_ARGS)
-PKG_ARGS= -v -c -${COMMENT:Q} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" ${EXTRA_PKG_ARGS}
-.if exists(${PKGINSTALL})
-PKG_ARGS+= -i ${PKGINSTALL}
-.endif
-.if exists(${PKGDEINSTALL})
-PKG_ARGS+= -k ${PKGDEINSTALL}
-.endif
-.if exists(${PKGREQ})
-PKG_ARGS+= -r ${PKGREQ}
-.endif
-.if exists(${PKGMESSAGE})
-PKG_ARGS+= -D ${PKGMESSAGE}
-.endif
+PKG_ARGS= -v -c -${COMMENT:Q} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`cd ${.CURDIR} && ${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" ${EXTRA_PKG_ARGS}
+PKG_ARGS+= `[ -f "${PKGINSTALL}" ] && ${ECHO_CMD} -n -i "${PKGINSTALL}"`
+PKG_ARGS+= `[ -f "${PKGDEINSTALL}" ] && ${ECHO_CMD} -n -k "${PKGDEINSTALL}"`
+PKG_ARGS+= `[ -f "${PKGREQ}" ] && ${ECHO_CMD} -n -r "${PKGREQ}"`
+PKG_ARGS+= `[ -f "${PKGMESSAGE}" ] && ${ECHO_CMD} -n -D "${PKGMESSAGE}"`
.if !defined(NO_MTREE)
PKG_ARGS+= -m ${MTREE_FILE}
.endif
--- bsd.port.mk.patch begins here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list