From owner-freebsd-ports Sun Feb 23 05:49:23 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA10475 for ports-outgoing; Sun, 23 Feb 1997 05:49:23 -0800 (PST) Received: from dfw-ix10.ix.netcom.com (dfw-ix10.ix.netcom.com [206.214.98.10]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id FAA10470 for ; Sun, 23 Feb 1997 05:49:20 -0800 (PST) Received: (from smap@localhost) by dfw-ix10.ix.netcom.com (8.8.4/8.8.4) id HAA15329; Sun, 23 Feb 1997 07:48:48 -0600 (CST) Received: from sjx-ca53-15.ix.netcom.com(206.214.106.47) by dfw-ix10.ix.netcom.com via smap (V1.3) id sma015326; Sun Feb 23 07:48:29 1997 Received: (from asami@localhost) by baloon.mimi.com (8.8.5/8.6.9) id FAA02668; Sun, 23 Feb 1997 05:48:22 -0800 (PST) Date: Sun, 23 Feb 1997 05:48:22 -0800 (PST) Message-Id: <199702231348.FAA02668@baloon.mimi.com> To: jfieber@indiana.edu CC: ports@FreeBSD.org In-reply-to: (message from John Fieber on Sat, 22 Feb 1997 14:24:55 -0500 (EST)) Subject: Re: version dependent PLIST From: asami@vader.cs.berkeley.edu (Satoshi Asami) Sender: owner-ports@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk * I was just working on some tweaks to my SP port to ensure that it * compiles on old (2.1.x) systems as well as current. One part of * the SP port for 2.2+ systems is a shared library, but on 2.1.x * systems, only the static library is built (linking against the * shared just produces core dumps). * * My question is how to deal with a system version dependent PLIST. * Ideas from more experienced porters? I just committed a change to bsd.port.mk to make things like this easier to handle. Basically, you use the variable ${PLIST} (defaults to ${PKGDIR}/PLIST). So, you can prepare two complete PLISTs, === pkg/PLIST pkg/PLIST-2.1 === and do something like === version!= uname -r | grep "2\\.1" .if !empty(version) PLIST= ${PKGDIR}/PLIST-2.1 .endif === Another way is to put the shared library stuff in a separate file, as in === pkg/PLIST (non-shlib stuff) pkg/PLIST.shlib (shlib only) === and define === PLIST= ${PKGDIR}/PLIST.tmp === and then do a === version!= uname -r | grep "2\\.1" pre-install: ${CP} ${PKGDIR}/PLIST ${PLIST} .if empty(version) ${CAT} ${PKGDIR}/PLIST.shlib >> ${PLIST} .endif pre-clean: ${RM} ${PLIST} === The first one is obviouly easier for the Makefile, but you won't have to update two PLISTs when you add one file. Satoshi