commit:     acbf936b77c2c0a33875daa9b77f44fccbc765f2
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sat Apr 16 16:19:00 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 16 16:20:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=acbf936b

dev-util/afdko: use system antlr4

Closes: https://bugs.gentoo.org/838802
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 dev-util/afdko/afdko-3.8.1.ebuild            |  2 ++
 dev-util/afdko/files/afdko-3.8.1-antlr.patch | 41 ++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/dev-util/afdko/afdko-3.8.1.ebuild 
b/dev-util/afdko/afdko-3.8.1.ebuild
index 99fcfd6e8..d61cd48f3 100644
--- a/dev-util/afdko/afdko-3.8.1.ebuild
+++ b/dev-util/afdko/afdko-3.8.1.ebuild
@@ -21,6 +21,7 @@ SLOT="0"
 
 #lxml, unicodedata2, fs, brotli, brotlicffi, zopfli, fontpens are indirect 
dependencies
 RDEPEND="
+       dev-cpp/antlr-cpp:4
        >=dev-python/lxml-4.8.0[${PYTHON_USEDEP}]
        >=dev-python/fs-2.2.0[${PYTHON_USEDEP}]
        >=app-arch/brotli-1.0.1[python,${PYTHON_USEDEP}]
@@ -54,6 +55,7 @@ DOCS=( {README,NEWS}.md docs )
 PATCHES=(
        "${FILESDIR}/${PN}-3.6.2-_get_scripts-to-data_files.patch"
        "${FILESDIR}/${P}-no-cmake-ninja-deps.patch"
+       "${FILESDIR}/${P}-antlr.patch"
 )
 
 distutils_enable_tests pytest

diff --git a/dev-util/afdko/files/afdko-3.8.1-antlr.patch 
b/dev-util/afdko/files/afdko-3.8.1-antlr.patch
new file mode 100644
index 000000000..3db0bc93e
--- /dev/null
+++ b/dev-util/afdko/files/afdko-3.8.1-antlr.patch
@@ -0,0 +1,41 @@
+diff '--color=auto' -ru afdko-3.8.1-orig/c/makeotf/lib/hotconv/CMakeLists.txt 
afdko-3.8.1/c/makeotf/lib/hotconv/CMakeLists.txt
+--- a/c/makeotf/lib/hotconv/CMakeLists.txt     2022-04-16 18:04:34.060438876 
+0200
++++ b/c/makeotf/lib/hotconv/CMakeLists.txt     2022-04-16 18:11:51.280732567 
+0200
+@@ -68,8 +68,8 @@
+ )
+ 
+ set_property(TARGET hotconv PROPERTY C_STANDARD 99)
+-target_include_directories(hotconv PRIVATE AFTER 
$<$<COMPILE_LANGUAGE:CXX>:${ANTLR4_INCLUDE_DIRS}>)
+-target_link_libraries(hotconv PUBLIC antlr4_static)
++target_include_directories(hotconv PUBLIC /usr/include/antlr4-runtime)
++target_link_libraries(hotconv PUBLIC -lantlr4-runtime)
+ 
+ if ( CMAKE_COMPILER_IS_GNUCC )
+     target_compile_options(hotconv PRIVATE -Wall -Wno-attributes)
+diff '--color=auto' -ru afdko-3.8.1-orig/CMakeLists.txt 
afdko-3.8.1/CMakeLists.txt
+--- a/CMakeLists.txt   2022-04-16 18:04:34.055438815 +0200
++++ b/CMakeLists.txt   2022-04-16 18:05:14.656930402 +0200
+@@ -27,23 +27,6 @@
+ 
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+ 
+-# Antlr 4 configuration
+-
+-# This is an alternate way of supplying the Antlr 4 sources that will override
+-# the git clone of the tag listed below. This is especially useful if you
+-# encounter compiler problems and need to make small edits to compensate. 
Start
+-# with the Antlr project's sources, e.g.
+-# https://www.antlr.org/download/antlr4-cpp-runtime-4.9.2-source.zip
+-# set(ANTLR4_ZIP_REPOSITORY "/path_to_antlr4_archive/a4.zip")
+-
+-add_definitions(-DANTLR4CPP_STATIC)
+-set(ANTLR4_WITH_STATIC_CRT OFF)
+-# Use slightly more recent commit than 4.9.2 to deal with utfcpp test
+-# compilation problems
+-# set(ANTLR4_TAG tags/4.9.2)
+-set(ANTLR4_TAG 916f03366edf15bf8b50010b11d479c189bf9f96)
+-include(ExternalAntlr4Cpp)
+-
+ # sanitizer support
+ # work around https://github.com/pypa/setuptools/issues/1928 with environment
+ # variable

Reply via email to