yacreader: 9.16.3 -> 10.0.0

This commit is contained in:
Ross Smyth
2026-06-08 10:59:37 -04:00
parent 9fce930eb9
commit 5b52806222
3 changed files with 124 additions and 32 deletions
@@ -1,13 +0,0 @@
diff --git a/compressed_archive/unarr/unarr-wrapper.pri b/compressed_archive/unarr/unarr-wrapper.pri
index 0115267..5d3d6f5 100644
--- a/compressed_archive/unarr/unarr-wrapper.pri
+++ b/compressed_archive/unarr/unarr-wrapper.pri
@@ -6,7 +6,7 @@ HEADERS += $$PWD/extract_delegate.h \
SOURCES += $$PWD/compressed_archive.cpp
-if(mingw|unix):!macx:!contains(QT_CONFIG, no-pkg-config):packagesExist(libunarr) {
+if(mingw|unix):!contains(QT_CONFIG, no-pkg-config):packagesExist(libunarr) {
message(Using system provided unarr installation found by pkg-config.)
CONFIG += link_pkgconfig
PKGCONFIG += libunarr
+55 -19
View File
@@ -2,50 +2,86 @@
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
ctestCheckHook,
libGLU,
libunarr,
libsForQt5,
pkg-config,
expat,
libdeflate,
lerc,
xz,
libwebp,
qtwebapp,
pipewire,
qt6Packages,
onlyServer ? false,
}:
let
qtPackages = qt6Packages;
in
stdenv.mkDerivation (finalAttrs: {
pname = "yacreader";
version = "9.16.3";
version = "10.0.0";
src = fetchFromGitHub {
owner = "YACReader";
repo = "yacreader";
tag = finalAttrs.version;
hash = "sha256-3mLmH6HJnH+LH/NkqI4G8Si5od3YiWnQ/kv5rmPFhlE=";
hash = "sha256-nJ4S4ej/I+ifDNa3CPpusFpDsEwZwYDt0JLaebptjuU=";
};
patches = [
# make the unarr backend logic use pkg-config even on Darwin
./darwin-unarr-use-pkg-config.patch
# Devendor qtwebapp, use pkg-config instead
./qtwebapp-devendor.patch
];
qmakeFlags = [
# Ensure devendor works
postPatch = ''
rm -rf third_party/QtWebApp
'';
# Pipewire is dlopen'd, so we must tell it where to look
preConfigure = ''
qtWrapperArgs+=("--prefix" "LD_LIBRARY_PATH" ":" "${lib.makeLibraryPath [ pipewire ]}")
'';
strictDeps = true;
__structuredAttrs = true;
cmakeFlags = [
# force unarr backend on all platforms
"CONFIG+=unarr"
(lib.cmakeBool "BUILD_SERVER_STANDALONE" onlyServer)
(lib.cmakeFeature "PDF_BACKEND" "poppler")
(lib.cmakeFeature "DECOMPRESSION_BACKEND" "unarr")
];
nativeBuildInputs = [
libsForQt5.qmake
libsForQt5.qttools # for translations
libsForQt5.wrapQtAppsHook
cmake
pkg-config
qtPackages.wrapQtAppsHook
];
buildInputs = [
libGLU
libsForQt5.poppler
libsForQt5.qtgraphicaleffects # imported, but not declared as a dependency
libsForQt5.qtmultimedia
libsForQt5.qtquickcontrols2
libunarr
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libsForQt5.qtmacextras # can be removed when using qt6
expat
libdeflate
lerc
xz
libwebp
qtwebapp
qtPackages.qtbase
qtPackages.qttools
qtPackages.qtmultimedia
qtPackages.qtspeech
qtPackages.poppler
qtPackages.qt5compat
];
doCheck = true;
nativeCheckInputs = [
ctestCheckHook
];
# custom Darwin install instructions taken from the upstream compileOSX.sh script
@@ -0,0 +1,69 @@
diff --git a/YACReaderLibrary/server/CMakeLists.txt b/YACReaderLibrary/server/CMakeLists.txt
index 839072efe4..8b8a2a5dd4 100644
--- a/YACReaderLibrary/server/CMakeLists.txt
+++ b/YACReaderLibrary/server/CMakeLists.txt
@@ -77,10 +77,10 @@
Qt6::Core
Qt6::Network
Qt6::Sql
- QtWebApp_httpserver
- QtWebApp_templateengine
QsLog
common_all
comic_backend
db_helper
+ PRIVATE
+ PkgConfig::QtWebApp
)
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index 512e57457f..787f334698 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -31,45 +31,8 @@
target_include_directories(QrCode PUBLIC QrCode)
# --- QtWebApp HTTP server ---
-add_library(QtWebApp_httpserver STATIC
- QtWebApp/httpserver/httpglobal.cpp
- QtWebApp/httpserver/httplistener.cpp
- QtWebApp/httpserver/httpconnectionhandler.cpp
- QtWebApp/httpserver/httpconnectionhandlerpool.cpp
- QtWebApp/httpserver/httprequest.cpp
- QtWebApp/httpserver/httpresponse.cpp
- QtWebApp/httpserver/httpcookie.cpp
- QtWebApp/httpserver/httprequesthandler.cpp
- QtWebApp/httpserver/httpsession.cpp
- QtWebApp/httpserver/httpsessionstore.cpp
- QtWebApp/httpserver/staticfilecontroller.cpp
- QtWebApp/httpserver/httpglobal.h
- QtWebApp/httpserver/httplistener.h
- QtWebApp/httpserver/httpconnectionhandler.h
- QtWebApp/httpserver/httpconnectionhandlerpool.h
- QtWebApp/httpserver/httprequest.h
- QtWebApp/httpserver/httpresponse.h
- QtWebApp/httpserver/httpcookie.h
- QtWebApp/httpserver/httprequesthandler.h
- QtWebApp/httpserver/httpsession.h
- QtWebApp/httpserver/httpsessionstore.h
- QtWebApp/httpserver/staticfilecontroller.h
-)
-target_include_directories(QtWebApp_httpserver PUBLIC QtWebApp/httpserver)
-target_link_libraries(QtWebApp_httpserver PUBLIC Qt6::Network)
-
-# --- QtWebApp template engine ---
-add_library(QtWebApp_templateengine STATIC
- QtWebApp/templateengine/template.cpp
- QtWebApp/templateengine/templateloader.cpp
- QtWebApp/templateengine/templatecache.cpp
- QtWebApp/templateengine/templateglobal.h
- QtWebApp/templateengine/template.h
- QtWebApp/templateengine/templateloader.h
- QtWebApp/templateengine/templatecache.h
-)
-target_include_directories(QtWebApp_templateengine PUBLIC QtWebApp/templateengine)
-target_link_libraries(QtWebApp_templateengine PUBLIC Qt6::Core5Compat)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(QtWebApp REQUIRED IMPORTED_TARGET GLOBAL QtWebApp)
# --- KDSignalThrottler (from KDToolBox) ---
add_library(KDSignalThrottler STATIC