From owner-freebsd-ports@FreeBSD.ORG Fri Jun 18 02:12:33 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A9B416A4CE for ; Fri, 18 Jun 2004 02:12:33 +0000 (GMT) Received: from bloodwood.hunterlink.net.au (smtp-local.hunterlink.net.au [203.12.144.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A15A43D4C for ; Fri, 18 Jun 2004 02:12:32 +0000 (GMT) (envelope-from boris@brooknet.com.au) Received: from [61.8.40.46] (ppp282E.dyn.pacific.net.au [61.8.40.46]) i5I24xWr021779; Fri, 18 Jun 2004 12:05:00 +1000 From: Sam Lawrance To: Oliver Eikemeier In-Reply-To: References: Content-Type: text/plain Message-Id: <1087524736.905.5.camel@dirk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 18 Jun 2004 12:12:17 +1000 Content-Transfer-Encoding: 7bit cc: ports@freebsd.org cc: Cyrille Lefevre Subject: Re: pkg-plist and installing under multiple prefixes X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2004 02:12:33 -0000 On Fri, 2004-06-18 at 03:00, Oliver Eikemeier wrote: > Am Donnerstag den, 17. Juni 2004, um 18:14, schrieb Sam Lawrance: > > > On Fri, 2004-06-18 at 00:55, Cyrille Lefevre wrote: > >> "Sam Lawrance" wrote: > >>> > >>> I'm porting a binary distributiono of a java application. > >>> > >>> Like a number of similar ports, it installs into > >>> ${PREFIX}/${PORTNAME}. > >>> I want to also install gnome application entries, but these are > >>> usually > >>> under ${X11BASE}/share/gnome/applications. > >>> > >>> Just doing > >>> > >>> PLIST_FILES += ${X11BASE}/share/gnome/applications/xyzzy.desktop > >> > >> PLIST_FILES += @cwd %%X11BASE%% > >> PLIST_FILES += share/gnome/applications/xyzzy.desktop > >> ... > >> PLIST_FILES += @cwd %%PREFIX%% > > > > Cheers, that got me on the right track. > > > > %%PREFIX%% is set to substitute for %D. I don't understand this - but > > setting the substitution to ${PREFIX} works. Also the substitutions > > needed to be quoted. > > > > This works: > > > > PLIST_SUB+= PREFIX=${PREFIX} > > PLIST_FILES+= "@cwd %%X11BASE%%" > > PLIST_FILES+= share/gnome/applications/xyzzy.desktop > > PLIST_FILES+= "@cwd %%PREFIX%%" > > > > You shouldn't do things like this in the Makefile. Use a real pkg-plist. > -Oliver I do have a real pkg-plist, but the lines above are used to add the gnome links conditionally. Is there another way? (It may be a moot point if I just have the port install them unconditionally).