summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2005-06-01 18:45:45 +0000
committerjmmv <jmmv@pkgsrc.org>2005-06-01 18:45:45 +0000
commitcbe4100202b9718cb94a2b01bed579f5075e3f86 (patch)
tree1541b2d5b7427ec71134f81983f8f5194ef3e5f7 /multimedia
parentb88e551f4e5d2a62be2f8bfdafb95bd91f162a41 (diff)
downloadpkgsrc-cbe4100202b9718cb94a2b01bed579f5075e3f86.tar.gz
Convert the mplayer* and mencoder* packages to the options framework.
This means that the MPLAYER_ENABLE_RUNTIME_CPU_DETECTION, MPLAYER_DISABLE_DRIVERS and MPLAYER_USE_MEDIALIB become deprecated (although still recognized). Visible changes in the resulting binary packages should be minimum by default (everything that was enabled before still is, and the same dependencies are kept). A notable addition, though, is the support for user-defined menus, closing PR pkg/29784. Also note that (almost) all dependencies have now a corresponding option to disable them in case you want to get a minimalist mplayer package. 'make show-options' is your friend ;) With thanks to wiz@ and dillo@ for their comments and help.
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/mencoder/Makefile4
-rw-r--r--multimedia/mplayer-share/Makefile.common49
-rw-r--r--multimedia/mplayer-share/Makefile.depends39
-rw-r--r--multimedia/mplayer-share/options.mk235
-rw-r--r--multimedia/mplayer/Makefile3
5 files changed, 241 insertions, 89 deletions
diff --git a/multimedia/mencoder/Makefile b/multimedia/mencoder/Makefile
index b986d30a410..96a7e2f1c15 100644
--- a/multimedia/mencoder/Makefile
+++ b/multimedia/mencoder/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2005/04/18 17:49:41 drochner Exp $
+# $NetBSD: Makefile,v 1.20 2005/06/01 18:45:46 jmmv Exp $
PKGNAME= mencoder-${MPLAYER_PKG_VERSION}
@@ -24,7 +24,5 @@ do-install:
.include "../../multimedia/mplayer-share/Makefile.depends"
-.include "../../audio/lame/buildlink3.mk"
-
.include "../../mk/bsd.pkg.mk"
.include "../../multimedia/mplayer-share/Makefile.cflags"
diff --git a/multimedia/mplayer-share/Makefile.common b/multimedia/mplayer-share/Makefile.common
index e5d7de6945d..a6928a426a6 100644
--- a/multimedia/mplayer-share/Makefile.common
+++ b/multimedia/mplayer-share/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.21 2005/05/22 20:08:22 jlam Exp $
+# $NetBSD: Makefile.common,v 1.22 2005/06/01 18:45:46 jmmv Exp $
MPLAYER_DIST_VERSION= 1.0pre7
@@ -53,49 +53,4 @@ CONFIGURE_ENV+= TMPDIR=${WRKDIR}
.include "../../mk/bsd.prefs.mk"
-.if ${MACHINE_ARCH} == "i386"
-CONFIGURE_ARGS+= --with-win32libdir="${LOCALBASE}/lib/win32"
-. if ${MPLAYER_ENABLE_RUNTIME_CPU_DETECTION} == YES
-CONFIGURE_ARGS+= --enable-runtime-cpudetection
-. endif
-BUILD_DEFS+= MPLAYER_ENABLE_RUNTIME_CPU_DETECTION
-.endif
-
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "alpha"
-CONFIGURE_ARGS+= --with-reallibdir="${LOCALBASE}/lib/RealPlayer8-Codecs"
-.endif
-
-.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux"
-CONFIGURE_ARGS+= --with-cdparanoiaincdir="${LOCALBASE}/include/cdparanoia"
-.endif
-
-.if ${OPSYS} == "SunOS" && !empty(MPLAYER_USE_MEDIALIB:M[Yy][Ee][Ss])
-CONFIGURE_ARGS+= --enable-mlib
-.else
-CONFIGURE_ARGS+= --disable-mlib
-.endif
-
-# Keep this list in sync with the one in bsd.pkg.defaults.mk, where
-# MPLAYER_DISABLE_DRIVERS is explained.
-MPLAYER_DRIVERS= arts audio/arts arts \
- esd audio/esound esd \
- nas audio/nas nas \
- sdl devel/SDL sdl
-
-# arts is currently broken on Solaris.
-.if ${OPSYS} == "SunOS"
-MPLAYER_DISABLE_DRIVERS+= arts
-.endif
-
-.if defined(PKGNAME) && !empty(PKGNAME:M*encoder*)
-MPLAYER_DISABLE_DRIVERS=arts esd nas sdl
-.else
-BUILD_DEFS+= MPLAYER_DISABLE_DRIVERS
-.endif
-.for drv pkg val in ${MPLAYER_DRIVERS}
-. if empty(MPLAYER_DISABLE_DRIVERS:M${drv})
-CONFIGURE_ARGS+= --enable-${val}
-. else
-CONFIGURE_ARGS+= --disable-${val}
-. endif
-.endfor
+.include "../../multimedia/mplayer-share/options.mk"
diff --git a/multimedia/mplayer-share/Makefile.depends b/multimedia/mplayer-share/Makefile.depends
index 938de5c0a05..7feea1cc1a6 100644
--- a/multimedia/mplayer-share/Makefile.depends
+++ b/multimedia/mplayer-share/Makefile.depends
@@ -1,49 +1,12 @@
-# $NetBSD: Makefile.depends,v 1.13 2005/06/01 18:03:06 jlam Exp $
+# $NetBSD: Makefile.depends,v 1.14 2005/06/01 18:45:46 jmmv Exp $
#
DEPENDS+= mplayer-share>=${MPLAYER_PKG_VERSION}:../../multimedia/mplayer-share
GCC_REQD+= 2.95.3
-.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD"
-. include "../../audio/cdparanoia/buildlink3.mk"
-.endif
-
.if ${OPSYS} == "NetBSD"
. include "../../devel/binutils/buildlink3.mk"
.endif
-
-.if ${MACHINE_ARCH} == "i386"
-DEPENDS+= win32-codecs>=011227:../../multimedia/win32-codecs
-.endif
-
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "alpha"
-DEPENDS+= realplayer-codecs>=8nb2:../../multimedia/realplayer-codecs
-.endif
-
-
-.for drv pkg val in ${MPLAYER_DRIVERS}
-. if empty(MPLAYER_DISABLE_DRIVERS:M${drv})
-. include "../../${pkg}/buildlink3.mk"
-. endif
-.endfor
-
-.include "../../audio/libmad/buildlink3.mk"
-.include "../../audio/libvorbis/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"
-.include "../../graphics/jpeg/buildlink3.mk"
-.include "../../graphics/libungif/buildlink3.mk"
-.include "../../graphics/png/buildlink3.mk"
-.include "../../multimedia/libdvdread/buildlink3.mk"
-.include "../../multimedia/libdv/buildlink3.mk"
-.include "../../multimedia/libtheora/buildlink3.mk"
-
-.if ${MACHINE_ARCH} == "i386"
-. include "../../multimedia/xvidcore/buildlink3.mk"
-.endif
-
-.if defined(USE_OSS)
-. include "../../mk/ossaudio.buildlink3.mk"
-.endif
-
.include "../../mk/x11.buildlink3.mk"
diff --git a/multimedia/mplayer-share/options.mk b/multimedia/mplayer-share/options.mk
new file mode 100644
index 00000000000..dfaea18aa0b
--- /dev/null
+++ b/multimedia/mplayer-share/options.mk
@@ -0,0 +1,235 @@
+# $NetBSD: options.mk,v 1.1 2005/06/01 18:45:46 jmmv Exp $
+
+.if !empty(PKGNAME) && empty(PKGNAME:Mmplayer-share*)
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//}
+
+.include "../../mk/bsd.prefs.mk"
+
+# -------------------------------------------------------------------------
+# Define PKG_SUPPORTED_OPTIONS based on the current package and system.
+# -------------------------------------------------------------------------
+
+# Options supported by both mplayer* or mencoder*.
+PKG_SUPPORTED_OPTIONS= gif jpeg mad dv dvdread oss png theora vorbis
+
+# Set options based on the specific package being built.
+.if !empty(PKGNAME:M*mplayer*)
+PKG_SUPPORTED_OPTIONS+= esound mplayer-menu nas sdl
+
+. if ${OPSYS} != "SunOS"
+PKG_SUPPORTED_OPTIONS+= arts
+. endif
+.elif !empty(PKGNAME:M*mencoder*)
+PKG_SUPPORTED_OPTIONS+= lame
+.endif
+
+# OS-specific options.
+.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD"
+PKG_SUPPORTED_OPTIONS+= cdparanoia
+.elif ${OPSYS} == "SunOS"
+PKG_SUPPORTED_OPTIONS+= mlib
+.endif
+
+# Platform-specific options.
+.if ${MACHINE_ARCH} == "i386"
+PKG_SUPPORTED_OPTIONS+= mplayer-runtime-cpudetection mplayer-win32 \
+ xvid
+.endif
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \
+ ${MACHINE_ARCH} == "alpha"
+PKG_SUPPORTED_OPTIONS+= mplayer-real
+.endif
+
+# -------------------------------------------------------------------------
+# Define PKG_SUGGESTED_OPTIONS.
+# -------------------------------------------------------------------------
+
+PKG_SUGGESTED_OPTIONS+= cdparanoia dv dvdread gif jpeg mad mplayer-menu \
+ oss png mplayer-real theora vorbis \
+ mplayer-runtime-cpudetection mplayer-win32 \
+ xvid
+.if !empty(PKGNAME:M*mplayer*)
+PKG_SUGGESTED_OPTIONS+= arts esound nas sdl
+.elif !empty(PKGNAME:M*mencoder*)
+PKG_SUGGESTED_OPTIONS+= lame
+.endif
+
+# -------------------------------------------------------------------------
+# Define PKG_SUGGESTED_OPTIONS based on deprecated variables.
+# -------------------------------------------------------------------------
+
+BUILD_DEFS+= MPLAYER_DISABLE_DRIVERS
+.for d in ${MPLAYER_DISABLE_DRIVERS}
+PKG_SUGGESTED_OPTIONS+= -${d:S/esd/esound/}
+_DEPRECATED_WARNING:= ${_DEPRECATED_WARNING} "Deprecated variable MPLAYER_DISABLE_DRIVERS=${d} used; use PKG_DEFAULT_OPTIONS+=-${d:S/esd/esound/} instead."
+.endfor
+.undef d
+
+.if ${MACHINE_ARCH} == "i386"
+PKG_OPTIONS_LEGACY_VARS+= \
+ MPLAYER_ENABLE_RUNTIME_CPU_DETECTION:mplayer-runtime-cpudetection
+.endif
+
+.if ${OPSYS} == "SunOS"
+PKG_OPTIONS_LEGACY_VARS+= MPLAYER_USE_MEDIALIB:mlib
+.endif
+
+# -------------------------------------------------------------------------
+# Handle chosen options.
+# -------------------------------------------------------------------------
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Marts)
+CONFIGURE_ARGS+= --enable-arts
+. include "../../audio/arts/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-arts
+.endif
+
+.if !empty(PKG_OPTIONS:Mcdparanoia)
+CONFIGURE_ARGS+= --enable-cdparanoia
+CONFIGURE_ARGS+= --with-cdparanoiaincdir="${BUILDLINK_PREFIX.cdparanoia}/include/cdparanoia"
+. include "../../audio/cdparanoia/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-cdparanoia
+.endif
+
+.if !empty(PKG_OPTIONS:Mdv)
+CONFIGURE_ARGS+= --enable-libdv
+. include "../../multimedia/libdv/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-libdv
+.endif
+
+.if !empty(PKG_OPTIONS:Mdvdread)
+CONFIGURE_ARGS+= --enable-dvdread
+. include "../../multimedia/libdvdread/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-dvdread
+.endif
+
+.if !empty(PKG_OPTIONS:Mesound)
+CONFIGURE_ARGS+= --enable-esd
+. include "../../audio/esound/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-esd
+.endif
+
+.if !empty(PKG_OPTIONS:Mgif)
+CONFIGURE_ARGS+= --enable-gif
+. include "../../graphics/libungif/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-gif
+.endif
+
+.if !empty(PKG_OPTIONS:Mjpeg)
+CONFIGURE_ARGS+= --enable-jpeg
+. include "../../graphics/jpeg/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-jpeg
+.endif
+
+.if !empty(PKG_OPTIONS:Mlame)
+#CONFIGURE_ARGS+= --enable-toolame
+. include "../../audio/lame/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-toolame
+.endif
+
+.if !empty(PKG_OPTIONS:Mmad)
+CONFIGURE_ARGS+= --enable-mad
+. include "../../audio/libmad/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-mad
+.endif
+
+.if !empty(PKG_OPTIONS:Mmlib)
+CONFIGURE_ARGS+= --enable-mlib
+.else
+CONFIGURE_ARGS+= --disable-mlib
+.endif
+
+.if !empty(PKG_OPTIONS:Mmplayer-menu)
+CONFIGURE_ARGS+= --enable-menu
+.else
+CONFIGURE_ARGS+= --disable-menu
+.endif
+
+.if !empty(PKG_OPTIONS:Mmplayer-real)
+EVAL_PREFIX+= PREFIX.realplayer-codecs=realplayer-codecs
+PREFIX.realplayer-codecs_DEFAULT= ${LOCALBASE}
+CONFIGURE_ARGS+= --enable-real
+CONFIGURE_ARGS+= --with-reallibdir="${PREFIX.realplayer-codecs}/lib/RealPlayer8-Codecs"
+DEPENDS+= realplayer-codecs>=8nb2:../../multimedia/realplayer-codecs
+.else
+CONFIGURE_ARGS+= --disable-real
+.endif
+
+.if !empty(PKG_OPTIONS:Mmplayer-runtime-cpudetection)
+CONFIGURE_ARGS+= --enable-runtime-cpudetection
+.else
+CONFIGURE_ARGS+= --disable-runtime-cpudetection
+.endif
+
+.if !empty(PKG_OPTIONS:Mmplayer-win32)
+EVAL_PREFIX+= PREFIX.win32-codecs=win32-codecs
+PREFIX.win32-codecs_DEFAULT= ${LOCALBASE}
+CONFIGURE_ARGS+= --enable-win32
+CONFIGURE_ARGS+= --with-win32libdir="${PREFIX.win32-codecs}/lib/win32"
+DEPENDS+= win32-codecs>=011227:../../multimedia/win32-codecs
+.else
+CONFIGURE_ARGS+= --disable-win32
+.endif
+
+.if !empty(PKG_OPTIONS:Mnas)
+CONFIGURE_ARGS+= --enable-nas
+. include "../../audio/nas/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-nas
+.endif
+
+.if !empty(PKG_OPTIONS:Moss)
+CONFIGURE_ARGS+= --enable-ossaudio
+. include "../../mk/ossaudio.buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-ossaudio
+.endif
+
+.if !empty(PKG_OPTIONS:Mpng)
+CONFIGURE_ARGS+= --enable-png
+. include "../../graphics/png/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-png
+.endif
+
+.if !empty(PKG_OPTIONS:Msdl)
+CONFIGURE_ARGS+= --enable-sdl
+. include "../../devel/SDL/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-sdl
+.endif
+
+.if !empty(PKG_OPTIONS:Mtheora)
+CONFIGURE_ARGS+= --enable-theora
+. include "../../multimedia/libtheora/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-theora
+.endif
+
+.if !empty(PKG_OPTIONS:Mvorbis)
+CONFIGURE_ARGS+= --enable-vorbis
+. include "../../audio/libvorbis/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-vorbis
+.endif
+
+.if !empty(PKG_OPTIONS:Mxvid)
+CONFIGURE_ARGS+= --enable-xvid
+. include "../../multimedia/xvidcore/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-xvid
+.endif
+
+.endif # !empty(PKGNAME) && empty(PKGNAME:Mmplayer-share*)
diff --git a/multimedia/mplayer/Makefile b/multimedia/mplayer/Makefile
index a2d33f22d83..d525b3a7c82 100644
--- a/multimedia/mplayer/Makefile
+++ b/multimedia/mplayer/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.17 2005/04/18 17:49:41 drochner Exp $
+# $NetBSD: Makefile,v 1.18 2005/06/01 18:45:46 jmmv Exp $
PKGNAME= mplayer-${MPLAYER_PKG_VERSION}
+PKGREVISION= 1
COMMENT= Software-only MPEG-1/2/4 video decoder