lunasvg: 3.2.1 -> 3.3.0 (#408020)
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lunasvg";
|
||||
version = "3.2.1";
|
||||
version = "3.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sammycage";
|
||||
repo = "lunasvg";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-CBhz117Y8e7AdD1JJtNkR/EthsfyiQ05HW41beaY95I=";
|
||||
hash = "sha256-1Cj6En0XedAeNPsLWCedxiiq8xPdJ4VpKmF4vYu4SC8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -24,14 +24,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
plutovg
|
||||
];
|
||||
|
||||
patches = [
|
||||
# https://github.com/sammycage/lunasvg/pull/219
|
||||
# can be removed when the PR 219 and a new release is created
|
||||
./use_system_plutovg.patch
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "USE_SYSTEM_PLUTOVG" true)
|
||||
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
|
||||
# (setting it to an absolute path causes include files to go to $out/$out/include,
|
||||
# because the absolute path is interpreted with root at $out).
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From 18d25de94046ed8223fe8987ca55b44f8b5f902c Mon Sep 17 00:00:00 2001
|
||||
From: eymeric <eymericdechelette@gmail.com>
|
||||
Date: Tue, 15 Apr 2025 22:16:50 +0200
|
||||
Subject: [PATCH] Refactor CMakeLists.txt to conditionally use system plutovg
|
||||
library
|
||||
|
||||
---
|
||||
CMakeLists.txt | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 08cee28..9724827 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -6,8 +6,17 @@ set(LUNASVG_VERSION_MICRO 1)
|
||||
|
||||
project(lunasvg LANGUAGES CXX VERSION ${LUNASVG_VERSION_MAJOR}.${LUNASVG_VERSION_MINOR}.${LUNASVG_VERSION_MICRO})
|
||||
|
||||
-find_package(plutovg 0.0.4 QUIET)
|
||||
+option(USE_SYSTEM_PLUTOVG "Use system plutovg library" OFF)
|
||||
+
|
||||
+if(USE_SYSTEM_PLUTOVG)
|
||||
+ find_package(plutovg 1.0.0 QUIET)
|
||||
+ if(NOT plutovg_FOUND)
|
||||
+ message(WARNING "Could not find: plutovg>=1.0.0. Falling back to plutovg submodule.")
|
||||
+ endif()
|
||||
+endif()
|
||||
+
|
||||
if(NOT plutovg_FOUND)
|
||||
+ message(STATUS "Using plutovg submodule.")
|
||||
add_subdirectory(plutovg)
|
||||
endif()
|
||||
|
||||
@@ -57,7 +66,12 @@ target_include_directories(lunasvg PUBLIC
|
||||
$<INSTALL_INTERFACE:include/lunasvg>
|
||||
)
|
||||
|
||||
-target_link_libraries(lunasvg PRIVATE plutovg::plutovg)
|
||||
+if(USE_SYSTEM_PLUTOVG AND plutovg_FOUND)
|
||||
+ target_link_libraries(lunasvg PRIVATE plutovg::plutovg)
|
||||
+else()
|
||||
+ target_link_libraries(lunasvg PRIVATE plutovg)
|
||||
+endif()
|
||||
+
|
||||
target_compile_definitions(lunasvg PRIVATE LUNASVG_BUILD)
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(lunasvg PUBLIC LUNASVG_BUILD_STATIC)
|
||||
Reference in New Issue
Block a user