Subject: Re: Proposal: buildlink for X11
To: Johnny Lam <>
From: Greg A. Woods <>
List: tech-pkg
Date: 08/20/2001 16:27:52
[ On Monday, August 20, 2001 at 12:20:38 (-0700), Johnny Lam wrote: ]
> Subject: Proposal: buildlink for X11
> It is a known deficiency of the current buildlink infrastructure that only
> when xpkgwedge is installed prior to the installation of any X11 packages
> that all packages may be strongly buildlinked.  If xpkgwedge is _not_
> installed, then when a package sets either USE_X11 or USE_X11BASE, then
> it will look in ${X11BASE} for headers and libraries, it will not find just
> the X11R6 files, but also any X11 packages' headers and libraries.

The question should really be is there any reason not to have xpkgwedge
be the default now?

I.e. does anyone really think they want X11 add-on third-party packages
installed with the base system X11 stuff (i.e. in /usr/X11R6) when
they're otherwise installing non-X11 add-on third-party packages in
/usr/pkg or some such (i.e. not installing pacakges in /usr)?

I think installing X11 packages in /usr/X11 was always bogus in the
context of installing non-X11 packages (in /usr/pkg or /usr/local, etc.)
How do you justify installing some add-on stuff in its own hierarchy
while mixing other add-on stuff in with a base system hierarchy?

If the issue is really just that some people do still find a need to
keep X11 and non X11 packages in separate hierarchies then why not
install X11 packages in ${PREFIX}/X11R6 (i.e. mirror the base X11
hierarchy under ${PREFIX}, just as the base X11R6 install mirrors the
system hierarchy under /usr/X11R6)?

I.e. why would anyone who does not set LOCALBASE=/usr want X11 add-on
third party packages to be installed in amongst the base X11 system

The really silly thing about all this X11BASE stuff is that the
definition of "x11 package" really just means:  a package that uses the
imake configuration system.  There are lots of packages now that use X11
libraries and headers, but which normally install directly in $LOCALBASE
because they are using GNU Autoconf or other configuration systems.

Assuming the only issue is having the option of keeping xmkmf-using
packages separate from non-xmkmf packages, how about this proposal:

	1. modify the default pkgsrc system to install X11 packages in
           $LOCALBASE (eg. as if the current xpkgwedge is the default)

	2. modify the xpkgwedge package so that if it's installed then
           X11 packages (i.e. packages using xmkmf) will be installed in
           a new hierarchy under $LOCALBASE/X11R6

(implementing it should be relatively easy -- it's a very minor thing as
"flag days" go, but it may require some magic to do what the current
xpkgwedge does, but to do it by default (i.e. without having to install
an additional special package)

Now, all that said, I recently had a brief discussion with D'Arcy Cain
about the relative sillyness of having USE_LOCALBASE_FOR_X11 defined
when I also have LOCALBASE=/usr.  Indeed it seems ludicrous to pub X11
packages in /usr/bin while the base X11 stuff is in /usr/X11R6/bin.  So
I've been testing some builds of stuff on a development sparc box with
just LOCALBASE=/usr, and while a few things have failed, it's working
relativley well.

(Of course that begs the question of why X11R6 is installed in its own
hierarchy and not directly in /usr too for this scenario.... :-)

Oh, and BTW, just exactly what is the difference supposed to be between
USE_X11 and USE_X11BASE?

> A possible solution for this is to create a shadow directory of symbolic
> links under ${LOCALBASE} of the true X11R6 headers and libraries in
> ${X11BASE}.  Call this shadow directory "${BUILDLINK_X11_DIR}".  Then
> if a package may be made to look for X11R6 files under ${BUILDLINK_X11_DIR},
> then it avoids the problem noted above, and thus may be strongly-
> buildlinked.

This I like because it is the only way to make it possible to "strongly"
buildlink an add-on X11 package when LOCALBASE=/usr.

You will need this fix to graphics/gdk-pixbuf though.  In fact you may
need this patch for non-xpkgwedge users too....

Index: distinfo
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/graphics/gdk-pixbuf/distinfo,v
retrieving revision 1.3
diff -c -r1.3 distinfo
*** distinfo	12 Aug 2001 18:15:37 -0000	1.3
--- distinfo	20 Aug 2001 07:12:45 -0000
*** 3,7 ****
  SHA1 (gdk-pixbuf-0.10.1.tar.gz) = d91342c6a13efcab572fc670ba7613c47dc42023
  Size (gdk-pixbuf-0.10.1.tar.gz) = 461611 bytes
  SHA1 (patch-ac) = efeb07a327c866bee7ddddbd94a7fae214e4c4d8
! SHA1 (patch-ad) = 8841c915841c2ec71082a8894b12038b97bb2088
  SHA1 (patch-ae) = 60b558c5d4894bab57520b8e2713d061083408cf
--- 3,7 ----
  SHA1 (gdk-pixbuf-0.10.1.tar.gz) = d91342c6a13efcab572fc670ba7613c47dc42023
  Size (gdk-pixbuf-0.10.1.tar.gz) = 461611 bytes
  SHA1 (patch-ac) = efeb07a327c866bee7ddddbd94a7fae214e4c4d8
! SHA1 (patch-ad) = d660bfa46065b1a01313dfc7075626a99fb6bb6d
  SHA1 (patch-ae) = 60b558c5d4894bab57520b8e2713d061083408cf
Index: patches/patch-ad
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/graphics/gdk-pixbuf/patches/patch-ad,v
retrieving revision 1.2
diff -c -r1.2 patch-ad
*** patches/patch-ad	18 Mar 2001 04:33:54 -0000	1.2
--- patches/patch-ad	20 Aug 2001 07:12:22 -0000
*** 1,7 ****
! $NetBSD: patch-ad,v 1.2 2001/03/18 04:33:54 mjl Exp $
! --- gdk-pixbuf/	Thu Mar  1 00:05:34 2001
! +++ gdk-pixbuf/	Sun Mar 18 04:57:50 2001
  @@ -24,70 +24,70 @@
   # The PNG plugin.
--- 1,5 ----
! --- gdk-pixbuf/	Wed Feb 28 18:05:34 2001
! +++ gdk-pixbuf/	Mon Aug 20 03:10:47 2001
  @@ -24,70 +24,70 @@
   # The PNG plugin.
*** 83,85 ****
--- 81,101 ----
   libpixbufloader_xbm_la_LIBADD =
   if HAVE_PNG
+ @@ -157,7 +157,7 @@
+  INCLUDES = -I$(top_srcdir) -I$(top_builddir) \
+  	-I$(top_srcdir)/gdk-pixbuf \
+  	-I$(top_builddir)/gdk-pixbuf \
+  AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(libexecdir)\""
+ @@ -220,7 +220,7 @@
+  	gdk-pixbuf-parse-color.c	\
+  	$(extra_sources)
+ -libgdk_pixbuf_xlib_la_LDFLAGS = -version-info 2:0:0 -export-dynamic $(GLIB_LIBS) $(X11_LIBS)
+ +libgdk_pixbuf_xlib_la_LDFLAGS = -version-info 2:0:0 -export-dynamic $(GLIB_LIBS) $(X_LIBS)
+  libgdk_pixbuf_xlib_la_LIBADD = pixops/

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>     <>
Planix, Inc. <>;   Secrets of the Weird <>