From owner-freebsd-ports@FreeBSD.ORG Sun Mar 21 11:56:59 2010 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9B7B106566C for ; Sun, 21 Mar 2010 11:56:59 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3A8FA8FC16 for ; Sun, 21 Mar 2010 11:56:58 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA28432 for ; Sun, 21 Mar 2010 13:56:57 +0200 (EET) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1NtJm5-000AUa-9c for ports@freebsd.org; Sun, 21 Mar 2010 13:56:57 +0200 Message-ID: <4BA60988.4060108@icyb.net.ua> Date: Sun, 21 Mar 2010 13:56:56 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: ports@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: mail/moztraybiff incorrectly works with WRKDIRPREFIX X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2010 11:57:00 -0000 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 + +.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 +.include -- Andriy Gapon