diff --git a/pkgs/by-name/li/librum/package.nix b/pkgs/by-name/li/librum/package.nix index 81cd81d68019..928bc7e0439c 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 0458279b7d68..6133623b9e38 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/$,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/$,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/$,shared-debug,shared-release> -b -j 0 m01) + set(MUPDF_BUILD_COMMAND ./scripts/mupdfwrap.py ${VENV_OPTION} -d build/$,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 - $<$,$>: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