diff options
author | Autumn | 2023-02-20 14:51:04 -0800 |
---|---|---|
committer | Autumn | 2023-02-20 15:21:53 -0800 |
commit | c271bd4119f014541f5a766aafa8f4e652def644 (patch) | |
tree | 9f5dacc0a231f6fe3239b5efc16b932c62f06a64 | |
parent | 5c7598a2d4f73682fc787604e3e012720453e766 (diff) | |
download | aur-c271bd4119f014541f5a766aafa8f4e652def644.tar.gz |
update to 2023.1
this version adds the option to depend on KDE Frameworks to improve
detection of the preferred text editor, which I've forgone.
I added the "GPL3" license because the new Plus interpreter comes
from Spatterlight, which uses GPLv3.
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | libspeechd-dlopen.patch | 159 |
3 files changed, 10 insertions, 177 deletions
@@ -1,7 +1,7 @@ pkgbase = gargoyle pkgdesc = Interactive Fiction multi-interpreter that supports all major IF formats. - pkgver = 2022.1 - pkgrel = 3 + pkgver = 2023.1 + pkgrel = 1 url = https://ccxvii.net/gargoyle/ arch = i686 arch = x86_64 @@ -9,6 +9,7 @@ pkgbase = gargoyle arch = armv7h arch = aarch64 license = GPL2 + license = GPL3 license = custom:BSD-2-Clause license = custom:BSD-3-Clause license = Artistic2.0 @@ -30,9 +31,7 @@ pkgbase = gargoyle provides = gargoyle conflicts = gargoyle-mod replaces = gargoyle-mod - source = gargoyle-2022.1.tar.gz::https://github.com/garglk/garglk/archive/2022.1.tar.gz - source = libspeechd-dlopen.patch - sha512sums = 10b9ccc4bb6bed83780f8d7bf2d36650c8f7c4e14204fe5372e972f8d6900c69846d601670db55ec369e313a75c34ef88fd873f158729af0d4d9a6d8c5c6a1e1 - sha512sums = d1381db41a973ccd4ae7bfccb089a48ca851a3c6a4ba8c1e07e8e195e7429b1d96d3bacec6a651aa108e8ecc17d9bc3eb78d368309cf134f80af9b699c3c2d4d + source = gargoyle-2023.1.tar.gz::https://github.com/garglk/garglk/archive/2023.1.tar.gz + sha512sums = d8624f8a8492f64adfdb638811419ebef5b77457708a5d07a3891faf97966237839170914af4d416f42aca7e6d9d0643384ef60be30a2ba22ed52fee4938683a pkgname = gargoyle @@ -6,12 +6,12 @@ # Contributor: Eric Forgeot < http://ifiction.free.fr > pkgname=gargoyle -pkgver=2022.1 -pkgrel=3 +pkgver=2023.1 +pkgrel=1 pkgdesc="Interactive Fiction multi-interpreter that supports all major IF formats." arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') url="https://ccxvii.net/gargoyle/" -license=('GPL2' 'custom:BSD-2-Clause' 'custom:BSD-3-Clause' 'Artistic2.0' 'MIT' 'custom:OFL-1.1') +license=('GPL2' 'GPL3' 'custom:BSD-2-Clause' 'custom:BSD-3-Clause' 'Artistic2.0' 'MIT' 'custom:OFL-1.1') depends=('sdl2_mixer' 'sdl2' 'freetype2' 'qt5-base' 'fontconfig' 'libjpeg' 'libpng' 'zlib' 'hicolor-icon-theme') makedepends=('cmake' 'pkgconfig' 'desktop-file-utils') @@ -20,15 +20,8 @@ provides=('gargoyle') conflicts=('gargoyle-mod') replaces=('gargoyle-mod') #groups=(inform) -source=("${pkgname}-${pkgver}.tar.gz::https://github.com/garglk/garglk/archive/${pkgver}.tar.gz" - "libspeechd-dlopen.patch") -sha512sums=('10b9ccc4bb6bed83780f8d7bf2d36650c8f7c4e14204fe5372e972f8d6900c69846d601670db55ec369e313a75c34ef88fd873f158729af0d4d9a6d8c5c6a1e1' - 'd1381db41a973ccd4ae7bfccb089a48ca851a3c6a4ba8c1e07e8e195e7429b1d96d3bacec6a651aa108e8ecc17d9bc3eb78d368309cf134f80af9b699c3c2d4d') - -prepare() { - cd "${srcdir}/garglk-${pkgver}" - patch -Np1 -i "${srcdir}/libspeechd-dlopen.patch" -} +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/garglk/garglk/archive/${pkgver}.tar.gz") +sha512sums=('d8624f8a8492f64adfdb638811419ebef5b77457708a5d07a3891faf97966237839170914af4d416f42aca7e6d9d0643384ef60be30a2ba22ed52fee4938683a') build() { cd "${srcdir}/garglk-${pkgver}" diff --git a/libspeechd-dlopen.patch b/libspeechd-dlopen.patch deleted file mode 100644 index 55a8d326ab94..000000000000 --- a/libspeechd-dlopen.patch +++ /dev/null @@ -1,159 +0,0 @@ -From d50e9abd62ab3942c5a7e2a9950c7fa62a967112 Mon Sep 17 00:00:00 2001 -From: Autumn <autumn@cyfox.net> -Date: Mon, 31 Jan 2022 17:19:46 -0800 -Subject: [PATCH] support loading libspeechd with dlopen - ---- - garglk/CMakeLists.txt | 12 ++++-- - garglk/ttsspeechd.cpp | 97 ++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 104 insertions(+), 5 deletions(-) - -diff --git a/garglk/CMakeLists.txt b/garglk/CMakeLists.txt -index 253990bb..c34e3c26 100644 ---- a/garglk/CMakeLists.txt -+++ b/garglk/CMakeLists.txt -@@ -16,7 +16,7 @@ else() - set(INTERFACE "QT") - endif() - --set(WITH_TTS "AUTO" CACHE STRING "Enable text-to-speech support (ON/OFF/AUTO)") -+set(WITH_TTS "AUTO" CACHE STRING "Enable text-to-speech support (ON/OFF/AUTO/DYNAMIC)") - set(GARGLKPRE "" CACHE STRING "Binary prefix") - set(SOUND "SDL" CACHE STRING "Backend to use for sound (SDL, QT, or none)") - -@@ -172,9 +172,15 @@ if(WITH_TTS) - set(TTS_REQUIRED "REQUIRED") - endif() - -- pkg_check_modules(SPEECH_DISPATCHER ${TTS_REQUIRED} IMPORTED_TARGET speech-dispatcher) -+ if(NOT WITH_TTS STREQUAL "DYNAMIC") -+ pkg_check_modules(SPEECH_DISPATCHER ${TTS_REQUIRED} IMPORTED_TARGET speech-dispatcher) -+ endif() - -- if(SPEECH_DISPATCHER_FOUND) -+ if(WITH_TTS STREQUAL "DYNAMIC") -+ target_sources(garglk PRIVATE ttsspeechd.cpp) -+ target_link_libraries(garglk PRIVATE ${CMAKE_DL_LIBS}) -+ target_compile_definitions(garglk PRIVATE "GARGLK_DLOPEN_LIBSPEECHD") -+ elseif(SPEECH_DISPATCHER_FOUND) - target_sources(garglk PRIVATE ttsspeechd.cpp) - target_link_libraries(garglk PRIVATE PkgConfig::SPEECH_DISPATCHER) - else() -diff --git a/garglk/ttsspeechd.cpp b/garglk/ttsspeechd.cpp -index a28f7438..9b86205a 100644 ---- a/garglk/ttsspeechd.cpp -+++ b/garglk/ttsspeechd.cpp -@@ -23,11 +23,65 @@ - - #include <vector> - --#include <libspeechd.h> -- - #include "glk.h" - #include "garglk.h" - -+#ifdef GARGLK_DLOPEN_LIBSPEECHD -+ -+#include <dlfcn.h> -+#include <iostream> -+ -+/* Redefine some types from libspeechd.h */ -+ -+typedef enum { -+ SPD_IMPORTANT = 1, -+ SPD_MESSAGE = 2, -+ SPD_TEXT = 3, -+ SPD_NOTIFICATION = 4, -+ SPD_PROGRESS = 5 -+} SPDPriority; -+ -+typedef enum { -+ SPD_MODE_SINGLE = 0, -+ SPD_MODE_THREADED = 1 -+} SPDConnectionMode; -+ -+struct SPDConnection; -+ -+/* Prefix names of libspeechd symbols with underscores -+ * in this file to avoid any possible conflicts */ -+ -+#define spd_open _spd_open -+#define spd_set_language _spd_set_language -+#define spd_say _spd_say -+#define spd_cancel _spd_cancel -+#define spd_close _spd_close -+ -+#define LIBSPEECHD_FUNCS \ -+ FUNC( \ -+ spd_open, \ -+ SPDConnection*, \ -+ (const char*, const char*, const char*, SPDConnectionMode) \ -+ ) \ -+ FUNC(spd_set_language, int, (SPDConnection*, const char*)) \ -+ FUNC(spd_say, int, (SPDConnection*, SPDPriority, const char*)) \ -+ FUNC(spd_cancel, int, (SPDConnection*)) \ -+ FUNC(spd_close, void, (SPDConnection*)) -+ -+#define FUNC(name, type, params) \ -+ typedef type(*name##_fn) params; \ -+ static name##_fn name; -+ -+LIBSPEECHD_FUNCS -+ -+#undef FUNC -+ -+#else -+ -+#include <libspeechd.h> -+ -+#endif -+ - static SPDConnection *spd; - static std::vector<glui32> txtbuf; - -@@ -35,6 +89,45 @@ void gli_initialize_tts(void) - { - if (gli_conf_speak) - { -+#ifdef GARGLK_DLOPEN_LIBSPEECHD -+ void *libspeechd = dlopen("libspeechd.so.2", RTLD_LAZY | RTLD_LOCAL); -+ -+ if (libspeechd == nullptr) -+ { -+ std::cerr << -+ "Failed to load libspeechd. " -+ "Text-to-speech will be disabled." << -+ std::endl; -+ return; -+ } -+ -+ /* Firefox checks for ABI compatibility by checking whether the -+ * spd_get_volume symbol exists, so we follow their lead. */ -+ if (dlsym(libspeechd, "spd_get_volume") == nullptr) -+ { -+ std::cerr << -+ "An unsupported version of libspeechd was found. " -+ "Text-to-speech will be disabled." << -+ std::endl; -+ return; -+ } -+ -+#define FUNC(name, type, params) \ -+ name = (name##_fn) dlsym(libspeechd, #name); \ -+ if (name == nullptr) \ -+ { \ -+ std::cerr << \ -+ "The symbol \"" << #name << "\" wasn't found in libspeechd. " \ -+ "Text-to-speech will be disabled." << \ -+ std::endl; \ -+ return; \ -+ } -+ -+ LIBSPEECHD_FUNCS -+ -+#undef FUNC -+#endif -+ - spd = spd_open("gargoyle", "main", nullptr, SPD_MODE_SINGLE); - - if (spd != nullptr && !gli_conf_speak_language.empty()) |