summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange2020-09-04 05:06:03 +0200
committerThomas Lange2020-09-04 05:06:03 +0200
commit7024a1f4f43e4d7ee91df281bceec216a4af4dd4 (patch)
tree17274c8f32e3f7fbb61365dec7ec17136950c2c5
parentdc36882c934fa4651304f2f5e4c5b595a75af000 (diff)
downloadaur-7024a1f4f43e4d7ee91df281bceec216a4af4dd4.tar.gz
Migrate from QMake to CMake
See also: - https://github.com/mumble-voip/mumble/commit/8bdf32d4808135e8e8d6cba004e36b4a6ead0f42
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD86
-rw-r--r--build-type-release.patch13
-rw-r--r--no-bundled-opus.patch16
4 files changed, 85 insertions, 44 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c329b39e1103..02a762f8aa76 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
pkgbase = mumble-git
pkgdesc = A voice chat application similar to TeamSpeak (git version)
- pkgver = 1.3.0.rc2.r461.g54eb261ca
+ pkgver = 1.3.0.rc2.r838.gf01920308
pkgrel = 1
epoch = 1
- url = https://www.mumble.info/
+ url = https://www.mumble.info
arch = i686
arch = x86_64
license = BSD
@@ -17,6 +17,8 @@ pkgbase = mumble-git
makedepends = protobuf
makedepends = python
makedepends = qt5-tools
+ makedepends = speech-dispatcher
+ makedepends = cmake
makedepends = git
depends = gcc-libs
depends = glibc
@@ -31,8 +33,8 @@ pkgbase = mumble-git
depends = qt5-svg
depends = speex
depends = xdg-utils
- optdepends = speech-dispatcher: Text-to-speech support
- optdepends = espeak-ng: Text-to-speech support
+ optdepends = speech-dispatcher: Text-to-Speech support
+ optdepends = espeak-ng: Text-to-Speech support
provides = mumble
conflicts = mumble
source = git://github.com/mumble-voip/mumble.git
@@ -40,11 +42,15 @@ pkgbase = mumble-git
source = git://github.com/mumble-voip/celt-0.7.0.git
source = git://github.com/mumble-voip/opus.git
source = git://github.com/mumble-voip/speex.git
+ source = build-type-release.patch
+ source = no-bundled-opus.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
+ sha256sums = 086374239b072df0034eed92d74917ab9af8db96fb0fcb01c36c111d6a134fe4
+ sha256sums = bd2d9fea616a88fe4425bdf3396a0d9e0dfb735a7c06bcacd0858250ea96a2b0
pkgname = mumble-git
depends = gcc-libs
diff --git a/PKGBUILD b/PKGBUILD
index dfa9f15b7f6e..31e049694670 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,27 +7,31 @@
_pkgname=mumble
pkgname="$_pkgname-git"
-pkgver=1.3.0.rc2.r461.g54eb261ca
+pkgver=1.3.0.rc2.r838.gf01920308
pkgrel=1
epoch=1
-arch=('i686' 'x86_64')
pkgdesc='A voice chat application similar to TeamSpeak (git version)'
-url='https://www.mumble.info/'
+arch=('i686' 'x86_64')
+url='https://www.mumble.info'
license=('BSD')
depends=('gcc-libs' 'glibc' 'hicolor-icon-theme' 'libspeechd' 'libx11' 'libxi'
'lsb-release' 'openssl' 'opus' 'qt5-base' 'qt5-svg' 'speex' 'xdg-utils')
makedepends=('alsa-lib' 'avahi' 'boost' 'jack' 'libpulse' 'libsndfile' 'mesa'
- 'protobuf' 'python' 'qt5-tools' 'git')
-optdepends=('speech-dispatcher: Text-to-speech support'
- 'espeak-ng: Text-to-speech support')
-conflicts=("$_pkgname")
+ 'protobuf' 'python' 'qt5-tools' 'speech-dispatcher' 'cmake' 'git')
+optdepends=('speech-dispatcher: Text-to-Speech support'
+ 'espeak-ng: Text-to-Speech support')
provides=("$_pkgname")
+conflicts=("$_pkgname")
source=('git://github.com/mumble-voip/mumble.git'
'git://github.com/mumble-voip/mumble-theme.git'
'git://github.com/mumble-voip/celt-0.7.0.git'
'git://github.com/mumble-voip/opus.git'
- 'git://github.com/mumble-voip/speex.git')
-sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
+ 'git://github.com/mumble-voip/speex.git'
+ 'build-type-release.patch'
+ 'no-bundled-opus.patch')
+sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
+ '086374239b072df0034eed92d74917ab9af8db96fb0fcb01c36c111d6a134fe4'
+ 'bd2d9fea616a88fe4425bdf3396a0d9e0dfb735a7c06bcacd0858250ea96a2b0')
pkgver() {
cd "$_pkgname"
@@ -39,47 +43,49 @@ prepare() {
git submodule init
git config submodule.3rdparty/celt-0.7.0-src.url "$srcdir/celt"
- git config submodule.3rdparty/opus-src.url "$srcdir/opus"
- git config submodule.3rdparty/speex-src.url "$srcdir/speex"
+ git config submodule.3rdparty/opus.url "$srcdir/opus"
+ git config submodule.3rdparty/speex.url "$srcdir/speex"
git config submodule.themes/Mumble.url "$srcdir/mumble-theme"
git submodule update
+
+ # Workarounds to fix cmake build
+ patch -Np1 -i "$srcdir/build-type-release.patch"
+ patch -Np1 -i "$srcdir/no-bundled-opus.patch"
}
build() {
- cd "$_pkgname"
- qmake-qt5 main.pro \
- CONFIG+="bundled-celt no-bundled-opus no-bundled-speex no-g15 no-xevie \
- no-server no-embed-qt-translations no-update packaged" \
- DEFINES+="PLUGIN_PATH=/usr/lib/$_pkgname" \
- INCLUDEPATH+="/usr/include/speech-dispatcher"
- make release
+ CXXFLAGS+=" -DPLUGIN_PATH=/usr/lib/$_pkgname"
+ cmake \
+ -B "$_pkgname/build" \
+ -S "$_pkgname" \
+ -DCMAKE_BUILD_TYPE='None' \
+ -DCMAKE_INSTALL_PREFIX='/usr' \
+ -DBUILD_TESTING:BOOL='OFF' \
+ -Dclient:BOOL='ON' \
+ -Dserver:BOOL='OFF' \
+ -Dbundled-celt:BOOL='ON' \
+ -Dbundled-opus:BOOL='OFF' \
+ -Dbundled-speex:BOOL='OFF' \
+ -Dupdate:BOOL='OFF' \
+ -Wno-dev
+ make -C "$_pkgname/build"
}
package() {
depends+=('libasound.so' 'libdns_sd.so' 'libjack.so' 'libprotobuf.so'
'libpulse.so' 'libsndfile.so')
cd "$_pkgname"
- # mumble has no install target: https://github.com/mumble-voip/mumble/issues/1029
- # binaries and scripts
- install -vDm 755 release/mumble -t "$pkgdir/usr/bin"
- install -vDm 755 scripts/mumble-overlay -t "$pkgdir/usr/bin/"
- # (vendored) libs
- install -vdm 755 "$pkgdir/usr/lib/$_pkgname/"
- local _lib
- for _lib in release/*.so*; do
- if [ -L "$_lib" ]; then
- cp -vP "$_lib" "$pkgdir/usr/lib/$_pkgname/"
- else
- install -vDm 755 "$_lib" -t "$pkgdir/usr/lib/$_pkgname/"
- fi
- done
- install -vDm 755 release/plugins/*.so -t "$pkgdir/usr/lib/$_pkgname/"
- # XDG desktop integration
- install -vDm 644 scripts/mumble.desktop -t "$pkgdir/usr/share/applications"
- # man page
- install -vDm 644 "man/${_pkgname}"*.1 -t "$pkgdir/usr/share/man/man1/"
- # XDG desktop icons
- install -vDm 644 icons/mumble.svg -t "$pkgdir/usr/share/icons/hicolor/scalable/apps/"
- # license
+ make -C build DESTDIR="$pkgdir" install
+
+ # Fix location of libraries
+ install -d "$pkgdir/usr/lib/$_pkgname"
+ mv "$pkgdir/usr/lib/"libcelt* "$pkgdir/usr/lib/$_pkgname/"
+ mv "$pkgdir/usr/lib/plugins/"*.so "$pkgdir/usr/lib/$_pkgname/"
+ rmdir "$pkgdir/usr/lib/plugins"
+
+ # Man page
+ install -vDm 644 "man/$_pkgname".1 -t "$pkgdir/usr/share/man/man1/"
+
+ # License
install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$_pkgname"
}
diff --git a/build-type-release.patch b/build-type-release.patch
new file mode 100644
index 000000000000..b10cbcf4d2c0
--- /dev/null
+++ b/build-type-release.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e17cdd6f6..5e39bbe99 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -76,8 +76,6 @@ else()
+ )
+
+ set(BUILD_STR "Debug")
+- elseif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Release")
+- message(FATAL_ERROR "Unsupported build type! Please choose either \"Debug\" or \"Release\".")
+ endif()
+ endif()
+
diff --git a/no-bundled-opus.patch b/no-bundled-opus.patch
new file mode 100644
index 000000000000..fb6b36560cf5
--- /dev/null
+++ b/no-bundled-opus.patch
@@ -0,0 +1,16 @@
+diff --git a/src/mumble/CMakeLists.txt b/src/mumble/CMakeLists.txt
+index 3aef73c69..87c3166ee 100644
+--- a/src/mumble/CMakeLists.txt
++++ b/src/mumble/CMakeLists.txt
+@@ -510,9 +510,8 @@ if(bundled-opus)
+ install(TARGETS opus LIBRARY DESTINATION lib)
+ endif()
+ else()
+- find_pkg(Opus CONFIG REQUIRED)
+- add_dependencies(mumble PRIVATE Opus::opus)
+- target_include_directories(mumble PRIVATE ${Opus_INCLUDE_DIRS})
++ find_pkg(opus CONFIG REQUIRED)
++ target_include_directories(mumble PRIVATE ${opus_INCLUDE_DIRS})
+ endif()
+
+ if(bundled-celt)