Subject: Re: How to best integrate libnbcompat? (pkgsrc/news/suck)
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netmeister.org>
List: tech-pkg
Date: 05/22/2004 12:31:20
--STPqjqpCrtky8aYs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Georg Schwarz <geos@epost.de> wrote:
=20
> .if ${OPSYS} =3D=3D "IRIX" && ${OS_VERSION} < 6
> .include "../../pkgtools/libnbcompat/buildlink3.mk"
> CONFIGURE_ARGS+=3D        LIBS=3D-lnbcompat
> .endif
>=20
> and it seems to do the trick for me in that particular situation at
> least.
>=20
> - is this syntactically correct, particularly the version number check?

No, that won't work.  For example, we have OS_VERSIONS like '1.6Z' etc.
You'd have to actually compare strings, or strip out the major.  I think
somewhere in pkgsrc there are some examples of this, but I forgot where.

> - should I add -L${LOCALBASE}/lib, or does buildlink automatically take
> care of the lib being found?

buildlink should take care of this already.

> - is it a good idea to make use of LIBS=3D? After all, this can only be
> done once in the Makefile

Probably not a good idea.  You are overwriting whatever definitions may
already be set.  Let buildlink do the right thing for you.

> Any comments from those familiar with pkgsrc would be very welcome, in
> particular since this is a quite general problem that one way or another
> applies to several packages.

If it's a general problem, then just patching the one package doesn't
seem wise.  It should instead be changed in the pkgsrc infrastructure
itself (if we want to provide support for such broken systems ;-/).

-Jan

--=20
My other computer also runs NetBSD!
			http://www.netbsd.org

--STPqjqpCrtky8aYs
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFAr4BXfFtkr68iakwRAjN9AKCQV3UxgwiW0k9awHSUEUWLsRlomgCcDNMF
DaNxCeajO9p0lEQ9pHmW83g=
=VKU+
-----END PGP SIGNATURE-----

--STPqjqpCrtky8aYs--