summaryrefslogtreecommitdiff
path: root/audio/mumble/Makefile
blob: 591d56381415c74e44da14787ea0d5b29858127e (plain)
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
# Created by: marius nuennerich
# $FreeBSD$

PORTNAME=	mumble
DISTVERSION=	1.3.0-rc1
PORTREVISION=	4
CATEGORIES=	audio

MAINTAINER=	feld@FreeBSD.org
COMMENT=	Voice chat software primarily intended for use while gaming

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS+=	libspeex.so:audio/speex \
		libspeexdsp.so:audio/speexdsp \
		libsndfile.so:audio/libsndfile \
		libboost_iostreams.so:devel/boost-libs \
		libprotoc.so:devel/protobuf \
		libopus.so:audio/opus

PLIST_SUB+=	PORTVERSION="${PORTVERSION:R}"

USES=		compiler:c++11-lang cpe desktop-file-utils gmake pkgconfig python:2.7 qmake qt:5 ssl
USE_CXXSTD=	c++11
USE_GITHUB=	yes
GH_TUPLE=	mumble-voip:mumble:${DISTVERSION} \
		mumble-voip:celt-0.7.0:5a16cda:mumble_celt_0_7/3rdparty/celt-0.7.0-src \
		mumble-voip:celt-0.11.0:e3d39fe:mumble_celt_0_11/3rdparty/celt-0.11.0-src \
		mumble-voip:mach_override:919148f:mumble_mach_override/3rdparty/mach-override-src \
		mumble-voip:minhook:9fbd087:mumble_minhook/3rdparty/minhook-src \
		mumble-voip:rnnoise:b30f2bb:mumble_rnnoise/3rdparty/rnnoise-src \
		mumble-voip:sbcelt:045493d:mumble_sbcelt/3rdparty/sbcelt-src \
		mumble-voip:mumble-theme:1d48b12:mumble_theme/themes/Mumble

USE_QT=		buildtools_build core gui l10n linguist_build network opengl sql sql-sqlite3_run svg xml
USE_LDCONFIG=	yes

USE_XORG=	ice xi x11
INSTALLS_ICONS=	yes
MAKE_JOBS_UNSAFE=yes

CONFIG=		bundled-celt bundled-rnnoise no-bundled-opus no-bundled-speex no-bundled-speexdsp \
		no-embed-qt-translations no-g15 no-alsa no-jackaudio no-pulseaudio no-server no-update

QMAKE_ARGS=	"CONFIG+=${CONFIG}"

OPTIONS_DEFINE=	DBUS BONJOUR PORTAUDIO SPEECHD
OPTIONS_DEFAULT=	DBUS

DBUS_VARS_OFF=	CONFIG+=no-dbus
DBUS_USES=	qt:5
DBUS_USE=	QT=dbus

BONJOUR_DESC=		Bonjour support
BONJOUR_VARS_OFF=	CONFIG+=no-bonjour
BONJOUR_LIB_DEPENDS=	libdns_sd.so:net/mDNSResponder

PORTAUDIO_VARS_OFF=	CONFIG+=no-portaudio
PORTAUDIO_LIB_DEPENDS=	libportaudio.so:audio/portaudio

SPEECHD_DESC=		Support for Speech Dispatcher
SPEECHD_VARS_OFF=	CONFIG+=no-speechd
SPEECHD_LIB_DEPENDS=	libspeechd.so:accessibility/speech-dispatcher

.include <bsd.port.pre.mk>

# PCH is broken on GCC
.if ${CHOSEN_COMPILER_TYPE} == gcc
CONFIG+=	no-pch
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|-ldl||' ${WRKSRC}/overlay_gl/overlay_gl.pro
	@${RM} ${WRKSRC}/plugins/manual/.qmake.cache

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/release/mumble ${STAGEDIR}${PREFIX}/bin
	${INSTALL_LIB} ${WRKSRC}/release/libcelt0.so.0.11.0 ${STAGEDIR}${PREFIX}/lib/libcelt-mumble.so.0.11.0
	${INSTALL_LIB} ${WRKSRC}/release/libcelt0.so.0.7.0 ${STAGEDIR}${PREFIX}/lib/libcelt-mumble.so.0.7.0
	${INSTALL_LIB} ${WRKSRC}/release/libmumble.so.${PORTVERSION:R} ${STAGEDIR}${PREFIX}/lib/libmumble.so.${PORTVERSION:R}
	${RLN} ${STAGEDIR}${PREFIX}/lib/libmumble.so.${PORTVERSION:R} ${STAGEDIR}${PREFIX}/lib/libmumble.so
	${RLN} ${STAGEDIR}${PREFIX}/lib/libmumble.so.${PORTVERSION:R} ${STAGEDIR}${PREFIX}/lib/libmumble.so.1
	${RLN} ${STAGEDIR}${PREFIX}/lib/libmumble.so.${PORTVERSION:R} ${STAGEDIR}${PREFIX}/lib/libmumble.so.1.3
	${MKDIR} ${STAGEDIR}${PREFIX}/share/services
	${INSTALL_DATA} ${WRKSRC}/scripts/mumble.protocol ${STAGEDIR}${PREFIX}/share/services
	${INSTALL_DATA} ${WRKSRC}/scripts/mumble.desktop ${STAGEDIR}${PREFIX}/share/applications
	${INSTALL_DATA} ${WRKSRC}/icons/mumble.xpm ${STAGEDIR}${PREFIX}/share/pixmaps
	${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/128x128/apps ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
	${INSTALL_DATA} ${WRKSRC}/icons/mumble.osx.installer.png ${STAGEDIR}${PREFIX}/share/icons/hicolor/128x128/apps/mumble.png
	${INSTALL_DATA} ${WRKSRC}/icons/mumble.svg ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
	${INSTALL_MAN} ${WRKSRC}/man/mumble.1 ${STAGEDIR}${MANPREFIX}/man/man1/mumble.1

.include <bsd.port.post.mk>