View | Details | Raw Unified | Return to bug 202404 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/ports/multimedia/mplayer2/Makefile (-203 / +159 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	mplayer2
3
PORTNAME=	mplayer2
4
PORTVERSION=	${MPLAYER2_PORT_VERSION}
4
PORTVERSION=	${MPLAYER2_PORT_VERSION}
5
PORTREVISION=	13
5
PORTREVISION=	14
6
CATEGORIES=	multimedia audio
6
CATEGORIES=	multimedia audio
7
MASTER_SITES=	LOCAL/gblach/
7
MASTER_SITES=	LOCAL/gblach/
8
8
Lines 12-19 Link Here
12
LICENSE=	GPLv2
12
LICENSE=	GPLv2
13
13
14
LIB_DEPENDS=	libpng.so:${PORTSDIR}/graphics/png \
14
LIB_DEPENDS=	libpng.so:${PORTSDIR}/graphics/png \
15
		libfreetype.so:${PORTSDIR}/print/freetype2 \
15
		libfreetype.so:${PORTSDIR}/print/freetype2
16
		libdvdread.so:${PORTSDIR}/multimedia/libdvdread
17
BUILD_DEPENDS=	ffmpeg:${PORTSDIR}/multimedia/ffmpeg \
16
BUILD_DEPENDS=	ffmpeg:${PORTSDIR}/multimedia/ffmpeg \
18
		python3:${PORTSDIR}/lang/python3 \
17
		python3:${PORTSDIR}/lang/python3 \
19
		rst2man:${PORTSDIR}/textproc/py-docutils
18
		rst2man:${PORTSDIR}/textproc/py-docutils
Lines 23-79 Link Here
23
HAS_CONFIGURE=	yes
22
HAS_CONFIGURE=	yes
24
CONFIGURE_ENV=	TMPDIR="${WRKSRC}"
23
CONFIGURE_ENV=	TMPDIR="${WRKSRC}"
25
CONFIGURE_ARGS=	--cc=${CC} \
24
CONFIGURE_ARGS=	--cc=${CC} \
26
		--extra-libs='-lavresample ${PORTAUDIOLIB}' \
27
		--mandir=${PREFIX}/man \
25
		--mandir=${PREFIX}/man \
28
		--enable-libavresample \
29
		--disable-alsa \
26
		--disable-alsa \
30
		--disable-liba52 \
31
		--disable-directfb \
27
		--disable-directfb \
32
		--disable-faad \
28
		--disable-faad \
33
		--disable-mng \
29
		--disable-gif \
30
		--disable-liba52 \
34
		--disable-libdca \
31
		--disable-libdca \
35
		--disable-xvid \
32
		--disable-mng \
36
		--disable-mpg123 \
33
		--disable-mpg123 \
37
		--disable-musepack
34
		--disable-musepack \
35
		--disable-xvid
38
MAKE_ARGS+=	BINDIR=${STAGEDIR}${PREFIX}/bin \
36
MAKE_ARGS+=	BINDIR=${STAGEDIR}${PREFIX}/bin \
39
		CONFDIR=${STAGEDIR}${PREFIX}/etc/mplayer
37
		CONFDIR=${STAGEDIR}${PREFIX}/etc/mplayer
40
38
41
MPLAYER2_SNAPSHOT_DATE=	2013-04-28
39
MPLAYER2_SNAPSHOT_DATE=	2013-04-28
42
MPLAYER2_PORT_VERSION=	2.0.${MPLAYER2_SNAPSHOT_DATE:S/-//g}
40
MPLAYER2_PORT_VERSION=	2.0.${MPLAYER2_SNAPSHOT_DATE:S/-//g}
43
41
42
OPTIONS_DEFINE=	A52 ASS CACA DEBUG DV DVDREAD DVDNAV ENCA IPV6 JACK LADSPA \
43
		LIBAV LIBBLURAY LIBCDIO LIRC MAD OPENGL PORTAUDIO PULSE \
44
		REALPLAYER RTC SDL SMB SPEEX THEORA V4L VDPAU X11 XINERAMA
45
OPTIONS_DEFINE_i386+=	WIN32
46
OPTIONS_DEFAULT=	ASS ENCA LIBAV X11
47
OPTIONS_SUB=	yes
44
48
45
OPTIONS_DEFINE=	DEBUG RTC IPV6 SMB LIBBLURAY DV THEORA \
46
		X11 XINERAMA OPENGL SDL VDPAU GIF CACA \
47
		MAD SPEEX LIBCDIO LADSPA REALPLAYER \
48
		JACK PULSE PORTAUDIO ASS LIRC
49
OPTIONS_DEFAULT=X11 ASS
50
51
.if !defined(PACKAGE_BUILDING)
52
OPTIONS_DEFINE+=	WIN32
53
OPTIONS_DEFAULT+=	WIN32
54
.endif
55
56
RTC_DESC=	Enable kernel realtime clock timing
57
PULSE_DESC=	Enable PulseAudio support
58
THEORA_DESC=	Enable ogg theora video support
59
ASS_DESC=	Enable ASS/SSA subtitle rendering
49
ASS_DESC=	Enable ASS/SSA subtitle rendering
60
WIN32_DESC=	Enable win32 codec set on the IA32 arch
50
DVDREAD_DESC=	DVD Playback support
61
REALPLAYER_DESC=Enable realplayer plugin
51
DVDNAV_DESC=	DVD menu navigation
62
LIRC_DESC=	Enable lirc support
52
ENCA_DESC=	Enable encoding detection support
53
LIBAV_DESC=	Enable libav support
63
LIBCDIO_DESC=	Enable libcdio support
54
LIBCDIO_DESC=	Enable libcdio support
55
LIRC_DESC=	Enable lirc support
56
PULSE_DESC=	Enable PulseAudio support
57
REALPLAYER_DESC=Enable realplayer plugin
58
RTC_DESC=	Enable kernel realtime clock timing
59
THEORA_DESC=	Enable ogg theora video support
64
V4L_DESC=	Enable Video4Linux TV support
60
V4L_DESC=	Enable Video4Linux TV support
61
WIN32_DESC=	Win32 codec pack support
65
62
66
SUB_FILES=	pkg-message
63
SUB_FILES=	pkg-message
67
64
68
CONFLICTS=	mplayer-1.*
65
CONFLICTS=	mplayer-1.*
69
66
70
.include <bsd.port.options.mk>
67
A52_LIB_DEPENDS=	liba52.so:${PORTSDIR}/audio/liba52
68
A52_CONFIGURE_ENABLE=	liba52
69
A52_LIBS=		-la52
70
71
ASS_LIB_DEPENDS=	libass.so:${PORTSDIR}/multimedia/libass
72
ASS_IMPLIES=		ENCA
73
74
CACA_LIB_DEPENDS=	libcaca.so:${PORTSDIR}/graphics/libcaca
75
CACA_CONFIGURE_ENABLE=	caca
76
CACA_LIBS=		-lcaca
77
78
DV_LIB_DEPENDS=		libdv.so:${PORTSDIR}/multimedia/libdv
79
DV_CONFIGURE_ON=	--enable-libdv
80
DV_CONFIGURE_OFF=	--disable-libdv
81
82
DVDREAD_LIB_DEPENDS=	libdvdread.so:${PORTSDIR}/multimedia/libdvdread
83
DVDREAD_CONFIGURE_ENABLE=dvdread
84
85
DVDNAV_LIB_DEPENDS=	libdvdnav.so:${PORTSDIR}/multimedia/libdvdnav
86
DVDNAV_CONFIGURE_ENABLE=dvdnav
87
88
ENCA_LIB_DEPENDS=	libenca.so:${PORTSDIR}/converters/enca
89
ENCA_CONFIGURE_ENABLE=	enca
90
ENCA_LIBS=		-lenca
91
92
IPV6_CATEGORIES=	ipv6
93
IPV6_CONFIGURE_ON=	--enable-inet6
94
IPV6_CONFIGURE_OFF=	--disable-inet6
95
96
JACK_LIB_DEPENDS=	libjack.so:${PORTSDIR}/audio/jack
97
JACK_CONFIGURE_ON=	--enable-jack
98
JACK_CONFIGURE_OFF=	--disable-jack
99
JACK_LIBS=		-ljack
100
101
LADSPA_RUN_DEPENDS=	${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa
102
LADSPA_CONFIGURE_ON=	--enable-ladspa
103
LADSPA_CONFIGURE_OFF=	--disable-ladspa
104
105
LIBAV_LIB_DEPENDS=	libavresample.so:${PORTSDIR}/multimedia/libav
106
LIBAV_CONFIGURE_ENABLE=	libavresample
107
LIBAV_LIBS=		-lavresample
108
109
LIBBLURAY_LIB_DEPENDS=	libbluray.so:${PORTSDIR}/multimedia/libbluray
110
LIBBLURAY_CONFIGURE_ON=	--enable-bluray
111
LIBBLURAY_CONFIGURE_OFF=--disable-bluray
112
113
LIBCDIO_LIB_DEPENDS=	libcdio_paranoia.so:${PORTSDIR}/sysutils/libcdio-paranoia
114
LIBCDIO_CONFIGURE_ON=	--enable-libcdio
115
LIBCDIO_CONFIGURE_OFF=	--disable-libcdio
116
117
LIRC_LIB_DEPENDS=	liblirc_client.so:${PORTSDIR}/comms/lirc
118
LIRC_CONFIGURE_ON=	--enable-lirc
119
LIRC_CONFIGURE_OFF=	--disable-lirc
120
121
MAD_LIB_DEPENDS=	libmad.so:${PORTSDIR}/audio/libmad
122
MAD_CONFIGURE_ON=	--enable-mad
123
MAD_CONFIGURE_OFF=	--disable-mad
124
125
OPENGL_USE=		GL=gl XORG=glproto
126
OPENGL_CONFIGURE_ON=	--enable-gl
127
OPENGL_CONFIGURE_OFF=	--disable-gl
128
OPENGL_IMPLIES=		X11
129
130
PORTAUDIO_LIB_DEPENDS=	libportaudio.so:${PORTSDIR}/audio/portaudio
131
PORTAUDIO_CONFIGURE_ON=	--enable-portaudio
132
PORTAUDIO_CONFIGURE_OFF=--disable-portaudio
133
PORTAUDIO_IMPLIES=	LIBAV
134
135
PULSE_LIB_DEPENDS=	libpulse.so:${PORTSDIR}/audio/pulseaudio
136
PULSE_CONFIGURE_ON=	--enable-pulse
137
PULSE_CONFIGURE_OFF=	--disable-pulse
138
139
REALPLAYER_BUILD_DEPENDS=realplay:${PORTSDIR}/multimedia/linux-realplayer
140
REALPLAYER_CONFIGURE_ON= --enable-real
141
REALPLAYER_CONFIGURE_OFF=--disable-real
142
143
RTC_BUILD_DEPENDS=	${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
144
RTC_CONFIGURE_ON=	--enable-rtc
145
RTC_CONFIGURE_OFF=	--disable-rtc
146
147
SDL_USE=		SDL=sdl
148
SDL_CONFIGURE_ON=	--enable-sdl
149
SDL_CONFIGURE_OFF=	--disable-sdl
150
151
SMB_LIB_DEPENDS=	libsmbclient.so:${PORTSDIR}/net/samba-libsmbclient
152
SMB_CONFIGURE_ON=	--enable-smb
153
SMB_CONFIGURE_OFF=	--disable-smb
154
155
SPEEX_LIB_DEPENDS=	libspeex.so:${PORTSDIR}/audio/speex
156
SPEEX_CONFIGURE_ON=	--enable-speex
157
SPEEX_CONFIGURE_OFF=	--disable-speex
158
159
THEORA_LIB_DEPENDS=	libtheora.so:${PORTSDIR}/multimedia/libtheora
160
THEORA_CONFIGURE_ON=	--enable-theora
161
THEORA_CONFIGURE_OFF=	--disable-theora
162
THEORA_LIBS=		-ltheoradec
163
164
V4L_BUILD_DEPENDS=	${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat
165
V4L_LIB_DEPENDS=	libv4l2.so:${PORTSDIR}/multimedia/libv4l
166
V4L_CONFIGURE_ON=	--enable-tv-v4l2
167
V4L_CONFIGURE_OFF=	--disable-tv-v4l2
168
V4L_LIBS=		-lv4l2
169
170
VDPAU_LIB_DEPENDS=	libvdpau.so:${PORTSDIR}/multimedia/libvdpau
171
VDPAU_CONFIGURE_ON=	--enable-vdpau
172
VDPAU_CONFIGURE_OFF=	--disable-vdpau
173
174
WIN32_RUN_DEPENDS=	win32-codecs>0:${PORTSDIR}/multimedia/win32-codecs
175
WIN32_CONFIGURE_ON=	--codecsdir=${LOCALBASE}/lib/win32
176
WIN32_CONFIGURE_OFF=	--disable-win32dll --disable-qtx
177
178
X11_USE=		XORG=x11,xv,xxf86vm
179
X11_CONFIGURE_ON=	--enable-x11
180
X11_CONFIGURE_OFF=	--disable-x11
181
X11_LIBS=		-lX11 -lXext
182
183
XINERAMA_USE=		XORG=xinerama,xineramaproto
184
XINERAMA_CONFIGURE_ON=	--enable-xinerama
185
XINERAMA_CONFIGURE_OFF=	--disable-xinerama
186
XINERAMA_IMPLIES=	X11
71
187
72
.if ${ARCH} == "sparc64"
188
.include <bsd.port.options.mk>
73
BROKEN=		Does not compile on sparc64
74
.endif
75
189
76
WITH_CDROM_DEVICE?=	/dev/cd0
190
BROKEN_sparc64=		Does not compile on sparc64
77
191
78
#On i386, gcc runs out of general purpose registers when
192
#On i386, gcc runs out of general purpose registers when
79
#trying to compile a debug version with the default flags.
193
#trying to compile a debug version with the default flags.
Lines 90-266 Link Here
90
.endif
204
.endif
91
.endif
205
.endif
92
206
93
.if ${PORT_OPTIONS:MIPV6}
94
CATEGORIES+=		ipv6
95
.else
96
CONFIGURE_ARGS+=	--disable-inet6
97
.endif
98
99
.if ${PORT_OPTIONS:MGIF}
100
LIB_DEPENDS+=		libgif.so:${PORTSDIR}/graphics/giflib
101
.else
102
CONFIGURE_ARGS+=	--disable-gif
103
.endif
104
105
.if ${PORT_OPTIONS:MMAD}
106
LIB_DEPENDS+=		libmad.so:${PORTSDIR}/audio/libmad
107
.else
108
CONFIGURE_ARGS+=	--disable-mad
109
.endif
110
111
.if ${PORT_OPTIONS:MDV}
112
LIB_DEPENDS+=		libdv.so:${PORTSDIR}/multimedia/libdv
113
.else
114
CONFIGURE_ARGS+=	--disable-libdv
115
.endif
116
117
.if ${PORT_OPTIONS:MTHEORA}
118
LIB_DEPENDS+=		libtheora.so:${PORTSDIR}/multimedia/libtheora
119
.else
120
CONFIGURE_ARGS+=	--disable-theora
121
.endif
122
123
.if ${PORT_OPTIONS:MSPEEX}
124
LIB_DEPENDS+=		libspeex.so:${PORTSDIR}/audio/speex
125
.else
126
CONFIGURE_ARGS+=	--disable-speex
127
.endif
128
129
.if ${PORT_OPTIONS:MJACK}
130
LIB_DEPENDS+=		libjack.so:${PORTSDIR}/audio/jack
131
.else
132
CONFIGURE_ARGS+=	--disable-jack
133
.endif
134
135
.if ${PORT_OPTIONS:MPULSE}
136
LIB_DEPENDS+=		libpulse.so:${PORTSDIR}/audio/pulseaudio
137
.else
138
CONFIGURE_ARGS+=	--disable-pulse
139
.endif
140
141
.if ${PORT_OPTIONS:MPORTAUDIO}
142
LIB_DEPENDS+=		libportaudio.so:${PORTSDIR}/audio/portaudio
143
PORTAUDIOLIB=		-lportaudio
144
.else
145
CONFIGURE_ARGS+=	--disable-portaudio
146
.endif
147
148
.if ${PORT_OPTIONS:MLIBBLURAY}
149
LIB_DEPENDS+=		libbluray.so:${PORTSDIR}/multimedia/libbluray
150
.else
151
CONFIGURE_ARGS+=	--disable-bluray
152
.endif
153
154
.if ${PORT_OPTIONS:MSMB}
155
LIB_DEPENDS+=		libsmbclient.so:${PORTSDIR}/net/samba-libsmbclient
156
.else
157
CONFIGURE_ARGS+=	--disable-smb
158
.endif
159
160
.if ${PORT_OPTIONS:MLIBCDIO}
161
LIB_DEPENDS+=		libcdio_paranoia.so:${PORTSDIR}/sysutils/libcdio-paranoia
162
.else
163
CONFIGURE_ARGS+=	--disable-libcdio
164
.endif
165
166
.if ${PORT_OPTIONS:MLADSPA}
167
RUN_DEPENDS+=		${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa
168
.else
169
CONFIGURE_ARGS+=	--disable-ladspa
170
.endif
171
172
.if ${ARCH} == "i386" || ${ARCH} == "amd64"
173
.if ${PORT_OPTIONS:MWIN32} && !defined(PACKAGE_BUILDING) && ${ARCH} == "i386"
174
CODEC_PORT=		${PORTSDIR}/multimedia/win32-codecs
175
CODEC_DETECTION_FILE!=	${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE
176
RUN_DEPENDS+=		${CODEC_DETECTION_FILE}:${CODEC_PORT}
177
CONFIGURE_ARGS+=	--codecsdir=${LOCALBASE}/lib/win32
178
.else
179
CONFIGURE_ARGS+=	--disable-win32dll --disable-qtx
180
.endif
181
.endif # ARCH == i386/amd64
182
183
.if ${PORT_OPTIONS:MREALPLAYER}
184
RUN_DEPENDS+=		realplay:${PORTSDIR}/multimedia/linux-realplayer
185
BUILD_DEPENDS+=		realplay:${PORTSDIR}/multimedia/linux-realplayer
186
.else
187
CONFIGURE_ARGS+=	--disable-real
188
.endif
189
190
#.if ${PORT_OPTIONS:MV4L}
191
#BUILD_DEPENDS+=		${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat
192
#LIB_DEPENDS+=		libv4l2.so:${PORTSDIR}/multimedia/libv4l
193
#CONFIGURE_ARGS+=	--enable-tv-v4l2
194
#EXTRA_LIBS+=		-lv4l2
195
#.else
196
CONFIGURE_ARGS+=	--disable-tv-v4l2
197
#.endif
198
199
#.if defined(EXTRA_LIBS)
200
#CONFIGURE_ARGS+=	--extra-libs="${EXTRA_LIBS}"
201
#.endif
202
203
.if ${PORT_OPTIONS:MASS}
204
LIB_DEPENDS+=		libass.so:${PORTSDIR}/multimedia/libass
205
.else
206
CONFIGURE_ARGS+=	--disable-libass --disable-enca
207
.endif
208
209
.if ${PORT_OPTIONS:MX11}
210
USE_XORG=		x11 xv xxf86vm
211
.if ${PORT_OPTIONS:MOPENGL}
212
USE_XORG+=		glproto
213
LIB_DEPENDS+=		libGL.so:${PORTSDIR}/graphics/libGL
214
.else
215
CONFIGURE_ARGS+=	--disable-gl
216
.endif
217
.if ${PORT_OPTIONS:MXINERAMA}
218
USE_XORG+=		xinerama xineramaproto
219
.else
220
CONFIGURE_ARGS+=	--disable-xinerama
221
.endif
222
.else			#WITHOUT_X11
223
CONFIGURE_ARGS+=	--disable-x11
224
.endif
225
226
.if ${PORT_OPTIONS:MVDPAU}
227
LIB_DEPENDS+=		libvdpau.so:${PORTSDIR}/multimedia/libvdpau
228
.else
229
CONFIGURE_ARGS+=	--disable-vdpau
230
.endif
231
232
.if ${PORT_OPTIONS:MRTC}
233
BUILD_DEPENDS+=	${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
234
RUN_DEPENDS+=	${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
235
CONFIGURE_ARGS+=	--enable-rtc
236
.else
237
CONFIGURE_ARGS+=	--disable-rtc
238
.endif
239
240
.if ${PORT_OPTIONS:MLIBCACA}
241
LIB_DEPENDS+=		libcaca.so:${PORTSDIR}/graphics/libcaca
242
.else
243
CONFIGURE_ARGS+=	--disable-caca
244
.endif
245
246
.if ${PORT_OPTIONS:MLIRC}
247
LIB_DEPENDS+=		liblirc_client.so:${PORTSDIR}/comms/lirc
248
.else
249
CONFIGURE_ARGS+=	--disable-lirc
250
.endif
251
252
.if ${PORT_OPTIONS:MSDL}
253
USE_SDL=		sdl
254
.else
255
CONFIGURE_ARGS+=	--disable-sdl
256
.endif
257
258
.if defined(WITH_KERN_HZ)
207
.if defined(WITH_KERN_HZ)
259
DEFAULT_KERN_HZ=${WITH_KERN_HZ}
208
DEFAULT_KERN_HZ=${WITH_KERN_HZ}
260
.else
209
.else
261
DEFAULT_KERN_HZ=1024
210
DEFAULT_KERN_HZ=1024
262
.endif
211
.endif
263
212
213
CONFIGURE_ARGS+=	--extra-libs="${LIBS}"
214
215
# Depend on RESTRICTED package when built manually
216
.if !defined(PACKAGE_BUILDING)
217
OPTIONS_DEFAULT_i386+=	WIN32
218
.endif
219
264
pre-everything::
220
pre-everything::
265
	@${ECHO_MSG} "N - O - T - E"
221
	@${ECHO_MSG} "N - O - T - E"
266
	@${ECHO_MSG} ""
222
	@${ECHO_MSG} ""
Lines 270-286 Link Here
270
226
271
post-patch:
227
post-patch:
272
.if ${OSVERSION} >= 900010
228
.if ${OSVERSION} >= 900010
273
	@${REINPLACE_CMD} -e \
229
	${REINPLACE_CMD} -e \
274
		'/CFLAGS.*-D_LARGEFILE64_SOURCE/ s/-D_LARGEFILE64_SOURCE/-D_FILE_OFFSET_BITS=64/' \
230
		'/CFLAGS.*-D_LARGEFILE64_SOURCE/ s/-D_LARGEFILE64_SOURCE/-D_FILE_OFFSET_BITS=64/' \
275
		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
231
		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
276
.endif
232
.endif
277
	@${REINPLACE_CMD} \
233
	${REINPLACE_CMD} \
278
		-e 's|/dev/acd0|${WITH_CDROM_DEVICE}|' \
234
		-e 's|/dev/acd0|${WITH_CDROM_DEVICE}|' \
279
		-e 's|/usr/local|${LOCALBASE}|' \
235
		-e 's|/usr/local|${LOCALBASE}|' \
280
		-e 's|-lbz2|/usr/lib/libbz2.so|' \
236
		-e 's|-lbz2|/usr/lib/libbz2.so|' \
281
		-e 's|-lncurses|/usr/lib/libncurses.so|' \
237
		-e 's|-lncurses|/usr/lib/libncurses.so|' \
282
		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
238
		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
283
	@${FIND} -E ${WRKSRC} -type f \
239
	${FIND} -E ${WRKSRC} -type f \
284
		-iregex ".*(configure|.sh|Makefile)" -print0 | \
240
		-iregex ".*(configure|.sh|Makefile)" -print0 | \
285
		${XARGS} -x -0 -n 10 \
241
		${XARGS} -x -0 -n 10 \
286
		${REINPLACE_CMD} -E \
242
		${REINPLACE_CMD} -E \
Lines 288-308 Link Here
288
			-e 's|[[:space:]]gcc| ${CC}|' \
244
			-e 's|[[:space:]]gcc| ${CC}|' \
289
			-e 's|\$$\(CC\)|${CC}|' \
245
			-e 's|\$$\(CC\)|${CC}|' \
290
			-e 's|/usr/X11R6|${LOCALBASE}|'
246
			-e 's|/usr/X11R6|${LOCALBASE}|'
291
	@${FIND} ${WRKSRC}/DOCS/man -name "mplayer.1" | ${XARGS} ${REINPLACE_CMD} -E -e \
247
	${FIND} ${WRKSRC}/DOCS/man -name "mplayer.1" | ${XARGS} ${REINPLACE_CMD} -E -e \
292
		's|/usr/\\:local/\\:etc/\\:mplayer|${DATADIR:S/\//\/\\\:/g}|g ; \
248
		's|/usr/\\:local/\\:etc/\\:mplayer|${DATADIR:S/\//\/\\\:/g}|g ; \
293
		 s|/dev/\\:(dvd[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g ; \
249
		 s|/dev/\\:(dvd[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g ; \
294
		 s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g'
250
		 s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g'
295
.if ${PORT_OPTIONS:MRTC}
251
.if ${PORT_OPTIONS:MRTC}
296
	@${REINPLACE_CMD} -e \
252
	${REINPLACE_CMD} -e \
297
		's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \
253
		's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \
298
		${WRKSRC}/mplayer.c
254
		${WRKSRC}/mplayer.c
299
.endif
255
.endif
300
256
301
post-install:
257
post-install:
302
	@${INSTALL_DATA} ${WRKSRC}/etc/example.conf \
258
	${INSTALL_DATA} ${WRKSRC}/etc/example.conf \
303
		${STAGEDIR}${PREFIX}/etc/mplayer/mplayer.conf.sample
259
		${STAGEDIR}${PREFIX}/etc/mplayer/mplayer.conf.sample
304
.for conf in codecs input
260
.for conf in codecs input
305
	@${INSTALL_DATA} ${WRKSRC}/etc/${conf}.conf \
261
	${INSTALL_DATA} ${WRKSRC}/etc/${conf}.conf \
306
		${STAGEDIR}${PREFIX}/etc/mplayer/${conf}.conf.sample
262
		${STAGEDIR}${PREFIX}/etc/mplayer/${conf}.conf.sample
307
.endfor
263
.endfor
308
264
(-)/usr/ports/multimedia/mplayer2/files/patch-configure (-5 / +5 lines)
Lines 1-6 Link Here
1
--- configure.orig	2012-05-12 01:08:28.473233004 -0500
1
--- configure.orig	2013-07-09 16:33:11 UTC
2
+++ configure	2012-05-12 01:10:33.294799627 -0500
2
+++ configure
3
@@ -3111,7 +3111,7 @@ echocheck "pthread"
3
@@ -2676,7 +2676,7 @@ echocheck "pthread"
4
 if linux ; then
4
 if linux ; then
5
   THREAD_CFLAGS=-D_REENTRANT
5
   THREAD_CFLAGS=-D_REENTRANT
6
 elif freebsd || netbsd || openbsd || bsdos ; then
6
 elif freebsd || netbsd || openbsd || bsdos ; then
Lines 9-15 Link Here
9
 fi
9
 fi
10
 if test "$_pthreads" = auto ; then
10
 if test "$_pthreads" = auto ; then
11
 cat > $TMPC << EOF
11
 cat > $TMPC << EOF
12
@@ -3128,7 +3128,7 @@ int main(void) {
12
@@ -2693,7 +2693,7 @@ int main(void) {
13
 EOF
13
 EOF
14
 _pthreads=no
14
 _pthreads=no
15
 if ! hpux ; then
15
 if ! hpux ; then
Lines 18-24 Link Here
18
     # for crosscompilation, we cannot execute the program, be happy if we can link statically
18
     # for crosscompilation, we cannot execute the program, be happy if we can link statically
19
     cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break
19
     cc_check $THREAD_CFLAGS $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break
20
   done
20
   done
21
@@ -6340,7 +6340,7 @@ TIMER = $_timer
21
@@ -5296,7 +5296,7 @@ RST2MAN = $_rst2man
22
 EXESUF      = $_exesuf
22
 EXESUF      = $_exesuf
23
 EXESUFS_ALL = .exe
23
 EXESUFS_ALL = .exe
24
 
24
 
(-)/usr/ports/multimedia/mplayer2/files/patch-libao2-ao_oss.c (-2 / +2 lines)
Lines 1-5 Link Here
1
--- libao2/ao_oss.c~	2012-05-10 23:45:22.000000000 -0500
1
--- libao2/ao_oss.c.orig	2013-07-09 16:33:13 UTC
2
+++ libao2/ao_oss.c	2012-05-11 00:03:17.820525648 -0500
2
+++ libao2/ao_oss.c
3
@@ -460,6 +460,7 @@ static void reset(void){
3
@@ -460,6 +460,7 @@ static void reset(void){
4
   fcntl(audio_fd, F_SETFD, FD_CLOEXEC);
4
   fcntl(audio_fd, F_SETFD, FD_CLOEXEC);
5
 #endif
5
 #endif
(-)/usr/ports/multimedia/mplayer2/files/patch-libmpcodecs-vd_theora.c (-10 / +10 lines)
Lines 1-6 Link Here
1
--- libmpcodecs/vd_theora.c.orig	2015-03-25 00:52:12.768575000 +0100
1
--- libmpcodecs/vd_theora.c.orig	2013-07-09 16:33:13 UTC
2
+++ libmpcodecs/vd_theora.c	2015-03-25 01:17:34.162174000 +0100
2
+++ libmpcodecs/vd_theora.c
3
@@ -39,22 +39,23 @@
3
@@ -39,22 +39,23 @@ static const vd_info_t info = {
4
 
4
 
5
 LIBVD_EXTERN(theora)
5
 LIBVD_EXTERN(theora)
6
 
6
 
Lines 32-38 Link Here
32
     }
32
     }
33
     return 0;
33
     return 0;
34
 }
34
 }
35
@@ -64,7 +65,7 @@
35
@@ -64,7 +65,7 @@ static int control(sh_video_t *sh,int cm
36
     theora_struct_t *context = sh->context;
36
     theora_struct_t *context = sh->context;
37
     switch(cmd) {
37
     switch(cmd) {
38
     case VDCTRL_QUERY_FORMAT:
38
     case VDCTRL_QUERY_FORMAT:
Lines 41-47 Link Here
41
 	    return CONTROL_TRUE;
41
 	    return CONTROL_TRUE;
42
 	return CONTROL_FALSE;
42
 	return CONTROL_FALSE;
43
     }
43
     }
44
@@ -88,8 +89,10 @@
44
@@ -88,8 +89,10 @@ static int init(sh_video_t *sh){
45
     if (!context)
45
     if (!context)
46
         goto err_out;
46
         goto err_out;
47
 
47
 
Lines 54-60 Link Here
54
 
54
 
55
     /* Read all header packets, pass them to theora_decode_header. */
55
     /* Read all header packets, pass them to theora_decode_header. */
56
     for (i = 0; i < THEORA_NUM_HEADER_PACKETS; i++)
56
     for (i = 0; i < THEORA_NUM_HEADER_PACKETS; i++)
57
@@ -109,7 +112,7 @@
57
@@ -109,7 +112,7 @@ static int init(sh_video_t *sh){
58
             op.b_o_s = 1;
58
             op.b_o_s = 1;
59
         }
59
         }
60
 
60
 
Lines 63-69 Link Here
63
         {
63
         {
64
             mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Broken Theora header; errorCode=%i!\n", errorCode);
64
             mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Broken Theora header; errorCode=%i!\n", errorCode);
65
             goto err_out;
65
             goto err_out;
66
@@ -117,23 +120,25 @@
66
@@ -117,23 +120,25 @@ static int init(sh_video_t *sh){
67
     }
67
     }
68
 
68
 
69
     /* now init codec */
69
     /* now init codec */
Lines 97-103 Link Here
97
 
97
 
98
 err_out:
98
 err_out:
99
     free(context);
99
     free(context);
100
@@ -150,9 +155,9 @@
100
@@ -150,9 +155,9 @@ static void uninit(sh_video_t *sh)
101
 
101
 
102
    if (context)
102
    if (context)
103
    {
103
    {
Lines 110-116 Link Here
110
       free (context);
110
       free (context);
111
    }
111
    }
112
 }
112
 }
113
@@ -165,7 +170,7 @@
113
@@ -165,7 +170,7 @@ static mp_image_t* decode(sh_video_t *sh
114
    theora_struct_t *context = sh->context;
114
    theora_struct_t *context = sh->context;
115
    int errorCode = 0;
115
    int errorCode = 0;
116
    ogg_packet op;
116
    ogg_packet op;
Lines 119-125 Link Here
119
    mp_image_t* mpi;
119
    mp_image_t* mpi;
120
 
120
 
121
    // no delayed frames
121
    // no delayed frames
122
@@ -177,31 +182,31 @@
122
@@ -177,31 +182,31 @@ static mp_image_t* decode(sh_video_t *sh
123
    op.packet = data;
123
    op.packet = data;
124
    op.granulepos = -1;
124
    op.granulepos = -1;
125
 
125
 
(-)/usr/ports/multimedia/mplayer2/files/patch-libmpdemux-demux_gif.c (-3 / +3 lines)
Lines 1-6 Link Here
1
--- libmpdemux/demux_gif.c.orig	2012-12-31 00:26:50.000000000 +0100
1
--- libmpdemux/demux_gif.c.orig	2013-07-09 16:33:16 UTC
2
+++ libmpdemux/demux_gif.c	2012-12-31 00:30:54.000000000 +0100
2
+++ libmpdemux/demux_gif.c
3
@@ -44,6 +44,16 @@
3
@@ -44,6 +44,16 @@ typedef struct {
4
 
4
 
5
 #define GIF_SIGNATURE (('G' << 16) | ('I' << 8) | 'F')
5
 #define GIF_SIGNATURE (('G' << 16) | ('I' << 8) | 'F')
6
 
6
 
(-)/usr/ports/multimedia/mplayer2/files/patch-libmpdemux-demux_ogg.c (-6 / +6 lines)
Lines 1-5 Link Here
1
--- libmpdemux/demux_ogg.c.orig	2013-07-09 18:33:16.000000000 +0200
1
--- libmpdemux/demux_ogg.c.orig	2013-07-09 16:33:16 UTC
2
+++ libmpdemux/demux_ogg.c	2015-03-25 01:47:19.439377000 +0100
2
+++ libmpdemux/demux_ogg.c
3
@@ -50,21 +50,21 @@
3
@@ -50,21 +50,21 @@
4
 #endif
4
 #endif
5
 
5
 
Lines 28-34 Link Here
28
 } theora_struct_t;
28
 } theora_struct_t;
29
 #endif
29
 #endif
30
 
30
 
31
@@ -117,7 +117,7 @@
31
@@ -117,7 +117,7 @@ typedef struct ogg_stream {
32
     float   samplerate; /// granulpos 2 time
32
     float   samplerate; /// granulpos 2 time
33
     int64_t lastpos;
33
     int64_t lastpos;
34
     int32_t lastsize;
34
     int32_t lastsize;
Lines 37-43 Link Here
37
 
37
 
38
     // Logical stream state
38
     // Logical stream state
39
     ogg_stream_state stream;
39
     ogg_stream_state stream;
40
@@ -300,11 +300,10 @@
40
@@ -300,11 +300,10 @@ static unsigned char *demux_ogg_read_pac
41
            have theora_state st, until all header packets were passed to the
41
            have theora_state st, until all header packets were passed to the
42
            decoder. */
42
            decoder. */
43
         if (!pack->bytes || !(*data&0x80)) {
43
         if (!pack->bytes || !(*data&0x80)) {
Lines 51-57 Link Here
51
                 os->lastpos += pack->granulepos & iframemask;
51
                 os->lastpos += pack->granulepos & iframemask;
52
                 *keyframe = (pack->granulepos & iframemask) == 0;
52
                 *keyframe = (pack->granulepos & iframemask) == 0;
53
             } else {
53
             } else {
54
@@ -888,14 +887,15 @@
54
@@ -888,14 +887,15 @@ int demux_ogg_open(demuxer_t *demuxer)
55
 #ifdef CONFIG_OGGTHEORA
55
 #ifdef CONFIG_OGGTHEORA
56
         } else if (pack.bytes >= 7 && !strncmp (&pack.packet[1], "theora", 6)) {
56
         } else if (pack.bytes >= 7 && !strncmp (&pack.packet[1], "theora", 6)) {
57
             int errorCode = 0;
57
             int errorCode = 0;
Lines 73-79 Link Here
73
                 mp_msg(MSGT_DEMUX, MSGL_ERR,
73
                 mp_msg(MSGT_DEMUX, MSGL_ERR,
74
                        "Theora header parsing failed: %i \n", errorCode);
74
                        "Theora header parsing failed: %i \n", errorCode);
75
             } else {
75
             } else {
76
@@ -904,30 +904,32 @@
76
@@ -904,30 +904,32 @@ int demux_ogg_open(demuxer_t *demuxer)
77
                 sh_v->bih = calloc(1, sizeof(*sh_v->bih));
77
                 sh_v->bih = calloc(1, sizeof(*sh_v->bih));
78
                 sh_v->bih->biSize        = sizeof(*sh_v->bih);
78
                 sh_v->bih->biSize        = sizeof(*sh_v->bih);
79
                 sh_v->bih->biCompression = sh_v->format = FOURCC_THEORA;
79
                 sh_v->bih->biCompression = sh_v->format = FOURCC_THEORA;
(-)/usr/ports/multimedia/mplayer2/files/patch-libmpdemux-demuxer.h (-3 / +3 lines)
Lines 1-6 Link Here
1
--- libmpdemux/demuxer.h.orig	2014-09-19 05:04:22.000000000 +0200
1
--- libmpdemux/demuxer.h.orig	2013-07-09 16:33:16 UTC
2
+++ libmpdemux/demuxer.h	2014-09-19 05:01:57.000000000 +0200
2
+++ libmpdemux/demuxer.h
3
@@ -121,7 +121,7 @@
3
@@ -121,7 +121,7 @@ enum timestamp_type {
4
 #define SEEK_BACKWARD (1 << 3)
4
 #define SEEK_BACKWARD (1 << 3)
5
 
5
 
6
 // demux_lavf can pass lavf buffers using FF_INPUT_BUFFER_PADDING_SIZE instead
6
 // demux_lavf can pass lavf buffers using FF_INPUT_BUFFER_PADDING_SIZE instead
(-)/usr/ports/multimedia/mplayer2/files/patch-stream-tvi_bsdbt848.c (-12 / +12 lines)
Lines 1-6 Link Here
1
--- stream/tvi_bsdbt848.c.orig	2009-05-12 21:58:57.000000000 -0500
1
--- stream/tvi_bsdbt848.c.orig	2013-07-09 16:33:36 UTC
2
+++ stream/tvi_bsdbt848.c	2009-07-23 20:39:13.536681248 -0500
2
+++ stream/tvi_bsdbt848.c
3
@@ -352,11 +352,11 @@
3
@@ -368,11 +368,11 @@ static int control(priv_t *priv, int cmd
4
         int req_mode = *(int *)arg;
4
         int req_mode = *(int *)arg;
5
 	u_short tmp_fps;
5
 	u_short tmp_fps;
6
 
6
 
Lines 14-20 Link Here
14
             priv->maxheight = PAL_HEIGHT;
14
             priv->maxheight = PAL_HEIGHT;
15
             priv->maxwidth = PAL_WIDTH;
15
             priv->maxwidth = PAL_WIDTH;
16
             priv->maxfps = PAL_FPS;
16
             priv->maxfps = PAL_FPS;
17
@@ -377,7 +377,7 @@
17
@@ -393,7 +393,7 @@ static int control(priv_t *priv, int cmd
18
 
18
 
19
         if(req_mode == TV_NORM_NTSC)
19
         if(req_mode == TV_NORM_NTSC)
20
             {
20
             {
Lines 23-29 Link Here
23
             priv->maxheight = NTSC_HEIGHT;
23
             priv->maxheight = NTSC_HEIGHT;
24
             priv->maxwidth = NTSC_WIDTH;
24
             priv->maxwidth = NTSC_WIDTH;
25
             priv->maxfps = NTSC_FPS;
25
             priv->maxfps = NTSC_FPS;
26
@@ -401,9 +401,28 @@
26
@@ -417,9 +417,28 @@ static int control(priv_t *priv, int cmd
27
                 }
27
                 }
28
             }
28
             }
29
 
29
 
Lines 35-41 Link Here
35
+            priv->maxwidth = PAL_WIDTH;
35
+            priv->maxwidth = PAL_WIDTH;
36
+            priv->maxfps = PAL_FPS;
36
+            priv->maxfps = PAL_FPS;
37
+            priv->fps = PAL_FPS;
37
+            priv->fps = PAL_FPS;
38
+
38
 
39
-        if(ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
39
+            if(priv->fps > priv->maxfps) priv->fps = priv->maxfps;
40
+            if(priv->fps > priv->maxfps) priv->fps = priv->maxfps;
40
+
41
+
41
+            if(priv->geom.rows > priv->maxheight)
42
+            if(priv->geom.rows > priv->maxheight)
Lines 48-60 Link Here
48
+                priv->geom.columns = priv->maxwidth;
49
+                priv->geom.columns = priv->maxwidth;
49
+                }
50
+                }
50
+            }
51
+            }
51
 
52
+
52
-        if(ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
53
+        if(ioctl(priv->btfd, BT848SFMT, &priv->iformat) < 0)
53
+        if(ioctl(priv->btfd, BT848SFMT, &priv->iformat) < 0)
54
             {
54
             {
55
             mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "METEORSFMT", strerror(errno));
55
             mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "METEORSFMT", strerror(errno));
56
             return TVI_CONTROL_FALSE;
56
             return TVI_CONTROL_FALSE;
57
@@ -532,8 +551,9 @@
57
@@ -548,8 +567,9 @@ G_private = priv; /* Oooh, sick */
58
 /* Video Configuration */
58
 /* Video Configuration */
59
 
59
 
60
 priv->videoready = TRUE;
60
 priv->videoready = TRUE;
Lines 65-76 Link Here
65
 priv->maxheight = PAL_HEIGHT;
65
 priv->maxheight = PAL_HEIGHT;
66
 priv->maxwidth = PAL_WIDTH;
66
 priv->maxwidth = PAL_WIDTH;
67
 priv->maxfps = PAL_FPS;
67
 priv->maxfps = PAL_FPS;
68
@@ -558,7 +578,7 @@
68
@@ -574,7 +594,7 @@ if(priv->btfd < 0)
69
     }
69
     }
70
 
70
 
71
 if(priv->videoready == TRUE &&
71
 if(priv->videoready == TRUE &&
72
-   ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
72
-   ioctl(priv->btfd, METEORSFMT, &priv->iformat) < 0)
73
+   ioctl(priv->btfd, BT848SFMT, &priv->iformat) < 0)
73
+   ioctl(priv->btfd, BT848SFMT, &priv->iformat) < 0)
74
     {
74
     {
75
     mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "SETEORSFMT", strerror(errno));
75
     mp_tmsg(MSGT_TV, MSGL_ERR, "tvi_bsdbt848: Call to %s ioctl failed. Error: %s\n", "SETEORSFMT", strerror(errno));
76
     }
76
     }
(-)/usr/ports/multimedia/mplayer2/files/patch-stream-tvi_v4l2.c (-2 / +2 lines)
Lines 1-5 Link Here
1
--- stream/tvi_v4l2.c~	2012-05-10 23:45:22.000000000 -0500
1
--- stream/tvi_v4l2.c.orig	2013-07-09 16:33:36 UTC
2
+++ stream/tvi_v4l2.c	2012-05-11 00:08:34.930938536 -0500
2
+++ stream/tvi_v4l2.c
3
@@ -52,7 +52,6 @@ known issues:
3
@@ -52,7 +52,6 @@ known issues:
4
 #ifdef HAVE_SYS_VIDEOIO_H
4
 #ifdef HAVE_SYS_VIDEOIO_H
5
 #include <sys/videoio.h>
5
 #include <sys/videoio.h>
(-)/usr/ports/multimedia/mplayer2/files/patch-sub-subassconvert.c (-1 / +1 lines)
Lines 1-4 Link Here
1
--- sub/subassconvert.c.orig
1
--- sub/subassconvert.c.orig	2013-07-09 16:33:36 UTC
2
+++ sub/subassconvert.c
2
+++ sub/subassconvert.c
3
@@ -18,6 +18,7 @@
3
@@ -18,6 +18,7 @@
4
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
4
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
(-)/usr/ports/multimedia/mplayer2/files/patch-sub-subreader.c (-1 / +1 lines)
Lines 1-4 Link Here
1
--- sub/subreader.c.orig
1
--- sub/subreader.c.orig	2013-07-09 16:33:36 UTC
2
+++ sub/subreader.c
2
+++ sub/subreader.c
3
@@ -21,6 +21,7 @@
3
@@ -21,6 +21,7 @@
4
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
4
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Return to bug 202404