aboutsummaryrefslogtreecommitdiff
path: root/multimedia/kodi/Makefile
blob: fcc4124852deb7da414e34af1f2d0aaeb3953f8b (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
# $FreeBSD$

PORTNAME=	kodi
DISTVERSION=	16.1
CATEGORIES=	multimedia java

MAINTAINER=	mickael.maillot@gmail.com
COMMENT=	Award winning media center application

LICENSE=	GPLv2

BUILD_DEPENDS=	enca:converters/enca \
		gawk:lang/gawk \
		gperf:devel/gperf \
		cmake:devel/cmake \
		zip:archivers/zip \
		nasm:devel/nasm \
		gtk-update-icon-cache:x11-toolkits/gtk20 \
		swig3.0:devel/swig30
LIB_DEPENDS=	libass.so:multimedia/libass \
		libFLAC.so:audio/flac \
		libboost_thread.so:devel/boost-libs \
		libcdio.so:sysutils/libcdio	\
		libcrossguid.so:devel/libcrossguid \
		libcurl.so:ftp/curl \
		libdbus-1.so:devel/dbus \
		libdcadec.so:multimedia/libdcadec \
		libdrm.so:graphics/libdrm \
		libenca.so:converters/enca \
		libfontconfig.so:x11-fonts/fontconfig \
		libfreetype.so:print/freetype2 \
		libfribidi.so:converters/fribidi \
		libgnutls.so:security/gnutls \
		libjasper.so:graphics/jasper \
		libltdl.so:devel/libltdl \
		liblzo2.so:archivers/lzo2 \
		libmodplug.so:audio/libmodplug \
		libmpeg2.so:multimedia/libmpeg2 \
		libpcre.so:devel/pcre \
		libpng.so:graphics/png \
		libsamplerate.so:audio/libsamplerate \
		libsqlite3.so:databases/sqlite3 \
		libtag.so:audio/taglib \
		libtinyxml.so:textproc/tinyxml \
		libvorbis.so:audio/libvorbis \
		libxslt.so:textproc/libxslt	\
		libyajl.so:devel/yajl
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \
		glxinfo:graphics/mesa-demos \
		python:lang/python \
		xdpyinfo:x11/xdpyinfo

USE_GITHUB=	yes
GH_TUPLE=	xbmc:xbmc:c327c53 xbmc:FFmpeg:2.8.6-Jarvis-16.0:ffmpeg

USES=		autoreconf:build compiler:c++11-lib gettext gmake iconv jpeg \
		libtool pkgconfig python:2
GNU_CONFIGURE=	yes
USE_XORG=	xmu xrandr xt xtst
USE_GL=		glu glew
USE_SDL=	image sdl2
USE_JAVA=	yes
USE_LDCONFIG=	yes
JAVA_BUILD=	jre
NOPRECIOUSMAKEVARS=	yes
INSTALLS_ICONS=	yes

ONLY_FOR_ARCHS=	i386 amd64
KODI_ARCH_i386=	x86
KODI_ARCH_amd64=x86_64

PLIST_SUB=	ARCH=${KODI_ARCH_${ARCH}}

OPTIONS_SUB=	yes
OPTIONS_DEFINE=	AIRPLAY AIRTUNES AVAHI CEC DOCS \
		LIBBLURAY LIRC MYSQL NFS NONFREE PULSEAUDIO RTMP \
		SFTP SMB VAAPI VDPAU WEBSERVER
AIRPLAY_DESC=	AirPlay support via libplist
AIRTUNES_DESC=	AirTunes support via libshairplay
CEC_DESC=	CEC adapter support
NONFREE_DESC=	Enable non-free components (rar, ccx, ffmpeg)
SFTP_DESC=	SSH SFTP support via libssh

OPTIONS_DEFAULT=	AIRPLAY AIRTUNES AVAHI CEC LIBBLURAY LIRC \
		MYSQL NFS RTMP SFTP SMB VAAPI VDPAU WEBSERVER

AIRPLAY_LIB_DEPENDS=	libplist.so:devel/libplist
AIRPLAY_CONFIGURE_ENABLE=	airplay

AIRTUNES_LIB_DEPENDS=	libshairplay.so:audio/shairplay
AIRTUNES_CONFIGURE_ENABLE=	airtunes

AVAHI_LIB_DEPENDS=	libavahi-client.so:net/avahi-app
AVAHI_CONFIGURE_ENABLE=	avahi

CEC_BUILD_DEPENDS=	libcec>=3.1.0:multimedia/libcec
CEC_LIB_DEPENDS=	libcec.so:multimedia/libcec
CEC_CONFIGURE_ENABLE=	libcec

LIBBLURAY_LIB_DEPENDS=	libbluray.so:multimedia/libbluray
LIBBLURAY_CONFIGURE_ENABLE=	libbluray

LIRC_RUN_DEPENDS=	lircd:comms/lirc

MYSQL_USES=	mysql
MYSQL_CONFIGURE_ENABLE=	mysql

NFS_LIB_DEPENDS=	libnfs.so:net/libnfs
NFS_CONFIGURE_ENABLE=	nfs

NONFREE_CONFIGURE_ENABLE=	non-free
NONFREE_VARS=		NO_CDROM="Restricted binary distribution" \
			NO_PACKAGE="Restricted binary distribution"

PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
PULSEAUDIO_CONFIGURE_ENABLE=	pulse

RTMP_LIB_DEPENDS=	librtmp.so:multimedia/librtmp
RTMP_CONFIGURE_ENABLE=	rtmp

SMB_LIB_DEPENDS=	libsmbclient.so:net/samba-libsmbclient
SMB_RUN_DEPENDS=	nmblookup:net/samba-nmblookup
SMB_CONFIGURE_ENABLE=	samba

VAAPI_LIB_DEPENDS=	libva.so:multimedia/libva
VAAPI_CONFIGURE_ENABLE=	vaapi

VDPAU_LIB_DEPENDS=	libvdpau.so:multimedia/libvdpau
VDPAU_CONFIGURE_ENABLE=	vdpau

WEBSERVER_LIB_DEPENDS=	libmicrohttpd.so:www/libmicrohttpd
WEBSERVER_CONFIGURE_ENABLE=	webserver

SFTP_BUILD_DEPENDS=	${LOCALBASE}/lib/libssh.so:security/libssh
SFTP_RUN_DEPENDS=	${LOCALBASE}/lib/libssh.so:security/libssh
SFTP_CONFIGURE_ENABLE=	ssh

CONFIGURE_ARGS+=	--disable-debug --disable-alsa --disable-texturepacker

post-extract:
	${MV} ${WRKSRC_ffmpeg} ${WRKSRC}/tools/depends/target/ffmpeg/

post-patch:
	${REINPLACE_CMD} 's;make;gmake;' \
		${WRKSRC}/bootstrap \
		${WRKSRC}/codegenerator.mk \
		${WRKSRC}/xbmc/Makefile.in
	${REINPLACE_CMD} 's;which swig;&3.0;' ${WRKSRC}/codegenerator.mk

pre-configure:
	cd ${WRKSRC} && ${SH} ./bootstrap

post-install:
	${INSTALL_MAN} ${WRKSRC}/docs/manpages/kodi.bin.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
	(cd ${STAGEDIR}${MAN1PREFIX}/man/man1 && ${LN} -sf kodi.bin.1.gz kodi.1.gz)
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/kodi/kodi.bin
	${FIND} ${STAGEDIR}${PREFIX}/lib/kodi -name '*.so' -or -name '*.xbs' -or -name '*.vis' \
		| ${XARGS} ${STRIP_CMD}
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/kodi/kodi-xrandr

.include <bsd.port.mk>