pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/43420: audio/pulseaudio has too many nonoptional dependencies



>Number:         43420
>Category:       pkg
>Synopsis:       pulseaudio's dependencies are mostly optional but not in pkgsrc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 05 17:15:00 +0000 2010
>Originator:     Peter Bex
>Release:        NetBSD 5.0.1_PATCH
>Organization:
        
>Environment:
        
        
System: NetBSD frohike.homeunix.org 5.0.1_PATCH NetBSD 5.0.1_PATCH (FROHIKE) 
#0: Tue Aug 11 22:31:56 CEST 2009 
sjamaan%frohike.homeunix.org@localhost:/usr/obj/sys/arch/amd64/compile/FROHIKE 
amd64
Architecture: x86_64
Machine: amd64
>Description:
        Several of audio/pulseaudio's dependencies that are listed in the
        package as hard dependencies are in reality optional.
>How-To-Repeat:
        $ cd /usr/pkgsrc/audio/pulseaudio
        $ make print-run-depends-list

>Fix:
        Here's a patch to make most optional dependencies into PKG_OPTIONS

        This makes a difference of up to 10 packages that don't have to
        be installed when the user doesn't need or want them.
        If the user doesn't want X11 and it triggers installation of
        Xorg from pkgsrc, it makes a much bigger difference obviously.

        Alternatively, the separate modules/options could probably be
        made into separate packages (much like libao has libao-esound,
        libao-arts etc) but I'll leave that to the real pkgsrc gurus :)
        I've seen it in some Linux distros, so I guess it's at least possible.
        This patch is sufficient for my purposes.


Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/audio/pulseaudio/Makefile,v
retrieving revision 1.35
diff -u -r1.35 Makefile
--- Makefile    22 Feb 2010 21:48:03 -0000      1.35
+++ Makefile    5 Jun 2010 16:05:46 -0000
@@ -24,7 +24,6 @@
 AUTOCONF_REQD= 2.62
 
 PKGCONFIG_OVERRIDE+=   libpulse-browse.pc.in
-PKGCONFIG_OVERRIDE+=   libpulse-mainloop-glib.pc.in
 PKGCONFIG_OVERRIDE+=   libpulse-simple.pc.in
 PKGCONFIG_OVERRIDE+=   libpulse.pc.in
 
@@ -41,8 +40,6 @@
 CONF_FILES+=   ${EGDIR}/daemon.conf ${PKG_SYSCONFDIR}/daemon.conf
 CONF_FILES+=   ${EGDIR}/default.pa ${PKG_SYSCONFDIR}/default.pa
 CONF_FILES+=   ${EGDIR}/system.pa ${PKG_SYSCONFDIR}/system.pa
-CONF_FILES+=   ${EGDIR}/pulseaudio-system.conf \
-               ${PKG_SYSCONFBASE}/dbus-1/system.d/pulseaudio-system.conf
 
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFBASE}
 CONFIGURE_ARGS+=       --localstatedir=${VARBASE}
@@ -71,7 +68,7 @@
 BUILDLINK_TRANSFORM+=  rm:-Wl,--no-undefined
 .endif
 
-PLIST_VARS+=           evdev hal oss
+PLIST_VARS+=           evdev oss
 PLIST_SUBST+=          PULSEAUDIO_VER=${PULSEAUDIO_VER:Q}
 
 .if ${OPSYS} == "Darwin"
@@ -79,7 +76,6 @@
 BUILDLINK_TRANSFORM+=  rm:-Wl,-no-undefined
 BUILDLINK_TRANSFORM+=  rm:-Wl,-z rm:-Wl,nodelete
 .else
-PLIST.hal=             yes
 PLIST.oss=             yes
 .endif
 
@@ -113,21 +109,7 @@
 .include "../../audio/libsndfile/buildlink3.mk"
 .include "../../audio/speex/buildlink3.mk"
 .include "../../databases/gdbm/buildlink3.mk"
-.include "../../devel/GConf/schemas.mk"
-.include "../../devel/glib2/buildlink3.mk"
 .include "../../devel/libltdl/buildlink3.mk"
 .include "../../devel/liboil/buildlink3.mk"
-.include "../../security/openssl/buildlink3.mk"
-.include "../../security/policykit/buildlink3.mk"
-.include "../../sysutils/dbus/buildlink3.mk"
-.if ${OPSYS} != "Darwin"
-.include "../../sysutils/consolekit/buildlink3.mk"
-.endif
-.include "../../sysutils/hal/buildlink3.mk"
-.include "../../x11/libICE/buildlink3.mk"
-.include "../../x11/libSM/buildlink3.mk"
-.include "../../x11/libX11/buildlink3.mk"
-.include "../../x11/libXtst/buildlink3.mk"
-.include "../../x11/xextproto/buildlink3.mk"
 .include "../../mk/oss.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/audio/pulseaudio/PLIST,v
retrieving revision 1.7
diff -u -r1.7 PLIST
--- PLIST       2 Feb 2010 11:35:11 -0000       1.7
+++ PLIST       5 Jun 2010 16:05:46 -0000
@@ -9,10 +9,10 @@
 bin/parec
 bin/parecord
 bin/pasuspender
-bin/pax11publish
+${PLIST.x11}bin/pax11publish
 bin/pulseaudio
 bin/start-pulseaudio-kde
-bin/start-pulseaudio-x11
+${PLIST.x11}bin/start-pulseaudio-x11
 include/pulse/cdecl.h
 include/pulse/channelmap.h
 include/pulse/context.h
@@ -21,7 +21,7 @@
 include/pulse/ext-device-manager.h
 include/pulse/ext-stream-restore.h
 include/pulse/gccmacro.h
-include/pulse/glib-mainloop.h
+${PLIST.glib2}include/pulse/glib-mainloop.h
 include/pulse/introspect.h
 include/pulse/mainloop-api.h
 include/pulse/mainloop-signal.h
@@ -42,14 +42,14 @@
 include/pulse/version.h
 include/pulse/volume.h
 include/pulse/xmalloc.h
-lib/libpulse-mainloop-glib.la
+${PLIST.glib2}lib/libpulse-mainloop-glib.la
 lib/libpulse-simple.la
 lib/libpulse.la
 lib/libpulsecommon-${PULSEAUDIO_VER}.la
 lib/libpulsecore-${PULSEAUDIO_VER}.la
 ${PLIST.oss}lib/libpulsedsp.a
 ${PLIST.oss}lib/libpulsedsp.so
-lib/pkgconfig/libpulse-mainloop-glib.pc
+${PLIST.glib2}lib/pkgconfig/libpulse-mainloop-glib.pc
 lib/pkgconfig/libpulse-simple.pc
 lib/pkgconfig/libpulse.pc
 lib/pulse-${PULSEAUDIO_VER}/modules/libcli.a
@@ -66,8 +66,8 @@
 lib/pulse-${PULSEAUDIO_VER}/modules/libprotocol-native.so
 lib/pulse-${PULSEAUDIO_VER}/modules/libprotocol-simple.a
 lib/pulse-${PULSEAUDIO_VER}/modules/libprotocol-simple.so
-lib/pulse-${PULSEAUDIO_VER}/modules/libraop.a
-lib/pulse-${PULSEAUDIO_VER}/modules/libraop.so
+${PLIST.openssl}lib/pulse-${PULSEAUDIO_VER}/modules/libraop.a
+${PLIST.openssl}lib/pulse-${PULSEAUDIO_VER}/modules/libraop.so
 lib/pulse-${PULSEAUDIO_VER}/modules/librtp.a
 lib/pulse-${PULSEAUDIO_VER}/modules/librtp.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-always-sink.a
@@ -84,8 +84,8 @@
 lib/pulse-${PULSEAUDIO_VER}/modules/module-cli.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-combine.a
 lib/pulse-${PULSEAUDIO_VER}/modules/module-combine.so
-lib/pulse-${PULSEAUDIO_VER}/modules/module-console-kit.a
-lib/pulse-${PULSEAUDIO_VER}/modules/module-console-kit.so
+${PLIST.consolekit}lib/pulse-${PULSEAUDIO_VER}/modules/module-console-kit.a
+${PLIST.consolekit}lib/pulse-${PULSEAUDIO_VER}/modules/module-console-kit.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-cork-music-on-phone.a
 lib/pulse-${PULSEAUDIO_VER}/modules/module-cork-music-on-phone.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-default-device-restore.a
@@ -106,8 +106,8 @@
 lib/pulse-${PULSEAUDIO_VER}/modules/module-esound-protocol-unix.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-esound-sink.a
 lib/pulse-${PULSEAUDIO_VER}/modules/module-esound-sink.so
-lib/pulse-${PULSEAUDIO_VER}/modules/module-gconf.a
-lib/pulse-${PULSEAUDIO_VER}/modules/module-gconf.so
+${PLIST.GConf}lib/pulse-${PULSEAUDIO_VER}/modules/module-gconf.a
+${PLIST.GConf}lib/pulse-${PULSEAUDIO_VER}/modules/module-gconf.so
 ${PLIST.hal}lib/pulse-${PULSEAUDIO_VER}/modules/module-hal-detect.a
 ${PLIST.hal}lib/pulse-${PULSEAUDIO_VER}/modules/module-hal-detect.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-http-protocol-tcp.a
@@ -140,8 +140,8 @@
 lib/pulse-${PULSEAUDIO_VER}/modules/module-pipe-source.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-position-event-sounds.a
 lib/pulse-${PULSEAUDIO_VER}/modules/module-position-event-sounds.so
-lib/pulse-${PULSEAUDIO_VER}/modules/module-raop-sink.a
-lib/pulse-${PULSEAUDIO_VER}/modules/module-raop-sink.so
+${PLIST.openssl}lib/pulse-${PULSEAUDIO_VER}/modules/module-raop-sink.a
+${PLIST.openssl}lib/pulse-${PULSEAUDIO_VER}/modules/module-raop-sink.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-remap-sink.a
 lib/pulse-${PULSEAUDIO_VER}/modules/module-remap-sink.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-rescue-streams.a
@@ -150,8 +150,8 @@
 lib/pulse-${PULSEAUDIO_VER}/modules/module-rtp-recv.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-rtp-send.a
 lib/pulse-${PULSEAUDIO_VER}/modules/module-rtp-send.so
-lib/pulse-${PULSEAUDIO_VER}/modules/module-rygel-media-server.a
-lib/pulse-${PULSEAUDIO_VER}/modules/module-rygel-media-server.so
+${PLIST.dbus}lib/pulse-${PULSEAUDIO_VER}/modules/module-rygel-media-server.a
+${PLIST.dbus}lib/pulse-${PULSEAUDIO_VER}/modules/module-rygel-media-server.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-simple-protocol-tcp.a
 lib/pulse-${PULSEAUDIO_VER}/modules/module-simple-protocol-tcp.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-simple-protocol-unix.a
@@ -170,15 +170,15 @@
 lib/pulse-${PULSEAUDIO_VER}/modules/module-tunnel-source.so
 lib/pulse-${PULSEAUDIO_VER}/modules/module-volume-restore.a
 lib/pulse-${PULSEAUDIO_VER}/modules/module-volume-restore.so
-lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-bell.a
-lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-bell.so
-lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-cork-request.a
-lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-cork-request.so
-lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-publish.a
-lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-publish.so
-lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-xsmp.a
-lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-xsmp.so
-libexec/pulse/gconf-helper
+${PLIST.x11}lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-bell.a
+${PLIST.x11}lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-bell.so
+${PLIST.x11}lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-cork-request.a
+${PLIST.x11}lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-cork-request.so
+${PLIST.x11}lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-publish.a
+${PLIST.x11}lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-publish.so
+${PLIST.x11}lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-xsmp.a
+${PLIST.x11}lib/pulse-${PULSEAUDIO_VER}/modules/module-x11-xsmp.so
+${PLIST.GConf}libexec/pulse/gconf-helper
 man/man1/esdcompat.1
 man/man1/pabrowse.1
 man/man1/pacat.1
@@ -187,7 +187,7 @@
 man/man1/padsp.1
 man/man1/paplay.1
 man/man1/pasuspender.1
-man/man1/pax11publish.1
+${PLIST.x11}man/man1/pax11publish.1
 man/man1/pulseaudio.1
 man/man5/default.pa.5
 man/man5/pulse-client.conf.5
@@ -197,8 +197,8 @@
 share/examples/pulseaudio/default.pa
 share/examples/pulseaudio/pulseaudio-system.conf
 share/examples/pulseaudio/system.pa
-share/gnome/autostart/pulseaudio-kde.desktop
-share/gnome/autostart/pulseaudio.desktop
+${PLIST.x11}share/gnome/autostart/pulseaudio-kde.desktop
+${PLIST.x11}share/gnome/autostart/pulseaudio.desktop
 share/locale/as/LC_MESSAGES/pulseaudio.mo
 share/locale/bn_IN/LC_MESSAGES/pulseaudio.mo
 share/locale/ca/LC_MESSAGES/pulseaudio.mo
Index: buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/audio/pulseaudio/buildlink3.mk,v
retrieving revision 1.7
diff -u -r1.7 buildlink3.mk
--- buildlink3.mk       11 Feb 2010 17:52:10 -0000      1.7
+++ buildlink3.mk       5 Jun 2010 16:05:46 -0000
@@ -10,18 +10,31 @@
 
 .include "../../mk/bsd.fast.prefs.mk"
 
+pkgbase := pulseaudio
+.include "../../mk/pkg-build-options.mk"
+
 .if ${OPSYS} == "NetBSD" && !exists(/usr/include/sys/atomic.h)
 .include "../../devel/libatomic_ops/buildlink3.mk"
 .endif
 
 .include "../../audio/libsndfile/buildlink3.mk"
 .include "../../databases/gdbm/buildlink3.mk"
+
+.if !empty(PKG_BUILD_OPTIONS.pulseaudio:Mglib2)
 .include "../../devel/glib2/buildlink3.mk"
+.endif
+
+.if !empty(PKG_BUILD_OPTIONS.pulseaudio:Mdbus)
 .include "../../sysutils/dbus/buildlink3.mk"
+.endif
+
+.if !empty(PKG_BUILD_OPTIONS.pulseaudio:Mx11)
 .include "../../x11/libICE/buildlink3.mk"
 .include "../../x11/libSM/buildlink3.mk"
 .include "../../x11/libX11/buildlink3.mk"
 .include "../../x11/libXtst/buildlink3.mk"
+.endif
+
 .endif # PULSEAUDIO_BUILDLINK3_MK
 
 BUILDLINK_TREE+=       -pulseaudio
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/audio/pulseaudio/options.mk,v
retrieving revision 1.2
diff -u -r1.2 options.mk
--- options.mk  21 Jan 2010 12:12:27 -0000      1.2
+++ options.mk  5 Jun 2010 16:05:46 -0000
@@ -1,8 +1,13 @@
 # $NetBSD: options.mk,v 1.2 2010/01/21 12:12:27 drochner Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.pulseaudio
-PKG_SUPPORTED_OPTIONS= avahi
+PKG_SUPPORTED_OPTIONS= avahi dbus policykit glib2 GConf openssl x11
+.if ${OPSYS} != "Darwin"
+PKG_SUPPORTED_OPTIONS+=        hal
+.endif
+PKG_SUGGESTED_OPTIONS= x11
 PLIST_VARS+=           ${PKG_SUPPORTED_OPTIONS}
+PLIST_VARS+=           consolekit
 .include "../../mk/bsd.options.mk"
 
 ###
@@ -14,3 +19,82 @@
 .else
 CONFIGURE_ARGS+=       --disable-avahi
 .endif
+
+###
+### dbus
+###
+.if !empty(PKG_OPTIONS:Mdbus)
+CONF_FILES+=   ${EGDIR}/pulseaudio-system.conf \
+               ${PKG_SYSCONFBASE}/dbus-1/system.d/pulseaudio-system.conf
+.include "../../sysutils/dbus/buildlink3.mk"
+.if ${OPSYS} != "Darwin"
+.include "../../sysutils/consolekit/buildlink3.mk"
+PLIST.consolekit=      yes
+.endif
+.else
+CONFIGURE_ARGS+=       --disable-dbus
+.endif
+
+###
+### hal
+###
+.if !empty(PKG_OPTIONS:Mhal)
+.include "../../sysutils/hal/buildlink3.mk"
+PLIST.hal=             yes
+.else
+CONFIGURE_ARGS+=       --disable-hal
+.endif
+
+###
+### policykit
+###
+.if !empty(PKG_OPTIONS:Mpolicykit)
+.include "../../security/policykit/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=       --disable-policykit
+.endif
+
+###
+### glib2
+###
+.if !empty(PKG_OPTIONS:Mglib2)
+.include "../../devel/glib2/buildlink3.mk"
+PLIST.glib2=           yes
+.else
+CONFIGURE_ARGS+=       --disable-glib2
+PKGCONFIG_OVERRIDE+=   libpulse-mainloop-glib.pc.in
+.endif
+
+###
+### GConf
+###
+.if !empty(PKG_OPTIONS:MGConf)
+.include "../../devel/GConf/schemas.mk"
+PLIST.GConf=           yes
+.else
+CONFIGURE_ARGS+=       --disable-gconf
+.endif
+
+###
+### openssl (used for Airtunes/RAOP)
+###
+.if !empty(PKG_OPTIONS:Mopenssl)
+.include "../../security/openssl/buildlink3.mk"
+PLIST.openssl=         yes
+.else
+CONFIGURE_ARGS+=       --disable-openssl
+.endif
+
+###
+### x11
+###
+.if !empty(PKG_OPTIONS:Mx11)
+.include "../../x11/libICE/buildlink3.mk"
+.include "../../x11/libSM/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXtst/buildlink3.mk"
+.include "../../x11/xextproto/buildlink3.mk"
+PLIST.x11=             yes
+.else
+CONFIGURE_ARGS+=       --disable-x11
+.endif

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index