From 877ea10da7376ab43f4ebe8c8eea4b347b232133 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Tue, 26 Jul 2022 10:59:53 +0200 Subject: [PATCH] python310Packages.afdko: 3.9.0 -> 3.9.1 --- .../python-modules/afdko/default.nix | 13 ++++++------ .../afdko/libxml2-cmake-find-package.patch | 21 ++++++------------- .../use-dynamic-system-antlr4-runtime.patch | 20 +++++------------- 3 files changed, 18 insertions(+), 36 deletions(-) diff --git a/pkgs/development/python-modules/afdko/default.nix b/pkgs/development/python-modules/afdko/default.nix index 2ca94a2085a48..8e04bbe48e280 100644 --- a/pkgs/development/python-modules/afdko/default.nix +++ b/pkgs/development/python-modules/afdko/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "afdko"; - version = "3.9.0"; + version = "3.9.1"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "1fjsaz6bp028fbmry6fzfcih78mdzycqmky1wsz5y0bg4kfk4shh"; + sha256 = "sha256-AtRNaZzn9BoNIjvKhS7rsYVfHw26JKKUFqO/6TcBIkw="; }; format = "pyproject"; @@ -43,6 +43,9 @@ buildPythonPackage rec { # Use antlr4 runtime from nixpkgs and link it dynamically ./use-dynamic-system-antlr4-runtime.patch + # Force use of CMake-shipped FindLibXml2 module + # This is needed to work around a nixpkgs bug + # https://github.com/NixOS/nixpkgs/issues/125008 ./libxml2-cmake-find-package.patch ]; @@ -69,13 +72,11 @@ buildPythonPackage rec { ]; checkInputs = [ pytestCheckHook ]; + preCheck = '' export PATH=$PATH:$out/bin - - # Update tests to match ufinormalizer-0.6.1 expectations: - # https://github.com/adobe-type-tools/afdko/issues/1418 - find tests -name layerinfo.plist -delete ''; + disabledTests = lib.optionals (!runAllTests) [ # Disable slow tests, reduces test time ~25 % "test_report" diff --git a/pkgs/development/python-modules/afdko/libxml2-cmake-find-package.patch b/pkgs/development/python-modules/afdko/libxml2-cmake-find-package.patch index 87604199d3e98..3b201a36b21ac 100644 --- a/pkgs/development/python-modules/afdko/libxml2-cmake-find-package.patch +++ b/pkgs/development/python-modules/afdko/libxml2-cmake-find-package.patch @@ -1,22 +1,13 @@ -commit c423d1ddf0345aed7ecaf4c8b9e1fa5108aafc6f -Author: sternenseemann -Date: Sat Jul 2 12:35:56 2022 +0200 - - Force use of CMake-shipped FindLibXml2 module - - This is needed to work around a nixpkgs bug: - https://github.com/NixOS/nixpkgs/issues/125008 - diff --git a/CMakeLists.txt b/CMakeLists.txt -index a75b6fb1..c1408283 100644 +index a2423022..9a4f97a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -42,7 +42,7 @@ set(ANTLR4_TAG tags/4.9.3) - find_path(ANTLR4_HEADER antlr4-runtime.h PATH_SUFFIXES antlr4-runtime) - set(ANTLR4_INCLUDE_DIRS ${ANTLR4_HEADER}) +@@ -43,7 +43,7 @@ set(ANTLR4_TAG tags/4.9.3) + include(ExternalAntlr4Cpp) + -FIND_PACKAGE(LibXml2) +FIND_PACKAGE(LibXml2 REQUIRED MODULE) - IF (NOT ${LibXml2_FOUND}) - MESSAGE(STATUS "Could not locate LibXml2, will install externally.") + IF ((NOT ${LibXml2_FOUND}) OR "${CMAKE_SYSTEM}" MATCHES "Linux") + MESSAGE(STATUS "Could not locate LibXml2 or system is Linux, will install externally & statically link") set(LIBXML2_TAG tags/v2.9.13) diff --git a/pkgs/development/python-modules/afdko/use-dynamic-system-antlr4-runtime.patch b/pkgs/development/python-modules/afdko/use-dynamic-system-antlr4-runtime.patch index a8ecb02c3e786..6fec2f48e8a5c 100644 --- a/pkgs/development/python-modules/afdko/use-dynamic-system-antlr4-runtime.patch +++ b/pkgs/development/python-modules/afdko/use-dynamic-system-antlr4-runtime.patch @@ -1,15 +1,5 @@ -commit 286b9c6e69691292dce4f2b4beaac8f886da184d -Author: sternenseemann -Date: Tue Oct 5 18:16:10 2021 +0200 - - Link against system antlr4 runtime, dynamically - - Instead of cloning a antlr4 version from git, use the system one. Also - don't link it statically, but dynamically by default (the library is - called antlr4-runtime, not antlr4_static). - diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9ce80598..a75b6fb1 100644 +index a2423022..2a9f7afa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,11 +36,11 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) @@ -24,10 +14,10 @@ index 9ce80598..a75b6fb1 100644 +find_path(ANTLR4_HEADER antlr4-runtime.h PATH_SUFFIXES antlr4-runtime) +set(ANTLR4_INCLUDE_DIRS ${ANTLR4_HEADER}) + FIND_PACKAGE(LibXml2) - IF (NOT ${LibXml2_FOUND}) diff --git a/c/makeotf/lib/cffread/CMakeLists.txt b/c/makeotf/lib/cffread/CMakeLists.txt -index 9a400fde..5452d987 100644 +index 7d74e512..f340792f 100644 --- a/c/makeotf/lib/cffread/CMakeLists.txt +++ b/c/makeotf/lib/cffread/CMakeLists.txt @@ -13,6 +13,6 @@ else () @@ -39,7 +29,7 @@ index 9a400fde..5452d987 100644 target_compile_definitions(makeotf_cffread PRIVATE $<$:CFF_DEBUG=1> CFF_T13_SUPPORT=0) diff --git a/c/makeotf/lib/hotconv/CMakeLists.txt b/c/makeotf/lib/hotconv/CMakeLists.txt -index 3cceceea..9695ea21 100644 +index 14e5c3cd..9b39f8b8 100644 --- a/c/makeotf/lib/hotconv/CMakeLists.txt +++ b/c/makeotf/lib/hotconv/CMakeLists.txt @@ -69,7 +69,7 @@ add_library(hotconv STATIC @@ -49,5 +39,5 @@ index 3cceceea..9695ea21 100644 -target_link_libraries(hotconv PUBLIC antlr4_static) +target_link_libraries(hotconv PUBLIC antlr4-runtime) - if (${LibXml2_FOUND}) + if ((${LibXml2_FOUND}) AND (NOT "${CMAKE_SYSTEM}" MATCHES "Linux")) target_link_libraries(hotconv PUBLIC ${LIBXML2_LIBRARY})