Subject: pkg/28815: gaim pkg_options
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <pancake@phreaker.net>
List: pkgsrc-bugs
Date: 12/30/2004 16:06:00
>Number:         28815
>Category:       pkg
>Synopsis:       PKG_OPTIONS support for chat/gaim
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 30 16:06:00 +0000 2004
>Originator:     pancake@phreaker.net
>Release:        Linux 2.6.8.1
>Organization:
	
>Environment:
	
	
System: Linux bare 2.6.8.1 #7 Tue Nov 9 17:58:41 VET 2004 i686 GNU/Linux
Architecture: i686
Machine: i686
>Description:
	
	chat/gaim is a huge package, i added pkg_options to the Makefile..
	by this way gaim is easily modularized and size is drastically reduced.
>How-To-Repeat:
	
>Fix:

add this file: (options.mk)

-----8<-----[cut here]----------------

PKG_OPTIONS_VAR=PKG_OPTIONS.gaim
PKG_SUPPORTED_OPTIONS=silc spell ssl audio nas perl tcl zephyr
PKG_DEFAULT_OPTIONS=audio silc ssl

.include "../../mk/bsd.options.mk"

# audio 
.if !empty(PKG_OPTIONS:Mnas)
CONFIGURE_ARGS+= --enable-nas
PKG_OPTIONS+=audio
.include "../../audio/nas/buildlink3.mk"
.endif

.if !empty(PKG_OPTIONS:Maudio)
.include "../../audio/libao/buildlink3.mk"
.include "../../audio/libaudiofile/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-audio
.endif

# scripting
.if !empty(PKG_OPTIONS:Mperl)
USE_PERL5=YES
.else
CONFIGURE_ARGS+=--disable-perl
.endif

.if !empty(PKG_OPTIONS:Mtcl)
.include "../../lang/tcl/buildlink3.mk"
.else
CONFIGURE_ARGS+=--disable-tcl
.endif

# protocols
.if !empty(PKG_OPTIONS:Msilc)
CONFIGURE_ARGS+=	--with-silc-includes=${BUILDLINK_PREFIX.silc-toolkit}/include/silc
CONFIGURE_ARGS+=	--with-silc-libs=${BUILDLINK_PREFIX.silc-toolkit}/lib/silc
.include "../../devel/silc-toolkit/buildlink3.mk"
.endif

.if !empty(PKG_OPTIONS:Mzephyr)
CONFIGURE_ARGS+=	--with-zephyr=${BUILDLINK_PREFIX.zephyr}
.include "../../chat/zephyr/buildlink3.mk"
.endif

# other
.if !empty(PKG_OPTIONS:Mspell)
.include "../../textproc/gtkspell/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-gtkspell
.endif

.if !empty(PKG_OPTIONS:Mssl)
.include "../../security/gnutls/buildlink3.mk"
.else
CONFIGURE_ARGS+=--enable-gnutls=no
.endif

-----8<-----[cut here]----------------


and diff this against chat/gaim/Makefile

Index: Makefile
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/chat/gaim/Makefile,v
retrieving revision 1.76
diff -r1.76 Makefile
27,30d26
< CONFIGURE_ARGS+=	--with-silc-includes=${BUILDLINK_PREFIX.silc-toolkit}/include/silc
< CONFIGURE_ARGS+=	--with-silc-libs=${BUILDLINK_PREFIX.silc-toolkit}/lib/silc
< CONFIGURE_ARGS+=	--disable-nas
< CONFIGURE_ARGS+=	--disable-perl
32d27
< CONFIGURE_ARGS+=	--disable-tcl
41,42c36
< .include "../../audio/libao/buildlink3.mk"
< .include "../../audio/libaudiofile/buildlink3.mk"
---
> .include "../../chat/gaim/options.mk"
47,49d40
< .include "../../devel/silc-toolkit/buildlink3.mk"
< .include "../../security/gnutls/buildlink3.mk"
< .include "../../textproc/gtkspell/buildlink3.mk"
	

>Unformatted: