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

Collapse All | Expand All

(-)/usr/ports/multimedia/mplayer2/Makefile (-211 / +119 lines)
Lines 13-23 Link Here
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
16
		libavcodec.so:${PORTSDIR}/multimedia/ffmpeg
17
BUILD_DEPENDS=	ffmpeg:${PORTSDIR}/multimedia/ffmpeg \
17
BUILD_DEPENDS=	python3:${PORTSDIR}/lang/python3 \
18
		python3:${PORTSDIR}/lang/python3 \
19
		rst2man:${PORTSDIR}/textproc/py-docutils
18
		rst2man:${PORTSDIR}/textproc/py-docutils
20
RUN_DEPENDS=	ffmpeg:${PORTSDIR}/multimedia/ffmpeg
19
20
BROKEN_sparc64=	Does not compile on sparc64
21
21
22
USES=		cpe gmake iconv ncurses pkgconfig tar:xz
22
USES=		cpe gmake iconv ncurses pkgconfig tar:xz
23
HAS_CONFIGURE=	yes
23
HAS_CONFIGURE=	yes
Lines 26-32 Link Here
26
		--extra-libs='${LIBS}' \
26
		--extra-libs='${LIBS}' \
27
		--mandir=${PREFIX}/man \
27
		--mandir=${PREFIX}/man \
28
		--disable-alsa \
28
		--disable-alsa \
29
		--disable-liba52 \
30
		--disable-directfb \
29
		--disable-directfb \
31
		--disable-faad \
30
		--disable-faad \
32
		--disable-mng \
31
		--disable-mng \
Lines 40-253 Link Here
40
MPLAYER2_SNAPSHOT_DATE=	2013-04-28
39
MPLAYER2_SNAPSHOT_DATE=	2013-04-28
41
MPLAYER2_PORT_VERSION=	2.0.${MPLAYER2_SNAPSHOT_DATE:S/-//g}
40
MPLAYER2_PORT_VERSION=	2.0.${MPLAYER2_SNAPSHOT_DATE:S/-//g}
42
41
43
OPTIONS_DEFINE=	DEBUG RTC IPV6 SMB LIBBLURAY DV THEORA \
42
OPTIONS_DEFINE=	A52 ASS CACA CDIO DEBUG DV DVDREAD DVDNAV GIF IPV6 JACK LADSPA \
44
		X11 XINERAMA OPENGL SDL VDPAU GIF CACA \
43
		LIBBLURAY LIRC MAD OPENGL PORTAUDIO PULSEAUDIO REALPLAYER \
45
		MAD SPEEX CDIO LADSPA REALPLAYER \
44
		RTC RTCPU SDL SMB SPEEX THEORA V4L VDPAU X11 XINERAMA
46
		JACK PULSEAUDIO PORTAUDIO ASS LIRC V4L
45
OPTIONS_DEFAULT=A52 ASS ENCA DVDREAD DVDNAV RTCPU X11
47
OPTIONS_DEFAULT=X11 ASS
46
OPTIONS_DEFINE_i386+=	WIN32
48
47
OPTIONS_DEFAULT_i386+=	WIN32
49
.if !defined(PACKAGE_BUILDING)
48
OPTIONS_SUB=	yes
50
OPTIONS_DEFINE+=	WIN32
51
OPTIONS_DEFAULT+=	WIN32
52
.endif
53
49
54
RTC_DESC=	Enable kernel realtime clock timing
55
ASS_DESC=	Enable ASS/SSA subtitle rendering
50
ASS_DESC=	Enable ASS/SSA subtitle rendering
56
WIN32_DESC=	Enable win32 codec set on the IA32 arch
51
DVDREAD_DESC=	DVD Playback support
52
DVDNAV_DESC=	DVD menu navigation
57
REALPLAYER_DESC=Enable realplayer plugin
53
REALPLAYER_DESC=Enable realplayer plugin
54
RTC_DESC=	Enable kernel realtime clock timing
55
RTCPU_DESC=	Allow runtime CPU detection
56
WIN32_DESC=	Enable win32 codec set on the IA32 arch
58
57
59
SUB_FILES=	pkg-message
58
SUB_FILES=	pkg-message
60
59
61
CONFLICTS=	mplayer-1.*
60
CONFLICTS=	mplayer-1.*
62
61
63
.include <bsd.port.options.mk>
62
A52_LIB_DEPENDS=	liba52.so:${PORTSDIR}/audio/liba52
63
A52_CONFIGURE_OFF=	--disable-liba52
64
65
ASS_LIB_DEPENDS=	libass.so:${PORTSDIR}/multimedia/libass
66
ASS_CONFIGURE_OFF=	--disable-libass
67
68
CACA_LIB_DEPENDS=	libcaca.so:${PORTSDIR}/graphics/libcaca
69
CACA_CONFIGURE_OFF=	--disable-caca
70
71
CDIO_LIB_DEPENDS=	libcdio_paranoia.so:${PORTSDIR}/sysutils/libcdio-paranoia
72
CDIO_CONFIGURE_OFF=	--disable-libcdio
73
74
DEBUG_CONFIGURE_ON=	--enable-debug=3
75
DEBUG_CONFIGURE_OFF=	--disable-debug
76
77
DV_LIB_DEPENDS=		libdv.so:${PORTSDIR}/multimedia/libdv
78
DV_CONFIGURE_OFF=	--disable-libdv
79
80
DVDREAD_LIB_DEPENDS=	libdvdread.so:${PORTSDIR}/multimedia/libdvdread
81
DVDREAD_CONFIGURE_OFF=	--disable-dvdread
82
83
DVDNAV_LIB_DEPENDS=	libdvdnav.so:${PORTSDIR}/multimedia/libdvdnav
84
DVDNAV_CONFIGURE_OFF=	--disable-dvdnav
85
86
ENCA_LIB_DEPENDS=	libenca.so:${PORTSDIR}/converters/enca
87
ENCA_CONFIGURE_OFF=	--disable-enca
88
89
GIF_LIB_DEPENDS=	libgif.so:${PORTSDIR}/graphics/giflib
90
GIF_CONFIGURE_ON=	--enable-gif
91
GIF_CONFIGURE_OFF=	--disable-gif
92
93
IPV6_CATEGORIES=	ipv6
94
IPV6_CONFIGURE_OFF=	--disable-inet6
95
96
JACK_LIB_DEPENDS=	libjack.so:${PORTSDIR}/audio/jack
97
JACK_CONFIGURE_OFF=	--disable-jack
98
99
LADSPA_RUN_DEPENDS=	${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa
100
LADSPA_CONFIGURE_OFF=	--disable-ladspa
101
102
LIBBLURAY_LIB_DEPENDS=	libbluray.so:${PORTSDIR}/multimedia/libbluray
103
LIBBLURAY_CONFIGURE_OFF=--disable-bluray
64
104
65
.if ${ARCH} == "sparc64"
105
LIRC_LIB_DEPENDS=	liblirc_client.so:${PORTSDIR}/comms/lirc
66
BROKEN=		Does not compile on sparc64
106
LIRC_CONFIGURE_OFF=	--disable-lirc
67
.endif
107
68
108
MAD_LIB_DEPENDS=	libmad.so:${PORTSDIR}/audio/libmad
69
WITH_CDROM_DEVICE?=	/dev/cd0
109
MAD_CONFIGURE_OFF=	--disable-mad
70
110
71
#On i386, gcc runs out of general purpose registers when
111
OPENGL_USE=		GL=gl XORG=glproto
72
#trying to compile a debug version with the default flags.
112
OPENGL_CONFIGURE_OFF=	--disable-gl
73
.if ${PORT_OPTIONS:MDEBUG}
113
OPENGL_IMPLIES=		X11
74
.if ${ARCH} == "i386"
114
75
DEBUG_FLAGS=		-g -O -fomit-frame-pointer
115
PORTAUDIO_LIB_DEPENDS=	libportaudio.so:${PORTSDIR}/audio/portaudio
76
.endif
116
PORTAUDIO_CONFIGURE_OFF=--disable-portaudio
77
.else
117
78
.if defined(PACKAGE_BUILDING)
118
PULSEAUDIO_LIB_DEPENDS=	libpulse.so:${PORTSDIR}/audio/pulseaudio
79
CONFIGURE_ARGS+=	--enable-runtime-cpudetection
119
PULSEAUDIO_CONFIGURE_OFF=--disable-pulse
80
CFLAGS+=		-O2 -fomit-frame-pointer
120
81
.else
121
REALPLAYER_BUILD_DEPENDS=realplay:${PORTSDIR}/multimedia/linux-realplayer
82
CONFIGURE_ENV+=		CPPFLAGS= CFLAGS= LDFLAGS=
122
REALPLAYER_CONFIGURE_OFF=--disable-real
83
.endif
123
84
.endif
124
RTC_BUILD_DEPENDS=	${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
85
125
RTC_RUN_DEPENDS=	${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
86
.if ${PORT_OPTIONS:MIPV6}
126
RTC_CONFIGURE_OFF=	--disable-rtc
87
CATEGORIES+=		ipv6
127
88
.else
128
RTCPU_CONFIGURE_ON=	--enable-runtime-cpudetection
89
CONFIGURE_ARGS+=	--disable-inet6
129
RTCPU_CONFIGURE_OFF=	--disable-runtime-cpudetection
90
.endif
130
91
131
SDL_USE=		SDL=sdl
92
.if ${PORT_OPTIONS:MGIF}
132
SDL_CONFIGURE_OFF=	--disable-sdl
93
LIB_DEPENDS+=		libgif.so:${PORTSDIR}/graphics/giflib
133
94
CONFIGURE_ARGS+=	--enable-gif
134
SMB_LIB_DEPENDS=	libsmbclient.so:${PORTSDIR}/net/samba-libsmbclient
95
.else
135
SMB_CONFIGURE_OFF=	--disable-smb
96
CONFIGURE_ARGS+=	--disable-gif
136
97
.endif
137
SPEEX_LIB_DEPENDS=	libspeex.so:${PORTSDIR}/audio/speex
98
138
SPEEX_CONFIGURE_OFF=	--disable-speex
99
.if ${PORT_OPTIONS:MMAD}
139
100
LIB_DEPENDS+=		libmad.so:${PORTSDIR}/audio/libmad
140
THEORA_LIB_DEPENDS=	libtheora.so:${PORTSDIR}/multimedia/libtheora
101
.else
141
THEORA_CONFIGURE_OFF=	--disable-theora
102
CONFIGURE_ARGS+=	--disable-mad
142
103
.endif
143
V4L_BUILD_DEPENDS=	${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat
104
144
V4L_LIB_DEPENDS=	libv4l2.so:${PORTSDIR}/multimedia/libv4l
105
.if ${PORT_OPTIONS:MDV}
145
V4L_CONFIGURE_OFF=	--disable-tv-v4l2
106
LIB_DEPENDS+=		libdv.so:${PORTSDIR}/multimedia/libdv
146
V4L_LIBS=		-lv4l1 -lv4l2
107
.else
147
108
CONFIGURE_ARGS+=	--disable-libdv
148
VDPAU_LIB_DEPENDS=	libvdpau.so:${PORTSDIR}/multimedia/libvdpau
109
.endif
149
VDPAU_CONFIGURE_OFF=	--disable-vdpau
110
150
111
.if ${PORT_OPTIONS:MTHEORA}
151
WIN32_RUN_DEPENDS=	win32-codecs>0:${PORTSDIR}/multimedia/win32-codecs
112
LIB_DEPENDS+=		libtheora.so:${PORTSDIR}/multimedia/libtheora
152
WIN32_CONFIGURE_ON=	--codecsdir=${LOCALBASE}/lib/win32
113
.else
153
WIN32_CONFIGURE_OFF=	--disable-win32dll --disable-qtx
114
CONFIGURE_ARGS+=	--disable-theora
154
115
.endif
155
X11_USE=		XORG=x11,xv,xxf86vm
116
156
X11_CONFIGURE_OFF=	--disable-x11
117
.if ${PORT_OPTIONS:MSPEEX}
157
118
LIB_DEPENDS+=		libspeex.so:${PORTSDIR}/audio/speex
158
XINERAMA_USE=		XORG=xinerama,xineramaproto
119
.else
159
XINERAMA_CONFIGURE_OFF=	--disable-xinerama
120
CONFIGURE_ARGS+=	--disable-speex
160
XINERAMA_IMPLIES=	X11
121
.endif
122
123
.if ${PORT_OPTIONS:MJACK}
124
LIB_DEPENDS+=		libjack.so:${PORTSDIR}/audio/jack
125
.else
126
CONFIGURE_ARGS+=	--disable-jack
127
.endif
128
129
.if ${PORT_OPTIONS:MPULSEAUDIO}
130
LIB_DEPENDS+=		libpulse.so:${PORTSDIR}/audio/pulseaudio
131
.else
132
CONFIGURE_ARGS+=	--disable-pulse
133
.endif
134
135
.if ${PORT_OPTIONS:MPORTAUDIO}
136
LIB_DEPENDS+=		libportaudio.so:${PORTSDIR}/audio/portaudio
137
.else
138
CONFIGURE_ARGS+=	--disable-portaudio
139
.endif
140
141
.if ${PORT_OPTIONS:MLIBBLURAY}
142
LIB_DEPENDS+=		libbluray.so:${PORTSDIR}/multimedia/libbluray
143
.else
144
CONFIGURE_ARGS+=	--disable-bluray
145
.endif
146
147
.if ${PORT_OPTIONS:MSMB}
148
LIB_DEPENDS+=		libsmbclient.so:${PORTSDIR}/net/samba-libsmbclient
149
.else
150
CONFIGURE_ARGS+=	--disable-smb
151
.endif
152
153
.if ${PORT_OPTIONS:MCDIO}
154
LIB_DEPENDS+=		libcdio_paranoia.so:${PORTSDIR}/sysutils/libcdio-paranoia
155
.else
156
CONFIGURE_ARGS+=	--disable-libcdio
157
.endif
158
159
.if ${PORT_OPTIONS:MLADSPA}
160
RUN_DEPENDS+=		${LOCALBASE}/lib/ladspa/amp.so:${PORTSDIR}/audio/ladspa
161
.else
162
CONFIGURE_ARGS+=	--disable-ladspa
163
.endif
164
165
.if ${ARCH} == "i386" || ${ARCH} == "amd64"
166
.if ${PORT_OPTIONS:MWIN32} && !defined(PACKAGE_BUILDING) && ${ARCH} == "i386"
167
CODEC_PORT=		${PORTSDIR}/multimedia/win32-codecs
168
CODEC_DETECTION_FILE!=	${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE
169
RUN_DEPENDS+=		${CODEC_DETECTION_FILE}:${CODEC_PORT}
170
CONFIGURE_ARGS+=	--codecsdir=${LOCALBASE}/lib/win32
171
.else
172
CONFIGURE_ARGS+=	--disable-win32dll --disable-qtx
173
.endif
174
.endif # ARCH == i386/amd64
175
176
.if ${PORT_OPTIONS:MREALPLAYER}
177
RUN_DEPENDS+=		realplay:${PORTSDIR}/multimedia/linux-realplayer
178
BUILD_DEPENDS+=		realplay:${PORTSDIR}/multimedia/linux-realplayer
179
.else
180
CONFIGURE_ARGS+=	--disable-real
181
.endif
182
183
.if ${PORT_OPTIONS:MV4L}
184
BUILD_DEPENDS+=		${LOCALBASE}/include/linux/videodev2.h:${PORTSDIR}/multimedia/v4l_compat
185
LIB_DEPENDS+=		libv4l2.so:${PORTSDIR}/multimedia/libv4l
186
LIBS+=			-lv4l2
187
.else
188
CONFIGURE_ARGS+=	--disable-tv-v4l2
189
.endif
190
191
.if ${PORT_OPTIONS:MASS}
192
LIB_DEPENDS+=		libass.so:${PORTSDIR}/multimedia/libass
193
.else
194
CONFIGURE_ARGS+=	--disable-libass --disable-enca
195
.endif
196
197
.if ${PORT_OPTIONS:MX11}
198
USE_XORG=		x11 xv xxf86vm
199
.if ${PORT_OPTIONS:MOPENGL}
200
USE_XORG+=		glproto
201
LIB_DEPENDS+=		libGL.so:${PORTSDIR}/graphics/libGL
202
.else
203
CONFIGURE_ARGS+=	--disable-gl
204
.endif
205
.if ${PORT_OPTIONS:MXINERAMA}
206
USE_XORG+=		xinerama xineramaproto
207
.else
208
CONFIGURE_ARGS+=	--disable-xinerama
209
.endif
210
.else			#WITHOUT_X11
211
CONFIGURE_ARGS+=	--disable-x11
212
.endif
213
214
.if ${PORT_OPTIONS:MVDPAU}
215
LIB_DEPENDS+=		libvdpau.so:${PORTSDIR}/multimedia/libvdpau
216
.else
217
CONFIGURE_ARGS+=	--disable-vdpau
218
.endif
219
220
.if ${PORT_OPTIONS:MRTC}
221
BUILD_DEPENDS+=	${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
222
RUN_DEPENDS+=	${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
223
CONFIGURE_ARGS+=	--enable-rtc
224
.else
225
CONFIGURE_ARGS+=	--disable-rtc
226
.endif
227
228
.if ${PORT_OPTIONS:MCACA}
229
LIB_DEPENDS+=		libcaca.so:${PORTSDIR}/graphics/libcaca
230
.else
231
CONFIGURE_ARGS+=	--disable-caca
232
.endif
233
234
.if ${PORT_OPTIONS:MLIRC}
235
LIB_DEPENDS+=		liblirc_client.so:${PORTSDIR}/comms/lirc
236
.else
237
CONFIGURE_ARGS+=	--disable-lirc
238
.endif
239
240
.if ${PORT_OPTIONS:MSDL}
241
USE_SDL=		sdl
242
.else
243
CONFIGURE_ARGS+=	--disable-sdl
244
.endif
245
246
.if defined(WITH_KERN_HZ)
247
DEFAULT_KERN_HZ=${WITH_KERN_HZ}
248
.else
249
DEFAULT_KERN_HZ=1024
250
.endif
251
161
252
pre-everything::
162
pre-everything::
253
	@${ECHO_MSG} "N - O - T - E"
163
	@${ECHO_MSG} "N - O - T - E"
Lines 257-267 Link Here
257
	@${ECHO_MSG} "order to learn more about them."
167
	@${ECHO_MSG} "order to learn more about them."
258
168
259
post-patch:
169
post-patch:
260
.if ${OSVERSION} >= 900010
261
	@${REINPLACE_CMD} -e \
170
	@${REINPLACE_CMD} -e \
262
		'/CFLAGS.*-D_LARGEFILE64_SOURCE/ s/-D_LARGEFILE64_SOURCE/-D_FILE_OFFSET_BITS=64/' \
171
		'/CFLAGS.*-D_LARGEFILE64_SOURCE/ s/-D_LARGEFILE64_SOURCE/-D_FILE_OFFSET_BITS=64/' \
263
		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
172
		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
264
.endif
265
	@${REINPLACE_CMD} \
173
	@${REINPLACE_CMD} \
266
		-e 's|/dev/acd0|${WITH_CDROM_DEVICE}|' \
174
		-e 's|/dev/acd0|${WITH_CDROM_DEVICE}|' \
267
		-e 's|/usr/local|${LOCALBASE}|' \
175
		-e 's|/usr/local|${LOCALBASE}|' \
Lines 280-290 Link Here
280
		's|/usr/\\:local/\\:etc/\\:mplayer|${DATADIR:S/\//\/\\\:/g}|g ; \
188
		's|/usr/\\:local/\\:etc/\\:mplayer|${DATADIR:S/\//\/\\\:/g}|g ; \
281
		 s|/dev/\\:(dvd[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g ; \
189
		 s|/dev/\\:(dvd[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g ; \
282
		 s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g'
190
		 s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${WITH_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g'
283
.if ${PORT_OPTIONS:MRTC}
191
284
	@${REINPLACE_CMD} -e \
192
post-patch-RTC-on:
285
		's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \
193
		@${REINPLACE_CMD} -e \
286
		${WRKSRC}/mplayer.c
194
			's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \
287
.endif
195
			${WRKSRC}/mplayer.c
288
196
289
post-install:
197
post-install:
290
	${INSTALL_DATA} ${WRKSRC}/etc/example.conf \
198
	${INSTALL_DATA} ${WRKSRC}/etc/example.conf \

Return to bug 202404