From owner-freebsd-ports@FreeBSD.ORG Tue May 18 17:25:17 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 82DFA106564A for ; Tue, 18 May 2010 17:25:17 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C8BB98FC18 for ; Tue, 18 May 2010 17:25:16 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA02044 for ; Tue, 18 May 2010 20:25:14 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4BF2CD79.3050205@freebsd.org> Date: Tue, 18 May 2010 20:25:13 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100517) MIME-Version: 1.0 To: ports@freebsd.org References: <4BA60988.4060108@icyb.net.ua> In-Reply-To: <4BA60988.4060108@icyb.net.ua> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: 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: Tue, 18 May 2010 17:25:17 -0000 Anyone cares to comment/act on this? on 21/03/2010 13:56 Andriy Gapon said the following: > 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