summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2022-04-04 15:29:20 -0300
committerDaniel Bermond2022-04-04 15:29:20 -0300
commit20e990d5a4248c7a19bfae4ea4a4bddc6e47a602 (patch)
tree83780fdf7027cd0ca17234152f786830e6481f75
parent498e4e078b83a7dc2a04f83559fadaeb7a815f06 (diff)
downloadaur-20e990d5a4248c7a19bfae4ea4a4bddc6e47a602.tar.gz
Remove bundled discord game sdk and vosk. Disable dynarec.
Also removed the now unneeded minizip dependency. Discord game sdk and vosk-api are now dependencies, instead of being bundled inside the package. Pros: - size: package has very significant smaller size - convenience: vosk-api can be an optinal dependency (at least as far as I could gather, please let me know if not) - security: vosk-api dependency is built from source, instead of relying in a pre-built library shipped by upstream - security: vosk-api package is built with full relro support and fortify, oposing to the library shipped by upstream - performance: vosk-api package is built with lto enabled (suposing the user is building with devtools or with lto enabled in makepkg.conf) Cons: - increased total build time, as vosk-api takes a while to build If something break os goes wrong, we will consider rolling back the removal of bundled discord game sdk and vosk api.
-rw-r--r--.SRCINFO20
-rw-r--r--020-m64p-change-optimizations.patch13
-rw-r--r--030-m64p-remove-bundled-discord-and-vosk.patch23
-rw-r--r--040-m64p-fix-paths.patch (renamed from 030-m64p-fix-paths.patch)44
-rw-r--r--050-m64p-add-pie.patch (renamed from 040-m64p-add-pie.patch)2
-rw-r--r--PKGBUILD37
6 files changed, 102 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8bb9c6bd05c7..96cc47511c04 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = m64p-git
pkgdesc = Mupen64Plus with custom plugins and Qt5 GUI (git version)
- pkgver = 20220403.r1.g9d6e4b1
+ pkgver = 20220403.r2.gf6e621b
pkgrel = 1
url = https://m64p.github.io/
arch = x86_64
@@ -11,20 +11,22 @@ pkgbase = m64p-git
makedepends = python
makedepends = zip
makedepends = icoutils
+ makedepends = vosk-api
depends = freetype2
depends = hidapi
depends = libgl
depends = libpng
depends = libsamplerate
- depends = minizip
depends = qt5-base
depends = qt5-websockets
depends = sdl2
depends = sdl2_net
depends = vulkan-icd-loader
depends = zlib
+ depends = discord-game-sdk
depends = hicolor-icon-theme
- optdepends = p7zip: for 7z/zip support
+ optdepends = p7zip: for 7z/zip and VRU support
+ optdepends = vosk-api: for VRU support (voice recognition unit)
provides = m64p
provides = mupen64plus-gui
provides = mupen64plus-video-gliden64
@@ -35,14 +37,16 @@ pkgbase = m64p-git
source = git+https://github.com/loganmc10/m64p.git
source = 010-m64p-remove-build-jobs-limitation.patch
source = 020-m64p-change-optimizations.patch
- source = 030-m64p-fix-paths.patch
- source = 040-m64p-add-pie.patch
+ source = 030-m64p-remove-bundled-discord-and-vosk.patch
+ source = 040-m64p-fix-paths.patch
+ source = 050-m64p-add-pie.patch
source = m64p.desktop
sha256sums = SKIP
sha256sums = f6ae0125845fd8fc70efeae83fc54d6d4c0787f8215d274c84f259564ec36211
- sha256sums = 464c58311f26e8ec23ed418c2b2d331743552b87e156bc7cd284add8debbd0d1
- sha256sums = b8cd918c56b1435c448067e4202c36e5c3cf3fb0ff43ac4cdc590719677b5da5
- sha256sums = 5c604da87c9deb3582b43efa724589080a7070a108ab0c0d00e115cb35eb4b13
+ sha256sums = 1981ca0e45bd77faa0651336487be1899250b0d1f3c4191b84daa22ebc119918
+ sha256sums = a32345c9013b2a6d8b08fd7aadb899643b95a7c4cee71cddbed1ae4fb7c8764b
+ sha256sums = 11f7a3caa150a716a12ab0d70a98089d7502d7a716f41e9bc419469fe4e1957a
+ sha256sums = 9d72588b07ef5e86c4730f9384b5d3622e38ccab0f99d7fa419870e7d19c264b
sha256sums = 8df4e8076d28a1bc44f41b0129a9935da9839e8a8cb9944206757e47da561808
pkgname = m64p-git
diff --git a/020-m64p-change-optimizations.patch b/020-m64p-change-optimizations.patch
index 9ed2e60e3697..e1482efa4831 100644
--- a/020-m64p-change-optimizations.patch
+++ b/020-m64p-change-optimizations.patch
@@ -1,13 +1,6 @@
--- a/build.sh
+++ b/build.sh
-@@ -19,12 +19,14 @@ else
- suffix=".so"
- fi
-
-+export NEW_DYNAREC=1
-+
- install_dir=$PWD/mupen64plus
- mkdir -p $install_dir
+@@ -24,7 +24,7 @@ mkdir -p $install_dir
base_dir=$PWD
cd $base_dir/mupen64plus-core/projects/unix
@@ -16,7 +9,7 @@
cp -P $base_dir/mupen64plus-core/projects/unix/*$suffix* $install_dir
cp $base_dir/mupen64plus-core/data/* $install_dir
-@@ -75,9 +77,9 @@ fi
+@@ -75,9 +75,9 @@ fi
mkdir -p $base_dir/parallel-rsp/build
cd $base_dir/parallel-rsp/build
if [[ $UNAME == *"MINGW"* ]]; then
@@ -28,7 +21,7 @@
fi
cmake --build .
cp mupen64plus-rsp-parallel.* $install_dir
-@@ -85,9 +87,9 @@ cp mupen64plus-rsp-parallel.* $install_dir
+@@ -85,9 +85,9 @@ cp mupen64plus-rsp-parallel.* $install_dir
mkdir -p $base_dir/parallel-rdp-standalone/build
cd $base_dir/parallel-rdp-standalone/build
if [[ $UNAME == *"MINGW"* ]]; then
diff --git a/030-m64p-remove-bundled-discord-and-vosk.patch b/030-m64p-remove-bundled-discord-and-vosk.patch
new file mode 100644
index 000000000000..793b42d094eb
--- /dev/null
+++ b/030-m64p-remove-bundled-discord-and-vosk.patch
@@ -0,0 +1,23 @@
+--- a/build.sh
++++ b/build.sh
+@@ -157,8 +157,6 @@ else
+ else
+ my_os=linux64
+ fi
+- cp $base_dir/mupen64plus-gui/discord/libdiscord_game_sdk.so $install_dir
+- cp $base_dir/mupen64plus-input-qt/vosk/libvosk.so $install_dir
+ fi
+
+ if [[ "$1" != "nozip" ]]; then
+--- a/mupen64plus-gui/mupen64plus-gui.pro
++++ b/mupen64plus-gui/mupen64plus-gui.pro
+@@ -92,8 +92,7 @@ HEADERS += mainwindow.h \
+ netplay/createroom.h \
+ netplay/joinroom.h \
+ netplay/waitroom.h \
+- version.h \
+- discord/discord_game_sdk.h
++ version.h
+
+ FORMS += mainwindow.ui
+
diff --git a/030-m64p-fix-paths.patch b/040-m64p-fix-paths.patch
index b9608346dcb1..e521a6076815 100644
--- a/030-m64p-fix-paths.patch
+++ b/040-m64p-fix-paths.patch
@@ -31,7 +31,7 @@
void MainWindow::setupDiscord()
{
- QLibrary *discordLib = new QLibrary((QDir(QCoreApplication::applicationDirPath()).filePath("discord_game_sdk")), this);
-+ QLibrary *discordLib = new QLibrary(QStringLiteral(u"/usr/lib/discord_game_sdk"), this);
++ QLibrary *discordLib = new QLibrary(QStringLiteral(u"discord_game_sdk"), this);
memset(&discord_app, 0, sizeof(discord_app));
@@ -53,6 +53,17 @@
#endif
QString file_path;
QString plugin_path;
+--- a/mupen64plus-gui/mainwindow.h
++++ b/mupen64plus-gui/mainwindow.h
+@@ -1,7 +1,7 @@
+ #ifndef MAINWINDOW_H
+ #define MAINWINDOW_H
+
+-#include "discord/discord_game_sdk.h"
++#include <discord_game_sdk.h>
+ #include "oglwindow.h"
+ #include "workerthread.h"
+ #include "logviewer.h"
--- a/mupen64plus-gui/settingsdialog.cpp
+++ b/mupen64plus-gui/settingsdialog.cpp
@@ -58,7 +58,7 @@ void SettingsDialog::initStuff()
@@ -64,3 +75,34 @@
#endif
QDir PluginDir(pluginPath);
QStringList Filter;
+--- a/mupen64plus-gui/workerthread.h
++++ b/mupen64plus-gui/workerthread.h
+@@ -6,7 +6,7 @@
+ #include <QString>
+ #include <QSurfaceFormat>
+ #include "common.h"
+-#include "discord/discord_game_sdk.h"
++#include <discord_game_sdk.h>
+
+ class WorkerThread
+ #ifndef SINGLE_THREAD
+--- a/mupen64plus-input-qt/main.cpp
++++ b/mupen64plus-input-qt/main.cpp
+@@ -27,7 +27,7 @@
+ #include "m64p_plugin.h"
+ #include "main.h"
+ #include "configdialog.h"
+-#include "vosk/vosk_api.h"
++#include <vosk_api.h>
+ #include "osal/osal_dynamiclib.h"
+ #include "vruwords.h"
+ #include "funcs.h"
+@@ -731,7 +731,7 @@ static int setupVosk()
+ {
+ if (voskLib)
+ return 0;
+- voskLib = new QLibrary((QDir(QCoreApplication::applicationDirPath()).filePath("vosk")));
++ voskLib = new QLibrary(QStringLiteral(u"vosk"));
+ VoskAcceptWaveform = (ptr_vosk_recognizer_accept_waveform) voskLib->resolve("vosk_recognizer_accept_waveform");
+ VoskFinalResult = (ptr_vosk_recognizer_final_result) voskLib->resolve("vosk_recognizer_final_result");
+ VoskNewModel = (ptr_vosk_model_new) voskLib->resolve("vosk_model_new");
diff --git a/040-m64p-add-pie.patch b/050-m64p-add-pie.patch
index 95fd43babc17..4b23960094d9 100644
--- a/040-m64p-add-pie.patch
+++ b/050-m64p-add-pie.patch
@@ -1,6 +1,6 @@
--- a/mupen64plus-gui/mupen64plus-gui.pro
+++ b/mupen64plus-gui/mupen64plus-gui.pro
-@@ -99,8 +99,6 @@ FORMS += mainwindow.ui
+@@ -98,8 +98,6 @@ FORMS += mainwindow.ui
QMAKE_INCDIR += api interface
diff --git a/PKGBUILD b/PKGBUILD
index 1a3dc70e5181..b01110a2ce0a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,43 @@
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
pkgname=m64p-git
-pkgver=20220403.r1.g9d6e4b1
+pkgver=20220403.r2.gf6e621b
pkgrel=1
pkgdesc='Mupen64Plus with custom plugins and Qt5 GUI (git version)'
arch=('x86_64')
url='https://m64p.github.io/'
license=('GPL3')
-depends=('freetype2' 'hidapi' 'libgl' 'libpng' 'libsamplerate' 'minizip'
- 'qt5-base' 'qt5-websockets' 'sdl2' 'sdl2_net' 'vulkan-icd-loader'
- 'zlib' 'hicolor-icon-theme')
-optdepends=('p7zip: for 7z/zip support')
-makedepends=('git' 'cmake' 'nasm' 'python' 'zip' 'icoutils')
+depends=('freetype2' 'hidapi' 'libgl' 'libpng' 'libsamplerate' 'qt5-base'
+ 'qt5-websockets' 'sdl2' 'sdl2_net' 'vulkan-icd-loader' 'zlib'
+ 'discord-game-sdk' 'hicolor-icon-theme')
+optdepends=('p7zip: for 7z/zip and VRU support'
+ 'vosk-api: for VRU support (voice recognition unit)')
+makedepends=('git' 'cmake' 'nasm' 'python' 'zip' 'icoutils' 'vosk-api')
provides=('m64p' 'mupen64plus-gui' 'mupen64plus-video-gliden64')
conflicts=('m64p' 'mupen64plus-gui' 'mupen64plus-video-gliden64' 'mupen64plus')
source=('git+https://github.com/loganmc10/m64p.git'
'010-m64p-remove-build-jobs-limitation.patch'
'020-m64p-change-optimizations.patch'
- '030-m64p-fix-paths.patch'
- '040-m64p-add-pie.patch'
+ '030-m64p-remove-bundled-discord-and-vosk.patch'
+ '040-m64p-fix-paths.patch'
+ '050-m64p-add-pie.patch'
'm64p.desktop')
sha256sums=('SKIP'
'f6ae0125845fd8fc70efeae83fc54d6d4c0787f8215d274c84f259564ec36211'
- '464c58311f26e8ec23ed418c2b2d331743552b87e156bc7cd284add8debbd0d1'
- 'b8cd918c56b1435c448067e4202c36e5c3cf3fb0ff43ac4cdc590719677b5da5'
- '5c604da87c9deb3582b43efa724589080a7070a108ab0c0d00e115cb35eb4b13'
+ '1981ca0e45bd77faa0651336487be1899250b0d1f3c4191b84daa22ebc119918'
+ 'a32345c9013b2a6d8b08fd7aadb899643b95a7c4cee71cddbed1ae4fb7c8764b'
+ '11f7a3caa150a716a12ab0d70a98089d7502d7a716f41e9bc419469fe4e1957a'
+ '9d72588b07ef5e86c4730f9384b5d3622e38ccab0f99d7fa419870e7d19c264b'
'8df4e8076d28a1bc44f41b0129a9935da9839e8a8cb9944206757e47da561808')
prepare() {
icotool -x m64p/mupen64plus-gui/mupen64plus.ico -o m64p/mupen64plus-gui
patch -d m64p -Np1 -i "${srcdir}/010-m64p-remove-build-jobs-limitation.patch"
patch -d m64p -Np1 -i "${srcdir}/020-m64p-change-optimizations.patch"
- patch -d m64p -Np1 -i "${srcdir}/030-m64p-fix-paths.patch"
- patch -d m64p -Np1 -i "${srcdir}/040-m64p-add-pie.patch"
+ patch -d m64p -Np1 -i "${srcdir}/030-m64p-remove-bundled-discord-and-vosk.patch"
+ patch -d m64p -Np1 -i "${srcdir}/040-m64p-fix-paths.patch"
+ patch -d m64p -Np1 -i "${srcdir}/050-m64p-add-pie.patch"
+ rm -rf m64p/mupen64plus-{gui/discord,input-qt/vosk}
}
pkgver() {
@@ -65,13 +70,11 @@ package() {
local _sover
for _component in core audio-sdl2 input-raphnetraw
do
- make -C "m64p/mupen64plus-${_component}/projects/unix" DESTDIR="$pkgdir" PREFIX='/usr' LDCONFIG='true' NEW_DYNAREC='1' NETPLAY='1' OSD='0' install
+ make -C "m64p/mupen64plus-${_component}/projects/unix" DESTDIR="$pkgdir" PREFIX='/usr' LDCONFIG='true' NEW_DYNAREC='0' NETPLAY='1' OSD='0' install
done
_sover="$(find "${pkgdir}/usr/lib" -type f -name 'libmupen64plus.so.*.*.*' | sed 's/^.*\.so\.//')"
ln -s "libmupen64plus.so.${_sover}" "${pkgdir}/usr/lib/libmupen64plus.so"
- # other plugins and components
- install -D -m644 m64p/mupen64plus/libdiscord_game_sdk.so -t "${pkgdir}/usr/lib"
- install -D -m644 m64p/mupen64plus-input-qt/vosk/libvosk.so -t "${pkgdir}/usr/lib/mupen64plus"
+ # other plugins
install -D -m644 m64p/mupen64plus/mupen64plus-{input-qt,{rsp,video}-parallel}.so -t "${pkgdir}/usr/lib/mupen64plus"
}