aboutsummaryrefslogtreecommitdiff
path: root/multimedia/libxine/Makefile
blob: 64ca3c6cf4e402b38d566fde96e80e994e171015 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Created by: alex
# $FreeBSD$

PORTNAME=	xine
PORTVERSION=	1.2.6
PORTREVISION=	11
CATEGORIES=	multimedia ipv6
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-lib/${PORTVERSION}
PKGNAMEPREFIX=	lib
DISTNAME=	${PORTNAME}-lib-${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Libraries for xine multimedia player

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/COPYING

BUILD_DEPENDS=	v4l_compat>=1.0.20100321:multimedia/v4l_compat
LIB_DEPENDS=	libFLAC.so:audio/flac \
		liba52.so:audio/liba52 \
		libvorbis.so:audio/libvorbis \
		libspeex.so:audio/speex \
		libmng.so:graphics/libmng \
		libpng.so:graphics/png \
		libdvdread.so:multimedia/libdvdread \
		libfreetype.so:print/freetype2 \
		libfame.so:multimedia/libfame \
		libcdio_paranoia.so:sysutils/libcdio-paranoia \
		libmodplug.so:audio/libmodplug \
		libvcdinfo.so:multimedia/vcdimager \
		libtheora.so:multimedia/libtheora \
		libmad.so:audio/libmad \
		libdca.so:multimedia/libdca \
		libavcodec.so:multimedia/ffmpeg \
		libfaad.so:audio/faad \
		libvdpau.so:multimedia/libvdpau
.if !defined(PACKAGE_BUILDING)
# DVDCSS version hardcoded in src/input/input_dvd.c misc/cdda_server.c
# and src/input/libdvdnav/dvd_input.c (dlopen'ed)
LIB_DEPENDS+=	libdvdcss.so.2:multimedia/libdvdcss
.endif

USES=		compiler cpe execinfo gmake iconv libtool:keepla \
		localbase pathfix perl5 pkgconfig tar:xz
CPE_PRODUCT=	xine-lib
CPE_VENDOR=	xine
GNU_CONFIGURE=	yes
USE_XORG=	x11 xv xinerama xext sm ice
USE_GL=		gl glu
USE_PERL5=	build
USE_SDL=	sdl
USE_LDCONFIG=	yes
CONFIGURE_ARGS=	--with-w32-path=${LOCALBASE}/lib/win32 \
		--enable-ipv6 \
		--with-external-libmad \
		--with-external-libdts \
		--with-libflac \
		--with-external-ffmpeg \
		--with-external-libfaad \
		--disable-real-codecs \
		--disable-v4l \
		--without-alsa \
		--disable-musepack \
		--enable-dvb
MAKE_ENV=	V=1

DOCSDIR=	${PREFIX}/share/doc/xine-lib
# Please sync with XINE_PLUGINSDIR in multimedia/xine
# and multimedia/vdr-plugin-xineliboutput
PLUGINSDIR=	lib/xine/plugins/2.5
PLIST_SUB=	PLUGINSDIR="${PLUGINSDIR}"

BROKEN_aarch64=		Fails to configure: error: no acceptable as found in $PATH

OPTIONS_DEFINE=	NLS CACA ESOUND JACK GNOMEVFS2 PULSEAUDIO XVMC SMB AALIB \
		IMAGEMAGICK PIXBUF WAVPACK VAAPI LIBBLURAY
OPTIONS_DEFAULT=VAAPI
OPTIONS_SUB=	yes

NLS_USES=		gettext
NLS_CONFIGURE_ENABLE=	nls
CACA_LIB_DEPENDS=	libcaca.so:graphics/libcaca
CACA_CONFIGURE_OFF=	--without-caca --disable-cacatest
ESOUND_USE=		GNOME=esound
ESOUND_CONFIGURE_OFF=	--without-esound
JACK_LIB_DEPENDS=	libjack.so:audio/jack
JACK_CONFIGURE_OFF=	--without-jack
GNOMEVFS2_USE=		GNOME=gnomevfs2
GNOMEVFS2_CONFIGURE_OFF=--disable-gnomevfs
PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
PULSEAUDIO_CONFIGURE_OFF=--without-pulseaudio
.if defined(WITH_NVIDIA304_GL) || exists(${LOCALBASE}/lib/libXvMCNVIDIA.so.1)
XVMC_CONFIGURE_ON=	--with-xvmc-lib=XvMCNVIDIA
XVMC_LIB_DEPENDS=	libXvMCNVIDIA.so:x11/nvidia-driver-304
.else
XVMC_CONFIGURE_ON=	--with-xvmc-lib=XvMCW
XVMC_LIB_DEPENDS=	libXvMC.so:x11/libXvMC
.endif
XVMC_CONFIGURE_OFF=	--disable-xvmc
SMB_USES=		samba:lib
SMB_CONFIGURE_ENV=	LIBSMBCLIENT_LIBS="-L${SAMBALIBS} -lsmbclient" \
			LIBSMBCLIENT_CFLAGS="-I${SAMBAINCLUDES}"
SMB_CONFIGURE_ENABLE=	samba
AALIB_LIB_DEPENDS=	libaa.so:graphics/aalib
AALIB_CONFIGURE_OFF=	--disable-aalib --disable-aalibtest
IMAGEMAGICK_LIB_DEPENDS=	libMagickWand-6.so:graphics/ImageMagick
IMAGEMAGICK_CONFIGURE_OFF=	--without-imagemagick
PIXBUF_USE=		GNOME=gdkpixbuf2
PIXBUF_CONFIGURE_OFF=	--disable-gdkpixbuf
WAVPACK_LIB_DEPENDS=	libwavpack.so:audio/wavpack
WAVPACK_CONFIGURE_WITH=	wavpack
VAAPI_LIB_DEPENDS=	libva.so:multimedia/libva
VAAPI_CONFIGURE_ON=	--enable-vaapi
LIBBLURAY_LIB_DEPENDS=	libbluray.so:multimedia/libbluray
LIBBLURAY_CONFIGURE_ENABLE=	bluray

.include <bsd.port.options.mk>

.if ${ARCH} == "i386"
CFLAGS+=	-fomit-frame-pointer
.endif

.if ${CONFIGURE_ARGS:M*--without-imagemagick*} == "" || ${CONFIGURE_ARGS:M*-disable-gdkpixbuf*} == ""
PLIST_SUB+=	WITH_DMX_IMAGE=""
.else
PLIST_SUB+=	WITH_DMX_IMAGE="@comment "
.endif

.if ${ARCH} == "i386"
PLIST_SUB+=	WITH_VIDIX=""
.else
PLIST_SUB+=	WITH_VIDIX="@comment "
CONFIGURE_ARGS+=	--disable-vidix
.endif

.include <bsd.port.pre.mk>

post-patch:
.if ${COMPILER_TYPE} == "clang"
	@${REINPLACE_CMD} -e 's|-fno-rename-registers||' \
		${WRKSRC}/src/libw32dll/wine/Makefile.in
.endif
	@${REINPLACE_CMD} -e 's|-ldl||' \
		${WRKSRC}/src/video_out/Makefile.in
	@${REINPLACE_CMD} -e "s|#define _ATOM QT_ATOM('', '', '', '')||" \
		${WRKSRC}/src/demuxers/demux_qt.c
	@${REINPLACE_CMD} -e \
		's|{libdir}/pkgconfig|{prefix}/libdata/pkgconfig|' \
		${WRKSRC}/configure

# XXX older nvidia-driver versions don't support opengl 2.0 so this
# plugin might not get built:
post-install:
	@if ! [ -e "${STAGEDIR}${PREFIX}/${PLUGINSDIR}/xineplug_vo_out_opengl2.so" ]; then \
		${REINPLACE_CMD} -e '/xineplug_vo_out_opengl2.so/d' \
			${TMPPLIST}; \
	fi
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PLUGINSDIR}/*.so
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PLUGINSDIR}/post/*.so

.include <bsd.port.post.mk>