Subject: pkg/30837: add `nogui' option to net/jigdo (patch privided)
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <j+nbsd@2005.salmi.ch>
List: pkgsrc-bugs
Date: 07/26/2005 11:18:00
>Number:         30837
>Category:       pkg
>Synopsis:       add `nogui' option to net/jigdo (patch privided)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 26 11:18:00 +0000 2005
>Originator:     Jukka Salmi
>Release:        NetBSD 3.99.7
>Environment:
System: NetBSD moray.salmi.ch 3.99.7 NetBSD 3.99.7 (MORAY) #0: Mon Jul 25 19:41:58 CEST 2005 build@moray.salmi.ch:/build/nbsd/i386/sys/arch/i386/compile/MORAY i386
Architecture: i386
Machine: i386
>Description:
The attached patch adds a `nogui' option to net/jigdo to make it possible
to build the package without the GTK+ GUI. If built with `nogui', www/libwww
and x11/gtk2 are not needed anymore.
>How-To-Repeat:
N/a
>Fix:
Apply the attached patch which can be found at
http://salmi.ch/~jukka/patches/pkgsrc/net/jigdo/patch-nogui_option

diff -ruN pkgsrc/net/jigdo.bak/Makefile pkgsrc/net/jigdo/Makefile
--- pkgsrc/net/jigdo.bak/Makefile	2005-07-21 21:59:31.000000000 +0200
+++ pkgsrc/net/jigdo/Makefile	2005-07-26 12:56:56.000000000 +0200
@@ -9,6 +9,19 @@
 HOMEPAGE=		http://atterer.net/jigdo/
 COMMENT=		Tool to ease downloading of large files from the Internet
 
+PKG_OPTIONS_VAR=	PKG_OPTIONS.jigdo
+PKG_SUPPORTED_OPTIONS=	nogui
+
+.include "../../mk/bsd.options.mk"
+
+
+.if !empty(PKG_OPTIONS:Mnogui)
+CONFIGURE_ARGS+=	--without-gui
+.else
+CONFIGURE_ARGS+=	--with-gui
+PLIST_SRC=		${PKGDIR}/PLIST ${PKGDIR}/PLIST.gui
+.endif
+
 CONFIGURE_ARGS+=	--without-libdb
 GNU_CONFIGURE=		yes
 USE_LANGUAGES=		c c++
@@ -16,7 +29,10 @@
 #.include "../../databases/db3/buildlink3.mk"
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../devel/pkg-config/buildlink3.mk"
+
+.if empty(PKG_OPTIONS:Mnogui)
 .include "../../www/libwww/buildlink3.mk"
 .include "../../x11/gtk2/buildlink3.mk"
+.endif
 
 .include "../../mk/bsd.pkg.mk"
diff -ruN pkgsrc/net/jigdo.bak/PLIST pkgsrc/net/jigdo/PLIST
--- pkgsrc/net/jigdo.bak/PLIST	2004-02-26 23:55:18.000000000 +0100
+++ pkgsrc/net/jigdo/PLIST	2005-07-26 13:00:16.000000000 +0200
@@ -1,21 +1,10 @@
 @comment $NetBSD: PLIST,v 1.1.1.1 2004/02/26 22:55:18 agc Exp $
-bin/jigdo
 bin/jigdo-file
 bin/jigdo-lite
 bin/jigdo-mirror
 man/man1/jigdo-file.1
 man/man1/jigdo-lite.1
 man/man1/jigdo-mirror.1
-man/man1/jigdo.1
-share/jigdo/COPYING
 share/jigdo/debian-mirrors.jigdo
-share/jigdo/pixmaps/close.png
-share/jigdo/pixmaps/jigdo-logo.png
-share/jigdo/pixmaps/pause.png
-share/jigdo/pixmaps/progress-green.png
-share/jigdo/pixmaps/restart.png
-share/jigdo/pixmaps/start.png
-share/jigdo/pixmaps/stop.png
 ${PKGLOCALEDIR}/locale/de/LC_MESSAGES/jigdo.mo
-@dirrm share/jigdo/pixmaps
 @dirrm share/jigdo
diff -ruN pkgsrc/net/jigdo.bak/PLIST.gui pkgsrc/net/jigdo/PLIST.gui
--- pkgsrc/net/jigdo.bak/PLIST.gui	1970-01-01 01:00:00.000000000 +0100
+++ pkgsrc/net/jigdo/PLIST.gui	2005-07-26 13:00:22.000000000 +0200
@@ -0,0 +1,12 @@
+@comment $NetBSD$
+bin/jigdo
+man/man1/jigdo.1
+share/jigdo/COPYING
+share/jigdo/pixmaps/close.png
+share/jigdo/pixmaps/jigdo-logo.png
+share/jigdo/pixmaps/pause.png
+hare/jigdo/pixmaps/progress-green.png
+share/jigdo/pixmaps/restart.png
+share/jigdo/pixmaps/start.png
+share/jigdo/pixmaps/stop.png
+@dirrm share/jigdo/pixmaps