diff --git a/pkgs/development/python-modules/afdko/default.nix b/pkgs/development/python-modules/afdko/default.nix index 3181ecda7639..6066eb50a118 100644 --- a/pkgs/development/python-modules/afdko/default.nix +++ b/pkgs/development/python-modules/afdko/default.nix @@ -3,7 +3,7 @@ stdenv, # Enables some expensive tests, useful for verifying an update afdko, - antlr4_9, + antlr4_13, booleanoperations, buildPythonPackage, cmake, @@ -27,7 +27,7 @@ buildPythonPackage rec { pname = "afdko"; - version = "4.0.1"; + version = "4.0.2"; pyproject = true; disabled = pythonOlder "3.8"; @@ -35,8 +35,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "adobe-type-tools"; repo = "afdko"; - rev = "refs/tags/${version}"; - hash = "sha256-I5GKPkbyQX8QNSZgNB3wPKdWwpx8Xkklesu1M7nhgp8="; + tag = version; + hash = "sha256:0955dvbydifhgx9gswbf5drsmmghry7iyf6jwz6qczhj86clswcm"; }; build-system = [ setuptools-scm ]; @@ -48,7 +48,7 @@ buildPythonPackage rec { ]; buildInputs = [ - antlr4_9.runtime.cpp + antlr4_13.runtime.cpp libxml2.dev ]; @@ -60,11 +60,6 @@ buildPythonPackage rec { ./use-dynamic-system-antlr4-runtime.patch ]; - # Happy new year - postPatch = '' - substituteInPlace tests/tx_data/expected_output/alt-missing-glif.pfb --replace 2023 2024 - ''; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (toString [ "-Wno-error=incompatible-function-pointer-types" "-Wno-error=int-conversion" diff --git a/pkgs/development/python-modules/afdko/no-pypi-build-tools.patch b/pkgs/development/python-modules/afdko/no-pypi-build-tools.patch index 4acc351e7bd7..a3ef7dd23b85 100644 --- a/pkgs/development/python-modules/afdko/no-pypi-build-tools.patch +++ b/pkgs/development/python-modules/afdko/no-pypi-build-tools.patch @@ -1,4 +1,4 @@ -commit 72b0ab672d1080049431eeee07ae6d2556ae9e4a +commit a5fde72bd15e0baba008ea54270a1ffe017544a0 Author: sternenseemann Date: Tue Oct 5 18:17:20 2021 +0200 @@ -8,10 +8,10 @@ Date: Tue Oct 5 18:17:20 2021 +0200 somehow wrap and vendor a version of the proper tool. diff --git a/setup.py b/setup.py -index 50deb781..81417971 100644 +index 973e2826..dba58766 100644 --- a/setup.py +++ b/setup.py -@@ -196,9 +196,7 @@ def main(): +@@ -198,9 +198,7 @@ def main(): setup_requires=[ 'wheel', 'setuptools_scm', 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 a8ecb02c3e78..d2184e8d2804 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,4 +1,4 @@ -commit 286b9c6e69691292dce4f2b4beaac8f886da184d +commit 3560653d5d52bf30a52ce971ecfe262b1a09d7a3 Author: sternenseemann Date: Tue Oct 5 18:16:10 2021 +0200 @@ -9,29 +9,29 @@ Date: Tue Oct 5 18:16:10 2021 +0200 called antlr4-runtime, not antlr4_static). diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9ce80598..a75b6fb1 100644 +index 88e9cfd0..3df902b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -36,11 +36,11 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +@@ -36,11 +36,10 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # https://www.antlr.org/download/antlr4-cpp-runtime-4.9.3-source.zip # set(ANTLR4_ZIP_REPOSITORY "/path_to_antlr4_archive/a4.zip") -add_definitions(-DANTLR4CPP_STATIC) set(ANTLR4_WITH_STATIC_CRT OFF) - # 4.9.3 is the latest ANTLR4 version - set(ANTLR4_TAG tags/4.9.3) +-# 4.9.3 is the latest ANTLR4 version + set(ANTLR4_TAG tags/4.13.2) -include(ExternalAntlr4Cpp) +find_path(ANTLR4_HEADER antlr4-runtime.h PATH_SUFFIXES antlr4-runtime) +set(ANTLR4_INCLUDE_DIRS ${ANTLR4_HEADER}) - FIND_PACKAGE(LibXml2) - IF (NOT ${LibXml2_FOUND}) + + if (DEFINED ENV{FORCE_BUILD_LIBXML2}) diff --git a/c/makeotf/lib/cffread/CMakeLists.txt b/c/makeotf/lib/cffread/CMakeLists.txt -index 9a400fde..5452d987 100644 +index 2990035f..fab25a77 100644 --- a/c/makeotf/lib/cffread/CMakeLists.txt +++ b/c/makeotf/lib/cffread/CMakeLists.txt -@@ -13,6 +13,6 @@ else () - endif() +@@ -8,6 +8,6 @@ if (${NEED_LIBXML2_DEPEND}) + add_dependencies(makeotf_cffread ${LIBXML2_TARGET}) endif() -target_link_libraries(makeotf_cffread PUBLIC antlr4_static) @@ -39,15 +39,15 @@ 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 60e49458..ada728c0 100644 --- a/c/makeotf/lib/hotconv/CMakeLists.txt +++ b/c/makeotf/lib/hotconv/CMakeLists.txt -@@ -69,7 +69,7 @@ add_library(hotconv STATIC - +@@ -70,7 +70,7 @@ add_library(hotconv STATIC set_property(TARGET hotconv PROPERTY C_STANDARD 99) + set_property(TARGET hotconv PROPERTY CXX_STANDARD 17) target_include_directories(hotconv PRIVATE AFTER $<$:${ANTLR4_INCLUDE_DIRS}>) -target_link_libraries(hotconv PUBLIC antlr4_static) +target_link_libraries(hotconv PUBLIC antlr4-runtime) - if (${LibXml2_FOUND}) - target_link_libraries(hotconv PUBLIC ${LIBXML2_LIBRARY}) + target_link_libraries(hotconv PUBLIC ${CHOSEN_LIBXML2_LIBRARY}) +