about summary refs log tree commit diff
path: root/pkgs/development/libraries/libunicode
diff options
context:
space:
mode:
authorfortuneteller2k <lythe1107@gmail.com>2023-12-20 06:46:53 +0800
committerfortuneteller2k <lythe1107@gmail.com>2023-12-20 07:02:36 +0800
commitbf0cf6f215eb30d6f00c0c50c948e28234b80b6c (patch)
tree447a3e24acd9dfbb02acef6072d6b2023119a3d1 /pkgs/development/libraries/libunicode
parent368dd7d0b22cce316f7ee2d878faf6707d4eecff (diff)
libunicode: 0.3.0 -> 0.4.0
Diffstat (limited to 'pkgs/development/libraries/libunicode')
-rw-r--r--pkgs/development/libraries/libunicode/default.nix9
-rw-r--r--pkgs/development/libraries/libunicode/remove-target-properties.diff19
2 files changed, 25 insertions, 3 deletions
diff --git a/pkgs/development/libraries/libunicode/default.nix b/pkgs/development/libraries/libunicode/default.nix
index 4241f5bc7676b..725dacebcc25d 100644
--- a/pkgs/development/libraries/libunicode/default.nix
+++ b/pkgs/development/libraries/libunicode/default.nix
@@ -10,15 +10,18 @@ let
   };
 in stdenv.mkDerivation (final: {
   pname = "libunicode";
-  version = "0.3.0-unstable-2023-03-05";
+  version = "0.4.0";
 
   src = fetchFromGitHub {
     owner = "contour-terminal";
     repo = "libunicode";
-    rev = "65e0c6ddf9648b94aa9bc7dda0718401efa9ef8e";
-    hash = "sha256-F4CVU5MImkM571mD4iFxqTnNbk2GXKTGksqO4LH2uEk=";
+    rev = "v${final.version}";
+    hash = "sha256-Us3T4fnGsArdsVB7IUhwdex43C+H1+lfL8yK9enhf2c=";
   };
 
+  # Fix: set_target_properties Can not find target to add properties to: Catch2, et al.
+  patches = [ ./remove-target-properties.diff ];
+
   nativeBuildInputs = [ cmake python3 ];
   buildInputs = [ catch2 fmt ];
 
diff --git a/pkgs/development/libraries/libunicode/remove-target-properties.diff b/pkgs/development/libraries/libunicode/remove-target-properties.diff
new file mode 100644
index 0000000000000..4bf665cf3e7c8
--- /dev/null
+++ b/pkgs/development/libraries/libunicode/remove-target-properties.diff
@@ -0,0 +1,19 @@
+diff --git a/src/libunicode/CMakeLists.txt b/src/libunicode/CMakeLists.txt
+index 6c5ac20..9fa13a3 100644
+--- a/src/libunicode/CMakeLists.txt
++++ b/src/libunicode/CMakeLists.txt
+@@ -223,10 +223,10 @@ if(LIBUNICODE_TESTING)
+     # supress conversion warnings for Catch2
+     # https://github.com/catchorg/Catch2/issues/2583
+     # https://github.com/SFML/SFML/blob/e45628e2ebc5843baa3739781276fa85a54d4653/test/CMakeLists.txt#L18-L22
+-    set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
+-    set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
+-    get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
+-    target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
++    # set_target_properties(Catch2 PROPERTIES COMPILE_OPTIONS "" EXPORT_COMPILE_COMMANDS OFF)
++    # set_target_properties(Catch2WithMain PROPERTIES EXPORT_COMPILE_COMMANDS OFF)
++    # get_target_property(CATCH2_INCLUDE_DIRS Catch2 INTERFACE_INCLUDE_DIRECTORIES)
++    # target_include_directories(Catch2 SYSTEM INTERFACE ${CATCH2_INCLUDE_DIRS})
+ 
+     target_link_libraries(unicode_test unicode Catch2::Catch2WithMain fmt::fmt-header-only)
+     add_test(unicode_test unicode_test)