diff options
author | Aleksana <me@aleksana.moe> | 2024-04-14 02:22:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-14 02:22:59 +0800 |
commit | 055788637ecef5b6b153287c325d6cb9e42e481a (patch) | |
tree | 5b6722ca74203dd8be092586119d225d9bacbc06 /pkgs/by-name/li | |
parent | 304c66ce0504c1fd94b7cb31c450b32ae4974b2a (diff) | |
parent | b4d4dc825e9ac360e137c6cf03eef6c6fb3dfb9e (diff) |
Merge pull request #303564 from Aleksanaa/librum-update
librum: 0.12.1 -> 0.12.2
Diffstat (limited to 'pkgs/by-name/li')
-rw-r--r-- | pkgs/by-name/li/librum/package.nix | 4 | ||||
-rw-r--r-- | pkgs/by-name/li/librum/use_mupdf_in_nixpkgs.patch | 58 |
2 files changed, 25 insertions, 37 deletions
diff --git a/pkgs/by-name/li/librum/package.nix b/pkgs/by-name/li/librum/package.nix index 81cd81d68019d..928bc7e0439c0 100644 --- a/pkgs/by-name/li/librum/package.nix +++ b/pkgs/by-name/li/librum/package.nix @@ -13,14 +13,14 @@ let in stdenv.mkDerivation rec { pname = "librum"; - version = "0.12.1"; + version = "0.12.2"; src = fetchFromGitHub { owner = "Librum-Reader"; repo = "Librum"; rev = "v.${version}"; fetchSubmodules = true; - hash = "sha256-/QxTWlTMoXykPe3z+mmn6eaGRJDu2IX8BJPcXi1gUqQ="; + hash = "sha256-Iwcbcz8LrznFP8rfW6mg9p7klAtTx4daFxylTeFKrH0="; }; patches = [ diff --git a/pkgs/by-name/li/librum/use_mupdf_in_nixpkgs.patch b/pkgs/by-name/li/librum/use_mupdf_in_nixpkgs.patch index 0458279b7d681..6133623b9e382 100644 --- a/pkgs/by-name/li/librum/use_mupdf_in_nixpkgs.patch +++ b/pkgs/by-name/li/librum/use_mupdf_in_nixpkgs.patch @@ -1,21 +1,20 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 191ff732..de46f35b 100644 +index 191ff732..4a50f7de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -71,7 +71,7 @@ endif() +@@ -71,6 +71,7 @@ endif() # Dependencies add_subdirectory(libs/rapidfuzz-cpp) -- +include_directories(@nixMupdfIncludePath@) + # Build - add_subdirectory(src/) diff --git a/src/application/CMakeLists.txt b/src/application/CMakeLists.txt -index bf122a66..64415be3 100644 +index 0a41c5fd..f8714715 100644 --- a/src/application/CMakeLists.txt +++ b/src/application/CMakeLists.txt -@@ -102,10 +102,9 @@ if(ANDROID) +@@ -107,7 +107,7 @@ if(ANDROID) endif() if(UNIX) @@ -23,48 +22,38 @@ index bf122a66..64415be3 100644 + set(MUPDF_OUTPUT_DIR "@nixMupdfLibPath@") set(MUPDF_OUTPUT "${MUPDF_OUTPUT_DIR}/libmupdfcpp.so") set(MUPDF_OUTPUT "${MUPDF_OUTPUT_DIR}/libmupdfcpp.so" PARENT_SCOPE) -- set(MUPDF_BUILD_COMMAND ./scripts/mupdfwrap.py ${VENV_OPTION} -d build/$<IF:$<CONFIG:Debug>,shared-debug,shared-release> -b --m-target libs ${EXTRA_MAKE_AGRS} -j 0 m01) - elseif(WIN32) - set(MUPDF_OUTPUT_DIR "${PROJECT_SOURCE_DIR}/libs/mupdf/platform/win32/x64/$<IF:$<CONFIG:Debug>,Debug,Release>") - set(MUPDF_OUTPUT "${MUPDF_OUTPUT_DIR}/mupdfcpp64.lib" PARENT_SCOPE) -@@ -113,8 +112,6 @@ elseif(WIN32) - set(MUPDF_BUILD_COMMAND python scripts/mupdfwrap.py ${VENV_OPTION} -d build/$<IF:$<CONFIG:Debug>,shared-debug,shared-release> -b -j 0 m01) + set(MUPDF_BUILD_COMMAND ./scripts/mupdfwrap.py ${VENV_OPTION} -d build/$<IF:$<CONFIG:Debug>,shared-debug,shared-release> -b --m-target 'libs tools' ${EXTRA_MAKE_AGRS} -j 0 m01) +@@ -145,21 +145,6 @@ else() + set(EXECUTABLE_EXTENSION ".exe") endif() --message("MuPdf build command: " ${MUPDF_BUILD_COMMAND}) -- - - set(CC_COMMAND "${CMAKE_C_COMPILER}") - set(CXX_COMMAND "${CMAKE_CXX_COMPILER}") -@@ -135,18 +132,6 @@ else() - endif() - - -add_custom_target(mupdf +- # Build mupdf - COMMAND ${CMAKE_COMMAND} -E env - ${ANDROID_COMPILERS} - "USE_SYSTEM_LIBJPEG=${USE_SYSTEM_LIBJPEG_VALUE}" - "USE_SONAME=no" - ${MUPDF_BUILD_COMMAND} +- # Copy mutool to the build directory +- COMMAND ${CMAKE_COMMAND} -E copy +- "${MUPDF_OUTPUT_DIR}/mutool${EXECUTABLE_EXTENSION}" +- "${PROJECT_BINARY_DIR}/mutool${EXECUTABLE_EXTENSION}" - BYPRODUCTS ${MUPDF_OUTPUT} - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/libs/mupdf - COMMENT "Building mupdf (This takes a while) ..." -) -- -- + + #Copy the mupdf dlls to the build directory for windows - if(WIN32) - add_custom_command( -@@ -168,8 +153,6 @@ add_library(application - interfaces/utility/i_book_getter.hpp +@@ -182,7 +167,6 @@ add_library(application + ${application_SRC} ) -add_dependencies(application mupdf) # Ensure the mupdf target is built before the application target -- + target_compile_definitions(application PRIVATE APPLICATION_LIBRARY) - target_include_directories(application -@@ -188,12 +171,6 @@ target_include_directories(application +@@ -202,11 +186,6 @@ target_include_directories(application ${CMAKE_CURRENT_SOURCE_DIR}/core/utils ) @@ -73,18 +62,17 @@ index bf122a66..64415be3 100644 - ${PROJECT_SOURCE_DIR}/libs/mupdf/platform/c++/include - ${PROJECT_SOURCE_DIR}/libs/mupdf/include -) -- + target_compile_definitions(application PRIVATE - $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG> -@@ -236,29 +213,10 @@ if(LINUX) - install(TARGETS application +@@ -251,29 +230,10 @@ if(LINUX) DESTINATION lib ) -- + - # Install mupdf's shared libraries - install(FILES ${MUPDF_OUTPUT_DIR}/libmupdfcpp.so - ${MUPDF_OUTPUT_DIR}/libmupdf.so +- ${MUPDF_OUTPUT_DIR}/mutool${EXECUTABLE_EXTENSION} - DESTINATION lib) - - # Install links with correct permissions |