| @@ -1,199 +1,203 @@ | | | @@ -1,199 +1,203 @@ |
1 | # $NetBSD: options.mk,v 1.27 2020/12/19 12:17:29 nia Exp $ | | 1 | # $NetBSD: options.mk,v 1.28 2021/04/25 06:09:41 nia Exp $ |
2 | | | 2 | |
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.mpv | | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.mpv |
4 | | | 4 | |
5 | | | 5 | |
6 | PKG_OPTIONS_OPTIONAL_GROUPS= gl | | 6 | PKG_OPTIONS_OPTIONAL_GROUPS= gl |
7 | PKG_OPTIONS_GROUP.gl= opengl rpi | | 7 | PKG_OPTIONS_GROUP.gl= opengl rpi |
8 | | | 8 | |
9 | # audio outputs | | 9 | # audio outputs |
10 | PKG_SUPPORTED_OPTIONS+= alsa jack openal pulseaudio | | 10 | PKG_SUPPORTED_OPTIONS+= alsa jack openal pulseaudio |
11 | # video outputs | | 11 | # video outputs |
12 | PKG_SUPPORTED_OPTIONS+= caca libdrm x11 | | 12 | PKG_SUPPORTED_OPTIONS+= caca libdrm x11 |
13 | # audio/video outputs | | 13 | # audio/video outputs |
14 | PKG_SUPPORTED_OPTIONS+= sdl2 | | 14 | PKG_SUPPORTED_OPTIONS+= sdl2 |
15 | # misc | | 15 | # misc |
16 | PKG_SUPPORTED_OPTIONS+= bluray lua | | 16 | PKG_SUPPORTED_OPTIONS+= bluray lua |
17 | | | 17 | |
18 | PKG_SUGGESTED_OPTIONS= bluray lua sdl2 | | 18 | PKG_SUGGESTED_OPTIONS= bluray lua sdl2 |
19 | PKG_SUGGESTED_OPTIONS.Linux+= alsa pulseaudio | | 19 | PKG_SUGGESTED_OPTIONS.Linux+= alsa pulseaudio |
20 | | | 20 | |
21 | .include "../../mk/bsd.fast.prefs.mk" | | 21 | .include "../../mk/bsd.fast.prefs.mk" |
22 | | | 22 | |
23 | .if ${OPSYS} != "Darwin" | | 23 | .if ${OPSYS} != "Darwin" |
24 | PKG_SUGGESTED_OPTIONS+= opengl libdrm x11 | | 24 | PKG_SUGGESTED_OPTIONS+= opengl libdrm x11 |
25 | .endif | | 25 | .endif |
26 | | | 26 | |
27 | .include "../../multimedia/libva/available.mk" | | 27 | .include "../../multimedia/libva/available.mk" |
28 | | | 28 | |
29 | .if ${VAAPI_AVAILABLE} == "yes" | | 29 | .if ${VAAPI_AVAILABLE} == "yes" |
30 | PKG_SUPPORTED_OPTIONS+= vaapi | | 30 | PKG_SUPPORTED_OPTIONS+= vaapi |
31 | PKG_SUGGESTED_OPTIONS+= vaapi | | 31 | PKG_SUGGESTED_OPTIONS+= vaapi |
32 | .endif | | 32 | .endif |
33 | | | 33 | |
34 | .include "../../multimedia/libvdpau/available.mk" | | 34 | .include "../../multimedia/libvdpau/available.mk" |
35 | | | 35 | |
36 | .if ${VDPAU_AVAILABLE} == "yes" | | 36 | .if ${VDPAU_AVAILABLE} == "yes" |
37 | PKG_SUPPORTED_OPTIONS+= vdpau | | 37 | PKG_SUPPORTED_OPTIONS+= vdpau |
38 | PKG_SUGGESTED_OPTIONS+= vdpau | | 38 | PKG_SUGGESTED_OPTIONS+= vdpau |
39 | .endif | | 39 | .endif |
40 | | | 40 | |
41 | .if ${OPSYS} == "Linux" | | 41 | .if ${OPSYS} == "Linux" |
42 | PKG_SUPPORTED_OPTIONS+= wayland | | 42 | PKG_SUPPORTED_OPTIONS+= wayland |
43 | PKG_SUGGESTED_OPTIONS+= wayland | | 43 | PKG_SUGGESTED_OPTIONS+= wayland |
44 | .endif | | 44 | .endif |
45 | | | 45 | |
46 | .include "../../mk/bsd.options.mk" | | 46 | .include "../../mk/bsd.options.mk" |
47 | | | 47 | |
48 | ### | | 48 | ### |
49 | ### alsa support (audio output) | | 49 | ### alsa support (audio output) |
50 | ### | | 50 | ### |
51 | .if !empty(PKG_OPTIONS:Malsa) | | 51 | .if !empty(PKG_OPTIONS:Malsa) |
52 | WAF_CONFIGURE_ARGS+= --enable-alsa | | 52 | WAF_CONFIGURE_ARGS+= --enable-alsa |
53 | .include "../../audio/alsa-lib/buildlink3.mk" | | 53 | .include "../../audio/alsa-lib/buildlink3.mk" |
54 | .else | | 54 | .else |
55 | WAF_CONFIGURE_ARGS+= --disable-alsa | | 55 | WAF_CONFIGURE_ARGS+= --disable-alsa |
56 | .endif | | 56 | .endif |
57 | | | 57 | |
58 | ### | | 58 | ### |
59 | ### libbluray support | | 59 | ### libbluray support |
60 | ### | | 60 | ### |
61 | .if !empty(PKG_OPTIONS:Mbluray) | | 61 | .if !empty(PKG_OPTIONS:Mbluray) |
62 | WAF_CONFIGURE_ARGS+= --enable-libbluray | | 62 | WAF_CONFIGURE_ARGS+= --enable-libbluray |
63 | .include "../../multimedia/libbluray/buildlink3.mk" | | 63 | .include "../../multimedia/libbluray/buildlink3.mk" |
64 | .else | | 64 | .else |
65 | WAF_CONFIGURE_ARGS+= --disable-libbluray | | 65 | WAF_CONFIGURE_ARGS+= --disable-libbluray |
66 | .endif | | 66 | .endif |
67 | | | 67 | |
68 | ### | | 68 | ### |
69 | ### caca support (video output) | | 69 | ### caca support (video output) |
70 | ### | | 70 | ### |
71 | .if !empty(PKG_OPTIONS:Mcaca) | | 71 | .if !empty(PKG_OPTIONS:Mcaca) |
72 | WAF_CONFIGURE_ARGS+= --enable-caca | | 72 | WAF_CONFIGURE_ARGS+= --enable-caca |
73 | .include "../../graphics/libcaca/buildlink3.mk" | | 73 | .include "../../graphics/libcaca/buildlink3.mk" |
74 | .else | | 74 | .else |
75 | WAF_CONFIGURE_ARGS+= --disable-caca | | 75 | WAF_CONFIGURE_ARGS+= --disable-caca |
76 | .endif | | 76 | .endif |
77 | | | 77 | |
78 | ### | | 78 | ### |
79 | ### lua support | | 79 | ### lua support |
80 | ### | | 80 | ### |
81 | .if !empty(PKG_OPTIONS:Mlua) | | 81 | .if !empty(PKG_OPTIONS:Mlua) |
82 | WAF_CONFIGURE_ARGS+= --enable-lua | | 82 | WAF_CONFIGURE_ARGS+= --enable-lua |
83 | LUA_VERSIONS_ACCEPTED= 52 51 | | 83 | LUA_VERSIONS_ACCEPTED= 52 51 |
84 | .include "../../lang/lua/buildlink3.mk" | | 84 | .include "../../lang/lua/buildlink3.mk" |
85 | .else | | 85 | .else |
86 | WAF_CONFIGURE_ARGS+= --disable-lua | | 86 | WAF_CONFIGURE_ARGS+= --disable-lua |
87 | .endif | | 87 | .endif |
88 | | | 88 | |
89 | ### | | 89 | ### |
90 | ### JACK support (audio output) | | 90 | ### JACK support (audio output) |
91 | ### | | 91 | ### |
92 | .if !empty(PKG_OPTIONS:Mjack) | | 92 | .if !empty(PKG_OPTIONS:Mjack) |
93 | WAF_CONFIGURE_ARGS+= --enable-jack | | 93 | WAF_CONFIGURE_ARGS+= --enable-jack |
94 | .include "../../audio/jack/buildlink3.mk" | | 94 | .include "../../audio/jack/buildlink3.mk" |
95 | .else | | 95 | .else |
96 | WAF_CONFIGURE_ARGS+= --disable-jack | | 96 | WAF_CONFIGURE_ARGS+= --disable-jack |
97 | .endif | | 97 | .endif |
98 | | | 98 | |
99 | | | 99 | |
100 | ### | | 100 | ### |
101 | ### OpenAL support (audio output) | | 101 | ### OpenAL support (audio output) |
102 | ### | | 102 | ### |
103 | .if !empty(PKG_OPTIONS:Mopenal) | | 103 | .if !empty(PKG_OPTIONS:Mopenal) |
104 | WAF_CONFIGURE_ARGS+= --enable-openal | | 104 | WAF_CONFIGURE_ARGS+= --enable-openal |
105 | .include "../../audio/openal-soft/buildlink3.mk" | | 105 | .include "../../audio/openal-soft/buildlink3.mk" |
106 | .else | | 106 | .else |
107 | WAF_CONFIGURE_ARGS+= --disable-openal | | 107 | WAF_CONFIGURE_ARGS+= --disable-openal |
108 | .endif | | 108 | .endif |
109 | | | 109 | |
110 | ### | | 110 | ### |
111 | ### PulseAudio support (audio output) | | 111 | ### PulseAudio support (audio output) |
112 | ### | | 112 | ### |
113 | .if !empty(PKG_OPTIONS:Mpulseaudio) | | 113 | .if !empty(PKG_OPTIONS:Mpulseaudio) |
114 | WAF_CONFIGURE_ARGS+= --enable-pulse | | 114 | WAF_CONFIGURE_ARGS+= --enable-pulse |
115 | .include "../../audio/pulseaudio/buildlink3.mk" | | 115 | .include "../../audio/pulseaudio/buildlink3.mk" |
116 | .else | | 116 | .else |
117 | WAF_CONFIGURE_ARGS+= --disable-pulse | | 117 | WAF_CONFIGURE_ARGS+= --disable-pulse |
118 | .endif | | 118 | .endif |
119 | | | 119 | |
120 | ### | | 120 | ### |
121 | ### SDL2 support (audio and video output) | | 121 | ### SDL2 support (audio and video output) |
122 | ### | | 122 | ### |
123 | .if !empty(PKG_OPTIONS:Msdl2) | | 123 | .if !empty(PKG_OPTIONS:Msdl2) |
124 | WAF_CONFIGURE_ARGS+= --enable-sdl2 | | 124 | WAF_CONFIGURE_ARGS+= --enable-sdl2 |
125 | .include "../../devel/SDL2/buildlink3.mk" | | 125 | .include "../../devel/SDL2/buildlink3.mk" |
126 | .else | | 126 | .else |
127 | WAF_CONFIGURE_ARGS+= --disable-sdl2 | | 127 | WAF_CONFIGURE_ARGS+= --disable-sdl2 |
128 | .endif | | 128 | .endif |
129 | | | 129 | |
130 | ### | | 130 | ### |
131 | ### VAAPI support (video output) | | 131 | ### VAAPI support (video output) |
132 | ### | | 132 | ### |
133 | .if !empty(PKG_OPTIONS:Mvaapi) | | 133 | .if !empty(PKG_OPTIONS:Mvaapi) |
134 | WAF_CONFIGURE_ARGS+= --enable-vaapi | | 134 | WAF_CONFIGURE_ARGS+= --enable-vaapi |
135 | .include "../../multimedia/libva/buildlink3.mk" | | 135 | .include "../../multimedia/libva/buildlink3.mk" |
136 | .else | | 136 | .else |
137 | WAF_CONFIGURE_ARGS+= --disable-vaapi | | 137 | WAF_CONFIGURE_ARGS+= --disable-vaapi |
138 | .endif | | 138 | .endif |
139 | | | 139 | |
140 | ### | | 140 | ### |
141 | ### VDPAU support (video output) | | 141 | ### VDPAU support (video output) |
142 | ### | | 142 | ### |
143 | .if !empty(PKG_OPTIONS:Mvdpau) | | 143 | .if !empty(PKG_OPTIONS:Mvdpau) |
144 | WAF_CONFIGURE_ARGS+= --enable-vdpau | | 144 | WAF_CONFIGURE_ARGS+= --enable-vdpau |
145 | .include "../../multimedia/libvdpau/buildlink3.mk" | | 145 | .include "../../multimedia/libvdpau/buildlink3.mk" |
146 | .else | | 146 | .else |
147 | WAF_CONFIGURE_ARGS+= --disable-vdpau | | 147 | WAF_CONFIGURE_ARGS+= --disable-vdpau |
148 | .endif | | 148 | .endif |
149 | | | 149 | |
150 | ### | | 150 | ### |
151 | ### libdrm support (video output) | | 151 | ### libdrm support (video output) |
152 | ### | | 152 | ### |
153 | .if !empty(PKG_OPTIONS:Mlibdrm) | | 153 | .if !empty(PKG_OPTIONS:Mlibdrm) |
154 | WAF_CONFIGURE_ARGS+= --enable-drm | | 154 | WAF_CONFIGURE_ARGS+= --enable-drm |
155 | .include "../../x11/libdrm/buildlink3.mk" | | 155 | .include "../../x11/libdrm/buildlink3.mk" |
156 | .else | | 156 | .else |
157 | WAF_CONFIGURE_ARGS+= --disable-drm | | 157 | WAF_CONFIGURE_ARGS+= --disable-drm |
158 | .endif | | 158 | .endif |
159 | | | 159 | |
160 | ### | | 160 | ### |
161 | ### OpenGL support (video output) | | 161 | ### OpenGL support (video output) |
162 | ### | | 162 | ### |
163 | .if !empty(PKG_OPTIONS:Mopengl) | | 163 | .if !empty(PKG_OPTIONS:Mopengl) |
| | | 164 | .include "../../graphics/MesaLib/features.mk" |
| | | 165 | . if ${MESALIB_SUPPORTS_EGL:tl} == "no" |
| | | 166 | WAF_CONFIGURE_ARGS+= --disable-egl-x11 |
| | | 167 | . endif |
164 | .include "../../graphics/MesaLib/buildlink3.mk" | | 168 | .include "../../graphics/MesaLib/buildlink3.mk" |
165 | .elif !empty(PKG_OPTIONS:Mrpi) | | 169 | .elif !empty(PKG_OPTIONS:Mrpi) |
166 | BUILD_DEPENDS+= raspberrypi-userland>=20170109:../../misc/raspberrypi-userland | | 170 | BUILD_DEPENDS+= raspberrypi-userland>=20170109:../../misc/raspberrypi-userland |
167 | CFLAGS+= "-L${PREFIX}/lib" | | 171 | CFLAGS+= "-L${PREFIX}/lib" |
168 | SUBST_CLASSES+= vc | | 172 | SUBST_CLASSES+= vc |
169 | SUBST_STAGE.vc= pre-configure | | 173 | SUBST_STAGE.vc= pre-configure |
170 | SUBST_MESSAGE.vc= Fixing path to VideoCore libraries. | | 174 | SUBST_MESSAGE.vc= Fixing path to VideoCore libraries. |
171 | SUBST_FILES.vc= waftools/checks/custom.py | | 175 | SUBST_FILES.vc= waftools/checks/custom.py |
172 | SUBST_SED.vc+= -e 's;opt/vc;${PREFIX};g' | | 176 | SUBST_SED.vc+= -e 's;opt/vc;${PREFIX};g' |
173 | .endif | | 177 | .endif |
174 | | | 178 | |
175 | ### | | 179 | ### |
176 | ### Wayland support (video output) | | 180 | ### Wayland support (video output) |
177 | ### | | 181 | ### |
178 | .if !empty(PKG_OPTIONS:Mwayland) | | 182 | .if !empty(PKG_OPTIONS:Mwayland) |
179 | WAF_CONFIGURE_ARGS+= --enable-wayland | | 183 | WAF_CONFIGURE_ARGS+= --enable-wayland |
180 | .include "../../devel/wayland/buildlink3.mk" | | 184 | .include "../../devel/wayland/buildlink3.mk" |
181 | .include "../../devel/wayland-protocols/buildlink3.mk" | | 185 | .include "../../devel/wayland-protocols/buildlink3.mk" |
182 | .include "../../x11/libxkbcommon/buildlink3.mk" | | 186 | .include "../../x11/libxkbcommon/buildlink3.mk" |
183 | .else | | 187 | .else |
184 | WAF_CONFIGURE_ARGS+= --disable-wayland | | 188 | WAF_CONFIGURE_ARGS+= --disable-wayland |
185 | .endif | | 189 | .endif |
186 | | | 190 | |
187 | ### | | 191 | ### |
188 | ### X11 support (video output) | | 192 | ### X11 support (video output) |
189 | ### | | 193 | ### |
190 | .if !empty(PKG_OPTIONS:Mx11) | | 194 | .if !empty(PKG_OPTIONS:Mx11) |
191 | WAF_CONFIGURE_ARGS+= --enable-x11 | | 195 | WAF_CONFIGURE_ARGS+= --enable-x11 |
192 | .include "../../x11/libXinerama/buildlink3.mk" | | 196 | .include "../../x11/libXinerama/buildlink3.mk" |
193 | .include "../../x11/libXrandr/buildlink3.mk" | | 197 | .include "../../x11/libXrandr/buildlink3.mk" |
194 | .include "../../x11/libXScrnSaver/buildlink3.mk" | | 198 | .include "../../x11/libXScrnSaver/buildlink3.mk" |
195 | .include "../../x11/libXv/buildlink3.mk" | | 199 | .include "../../x11/libXv/buildlink3.mk" |
196 | .include "../../x11/libXxf86vm/buildlink3.mk" | | 200 | .include "../../x11/libXxf86vm/buildlink3.mk" |
197 | .else | | 201 | .else |
198 | WAF_CONFIGURE_ARGS+= --disable-x11 | | 202 | WAF_CONFIGURE_ARGS+= --disable-x11 |
199 | .endif | | 203 | .endif |