mail/moztraybiff incorrectly works with WRKDIRPREFIX
Andriy Gapon
avg at icyb.net.ua
Sun Mar 21 11:57:00 UTC 2010
There is the following snippet in mail/moztraybiff/Makefile:
.if !exists(../thunderbird/Makefile)
BROKEN= ${PORTNAME} needs the Thunderbird port in order to build
.else
TBVER!= cd ../thunderbird && ${MAKE} -V PORTVERSION
.endif
When WRKDIRPREFIX is used TBVER gets set to an empty string.
It seems that this happens because current directory is somewhere under in
${WRKDIRPREFIX}, not in the ports tree.
The following patch worked for me, but I am not sure if everything is done
correctly. Each time I work with ports I have to study Porter's Handbook like
I've never seen it before :-)
--- Makefile.orig 2010-03-21 13:54:12.828668202 +0200
+++ Makefile 2010-03-21 13:41:06.760927255 +0200
@@ -20,12 +19,6 @@
zip:${PORTSDIR}/archivers/zip
RUN_DEPENDS=
${LOCALBASE}/lib/thunderbird/components/libwidget_gtk2.so:${PORTSDIR}/mail/thunderbird
-.if !exists(../thunderbird/Makefile)
-BROKEN= ${PORTNAME} needs the Thunderbird port in order to build
-.else
-TBVER!= cd ../thunderbird && ${MAKE} -V PORTVERSION
-.endif
-
USE_GMAKE= yes
USE_GNOME= libgnome
MAKE_ARGS+= MOZILLA_PLATFORM=tbird TBVER=${TBVER} MOZ_TRUNK=0
@@ -37,6 +30,14 @@
SUB_FILES= pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
+.include <bsd.port.pre.mk>
+
+.if !exists(${PORTSDIR}/mail/thunderbird/Makefile)
+BROKEN= ${PORTNAME} needs the Thunderbird port in order to build
+.else
+TBVER!= (cd ${PORTSDIR}/mail/thunderbird && ${MAKE} -V PORTVERSION)
+.endif
+
post-patch:
@${REINPLACE_CMD} -e "s|^#!/bin/bash|#!/bin/sh|" \
${WRKSRC}/get-platform
@@ -50,4 +51,4 @@
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
--
Andriy Gapon
More information about the freebsd-ports
mailing list