Date: Mon, 14 Jun 2004 14:28:51 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: FreeBSD Ports <ports@FreeBSD.ORG> Subject: Re: binary port: how to deal with 4.x vs 5.x? Message-ID: <20040614212851.GA1401@Odin.AC.HMC.Edu> In-Reply-To: <20040614211940.GK38347@iib.unsam.edu.ar> References: <20040614211940.GK38347@iib.unsam.edu.ar>
next in thread | previous in thread | raw e-mail | index | archive | help
--h31gzZEtNLTqOjlF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 14, 2004 at 06:19:40PM -0300, Fernan Aguero wrote: > Hi! >=20 > I have an almost complete port of WU BLAST > (http://blast.wustl.edu), which is only distributed as > pre-compiled binaries.=20 >=20 > Warren Gish has produced binaries for both freebsd-4.x and > 5.x. Currently my port only installs the one for 4.x >=20 > Is it possible to use the same port Makefile and set two > different DISTNAMEs based on the OS version? >=20 > The contents of the two files are similar, they're just > linked against different libraries (libc_r is one if I > remember correctly). >=20 > I have already tried something along the lines of: >=20 > .if __FreeBSD_version < 500000 > DISTNAME=3D xxxx > .else=20 > DISTNAME=3D yyyy > .endif >=20 > but it didn't work as expected. >=20 > Any idea? Use make syntax. :-) First, you need to include bsd.port.pre.mk before you use the variables. Second, the correct variable is ${OSVERSION}. Thus the code would look like: =2E.. =2Einclude <bsd.port.pre.mk> =2Eif ${OSVERSION} < 500000 DISTNAME=3D xxxx =2Eelse DISTNAME=3D yyyy =2EendiF =2E.. =2Einclude <bsd.port.post.mk> EOF See the Porters Handbook for details: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dads-afte= r-port-mk.html -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --h31gzZEtNLTqOjlF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAzhiSXY6L6fI4GtQRAitSAKCpNhkEBlFWp67yZRbmdtDpsAXkVACg4KWP QJIGzPxJRA/1WSNKrIo33zI= =JeQh -----END PGP SIGNATURE----- --h31gzZEtNLTqOjlF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040614212851.GA1401>