diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2018-06-28 17:00:47 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2018-06-28 17:00:47 +0300 |
commit | 31cbee870026058ce6cf48e853e907cb7d246f8f (patch) | |
tree | 256258c2f34b23c3b7afbb11e41ec334e9c76306 | |
parent | cc4453cf520c36a34f9cf24c058b379c23479a47 (diff) |
mumble-scm (with my patches)
-rw-r--r-- | metadata/categories.conf | 1 | ||||
-rw-r--r-- | packages/voip/mumble/files/allow_higher_bitrate_and_frame_size.patch | 29 | ||||
-rw-r--r-- | packages/voip/mumble/files/crosscompiling.patch | 22 | ||||
-rw-r--r-- | packages/voip/mumble/files/gcc.patch | 12 | ||||
-rw-r--r-- | packages/voip/mumble/files/higher_opus_complexity.patch | 12 | ||||
-rw-r--r-- | packages/voip/mumble/files/tls12_strong_ciphers.patch | 41 | ||||
-rw-r--r-- | packages/voip/mumble/mumble-scm.exheres-0 | 205 |
7 files changed, 322 insertions, 0 deletions
diff --git a/metadata/categories.conf b/metadata/categories.conf index 42e0d03..3c7f9d3 100644 --- a/metadata/categories.conf +++ b/metadata/categories.conf @@ -10,3 +10,4 @@ kde-frameworks media-gfx gnome-desktop mail-client +voip diff --git a/packages/voip/mumble/files/allow_higher_bitrate_and_frame_size.patch b/packages/voip/mumble/files/allow_higher_bitrate_and_frame_size.patch new file mode 100644 index 0000000..87aaee0 --- /dev/null +++ b/packages/voip/mumble/files/allow_higher_bitrate_and_frame_size.patch @@ -0,0 +1,29 @@ +diff --git a/src/mumble/AudioInput.ui b/src/mumble/AudioInput.ui +index f2a67a5b..b250b3b7 100644 +--- a/src/mumble/AudioInput.ui ++++ b/src/mumble/AudioInput.ui +@@ -483,7 +483,7 @@ + <number>8000</number> + </property> + <property name="maximum"> +- <number>96000</number> ++ <number>128000</number> + </property> + <property name="singleStep"> + <number>1000</number> +@@ -534,11 +534,14 @@ + <number>1</number> + </property> + <property name="maximum"> +- <number>4</number> ++ <number>6</number> + </property> + <property name="pageStep"> + <number>2</number> + </property> ++ <property name="value"> ++ <number>6</number> ++ </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> diff --git a/packages/voip/mumble/files/crosscompiling.patch b/packages/voip/mumble/files/crosscompiling.patch new file mode 100644 index 0000000..c666f0b --- /dev/null +++ b/packages/voip/mumble/files/crosscompiling.patch @@ -0,0 +1,22 @@ +diff --git a/src/mumble/main.cpp b/src/mumble/main.cpp +index 7062ede6..3becca72 100644 +--- a/src/mumble/main.cpp ++++ b/src/mumble/main.cpp +@@ -662,7 +662,7 @@ int main(int argc, char **argv) { + } + + #if defined(Q_OS_WIN) && defined(QT_NO_DEBUG) +-extern void qWinMain(HINSTANCE, HINSTANCE, LPSTR, int, int &, QVector<char *> &); ++//extern void qWinMain(HINSTANCE, HINSTANCE, LPSTR, int, int &, QVector<char *> &); + + extern "C" __declspec(dllexport) int MumbleMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdArg, int cmdShow) { + Q_UNUSED(cmdArg); +@@ -672,7 +672,7 @@ extern "C" __declspec(dllexport) int MumbleMain(HINSTANCE instance, HINSTANCE pr + + // qWinMain takes argv as a reference. + QVector<char *> argv; +- qWinMain(instance, prevInstance, cmdParam.data(), cmdShow, argc, argv); ++// qWinMain(instance, prevInstance, cmdParam.data(), cmdShow, argc, argv); + + int result = main(argc, argv.data()); + return result; diff --git a/packages/voip/mumble/files/gcc.patch b/packages/voip/mumble/files/gcc.patch new file mode 100644 index 0000000..12d2851 --- /dev/null +++ b/packages/voip/mumble/files/gcc.patch @@ -0,0 +1,12 @@ +diff --git a/src/SSLCipherInfo.h b/src/SSLCipherInfo.h +index 508db61..2889b82 100644 +--- a/src/SSLCipherInfo.h ++++ b/src/SSLCipherInfo.h +@@ -30,6 +30,7 @@ +
+ #ifndef MUMBLE_SSLCIPHERINFO_H_
+ #define MUMBLE_SSLCIPHERINFO_H_
++#include <string.h> +
+ struct SSLCipherInfo {
+ const char *openssl_name;
diff --git a/packages/voip/mumble/files/higher_opus_complexity.patch b/packages/voip/mumble/files/higher_opus_complexity.patch new file mode 100644 index 0000000..6a271ef --- /dev/null +++ b/packages/voip/mumble/files/higher_opus_complexity.patch @@ -0,0 +1,12 @@ +diff --git a/src/mumble/AudioInput.cpp b/src/mumble/AudioInput.cpp +index 62f6244e..afb95568 100644 +--- a/src/mumble/AudioInput.cpp ++++ b/src/mumble/AudioInput.cpp +@@ -95,6 +95,7 @@ AudioInput::AudioInput() : opusBuffer(g.s.iFramesPerPacket * (SAMPLE_RATE / 100) + } + + opus_encoder_ctl(opusState, OPUS_SET_VBR(0)); // CBR ++ opus_encoder_ctl(opusState, OPUS_SET_COMPLEXITY(10)); //common, this should work just fine on high end gamer machine (and on low and too ...) + #endif + + qWarning("AudioInput: %d bits/s, %d hz, %d sample", iAudioQuality, iSampleRate, iFrameSize); diff --git a/packages/voip/mumble/files/tls12_strong_ciphers.patch b/packages/voip/mumble/files/tls12_strong_ciphers.patch new file mode 100644 index 0000000..5fab971 --- /dev/null +++ b/packages/voip/mumble/files/tls12_strong_ciphers.patch @@ -0,0 +1,41 @@ +diff --git a/src/Connection.cpp b/src/Connection.cpp +index 5dc7443e..2287f174 100644 +--- a/src/Connection.cpp ++++ b/src/Connection.cpp +@@ -27,7 +27,9 @@ Connection::Connection(QObject *p, QSslSocket *qtsSock) : QObject(p) { + qtsSocket->setParent(this); + iPacketLength = -1; + bDisconnectedEmitted = false; +- ++#if QT_VERSION >= 0x050500 ++ qtsSocket->setProtocol(QSsl::TlsV1_2OrLater); ++#endif + static bool bDeclared = false; + if (! bDeclared) { + bDeclared = true; +diff --git a/src/SSL.cpp b/src/SSL.cpp +index 7f7e8121..16cddd28 100644 +--- a/src/SSL.cpp ++++ b/src/SSL.cpp +@@ -40,7 +40,7 @@ void MumbleSSL::destroy() { + } + + QString MumbleSSL::defaultOpenSSLCipherString() { +- return QLatin1String("EECDH+AESGCM:EDH+aRSA+AESGCM:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA"); ++ return QLatin1String("DHE-RSA-CHACHA20-POLY1305:DHE-RSA-CAMELLIA256-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384"); + } + + QList<QSslCipher> MumbleSSL::ciphersFromOpenSSLCipherString(QString cipherString) { +diff --git a/src/mumble/ServerHandler.cpp b/src/mumble/ServerHandler.cpp +index 7e30e76a..60c39121 100644 +--- a/src/mumble/ServerHandler.cpp ++++ b/src/mumble/ServerHandler.cpp +@@ -335,7 +335,7 @@ void ServerHandler::run() { + + + #if QT_VERSION >= 0x050500 +- qtsSock->setProtocol(QSsl::TlsV1_0OrLater); ++ qtsSock->setProtocol(QSsl::TlsV1_2OrLater); + #elif QT_VERSION >= 0x050400 + // In Qt 5.4, QSsl::SecureProtocols is equivalent + // to "TLSv1.0 or later", which we require. diff --git a/packages/voip/mumble/mumble-scm.exheres-0 b/packages/voip/mumble/mumble-scm.exheres-0 new file mode 100644 index 0000000..8343043 --- /dev/null +++ b/packages/voip/mumble/mumble-scm.exheres-0 @@ -0,0 +1,205 @@ +# Copyright 2010-2011 Johannes Nixdorf <mixi@user-helfen-usern.de> +# Copyright 2012-2013 Lasse Brun <bruners@gmail.com> +# Copyright 2013-2018 Timo Gurr <tgurr@exherbo.org> +# Distributed under the terms of the GNU General Public License v2 +# Based in part upon 'mumble-1.2.2.ebuild' from Gentoo, which is: +# Copyright 1999-2010 Gentoo Foundation + + +SCM_REPOSITORY="https://github.com/mumble-voip/mumble.git" + +SCM_EXTERNAL_REFS=" + 3rdparty/speex-src:speex + 3rdparty/celt-0.11.0-src:celt011 + 3rdparty/opus-src:opus + 3rdparty/sbcelt-src:sbcelt + 3rdparty/minhook-src:minhook + 3rdparty/mach-override-src:machoverride + 3rdparty/speexdsp-src:speexdsp + themes/Mumble:mumblethemes + 3rdparty/celt-0.7.0-src:celt07 +" + +SCM_sbcelt_EXTERNAL_REFS=" + celt-0.7.0:celt07sbcelt +" + +SCM_SECONDARY_REPOSITORIES=" + speex + celt07 + celt011 + opus + sbcelt + minhook + machoverride + speexdsp + mumblethemes + celt07sbcelt +" + +SCM_speex_REPOSITORY="https://github.com/mumble-voip/speex.git" +SCM_celt07_REPOSITORY="https://github.com/mumble-voip/celt-0.7.0.git" +SCM_celt011_REPOSITORY="https://github.com/mumble-voip/celt-0.11.0.git" +SCM_opus_REPOSITORY="https://github.com/mumble-voip/opus.git" +SCM_sbcelt_REPOSITORY="https://github.com/mumble-voip/sbcelt.git" +SCM_minhook_REPOSITORY="https://github.com/mumble-voip/minhook.git" +SCM_machoverride_REPOSITORY="https://github.com/mumble-voip/mach_override.git" +SCM_speexdsp_REPOSITORY="https://github.com/mumble-voip/speexdsp.git" +SCM_mumblethemes_REPOSITORY="https://github.com/mumble-voip/mumble-theme.git" +SCM_celt07sbcelt_REPOSITORY="https://git.xiph.org/celt.git/" + +require scm-git \ + qmake [ slot=5 ] \ + freedesktop-desktop \ + gtk-icon-cache \ + option-renames [ renames=[ 'speechd tts' ] ] + +SUMMARY="Mumble is an open source, low-latency, high quality voice chat software" +DESCRIPTION=" +Mumble is a voice chat application for groups. While it can be used for any kind of +activity, it is primarily intended for gaming. It can be compared to programs like Ventrilo or +TeamSpeak. People tend to simplify things, so when they talk about Mumble they either talk about +\"Mumble\" the client application or about \"Mumble & Murmur\" the whole voice chat application suite. +" +HOMEPAGE+=" https://wiki.${PN}.info/wiki/Main_Page" +DOWNLOADS="" + +LICENCES="BSD-3 MIT" +SLOT="0" +PLATFORMS="~amd64 ~x86" +MYOPTIONS=" + alsa + avahi + dbus + oss + pulseaudio + tts [[ description = [ Support for text to speech ] ]] + ( providers: libressl openssl ) [[ number-selected = exactly-one ]] +" + +DEPENDENCIES=" + build: + virtual/pkg-config + x11-libs/qttools:5 [[ note = [ Qt5LinguistTools ] ]] + x11-proto/xorgproto + build+run: + dev-libs/boost + dev-libs/protobuf:= + media-libs/libsndfile + media-libs/opus[>=1.0.0] + media-libs/speex[>=1.2_rc1] + media-libs/speexdsp[>=1.2_rc1] + x11-libs/libX11 + x11-libs/libXi + x11-libs/qtbase:5[gui][sql][sqlite] + x11-libs/qtsvg:5 + alsa? ( sys-sound/alsa-lib ) + avahi? ( net-dns/avahi[dns_sd] ) + pulseaudio? ( media-sound/pulseaudio ) + tts? ( app-speech/speechd ) + providers:libressl? ( dev-libs/libressl:= ) + providers:openssl? ( dev-libs/openssl ) + !media-sound/mumble [[ + description = [ media-sound/mumble was moved to ::desktop voip/mumble ] + resolution = uninstall-blocked-before + ]] +" + +DEFAULT_SRC_PREPARE_PATCHES=( + "${FILES}"/gcc.patch + "${FILES}"/tls12_strong_ciphers.patch + "${FILES}"/higher_opus_complexity.patch + "${FILES}"/allow_higher_bitrate_and_frame_size.patch +) + + + +src_prepare() { + default + + # TODO: report upstream + edo sed \ + -e "s:pkg-config:${PKG_CONFIG}:g" \ + -i main.pro \ + -i qmake/pkgconfig.pri \ + -i src/${PN}.pri \ + -i src/${PN}/${PN}.pro + + # set version + edo sed \ + -e "s:Compiled by User:${PV}:g" \ + -i src/Version.h + +# edo rmdir ${WORK}/3rdparty/celt-0.{7,11}.0-src +# edo ln -s ${WORKBASE}/celt-0.7.0-${CELT7_REV} ${WORK}/3rdparty/celt-0.7.0-src +# edo ln -s ${WORKBASE}/celt-0.11.0-${CELT11_REV} ${WORK}/3rdparty/celt-0.11.0-src + +# edo rmdir ${WORK}/themes/Mumble +# edo ln -s ${WORKBASE}/mumble-theme-${MUMBLETHEME_REV} ${WORK}/themes/Mumble +} + +src_configure() { + config=( + release # release build + bundled-celt # bundled celt + no-bundled-opus # bundled opus + no-bundled-speex # bundled speex + no-embed-qt-translations # Qt translations embedding + no-g15 # Logitech g15 keyboard support + no-server # server part (voip/murmur) + no-update # new versions check + ) + option alsa || config+=( no-alsa ) + option avahi || config+=( no-bonjour ) + option dbus || config+=( no-dbus ) + option oss || config+=( no-oss ) + option pulseaudio || config+=( no-pulseaudio ) + option tts || config+=( no-speechd ) + + eqmake main.pro -recursive \ + CONFIG+="${config[*]}" \ + DEFINES+="PLUGIN_PATH=/usr/$(exhost --target)/lib/mumble" +} + +src_install() { + local host=$(exhost --target) + + dobin release/${PN} + dobin scripts/${PN}-overlay + + exeinto /usr/${host}/lib/${PN} + doexe release/libmumble.so.$(ever range 1-3) + dosym libmumble.so.$(ever range 1-3) /usr/${host}/lib/${PN}/libmumble.so + dosym libmumble.so.$(ever range 1-3) /usr/${host}/lib/${PN}/libmumble.so.$(ever range 1) + dosym libmumble.so.$(ever range 1-3) /usr/${host}/lib/${PN}/libmumble.so.$(ever range 1-2) + doexe release/plugins/lib*.so* + doexe release/libcelt0.so.0.{7,11}.0 + + insinto /usr/share/applications + doins scripts/${PN}.desktop + + insinto /usr/share/icons/hicolor/scalable/apps + doins icons/${PN}.svg + + insinto /usr/share/kde4/services + doins scripts/${PN}.protocol + + doman man/${PN}.1 + doman man/${PN}-overlay.1 + + emagicdocs +} + +pkg_postinst() { + freedesktop-desktop_pkg_postinst + gtk-icon-cache_pkg_postinst + + elog "Mumble supports reading the kernel input devices, but may fall back to using the less optimal xinput2" + elog "This can be solved with a simple udev rule: SUBSYSTEM==\"input\", GROUP=\"input\" MODE=\"660\"" +} + +pkg_postrm() { + freedesktop-desktop_pkg_postrm + gtk-icon-cache_pkg_postrm +} + |