Subject: Re: pkg/26519: xorg's freetype module is broken
To: None <gnats-bugs@gnats.NetBSD.org>
From: Marc Recht <recht@netbsd.org>
List: netbsd-bugs
Date: 08/09/2004 10:14:55
--==========562C818EA1086BCF615C==========
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

> The xorg-server package doesn't pass the right rpath flags while building
> the freetyppe module:
>
># ldd xorg/lib/modules/fonts/libfreetype.so
> xorg/lib/modules/fonts/libfreetype.so:

The attached two patches fix this for me. I'm unsure if that works if 
PkgRpathFlags are empty. I doubt that actually. So, maybe this needs to 
replaced by -L in that case, so that
Concat(PkgRpathFlags, path) won't produce a wrong line containing only path.
--==========562C818EA1086BCF615C==========
Content-Type: text/plain; charset=us-ascii; name="xorg-makefile-common.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="xorg-makefile-common.diff";
 size=705

Index: Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/meta-pkgs/xorg/Makefile.common,v
retrieving revision 1.5
diff -u -r1.5 Makefile.common
--- Makefile.common	30 Jul 2004 08:24:20 -0000	1.5
+++ Makefile.common	9 Aug 2004 08:08:21 -0000
@@ -163,6 +163,8 @@
 		-e "s|@LOCALBASE@|${LOCALBASE}|g" \
 		-e "s|@LDFLAGS@|${GLOBAL_LDFLAGS}|g" \
 		-e "s|@WRKSRC@|${WRKSRC}|g" \
+		-e "s|@_COMPILER_LD_FLAG@|${_COMPILER_LD_FLAG}|g" \
+		-e "s|@RPATH_FLAG@|${RPATH_FLAG}|g" \
 		${FILESDIR}/host.def > ${WRKSRC}/config/cf/host.def
 	@${LN} -sf ${X11ROOT}/bin/gccmakedep ${WRKSRC}/config/util
 	@${LN} -sf ${X11ROOT}/bin/revpath ${WRKSRC}/config/util

--==========562C818EA1086BCF615C==========
Content-Type: text/plain; charset=us-ascii; name="xorg-server-host-def.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="xorg-server-host-def.diff";
 size=560

Index: files/host.def
===================================================================
RCS file: /cvsroot/pkgsrc/x11/xorg-server/files/host.def,v
retrieving revision 1.2
diff -u -r1.2 host.def
--- files/host.def	29 Jul 2004 22:54:09 -0000	1.2
+++ files/host.def	9 Aug 2004 08:10:33 -0000
@@ -32,6 +32,8 @@
 
 #define StandardIncludes -I@BLNK@/include
 #define ExtraLoadFlags @LDFLAGS@
+#define PkgRpathFlags @_COMPILER_LD_FLAG@@RPATH_FLAG@
+#define LinkerRuntimeLibraryPathFlag(path) Concat(PkgRpathFlags, path)
 
 #define XTrueTypeInstallCConvHeaders NO
 

--==========562C818EA1086BCF615C==========--