Wed Sep 1 20:55:56 2010 UTC ()
Add vdpau option, on the platforms where it is supported.
>From Aleksey Cheusov in PR 43658.


(wiz)
diff -r1.39 -r1.40 pkgsrc/multimedia/mplayer-share/options.mk

cvs diff -r1.39 -r1.40 pkgsrc/multimedia/mplayer-share/options.mk (expand / switch to unified diff)

--- pkgsrc/multimedia/mplayer-share/options.mk 2009/11/04 16:00:54 1.39
+++ pkgsrc/multimedia/mplayer-share/options.mk 2010/09/01 20:55:56 1.40
@@ -1,42 +1,47 @@ @@ -1,42 +1,47 @@
1# $NetBSD: options.mk,v 1.39 2009/11/04 16:00:54 pooka Exp $ 1# $NetBSD: options.mk,v 1.40 2010/09/01 20:55:56 wiz Exp $
2 2
3.if defined(PKGNAME) && empty(PKGNAME:Mmplayer-share*) 3.if defined(PKGNAME) && empty(PKGNAME:Mmplayer-share*)
4 4
5# Note: This expression is the same as ${PKGBASE}, but the latter is 5# Note: This expression is the same as ${PKGBASE}, but the latter is
6# not defined yet, so we cannot use it here. 6# not defined yet, so we cannot use it here.
7PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//} 7PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//}
8 8
9.include "../../mk/oss.buildlink3.mk" 9.include "../../mk/oss.buildlink3.mk"
 10.include "../../multimedia/libvdpau/available.mk"
10 11
11# ------------------------------------------------------------------------- 12# -------------------------------------------------------------------------
12# Define PKG_SUPPORTED_OPTIONS based on the current package and system. 13# Define PKG_SUPPORTED_OPTIONS based on the current package and system.
13# ------------------------------------------------------------------------- 14# -------------------------------------------------------------------------
14 15
15# Options supported by both mplayer* or mencoder*. 16# Options supported by both mplayer* or mencoder*.
16 17
17PKG_SUPPORTED_OPTIONS= gif jpeg mad dts dv dvdread png theora vorbis x264 debug 18PKG_SUPPORTED_OPTIONS= gif jpeg mad dts dv dvdread png theora vorbis x264 debug
18.if ${OSS_TYPE} != "none" 19.if ${OSS_TYPE} != "none"
19PKG_SUPPORTED_OPTIONS+= oss 20PKG_SUPPORTED_OPTIONS+= oss
20.endif 21.endif
21 22
22PKG_OPTIONS_OPTIONAL_GROUPS= faadgroup 23PKG_OPTIONS_OPTIONAL_GROUPS= faadgroup
23PKG_OPTIONS_GROUP.faadgroup= faad mplayer-internal-faad 24PKG_OPTIONS_GROUP.faadgroup= faad mplayer-internal-faad
24PKG_SUGGESTED_OPTIONS+= mplayer-internal-faad 25PKG_SUGGESTED_OPTIONS+= mplayer-internal-faad
25 26
26# Set options based on the specific package being built. 27# Set options based on the specific package being built.
27.if !empty(PKGNAME:M*mplayer*) 28.if !empty(PKGNAME:M*mplayer*)
28PKG_SUPPORTED_OPTIONS+= aalib esound ggi mplayer-menu nas pulseaudio sdl 29PKG_SUPPORTED_OPTIONS+= aalib esound ggi mplayer-menu nas pulseaudio sdl
29 30
 31.if ${VDPAU_AVAILABLE} == "yes"
 32PKG_SUPPORTED_OPTIONS+= vdpau
 33.endif
 34
30. if ${OPSYS} != "SunOS" 35. if ${OPSYS} != "SunOS"
31PKG_SUPPORTED_OPTIONS+= arts 36PKG_SUPPORTED_OPTIONS+= arts
32. endif 37. endif
33.elif !empty(PKGNAME:M*mencoder*) 38.elif !empty(PKGNAME:M*mencoder*)
34PKG_SUPPORTED_OPTIONS+= faac lame 39PKG_SUPPORTED_OPTIONS+= faac lame
35.endif 40.endif
36 41
37# OS-specific options. 42# OS-specific options.
38.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD" 43.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "Linux" || ${OPSYS} == "NetBSD"
39PKG_SUPPORTED_OPTIONS+= cdparanoia 44PKG_SUPPORTED_OPTIONS+= cdparanoia
40.elif ${OPSYS} == "SunOS" 45.elif ${OPSYS} == "SunOS"
41PKG_SUPPORTED_OPTIONS+= mlib 46PKG_SUPPORTED_OPTIONS+= mlib
42.endif 47.endif
@@ -66,27 +71,27 @@ PKG_SUPPORTED_OPTIONS+= mplayer-ssse3 @@ -66,27 +71,27 @@ PKG_SUPPORTED_OPTIONS+= mplayer-ssse3
66.endif 71.endif
67.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || \ 72.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
68 ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64" 73 ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
69PKG_SUPPORTED_OPTIONS+= xvid 74PKG_SUPPORTED_OPTIONS+= xvid
70.endif 75.endif
71 76
72# ------------------------------------------------------------------------- 77# -------------------------------------------------------------------------
73# Define PKG_SUGGESTED_OPTIONS. 78# Define PKG_SUGGESTED_OPTIONS.
74# ------------------------------------------------------------------------- 79# -------------------------------------------------------------------------
75 80
76.for _o_ in aalib arts cdparanoia dv dvdread esound gif jpeg \ 81.for _o_ in aalib arts cdparanoia dv dvdread esound gif jpeg \
77 lame mad mplayer-menu mplayer-real \ 82 lame mad mplayer-menu mplayer-real \
78 mplayer-default-cflags mplayer-runtime-cpudetection mplayer-win32 \ 83 mplayer-default-cflags mplayer-runtime-cpudetection mplayer-win32 \
79 nas oss pulseaudio png sdl theora vorbis x264 xvid 84 nas oss pulseaudio png sdl theora vorbis x264 xvid vdpau
80. if !empty(PKG_SUPPORTED_OPTIONS:M${_o_}) 85. if !empty(PKG_SUPPORTED_OPTIONS:M${_o_})
81PKG_SUGGESTED_OPTIONS+= ${_o_} 86PKG_SUGGESTED_OPTIONS+= ${_o_}
82. endif 87. endif
83.endfor 88.endfor
84.if ${OPSYS} == "Linux" 89.if ${OPSYS} == "Linux"
85PKG_SUGGESTED_OPTIONS+= vidix 90PKG_SUGGESTED_OPTIONS+= vidix
86.endif 91.endif
87 92
88# ------------------------------------------------------------------------- 93# -------------------------------------------------------------------------
89# Handle extra libraries (part 1) 94# Handle extra libraries (part 1)
90# ------------------------------------------------------------------------- 95# -------------------------------------------------------------------------
91EXTRA_LIBS= 96EXTRA_LIBS=
92 97
@@ -309,21 +314,27 @@ EXTRA_LIBS+= -lxvidcore @@ -309,21 +314,27 @@ EXTRA_LIBS+= -lxvidcore
309. include "../../multimedia/xvidcore/buildlink3.mk" 314. include "../../multimedia/xvidcore/buildlink3.mk"
310.else 315.else
311CONFIGURE_ARGS+= --disable-xvid 316CONFIGURE_ARGS+= --disable-xvid
312.endif 317.endif
313 318
314.if !empty(PKG_OPTIONS:Mmplayer-ssse3) 319.if !empty(PKG_OPTIONS:Mmplayer-ssse3)
315# needs a recent assembler 320# needs a recent assembler
316.include "../../devel/binutils/buildlink3.mk" 321.include "../../devel/binutils/buildlink3.mk"
317.include "../../devel/binutils/override-as.mk" 322.include "../../devel/binutils/override-as.mk"
318.else 323.else
319CONFIGURE_ARGS+= --disable-ssse3 324CONFIGURE_ARGS+= --disable-ssse3
320.endif 325.endif
321 326
 327.if !empty(PKG_OPTIONS:Mvdpau)
 328. include "../../multimedia/libvdpau/buildlink3.mk"
 329.else
 330CONFIGURE_ARGS+= --disable-vdpau
 331.endif
 332
322# ------------------------------------------------------------------------- 333# -------------------------------------------------------------------------
323# Handle extra libraries (part 1) 334# Handle extra libraries (part 1)
324# ------------------------------------------------------------------------- 335# -------------------------------------------------------------------------
325.if ${EXTRA_LIBS} != "" 336.if ${EXTRA_LIBS} != ""
326CONFIGURE_ARGS+= --extra-libs=${EXTRA_LIBS:C/^ //:Q} 337CONFIGURE_ARGS+= --extra-libs=${EXTRA_LIBS:C/^ //:Q}
327.endif 338.endif
328 339
329.endif # defined(PKGNAME) && empty(PKGNAME:Mmplayer-share*) 340.endif # defined(PKGNAME) && empty(PKGNAME:Mmplayer-share*)