Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Mar 2010 13:56:56 +0200
From:      Andriy Gapon <avg@icyb.net.ua>
To:        ports@freebsd.org
Subject:   mail/moztraybiff incorrectly works with WRKDIRPREFIX
Message-ID:  <4BA60988.4060108@icyb.net.ua>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BA60988.4060108>