pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/43480: audio/SDL_mixer's optional dependencies should be PKG_OPTIONs
>Number: 43480
>Category: pkg
>Synopsis: SDL_mixer has a couple of libraries which are optional. They
>should be optional in pkgsrc too
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Jun 15 19:50: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:
It's annoying that SDL_mixer uses so many dependencies when you
need it to play only one or two games which don't use mp3, mod,
ogg or flac files.
The MP3 format is still plagued by patents and there are people
who prefer to avoid MP3 if possible. Those might like to be able
to disable mp3 support in SDL_mixer.
Besides, libmikmod has four current vulnerabilities which are not
yet fixed. Disabling libmikmod in all packages until there is an
updated package is a good workaround. This is another excellent
reason to make it optional in SDL_mixer.
>How-To-Repeat:
$ cd /usr/pkgsrc/audio/SDL_mixer
$ make print-run-depends-list
>Fix:
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/audio/SDL_mixer/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- Makefile 15 Nov 2009 21:05:40 -0000 1.38
+++ Makefile 15 Jun 2010 19:34:48 -0000
@@ -35,10 +35,7 @@
BUILDLINK_API_DEPENDS.SDL+= SDL>=1.2.10
-.include "../../audio/flac/buildlink3.mk"
-.include "../../audio/libmikmod/buildlink3.mk"
-.include "../../audio/libvorbis/buildlink3.mk"
+.include "options.mk"
+
.include "../../devel/SDL/buildlink3.mk"
-.include "../../multimedia/libogg/buildlink3.mk"
-.include "../../multimedia/smpeg/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: options.mk
===================================================================
RCS file: options.mk
diff -N options.mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ options.mk 15 Jun 2010 19:34:48 -0000
@@ -0,0 +1,56 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.SDL_mixer
+PKG_SUPPORTED_OPTIONS= flac mikmod ogg mp3
+PKG_SUGGESTED_OPTIONS= flac mikmod ogg mp3
+
+.include "../../mk/bsd.options.mk"
+
+###
+### flac
+###
+.if !empty(PKG_OPTIONS:Mflac)
+.include "../../audio/flac/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-music-flac
+CONFIGURE_ARGS+= --enable-music-flac-shared
+.else
+CONFIGURE_ARGS+= --disable-music-flac
+CONFIGURE_ARGS+= --disable-music-flac-shared
+.endif
+
+###
+### mikmod
+###
+.if !empty(PKG_OPTIONS:Mmikmod)
+.include "../../audio/libmikmod/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-music-mod
+CONFIGURE_ARGS+= --enable-music-mod-shared
+.else
+CONFIGURE_ARGS+= --disable-music-mod
+CONFIGURE_ARGS+= --disable-music-mod-shared
+.endif
+
+###
+### ogg
+###
+.if !empty(PKG_OPTIONS:Mogg)
+.include "../../audio/libvorbis/buildlink3.mk"
+.include "../../multimedia/libogg/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-music-ogg
+CONFIGURE_ARGS+= --enable-music-ogg-shared
+.else
+CONFIGURE_ARGS+= --disable-music-ogg
+CONFIGURE_ARGS+= --disable-music-ogg-shared
+.endif
+
+###
+### mp3
+###
+.if !empty(PKG_OPTIONS:Mmp3)
+.include "../../multimedia/smpeg/buildlink3.mk"
+CONFIGURE_ARGS+= --enable-music-mp3
+CONFIGURE_ARGS+= --enable-music-mp3-shared
+.else
+CONFIGURE_ARGS+= --disable-music-mp3
+CONFIGURE_ARGS+= --disable-music-mp3-shared
+.endif
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index