pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Convert the mplayer* and mencoder* packages to the opt...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5d9295228e24
branches:  trunk
changeset: 495016:5d9295228e24
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Wed Jun 01 18:45:45 2005 +0000

description:
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:

 doc/CHANGES                               |    4 +-
 mk/defaults/options.description           |   24 ++-
 multimedia/mencoder/Makefile              |    4 +-
 multimedia/mplayer-share/Makefile.common  |   49 +------
 multimedia/mplayer-share/Makefile.depends |   39 +----
 multimedia/mplayer-share/options.mk       |  235 ++++++++++++++++++++++++++++++
 multimedia/mplayer/Makefile               |    3 +-
 7 files changed, 262 insertions(+), 96 deletions(-)

diffs (truncated from 514 to 300 lines):

diff -r a437fee80e13 -r 5d9295228e24 doc/CHANGES
--- a/doc/CHANGES       Wed Jun 01 18:37:27 2005 +0000
+++ b/doc/CHANGES       Wed Jun 01 18:45:45 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.10271 2005/06/01 14:15:12 abs Exp $
+$NetBSD: CHANGES,v 1.10272 2005/06/01 18:45:45 jmmv Exp $
 
 Changes to the packages collection and infrastructure in 2005:
        
@@ -2753,3 +2753,5 @@
        Updated pkgtools/pkg_chk to 1.58 [abs 2005-06-01]
        Updated audio/SDL_mixer to 1.2.6nb2 [wiz 2005-06-01]
        Updated pkgtools/pkg_chk to 1.59 [abs 2005-06-01]
+       Updated multimedia/mplayer 1.0rc7nb1 [jmmv 2005-06-01]
+       Updated multimedia/gmplayer 1.0rc7nb1 [jmmv 2005-06-01]
diff -r a437fee80e13 -r 5d9295228e24 mk/defaults/options.description
--- a/mk/defaults/options.description   Wed Jun 01 18:37:27 2005 +0000
+++ b/mk/defaults/options.description   Wed Jun 01 18:45:45 2005 +0000
@@ -12,7 +12,7 @@
 ark    
 arping1        
 arping2        
-arts   
+arts                   Use the aRts audio daemon.
 aspell 
 ati    
 audiofile      
@@ -31,6 +31,7 @@
 canna  
 catalog-pgsql  
 catalog-sqlite 
+cdparanoia             Use cdparanoia to rip CDDA media.
 charset        
 charts 
 chips  
@@ -49,6 +50,8 @@
 domainscale    
 drac   
 dummy  
+dv                     Enable usage of the libdv library.
+dvdread                        Enable reproduction of DVDs.
 dynamic        
 eb     
 edit   
@@ -65,6 +68,7 @@
 gd     
 gdbm   
 gdk-pixbuf     
+gif                    Enable GIF support.
 gimp1-helpbrowser      Links gimp1 against gnome1 to get a help browser.
 glib1  
 glint  
@@ -105,7 +109,7 @@
 irssi-perl             Enable Perl support in irssi.
 ispell 
 java   
-jpeg   
+jpeg                   Enable JPEG support.
 jpilot 
 kde    
 kerberos       
@@ -113,7 +117,7 @@
 kqueue 
 krb4   
 krb5   
-lame   
+lame                   Use the lame encoder to create MP3 files.
 largefile      
 largescale     
 ldap   
@@ -130,20 +134,26 @@
 lzw    
 m17n   
 m68060-optimized       
-mad    
+mad                    Enable usage of the mad library to play MP3 files.
 magick 
 mdc2   
 metarefresh    
 mga    
 mhash  
 milter 
+mlib                   Enable usage of medialib (SunOS only).
 mmx    
 modperl        
+mplayer-menu           Enable support for user-defined menus.
+mplayer-real           Enable usage of Real codecs.
+mplayer-runtime-cpudetection   Enable CPU detection at run time.
+mplayer-win32          Enable usage of Win32 DLLs (codecs).
 multibyte      
 mysql  
 mysql4 
 native 
 ncurses        
+nas                    Enable usage of the Network Audio System.
 neomagic       
 net-tests      
 netqmail       
@@ -170,6 +180,7 @@
 pf     
 pgsql  
 plplot 
+png                    Enable PNG support.
 portals        
 postgresql     
 postgresql73   
@@ -216,6 +227,7 @@
 tdb    
 tdfx   
 tga    
+theora                 Use the theora codecs.
 tinydns64      
 tls    
 trident        
@@ -231,7 +243,7 @@
 virtualchroot  
 viruscan       
 vmware 
-vorbis 
+vorbis                 Use the vorbis codecs to play Ogg Vorbis files.
 vpop   
 wrap   
 wx     
@@ -241,7 +253,7 @@
 xft2   
 xmlimportbugs  
 xmms-eq        
-xvid   
+xvid                   Enable usage of XVid codecs.
 zaptel 
 zip    
 ziplinks       
diff -r a437fee80e13 -r 5d9295228e24 multimedia/mencoder/Makefile
--- a/multimedia/mencoder/Makefile      Wed Jun 01 18:37:27 2005 +0000
+++ b/multimedia/mencoder/Makefile      Wed Jun 01 18:45:45 2005 +0000
@@ -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 @@
 
 .include "../../multimedia/mplayer-share/Makefile.depends"
 
-.include "../../audio/lame/buildlink3.mk"
-
 .include "../../mk/bsd.pkg.mk"
 .include "../../multimedia/mplayer-share/Makefile.cflags"
diff -r a437fee80e13 -r 5d9295228e24 multimedia/mplayer-share/Makefile.common
--- a/multimedia/mplayer-share/Makefile.common  Wed Jun 01 18:37:27 2005 +0000
+++ b/multimedia/mplayer-share/Makefile.common  Wed Jun 01 18:45:45 2005 +0000
@@ -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 @@
 
 .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 -r a437fee80e13 -r 5d9295228e24 multimedia/mplayer-share/Makefile.depends
--- a/multimedia/mplayer-share/Makefile.depends Wed Jun 01 18:37:27 2005 +0000
+++ b/multimedia/mplayer-share/Makefile.depends Wed Jun 01 18:45:45 2005 +0000
@@ -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 -r a437fee80e13 -r 5d9295228e24 multimedia/mplayer-share/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/mplayer-share/options.mk       Wed Jun 01 18:45:45 2005 +0000
@@ -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
+



Home | Main Index | Thread Index | Old Index