blob: 63248fa6ab1cc8f0ec6c31558d84b1906ea9617c (
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
|
# Created by: Ben Woods <woodsb02@gmail.com>
# $FreeBSD$
PORTNAME= plexhometheater
PORTVERSION= 1.4.1
PORTREVISION= 1
DISTVERSIONPREFIX=v
DISTVERSIONSUFFIX=.469-47a90f01
CATEGORIES= multimedia
MAINTAINER= woodsb02@gmail.com
COMMENT= Media center frontend to multimedia/plexmediaserver
LICENSE= GPLv2
BUILD_DEPENDS= enca:${PORTSDIR}/converters/enca \
gawk:${PORTSDIR}/lang/gawk \
gperf:${PORTSDIR}/devel/gperf \
cmake:${PORTSDIR}/devel/cmake \
zip:${PORTSDIR}/archivers/zip \
unzip:${PORTSDIR}/archivers/unzip \
nasm:${PORTSDIR}/devel/nasm \
gtk-update-icon-cache:${PORTSDIR}/x11-toolkits/gtk20 \
swig2.0:${PORTSDIR}/devel/swig20
LIB_DEPENDS= libass.so:${PORTSDIR}/multimedia/libass \
libavahi-client.so:${PORTSDIR}/net/avahi-app \
libboost_thread.so:${PORTSDIR}/devel/boost-libs \
libcdio.so:${PORTSDIR}/sysutils/libcdio \
libcurl.so:${PORTSDIR}/ftp/curl \
libdbus-1.so:${PORTSDIR}/devel/dbus \
libenca.so:${PORTSDIR}/converters/enca \
libFLAC.so:${PORTSDIR}/audio/flac \
libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \
libfreetype.so:${PORTSDIR}/print/freetype2 \
libfribidi.so:${PORTSDIR}/converters/fribidi \
libGLEW.so:${PORTSDIR}/graphics/glew \
libhal.so:${PORTSDIR}/sysutils/hal \
libjasper.so:${PORTSDIR}/graphics/jasper \
libjpeg.so:${PORTSDIR}/graphics/jpeg \
liblzo2.so:${PORTSDIR}/archivers/lzo2 \
libmad.so:${PORTSDIR}/audio/libmad \
libmicrohttpd.so:${PORTSDIR}/www/libmicrohttpd \
libmodplug.so:${PORTSDIR}/audio/libmodplug \
libmpeg2.so:${PORTSDIR}/multimedia/libmpeg2 \
libpcre.so:${PORTSDIR}/devel/pcre \
libplist.so:${PORTSDIR}/devel/libplist \
libpng.so:${PORTSDIR}/graphics/png \
librtmp.so:${PORTSDIR}/multimedia/librtmp \
libsamplerate.so:${PORTSDIR}/audio/libsamplerate \
libshairport.so:${PORTSDIR}/audio/libshairport \
libsqlite3.so:${PORTSDIR}/databases/sqlite3 \
libtag.so:${PORTSDIR}/audio/taglib \
libtiff.so:${PORTSDIR}/graphics/tiff \
libtinyxml.so:${PORTSDIR}/textproc/tinyxml \
libva.so:${PORTSDIR}/multimedia/libva \
libvdpau.so:${PORTSDIR}/multimedia/libvdpau \
libvorbis.so:${PORTSDIR}/audio/libvorbis \
libxslt.so:${PORTSDIR}/textproc/libxslt \
libyajl.so:${PORTSDIR}/devel/yajl
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
glxinfo:${PORTSDIR}/graphics/mesa-demos \
${PYTHON_PKGNAMEPREFIX}pillow>0:${PORTSDIR}/graphics/py-pillow \
xdpyinfo:${PORTSDIR}/x11/xdpyinfo
USE_GITHUB= yes
GH_ACCOUNT= plexinc
GH_PROJECT= plex-home-theater-public
BUNDLE_LIBS= yes
USES= cmake:outsource execinfo gmake iconv:wchar_t pkgconfig python:2
CMAKE_ARGS+= -DENABLE_AUTOUPDATE:BOOL=false
CMAKE_ARGS+= -DENABLE_DUMP_SYMBOLS:BOOL=false
CMAKE_ARGS+= -DENABLE_PYTHON:BOOL=false
CMAKE_ARGS+= -DUSE_INTERNAL_FFMPEG:BOOL=true
CMAKE_ARGS+= -DCREATE_BUNDLE:BOOL=false
CMAKE_ARGS+= -DCMAKE_PREFIX_PATH=${LOCALBASE}
CFLAGS+= -isystem${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
USE_XORG= xt xmu xtst xrandr
USE_GL= glu
USE_SDL= image sdl mixer
INSTALLS_ICONS= yes
ONLY_FOR_ARCHS= i386 amd64
WRKSRC= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT}
SUB_FILES= ${PORTNAME}.sh pkg-message
DESKTOP_ENTRIES="Plex Home Theater" \
"${COMMENT}" \
"${DATADIR}/media/plex-icon-120.png" \
"plexhometheater.sh" \
"AudioVideo;Video;" \
true
OPTIONS_SUB= yes
OPTIONS_DEFINE= CEC LIRC PULSEAUDIO
CEC_DESC= Control plexhometheater over HDMI with TV remote
OPTIONS_DEFAULT= CEC LIRC
CEC_BUILD_DEPENDS= libcec>=2.2.0:${PORTSDIR}/multimedia/libcec
CEC_LIB_DEPENDS= libcec.so:${PORTSDIR}/multimedia/libcec
CEC_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_CEC:BOOL=true
LIRC_RUN_DEPENDS= lircd:${PORTSDIR}/comms/lirc
PULSEAUDIO_LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio/pulseaudio
PULSEAUDIO_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_PulseAudio:BOOL=true
.include <bsd.port.pre.mk>
.if ${ARCH} == i386
PLIST_SUB+= ARCH="x86"
.else
PLIST_SUB+= ARCH="x86_64"
.endif
.if ${OPSYS} == "FreeBSD" && ${OSVERSION} < 900033
USE_BINUTILS= yes
MAKE_ENV= COMPILER_PATH=${LOCALBASE}/bin
.endif
post-patch:
@${REINPLACE_CMD} 's/[[:<:]]ARCH[[:>:]]/FFMPEG_ARCH/' \
${WRKSRC}/lib/ffmpeg/Makefile \
${WRKSRC}/lib/ffmpeg/common.mak \
${WRKSRC}/lib/ffmpeg/configure \
${WRKSRC}/lib/ffmpeg/libavcodec/Makefile
@${REINPLACE_CMD} 's/iconv_open/libiconv_open/' \
${WRKSRC}/plex/CMakeModules/FindIconv.cmake
@${REINPLACE_CMD} 's/COMMAND\ make/COMMAND\ gmake/g' \
${WRKSRC}/lib/ffmpeg/CMakeLists.txt
.if ${OPSYS} == "FreeBSD" && ${OSVERSION} < 1000024
@${REINPLACE_CMD} 's/__builtin_bswap/__bswap/g' \
${WRKSRC}/plex/Third-Party/hash-library/crc32.cpp \
${WRKSRC}/plex/Third-Party/hash-library/keccak.cpp \
${WRKSRC}/plex/Third-Party/hash-library/md5.cpp \
${WRKSRC}/plex/Third-Party/hash-library/sha1.cpp \
${WRKSRC}/plex/Third-Party/hash-library/sha256.cpp \
${WRKSRC}/plex/Third-Party/hash-library/sha3.cpp
.endif
post-install:
${RM} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/*.so
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.post.mk>
|