diff --git a/buildscripts/build_snore_linux.sh b/buildscripts/build_snore_linux.sh index c92ae83c4..40c4e8f5f 100755 --- a/buildscripts/build_snore_linux.sh +++ b/buildscripts/build_snore_linux.sh @@ -42,6 +42,8 @@ else INSTALL_PREFIX_ARGS="" fi +patch -Np1 < "$(dirname "$0")"/patches/snore.patch + cmake -DCMAKE_BUILD_TYPE=Release $INSTALL_PREFIX_ARGS \ -DBUILD_daemon=OFF \ -DBUILD_settings=OFF \ diff --git a/buildscripts/docker/Dockerfile.almalinux b/buildscripts/docker/Dockerfile.almalinux index 6150abe89..19634492b 100644 --- a/buildscripts/docker/Dockerfile.almalinux +++ b/buildscripts/docker/Dockerfile.almalinux @@ -33,6 +33,7 @@ RUN dnf --nodocs -y install dnf-plugins-core && \ opus-devel \ libsodium-devel \ libasan \ + patch \ ffmpeg-devel \ libexif-devel \ qrencode-devel \ @@ -47,8 +48,10 @@ RUN dnf --nodocs -y install dnf-plugins-core && \ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig COPY download/common.sh /build/download/common.sh + COPY download/download_snore.sh /build/download/download_snore.sh COPY build_snore_linux.sh /build/build_snore_linux.sh +COPY patches/snore.patch /build/patches/snore.patch RUN mkdir -p /src/snore && \ cd /src/snore && \ /build/build_snore_linux.sh && \ diff --git a/buildscripts/docker/Dockerfile.debian b/buildscripts/docker/Dockerfile.debian index 427499a96..076b97f0e 100644 --- a/buildscripts/docker/Dockerfile.debian +++ b/buildscripts/docker/Dockerfile.debian @@ -49,6 +49,7 @@ COPY download/common.sh /build/download/common.sh COPY download/download_snore.sh /build/download/download_snore.sh COPY build_snore_linux.sh /build/build_snore_linux.sh +COPY patches/snore.patch /build/patches/snore.patch RUN mkdir -p /src/snore && \ cd /src/snore && \ /build/build_snore_linux.sh && \ diff --git a/buildscripts/docker/Dockerfile.debian_old b/buildscripts/docker/Dockerfile.debian_old index 9f080bdaf..00c0e0fbc 100644 --- a/buildscripts/docker/Dockerfile.debian_old +++ b/buildscripts/docker/Dockerfile.debian_old @@ -52,6 +52,7 @@ COPY download/common.sh /build/download/common.sh COPY download/download_snore.sh /build/download/download_snore.sh COPY build_snore_linux.sh /build/build_snore_linux.sh +COPY patches/snore.patch /build/patches/snore.patch RUN mkdir -p /src/snore && \ cd /src/snore && \ /build/build_snore_linux.sh && \ diff --git a/buildscripts/docker/Dockerfile.fedora b/buildscripts/docker/Dockerfile.fedora index 369a2f3a3..3c3468bcd 100644 --- a/buildscripts/docker/Dockerfile.fedora +++ b/buildscripts/docker/Dockerfile.fedora @@ -38,6 +38,7 @@ RUN dnf --nodocs -y install dnf-plugins-core && \ kf5-sonnet-devel \ libXScrnSaver-devel \ msgpack-devel \ + patch \ sqlite-devel \ sqlcipher-devel && \ dnf clean all @@ -45,8 +46,10 @@ RUN dnf --nodocs -y install dnf-plugins-core && \ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig COPY download/common.sh /build/download/common.sh + COPY download/download_snore.sh /build/download/download_snore.sh COPY build_snore_linux.sh /build/build_snore_linux.sh +COPY patches/snore.patch /build/patches/snore.patch RUN mkdir -p /src/snore && \ cd /src/snore && \ /build/build_snore_linux.sh && \ diff --git a/buildscripts/docker/Dockerfile.ubuntu_lts b/buildscripts/docker/Dockerfile.ubuntu_lts index 4864a3a2f..979c056a3 100644 --- a/buildscripts/docker/Dockerfile.ubuntu_lts +++ b/buildscripts/docker/Dockerfile.ubuntu_lts @@ -73,6 +73,7 @@ COPY download/common.sh /build/download/common.sh COPY download/download_snore.sh /build/download/download_snore.sh COPY build_snore_linux.sh /build/build_snore_linux.sh +COPY patches/snore.patch /build/patches/snore.patch RUN mkdir -p /src/snore && \ cd /src/snore && \ /build/build_snore_linux.sh --system-install && \ diff --git a/buildscripts/patches/snore.patch b/buildscripts/patches/snore.patch new file mode 100644 index 000000000..2cf7fc0cc --- /dev/null +++ b/buildscripts/patches/snore.patch @@ -0,0 +1,26 @@ +--- src/libsnore/plugins/plugincontainer.cpp 2022-02-10 14:14:10.157272874 -0800 ++++ patched/src/libsnore/plugins/plugincontainer.cpp 2022-02-10 14:14:53.371062246 -0800 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + using namespace Snore; + +@@ -134,6 +135,7 @@ + static QDir path; + if (!isLoaded) { + isLoaded = true; ++ QString pluginDir = QLibraryInfo::location(QLibraryInfo::PluginsPath); + QString appDir = qApp->applicationDirPath(); + QStringList list; + #ifdef Q_OS_MAC +@@ -152,6 +154,7 @@ + << appDir + suffix + << appDir + QStringLiteral("/../lib/plugins") + suffix + << appDir + QStringLiteral("/../lib64/plugins") + suffix ++ << pluginDir + suffix + << QStringLiteral(LIBSNORE_PLUGIN_PATH); + foreach(const QString & p, list) { + path = QDir(p);