Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Feb 1997 05:48:22 -0800 (PST)
From:      asami@vader.cs.berkeley.edu (Satoshi Asami)
To:        jfieber@indiana.edu
Cc:        ports@FreeBSD.org
Subject:   Re: version dependent PLIST
Message-ID:  <199702231348.FAA02668@baloon.mimi.com>
In-Reply-To: <Pine.BSF.3.95q.970222141535.12505C-100000@fallout.campusview.indiana.edu> (message from John Fieber on Sat, 22 Feb 1997 14:24:55 -0500 (EST))

next in thread | previous in thread | raw e-mail | index | archive | help
 * 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



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