Lines 1-5
Link Here
|
1 |
# Contains the options and dependencies that are shared |
1 |
# Contains non-trivial handling of option variables |
2 |
# among mplayer and mencoder |
2 |
# and build environment. Must be included after |
|
|
3 |
# bsd.port.pre.mk |
3 |
# |
4 |
# |
4 |
# Some of the knobs are not tunable by the OPTIONS framework. These are |
5 |
# Some of the knobs are not tunable by the OPTIONS framework. These are |
5 |
# explained here in detail. |
6 |
# explained here in detail. |
Lines 27-40
Link Here
|
27 |
# Enables language support bg, cz, de, dk, en, es, fr, gr, hu, it, ko, nl, no, pl, pt_BR, ro, ru, sk, tr, uk, zh |
28 |
# Enables language support bg, cz, de, dk, en, es, fr, gr, hu, it, ko, nl, no, pl, pt_BR, ro, ru, sk, tr, uk, zh |
28 |
# |
29 |
# |
29 |
|
30 |
|
30 |
.if ${OSVERSION} < 802502 |
31 |
# Non-OPTIONS knob handling |
31 |
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-base_system_log2f |
32 |
# ========================= |
32 |
.endif |
|
|
33 |
|
33 |
|
34 |
.if defined(WITH_LANG) |
34 |
.if defined(WITH_LANG) |
35 |
CONFIGURE_ARGS+=--language=${WITH_LANG} |
35 |
CONFIGURE_ARGS+=--language=${WITH_LANG} |
36 |
.endif |
36 |
.endif |
37 |
|
37 |
|
|
|
38 |
.if defined(WITH_DVD_DEVICE) |
39 |
DEFAULT_DVD_DEVICE=${WITH_DVD_DEVICE} |
40 |
.else |
41 |
DEFAULT_DVD_DEVICE=/dev/cd0 |
42 |
.endif |
43 |
|
44 |
.if defined(WITH_CDROM_DEVICE) |
45 |
DEFAULT_CDROM_DEVICE=${WITH_CDROM_DEVICE} |
46 |
.else |
47 |
DEFAULT_CDROM_DEVICE=/dev/cd0 |
48 |
.endif |
49 |
|
50 |
.if defined(WITH_KERN_HZ) |
51 |
DEFAULT_KERN_HZ=${WITH_KERN_HZ} |
52 |
.else |
53 |
DEFAULT_KERN_HZ=1024 |
54 |
.endif |
55 |
|
56 |
|
57 |
# Non-simplified OPTIONS handling |
58 |
# =============================== |
59 |
|
60 |
.if ${PORT_OPTIONS:MESOUND} |
61 |
USE_GNOME+= esound |
62 |
.else |
63 |
CONFIGURE_ARGS+= --disable-esd |
64 |
.endif |
65 |
|
66 |
.if ${PORT_OPTIONS:MIPV6} |
67 |
CATEGORIES+= ipv6 |
68 |
.else |
69 |
CONFIGURE_ARGS+= --disable-inet6 |
70 |
.endif |
71 |
|
72 |
.if ${PORT_OPTIONS:MOPENAL} |
73 |
USE_OPENAL= soft |
74 |
.else |
75 |
CONFIGURE_ARGS+= --disable-openal |
76 |
.endif |
77 |
|
78 |
.if ${PORT_OPTIONS:MRTMP} |
79 |
LIB_DEPENDS+= librtmp.so:${PORTSDIR}/multimedia/librtmp |
80 |
CONFIGURE_ARGS+= --enable-librtmp |
81 |
EXTRA_LIBS+= -lrtmp |
82 |
.else |
83 |
CONFIGURE_ARGS+= --disable-librtmp |
84 |
.endif |
85 |
|
86 |
.if ${PORT_OPTIONS:MSDL} |
87 |
USE_SDL= sdl |
88 |
LIB_DEPENDS+= libaa.so:${PORTSDIR}/graphics/aalib |
89 |
.else |
90 |
CONFIGURE_ARGS+= --disable-sdl |
91 |
.endif |
92 |
|
93 |
.if ${PORT_OPTIONS:MV4L} |
94 |
BUILD_DEPENDS+= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat |
95 |
LIB_DEPENDS+= libv4l2.so:${PORTSDIR}/multimedia/libv4l |
96 |
CONFIGURE_ARGS+= --enable-tv-v4l1 \ |
97 |
--enable-tv-v4l2 |
98 |
EXTRA_LIBS+= -lv4l1 -lv4l2 |
99 |
.else |
100 |
CONFIGURE_ARGS+= --disable-tv-v4l1 \ |
101 |
--disable-tv-v4l2 |
102 |
.endif |
103 |
|
104 |
|
105 |
# Build system handling (including OPTIONS) |
106 |
# ========================================= |
107 |
|
108 |
.if ${OSVERSION} < 802502 |
109 |
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-base_system_log2f |
110 |
.endif |
111 |
|
38 |
#On i386, gcc runs out of general purpose registers when |
112 |
#On i386, gcc runs out of general purpose registers when |
39 |
#trying to compile a debug version with the default flags. |
113 |
#trying to compile a debug version with the default flags. |
40 |
.if ${PORT_OPTIONS:MDEBUG} |
114 |
.if ${PORT_OPTIONS:MDEBUG} |
Lines 49-59
Link Here
|
49 |
.endif #OCFLAGS |
123 |
.endif #OCFLAGS |
50 |
.endif #DEBUG |
124 |
.endif #DEBUG |
51 |
|
125 |
|
52 |
#Supported architectures for clang |
126 |
# Supported architectures for clang |
53 |
.if ${ARCH} == "amd64" || ${ARCH} == "i386" |
127 |
.if ${ARCH} == "amd64" || ${ARCH} == "i386" |
54 |
MPLAYER_CLANG_SUPPORTED_ARCH= yes |
128 |
MPLAYER_CLANG_SUPPORTED_ARCH= yes |
55 |
.endif |
129 |
.endif |
56 |
|
130 |
|
|
|
131 |
# Unsupported architectures for inline assembly |
132 |
.if ${ARCH} == "ppc" |
133 |
CONFIGURE_ARGS+= --disable-asm |
134 |
.endif |
135 |
|
136 |
# Unsupported architectures |
137 |
.if ${ARCH} == "sparc64" |
138 |
BROKEN= Does not compile on sparc64 |
139 |
.endif |
140 |
.if ${ARCH} == "ia64" |
141 |
BROKEN= Does not detect CPU correctly on ia64 |
142 |
.endif |
143 |
|
144 |
|
57 |
.if ${PORT_OPTIONS:MRTCPU} |
145 |
.if ${PORT_OPTIONS:MRTCPU} |
58 |
CONFIGURE_ARGS+=--enable-runtime-cpudetection |
146 |
CONFIGURE_ARGS+=--enable-runtime-cpudetection |
59 |
.endif |
147 |
.endif |
Lines 85-236
Link Here
|
85 |
.endif |
173 |
.endif |
86 |
.endif |
174 |
.endif |
87 |
|
175 |
|
88 |
.if ${PORT_OPTIONS:MIPV6} |
|
|
89 |
CATEGORIES+= ipv6 |
90 |
.else |
91 |
CONFIGURE_ARGS+= --disable-inet6 |
92 |
.endif |
93 |
|
94 |
.if ${PORT_OPTIONS:MGIF} |
95 |
LIB_DEPENDS+= gif:${PORTSDIR}/graphics/giflib |
96 |
.else |
97 |
CONFIGURE_ARGS+= --disable-gif |
98 |
.endif |
99 |
|
100 |
.if ${PORT_OPTIONS:MOPENJPEG} |
101 |
LIB_DEPENDS+= openjpeg:${PORTSDIR}/graphics/openjpeg |
102 |
.else |
103 |
CONFIGURE_ARGS+= --disable-libopenjpeg |
104 |
.endif |
105 |
|
106 |
.if ${PORT_OPTIONS:MMAD} |
107 |
LIB_DEPENDS+= mad:${PORTSDIR}/audio/libmad |
108 |
.else |
109 |
CONFIGURE_ARGS+= --disable-mad |
110 |
.endif |
111 |
|
112 |
.if ${PORT_OPTIONS:MDV} |
113 |
LIB_DEPENDS+= dv:${PORTSDIR}/multimedia/libdv |
114 |
.else |
115 |
CONFIGURE_ARGS+= --disable-libdv |
116 |
.endif |
117 |
|
118 |
.if ${PORT_OPTIONS:MTHEORA} |
119 |
LIB_DEPENDS+= theora:${PORTSDIR}/multimedia/libtheora |
120 |
.else |
121 |
CONFIGURE_ARGS+= --disable-theora |
122 |
.endif |
123 |
|
124 |
.if ${PORT_OPTIONS:MVPX} |
125 |
LIB_DEPENDS+= vpx:${PORTSDIR}/multimedia/libvpx |
126 |
.else |
127 |
CONFIGURE_ARGS+= --disable-libvpx-lavc |
128 |
.endif |
129 |
|
130 |
.if ${PORT_OPTIONS:MSCHROEDINGER} |
131 |
LIB_DEPENDS+= schroedinger-1.0.11:${PORTSDIR}/multimedia/schroedinger |
132 |
.else |
133 |
CONFIGURE_ARGS+= --disable-libschroedinger-lavc |
134 |
.endif |
135 |
|
136 |
.if ${PORT_OPTIONS:MLIVEMEDIA} |
137 |
CONFIGURE_ARGS+= --enable-live |
138 |
BUILD_DEPENDS+= ${LOCALBASE}/live/liveMedia/libliveMedia.a:${PORTSDIR}/net/liveMedia |
139 |
CFLAGS+= -I${LOCALBASE}/live/liveMedia/include \ |
140 |
-I${LOCALBASE}/live/BasicUsageEnvironment/include \ |
141 |
-I${LOCALBASE}/live/UsageEnvironment/include \ |
142 |
-I${LOCALBASE}/live/groupsock/include |
143 |
LDFLAGS+= -L${LOCALBASE}/live/liveMedia \ |
144 |
-L${LOCALBASE}/live/BasicUsageEnvironment \ |
145 |
-L${LOCALBASE}/live/UsageEnvironment \ |
146 |
-L${LOCALBASE}/live/groupsock \ |
147 |
-lliveMedia \ |
148 |
-lUsageEnvironment \ |
149 |
-lBasicUsageEnvironment \ |
150 |
-lgroupsock \ |
151 |
-lstdc++ |
152 |
.else |
153 |
CONFIGURE_ARGS+= --disable-live |
154 |
.endif |
155 |
|
156 |
.if ${PORT_OPTIONS:MJACK} |
157 |
LIB_DEPENDS+= jack:${PORTSDIR}/audio/jack |
158 |
.else |
159 |
CONFIGURE_ARGS+= --disable-jack |
160 |
.endif |
161 |
|
162 |
.if ${PORT_OPTIONS:MNAS} |
163 |
LIB_DEPENDS+= audio:${PORTSDIR}/audio/nas |
164 |
.else |
165 |
CONFIGURE_ARGS+= --disable-nas |
166 |
.endif |
167 |
|
168 |
.if ${PORT_OPTIONS:MOPENAL} |
169 |
USE_OPENAL= soft |
170 |
.else |
171 |
CONFIGURE_ARGS+= --disable-openal |
172 |
.endif |
173 |
|
174 |
.if ${PORT_OPTIONS:MPULSEAUDIO} |
175 |
LIB_DEPENDS+= pulse:${PORTSDIR}/audio/pulseaudio |
176 |
.else |
177 |
CONFIGURE_ARGS+= --disable-pulse |
178 |
.endif |
179 |
|
180 |
.if ${PORT_OPTIONS:MBLURAY} |
181 |
LIB_DEPENDS+= bluray:${PORTSDIR}/multimedia/libbluray |
182 |
.else |
183 |
CONFIGURE_ARGS+= --disable-bluray |
184 |
.endif |
185 |
|
186 |
.if ${PORT_OPTIONS:MSMB} |
187 |
LIB_DEPENDS+= smbclient:${PORTSDIR}/net/samba-libsmbclient |
188 |
.else |
189 |
CONFIGURE_ARGS+= --disable-smb |
190 |
.endif |
191 |
|
192 |
.if ${PORT_OPTIONS:MFRIBIDI} |
193 |
LIB_DEPENDS+= fribidi:${PORTSDIR}/converters/fribidi |
194 |
.else |
195 |
CONFIGURE_ARGS+= --disable-fribidi |
196 |
.endif |
197 |
|
198 |
.if ${PORT_OPTIONS:MCDPARANOIA} |
199 |
LIB_DEPENDS+= cdda_paranoia:${PORTSDIR}/audio/cdparanoia |
200 |
.else |
201 |
CONFIGURE_ARGS+= --disable-cdparanoia |
202 |
.endif |
203 |
|
204 |
.if ${PORT_OPTIONS:MCDIO} |
205 |
LIB_DEPENDS+= cdio:${PORTSDIR}/sysutils/libcdio |
206 |
.else |
207 |
CONFIGURE_ARGS+= --disable-libcdio |
208 |
.endif |
209 |
|
210 |
.if ${PORT_OPTIONS:MLADSPA} |
211 |
RUN_DEPENDS+= ${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa |
212 |
.else |
213 |
CONFIGURE_ARGS+= --disable-ladspa |
214 |
.endif |
215 |
|
216 |
.if ${PORT_OPTIONS:MLZO} |
217 |
LIB_DEPENDS+= lzo2:${PORTSDIR}/archivers/lzo2 |
218 |
.else |
219 |
CONFIGURE_ARGS+= --disable-liblzo |
220 |
.endif |
221 |
|
222 |
.if defined(WITH_DVD_DEVICE) |
223 |
DEFAULT_DVD_DEVICE=${WITH_DVD_DEVICE} |
224 |
.else |
225 |
DEFAULT_DVD_DEVICE=/dev/cd0 |
226 |
.endif |
227 |
|
228 |
.if defined(WITH_CDROM_DEVICE) |
229 |
DEFAULT_CDROM_DEVICE=${WITH_CDROM_DEVICE} |
230 |
.else |
231 |
DEFAULT_CDROM_DEVICE=/dev/cd0 |
232 |
.endif |
233 |
|
234 |
.if ${ARCH} == "i386" || ${ARCH} == "amd64" |
176 |
.if ${ARCH} == "i386" || ${ARCH} == "amd64" |
235 |
.if ${PORT_OPTIONS:MWIN32} && !defined(PACKAGE_BUILDING) && ${ARCH} == "i386" |
177 |
.if ${PORT_OPTIONS:MWIN32} && !defined(PACKAGE_BUILDING) && ${ARCH} == "i386" |
236 |
RUN_DEPENDS+= ${CODEC_DETECTION_FILE}:${CODEC_PORT} |
178 |
RUN_DEPENDS+= ${CODEC_DETECTION_FILE}:${CODEC_PORT} |
Lines 243-299
Link Here
|
243 |
.endif |
185 |
.endif |
244 |
.endif # ARCH == i386/amd64 |
186 |
.endif # ARCH == i386/amd64 |
245 |
|
187 |
|
246 |
.if ${PORT_OPTIONS:MREAL} |
|
|
247 |
RUN_DEPENDS+= realplay:${PORTSDIR}/multimedia/linux-realplayer |
248 |
BUILD_DEPENDS+= realplay:${PORTSDIR}/multimedia/linux-realplayer |
249 |
.else |
250 |
CONFIGURE_ARGS+= --disable-real |
251 |
.endif |
252 |
|
253 |
.if ${PORT_OPTIONS:MAMR_NB} || ${PORT_OPTIONS:MAMR_WB} |
254 |
LIB_DEPENDS+= opencore-amrnb:${PORTSDIR}/audio/opencore-amr |
255 |
.endif |
256 |
|
257 |
.if !${PORT_OPTIONS:MAMR_NB} |
258 |
CONFIGURE_ARGS+= --disable-libopencore_amrnb |
259 |
.endif |
260 |
|
261 |
.if !${PORT_OPTIONS:MAMR_WB} |
262 |
CONFIGURE_ARGS+= --disable-libopencore_amrwb |
263 |
.endif |
264 |
|
265 |
.if ${PORT_OPTIONS:MGSM} |
266 |
LIB_DEPENDS+= gsm:${PORTSDIR}/audio/gsm |
267 |
.else |
268 |
CONFIGURE_ARGS+= --disable-libgsm |
269 |
.endif |
270 |
|
271 |
.if ${PORT_OPTIONS:MV4L} |
272 |
BUILD_DEPENDS+= ${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat |
273 |
LIB_DEPENDS+= v4l2.0:${PORTSDIR}/multimedia/libv4l |
274 |
CONFIGURE_ARGS+= --enable-tv-v4l1 \ |
275 |
--enable-tv-v4l2 |
276 |
EXTRA_LIBS+= -lv4l1 -lv4l2 |
277 |
.else |
278 |
CONFIGURE_ARGS+= --disable-tv-v4l1 \ |
279 |
--disable-tv-v4l2 |
280 |
.endif |
281 |
|
282 |
.if ${PORT_OPTIONS:MRTMP} |
283 |
LIB_DEPENDS+= rtmp:${PORTSDIR}/multimedia/rtmpdump |
284 |
CONFIGURE_ARGS+= --enable-librtmp |
285 |
EXTRA_LIBS+= -lrtmp |
286 |
.else |
287 |
CONFIGURE_ARGS+= --disable-librtmp |
288 |
.endif |
289 |
|
290 |
.if ${PORT_OPTIONS:MLIBMNG} |
291 |
LIB_DEPENDS+= mng:${PORTSDIR}/graphics/libmng |
292 |
.else |
293 |
CONFIGURE_ARGS+= --disable-mng |
294 |
.endif |
295 |
|
188 |
|
296 |
.if defined(EXTRA_LIBS) |
189 |
.if defined(EXTRA_LIBS) |
297 |
CONFIGURE_ARGS+= --extra-libs="${EXTRA_LIBS}" |
190 |
CONFIGURE_ARGS+= --extra-libs="${EXTRA_LIBS}" |
298 |
.endif |
191 |
.endif |
299 |
|
|
|