Subject: Re: motif.buildlink3.mk/Solaris and symlinks
To: None <tech-pkg@NetBSD.org>
From: grant beattie <grant@NetBSD.org>
List: tech-pkg
Date: 06/13/2004 13:17:21
--LQksG6bCIzRHxTLp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sun, Jun 13, 2004 at 10:18:00AM +1000, grant beattie wrote:
> hi all,
>=20
> I'm trying to figure out why packages can't find the motif header
> files on Solaris, and it appears that the motif files aren't symlinked
> from /usr/dt into ${BUILDLINK_DIR}.
>=20
> if we are not using "native" motif, the appropriate buildlink3.mk file
> is included (eg. lesstif), which will result in symlinks being
> created, but no such logic exists for native motif.
>=20
> how should this be handled? I guess we either need to symlink the
> motif files into the buildlink dir (how?), or allow /usr/dt on the
> compiler command line to remain unmodified (BUILDLINK_PASSTHRU_DIRS?)
the patch below fixes two problems with motif handling:
1. packages can now find Motif header files without needing to know to
look in /usr/dt/include (some just look in ${X11BASE}/include and
fail if they're not there). this seems to pass through unmodified
without any special handling.
2. not much point specifying -R/usr/dt/lib without -L/usr/dt/lib :-)
however, since ~no buildlink3.mk files add to CPPFLAGS or LDFLAGS
directly, something like this is closer to the bl3 way:
BUILDLINK_CPPFLAGS.motif=3D -I${_MOTIFBASE}/include
BUILDLINK_LDFLAGS.motif=3D -L${_MOTIFBASE}/lib
BUILDLINK_LDFLAGS.motif+=3D ${_COMPILER_LD_FLAG}${_OPSYS_RPATH_NAME}${_MOTI=
FBASE}/lib
BUILDLINK_LDADD.motif=3D ${BUILDLINK_LDFLAGS.motif} -lXm -lXp
but I think that is a little too intrusive during the freeze for the
upcoming branch as it would likely require changes to a number of
packages for them to work properly.
unless there is any objection, I'll commit this patch as-is and re-visit
this after the branch is cut. editors/vim-motif and editors/ted which
failed in my bulk build now build fine with these changes.
Index: motif.buildlink3.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /work/netbsd/cvsroot/pkgsrc/mk/motif.buildlink3.mk,v
retrieving revision 1.2
diff -u -r1.2 motif.buildlink3.mk
--- motif.buildlink3.mk 10 May 2004 00:11:14 -0000 1.2
+++ motif.buildlink3.mk 13 Jun 2004 00:40:42 -0000
@@ -140,6 +140,8 @@
USE_X11?=3D # defined
MAKE_ENV+=3D MOTIFLIB=3D"${MOTIFLIB}"
MAKE_ENV+=3D MOTIFBASE=3D"${_MOTIFBASE}"
+CPPFLAGS+=3D -I${_MOTIFBASE}/include
+LDFLAGS+=3D -L${_MOTIFBASE}/lib
LDFLAGS+=3D ${_COMPILER_LD_FLAG}${_OPSYS_RPATH_NAME}${_MOTIFBASE}/lib
MOTIFLIB?=3D ${_COMPILER_LD_FLAG}${_OPSYS_RPATH_NAME}${_MOTIFBASE}/lib \
-L${_MOTIFBASE}/lib -lXm -lXp
--LQksG6bCIzRHxTLp
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
iD8DBQFAy8dBluYOb9yiFXoRAs6CAJwIvTD6Szf2AzLza0EsVqFAmDGSIgCfSlR9
Vj1pg8R0eKNzGV33IA2fDRc=
=f3Md
-----END PGP SIGNATURE-----
--LQksG6bCIzRHxTLp--