Subject: pkg/30603: USE_IMAKE packages fail on xorg-only installs
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 06/25/2005 22:10:01
>Number:         30603
>Category:       pkg
>Synopsis:       USE_IMAKE packages fail on xorg-only installs
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 25 22:10:00 +0000 2005
>Originator:     Lars Nordlund
>Release:        NetBSD-current, pkgsrc-current
NetBSD glengoyne 3.99.5 NetBSD 3.99.5 (GLENGOYNE) #4: Sat May 28 16:23:55 CEST 2005  lars@glengoyne:/home/lars/tmp/obj_i386/sys/arch/i386/compile/GLENGOYNE i386

On xorg-only systems packages like graphics/xpm fail to build with an error like this:

===> lars@glengoyne:/usr/pkgsrc/graphics/xpm %make
===> do-fetch [xpm-3.4knb4] ===> *** No /usr/pkgsrc/distfiles/pkg-vulnerabilities file found,
===> do-fetch [xpm-3.4knb4] ===> *** skipping vulnerability checks. To fix, install
===> do-fetch [xpm-3.4knb4] ===> *** the pkgsrc/security/audit-packages package and run
===> do-fetch [xpm-3.4knb4] ===> *** '/usr/pkg/sbin/download-vulnerability-list'.
===> configure-message [xpm-3.4knb4] ===> Configuring for xpm-3.4knb4
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/pkg/lib/X11/config -I/usr/pkg/xorg/lib/X11/config
make Makefiles
making Makefiles in lib...
        mv -f Makefile Makefile.bak
Imakefile.c:16: Imake.tmpl: No such file or directory
/usr/pkgsrc/graphics/xpm/work.glengoyne/.tools/bin/imake: Exit code 1.

The fault is in the pkgxmkmf script installed by pkgtools/xpkgwedge. It should pass X11BASE/lib/X11/config as include path to imake. I have briefly tested the solution on both xorg-only and non-xorg (X from base system) using netbsd systems.
Install NetBSD. Leave out the X packages from the main distribution.

Install pkgsrc.

Build graphics/xpm
Apply this patch in pkgsrc/pkgtools/xpkgwedge:

Index: files/xpkgwedge.def
RCS file: /cvsroot/pkgsrc/pkgtools/xpkgwedge/files/xpkgwedge.def,v
retrieving revision 1.12
diff -u -r1.12 xpkgwedge.def
--- files/xpkgwedge.def 31 Jul 2004 01:42:06 -0000      1.12
+++ files/xpkgwedge.def 25 Jun 2005 21:31:34 -0000
@@ -118,7 +118,7 @@
  * configuration files installed there.
 #undef ImakeCmd
-#define ImakeCmd imake -I$(PREFIX)/lib/X11/config -I$(VIEWBASE)/lib/X11/config
+#define ImakeCmd imake -I$(PREFIX)/lib/X11/config -I$(VIEWBASE)/lib/X11/config -I${X11BASE}/lib/X11/config
 #endif /* AfterVendorCF */