Subject: pkg/27340: audio/aumix: Add knob USE_GTK2
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <lems@gmx.net>
List: pkgsrc-bugs
Date: 10/22/2004 12:06:22
>Number:         27340
>Category:       pkg
>Synopsis:       audio/aumix: Add knob USE_GTK2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 22 12:07:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Leonard Schmidt
>Release:        NetBSD 2.0_RC4
>Organization:
>Environment:
NetBSD kafka 2.0_RC4 NetBSD 2.0_RC4 (THEWIRED) #1: Wed Oct 20 12:41:14 GMT 2004  lems@kafka:/usr/src/sys/arch/i386/compile/THEWIRED i386
>Description:
Let the user decide if he/she wants to build aumix with GTK2 support.

I don't know if this is the cleanest way to do it, but I think some packages (especially mplayer) really should ask the user if he/she wants specific features to be enabled or disabled.
>How-To-Repeat:
Build audio/aumix and notice how much bloat gets added by default if you don't hack up the Makefile to disable GTK2 support.
>Fix:
diff -ruN /usr/pkgsrc/audio/aumix/Makefile aumix/Makefile
--- /usr/pkgsrc/audio/aumix/Makefile	2004-10-22 13:43:57.000000000 +0000
+++ aumix/Makefile	2004-10-22 13:38:52.000000000 +0000
@@ -23,7 +23,15 @@
 CONFIGURE_ARGS+=	--enable-nls
 CONFIGURE_ARGS+=	--without-gtk1
 
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+=		USE_GTK2
+.if defined(USE_GTK2) && !empty(USE_GTK2:M[Yy][Ee][Ss])
+.include "../../x11/gtk2/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--without-gtk
+.endif
+
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../devel/ncurses/buildlink3.mk"
-.include "../../x11/gtk2/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

>Release-Note:
>Audit-Trail:
>Unformatted: