Merge pull request #179890 from sternenseemann/afdko-3.9.0

python3Packages.afdko: 3.8.3 -> 3.9.0
This commit is contained in:
Robert Scott 2022-07-10 20:57:44 +01:00 committed by GitHub
commit 12b9f6a664
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 9 deletions

View file

@ -5,6 +5,7 @@
, setuptools-scm, scikit-build
, cmake
, antlr4_9
, libxml2
, pytestCheckHook
# Enables some expensive tests, useful for verifying an update
, runAllTests ? false
@ -13,13 +14,13 @@
buildPythonPackage rec {
pname = "afdko";
version = "3.8.3";
version = "3.9.0";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "0mplyla4zcai3qld7is7bl5wn2kzhp87w87yi13wpqnw06i6ij4b";
sha256 = "1fjsaz6bp028fbmry6fzfcih78mdzycqmky1wsz5y0bg4kfk4shh";
};
format = "pyproject";
@ -32,6 +33,7 @@ buildPythonPackage rec {
buildInputs = [
antlr4_9.runtime.cpp
libxml2.dev
];
patches = [
@ -40,6 +42,8 @@ buildPythonPackage rec {
# Use antlr4 runtime from nixpkgs and link it dynamically
./use-dynamic-system-antlr4-runtime.patch
./libxml2-cmake-find-package.patch
];
# setup.py will always (re-)execute cmake in buildPhase

View file

@ -0,0 +1,22 @@
commit c423d1ddf0345aed7ecaf4c8b9e1fa5108aafc6f
Author: sternenseemann <sternenseemann@systemli.org>
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
--- 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})
-FIND_PACKAGE(LibXml2)
+FIND_PACKAGE(LibXml2 REQUIRED MODULE)
IF (NOT ${LibXml2_FOUND})
MESSAGE(STATUS "Could not locate LibXml2, will install externally.")
set(LIBXML2_TAG tags/v2.9.13)

View file

@ -1,4 +1,4 @@
commit 1ccbf21a67da0fdbaad881a1f5c2a4df915e8c57
commit 286b9c6e69691292dce4f2b4beaac8f886da184d
Author: sternenseemann <sternenseemann@systemli.org>
Date: Tue Oct 5 18:16:10 2021 +0200
@ -9,7 +9,7 @@ Date: Tue Oct 5 18:16:10 2021 +0200
called antlr4-runtime, not antlr4_static).
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e9c8c08e..dc3a46da 100644
index 9ce80598..a75b6fb1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,11 +36,11 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
@ -24,10 +24,22 @@ index e9c8c08e..dc3a46da 100644
+find_path(ANTLR4_HEADER antlr4-runtime.h PATH_SUFFIXES antlr4-runtime)
+set(ANTLR4_INCLUDE_DIRS ${ANTLR4_HEADER})
# sanitizer support
# work around https://github.com/pypa/setuptools/issues/1928 with environment
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
--- a/c/makeotf/lib/cffread/CMakeLists.txt
+++ b/c/makeotf/lib/cffread/CMakeLists.txt
@@ -13,6 +13,6 @@ else ()
endif()
endif()
-target_link_libraries(makeotf_cffread PUBLIC antlr4_static)
+target_link_libraries(makeotf_cffread PUBLIC antlr4-runtime)
target_compile_definitions(makeotf_cffread PRIVATE $<$<CONFIG:Debug>:CFF_DEBUG=1> CFF_T13_SUPPORT=0)
diff --git a/c/makeotf/lib/hotconv/CMakeLists.txt b/c/makeotf/lib/hotconv/CMakeLists.txt
index 82257bf2..02eb2e30 100644
index 3cceceea..9695ea21 100644
--- a/c/makeotf/lib/hotconv/CMakeLists.txt
+++ b/c/makeotf/lib/hotconv/CMakeLists.txt
@@ -69,7 +69,7 @@ add_library(hotconv STATIC
@ -37,5 +49,5 @@ index 82257bf2..02eb2e30 100644
-target_link_libraries(hotconv PUBLIC antlr4_static)
+target_link_libraries(hotconv PUBLIC antlr4-runtime)
if ( CMAKE_COMPILER_IS_GNUCC )
target_compile_options(hotconv PRIVATE -Wall -Wno-attributes)
if (${LibXml2_FOUND})
target_link_libraries(hotconv PUBLIC ${LIBXML2_LIBRARY})