Subject: pkg/17300: bbrun doesn't compile with xpkgwedge
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kre@munnari.OZ.AU>
List: netbsd-bugs
Date: 06/17/2002 15:01:39
>Number:         17300
>Category:       pkg
>Synopsis:       bbrun doesn't compile with xpkgwedge
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 17 08:10:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Robert Elz
>Release:        NetBSD 1.6A pkgsrc of 2002-06-16
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD fuchsia.cs.mu.OZ.AU 1.6A NetBSD 1.6A (FUCHSIA) #11: Wed May 29 12:50:36 UTC 2002 kre@fuchsia.cs.mu.OZ.AU:/usr/obj/sys/FUCHSIA i386
Architecture: i386
Machine: i386
>Description:
	wm/bbrun doesn't compile with xpkgwedge installed
>How-To-Repeat:
	install xpkgwedge, then xpm using xpkgwedge, then attempt
	to compile bbrun

	wait for ...

===> Building for bbrun-1.3
gcc -c -O2 -Wall bbrun.c -o bbrun.o `/usr/obj/pkg/wm/bbrun/work.i386/.buildlink/bin/gtk-config --cflags`
bbrun.c:5: X11/xpm.h: No such file or directory
gmake: *** [bbrun.o] Error 1
*** Error code 2

>Fix:
	Apply the patch below to bbrun/Makefile, and then replace
	patches-aa with the version given below the Makefile patch
	(put back the $NetBSD$ line that this patch lacks...)
	Regenerate distinfo.

pkgsrc Makefile change - this just adds the x11 buildink

--- Makefile.orig	Wed Jun 12 00:36:21 2002
+++ Makefile	Mon Jun 17 07:14:58 2002
@@ -11,6 +11,7 @@
 COMMENT=	run utility for BlackBox
 
 USE_GMAKE=		yes
+USE_BUILDLINK_X11=	yes
 USE_BUILDLINK_ONLY=	yes
 
 do-install:
@@ -18,6 +19,7 @@
 	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bbrun
 	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/README ${PREFIX}/share/doc/bbrun
 
+.include "../../mk/x11.buildlink.mk"
 .include "../../graphics/xpm/buildlink.mk"
 .include "../../x11/gtk/buildlink.mk"
 .include "../../mk/bsd.pkg.mk"


And the replacement patches/patch-aa - this just changes a couple of
lines (CFLAGS, LIBS) from CFLAGS= (etc) to CFLAGS+= so all the work
done by the buildlink stuff isn't being ignored...

--- Makefile.orig	Wed Feb  6 20:05:51 2002
+++ Makefile	Mon Jun 17 07:16:33 2002
@@ -1,6 +1,6 @@
 CC     = gcc
-LIBS   = -lXpm `gtk-config --libs`
-CFLAGS = `gtk-config --cflags`
+LIBS   += -lXpm `${GTK_CONFIG} --libs`
+CFLAGS += `${GTK_CONFIG} --cflags`
 OBJS   = bbrun.o \
          ../wmgeneral/wmgeneral.o \
          ../wmgeneral/misc.o \
@@ -8,6 +8,8 @@
 
 .c.o:
 	$(CC) -c -O2 -Wall $< -o $*.o $(CFLAGS)
+
+all: bbrun
 
 bbrun: $(OBJS)
 	$(CC) -Wall -g -o bbrun $^ $(LIBS)
>Release-Note:
>Audit-Trail:
>Unformatted: