Subject: USE_X11 and builtin.mk
To: None <tech-pkg@NetBSD.org>
From: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
List: tech-pkg
Date: 01/30/2005 22:00:47
Hello,

With USE_X11, the builtin.mk files of the packages which are
depended upon by Xlib are not included.

For example, x11/Xrender depends on devel/zlib indirectly via
x11/xorg-libs (with X11_TYPE=xorg), but IS_BUILTIN.zlib is empty.

# cd /usr/pkgsrc/x11/Xrender
===> Checking for vulnerabilities in Xrender-0.8.4nb1
=> Checksum OK for libXrender-0.8.4.tar.bz2.
===> Extracting for Xrender-0.8.4nb1
===> Required installed package xorg-libs>=6.8.1nb2: xorg-libs-6.8.1nb3 found
===> Required installed package fontconfig>=2.2.96nb1: fontconfig-2.2.96nb1 found
===> Required installed package zlib>=1.2.1nb3: zlib-1.2.2 found
===> Required installed package freetype2>=2.1.9nb1: freetype2-2.1.9nb1 found
===> Required installed package expat>=1.95.8nb2: expat-1.95.8nb2 found
===> Required installed package libtool-base>=1.5.10nb6: libtool-base-1.5.10nb6 found
===> Required installed package pkgconfig>=0.15.0: pkgconfig-0.15.0nb1 found
===> Required installed package render>=0.8: render-0.8 found
===> Required installed package render>=0.2: render-0.8 found
^C
# make show-var VARNAME=BUILDLINK_PACKAGES
xorg-libs pkgconfig render fontconfig zlib freetype2 expat
# make show-var VARNAME=IS_BUILTIN.zlib

#

In bsd.buildlink3.mk, the list of these packages should be added
to BUILDLINK_PACKAGES before inclusion of bsd.builtin.mk, I think.
However, in rev. 1.136, the order has been changed to fix another
problem.

-----------------------------------------------------------------------------
revision 1.136
date: 2004/03/31 07:12:31;  author: jlam;  state: Exp;  lines: +20 -15
Move the check for USE_X11 after bsd.builtin.mk included since that file
may indirectly set USE_X11.  This should fix using some of the builtin
X11 software to build non-X11 packages.
-----------------------------------------------------------------------------

I have three ideas.  Which one is best?  Or any other ideas?

 (1) Don't allow indirectly set USE_X11 and backout this.
 (2) Add more inclusions of builtin.mk after the check for USE_X11.
 (3) Add inclusions of these packages' builtin.mk from Xlib's
     builtin.mk or buildlink3.mk.

best regards.
-- 
 Kouichirou Hiratsuka
   hira@po6.nsk.ne.jp