summaryrefslogtreecommitdiff
path: root/dev-cpp/antlr-cpp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-03 02:25:09 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-03 02:25:09 +0000
commit384d032fe7e048bb10cc9bc9881835c92d7e104c (patch)
tree59b969fdecd674b649820312bfa0b0f6043c25a0 /dev-cpp/antlr-cpp
parent7a13078cb414752df1133d1767cc29260dc60fda (diff)
gentoo auto-resync : 03:01:2023 - 02:25:09
Diffstat (limited to 'dev-cpp/antlr-cpp')
-rw-r--r--dev-cpp/antlr-cpp/Manifest3
-rw-r--r--dev-cpp/antlr-cpp/antlr-cpp-4.11.1.ebuild29
-rw-r--r--dev-cpp/antlr-cpp/files/4.11.1-GNUInstallDirs.patch139
3 files changed, 171 insertions, 0 deletions
diff --git a/dev-cpp/antlr-cpp/Manifest b/dev-cpp/antlr-cpp/Manifest
index 04ee10f6517a..3244f859acef 100644
--- a/dev-cpp/antlr-cpp/Manifest
+++ b/dev-cpp/antlr-cpp/Manifest
@@ -1,7 +1,10 @@
AUX 2.7.7-autotools.patch 6273 BLAKE2B cff9b2f6d071438e49eab2ee042d5ec5501d9fa926925b7d365b36e4b39e4cab88e2e140c1ca74a9ac92195c5c12f515d802dbe7ba51d2d13a0fda51dd9bc3cf SHA512 a80590e2751242b816c01d9bddd682642fa858f2824c11ca346c22e5f90950784143fefea936e603fc81fc6cc716f8be6882207510979213440ab11eef84f517
AUX 2.7.7-gcc.patch 402 BLAKE2B be143ebbf062aa2ed59630424e7741ac8105eb3575494639d05fe21471d2764c12fc5c5aa95f7297ed9ad67df7af8c107582f008c5372205fa4bfc991b87d14e SHA512 c94a8fcdce09f5a7cb32c2594728954775812a5eb2487aebe4f1e9203e5db75e391a2214fdb173f33f8616ac5b666e2d4653bc00a3a98b09005333ed2a3b27fd
+AUX 4.11.1-GNUInstallDirs.patch 5117 BLAKE2B 7095631d1efc3ac30eb5dce4107eb9cf6aea34890515685dffa8eb87de9e4645991908e23b555fd26833cc0ddeffffbccaf2b119569d1bf616ea6172d067e621 SHA512 75f06909f354dcaa844b511fe39146f0f2dcd384e5e2e53d75754a19012b73eff7ac0323b8623afaa546df82f0609b771c821e81ecaaa6d6da2b9effc9dddedd
DIST antlr-2.7.7.tar.gz 1816180 BLAKE2B 3a9a51070f8651befeb4d22be344b544e119db34a78522828c2ffc3c481c14b9c7784f0a9997a61f6faedde5b6d1fe12214cfd84fb274f7065f3ffe6a44abf1c SHA512 faa72d2ddcba434ef1233e70c1549e63eba67c00793966322e821cf7f015cccb804448cb92d8fbef0429f59928fad65ec954f8ffbda0acbb8e983de0806d349d
+DIST antlr-cpp-4.11.1.zip 534105 BLAKE2B acf854bb8f10f8afdb8df9aa1fa92176edc66bfe3e33ca4b57e138e29f7d8512dc0a31aee057e5997ca9e37ca7934c459ef725e831d34166c189a2ed7e6fbc51 SHA512 47a4f714cf195e454b4f66cace58f6dbaa144f44c25594735fc91b37289e9b3c8b5259c03925316754d3eb33af3e0b3d3fb0c5c9aef818b239799e4f1fb49ce6
DIST antlr-cpp-4.7.2.zip 1494927 BLAKE2B 007aac6655dc3c4e3a0c2073ca9c8c016b46bdf97dca4494d4ea2c44d27a458bfbb09811b3beb0aec1ce2873c3b62ad6789c6a9e3e7ddc62cde51c8357e9123b SHA512 3298b83a06ddd8d8852462401e46fe2eb83d20af4ba14c722cb31b33d929d1c5a4ffb694ee084495a4ae26ed3246b6781ca6045d11253c94efc09729fa001090
EBUILD antlr-cpp-2.7.7-r2.ebuild 1875 BLAKE2B 68b0add6d2f97edb9f678307e71227f5c6543e61d76f4a50e9bb424039c909a7654c6b25a8b81c1c89c061f5bedce76c19f0a84997127ac2486e612f85c76edf SHA512 16793b8dd3c3bfbdfb928bf286a6c665823cae7c47c6e32ea41a6646b8dbe779747caaaa2acd072e696790ff201a9e380e156d4d33768d895fac923ec36d399d
+EBUILD antlr-cpp-4.11.1.ebuild 618 BLAKE2B 536bb15edb26058806fde422c18b0092b957f22c376138c54c05edd9f3fafb675f1262e2e40351b4f33380e4494784115a7f6960eec42c78b8563d2924fbc84a SHA512 ebf8e551f3f685eaa62a279c4dfc88ef946591a12f74e4d34315e450a2299a45be15339e3baaafb220229a915b380346f84a287daac978dcf7e21d762f78bcd7
EBUILD antlr-cpp-4.7.2.ebuild 636 BLAKE2B 871b5616e3c8286e79e43448e99dc795e82e6e88717bc9f457b993093e930f173227485836132738d45963bc83fdb776375ce1221b82c4164cdd4bfa5714efb9 SHA512 73c8d0dbf898eb7086b290f86c82055b203cc6f5d3bbf389fb4c4921d3527ecb7acbe71908217405d75deeec65611e9b941b423349c0661734456342420ce826
MISC metadata.xml 314 BLAKE2B 44614e69318b15302910048bed9f1a4acd92a1eb737e1861563d855aeec4e6f8f1a201f0bcbc039420a820e17f15d7deef68fb54b104d0c621def437c0457da3 SHA512 d03626431b434fe0b4fbbaaf7c860fd55390a1511c1f93f95747cc6a058795f166b73846b038bba3e843b6afdde2655ac3b7776a33276230efbaaa6d7b469d84
diff --git a/dev-cpp/antlr-cpp/antlr-cpp-4.11.1.ebuild b/dev-cpp/antlr-cpp/antlr-cpp-4.11.1.ebuild
new file mode 100644
index 000000000000..f184f2fc1c2c
--- /dev/null
+++ b/dev-cpp/antlr-cpp/antlr-cpp-4.11.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="The ANTLR 4 C++ Runtime"
+HOMEPAGE="https://www.antlr.org/"
+SRC_URI="https://www.antlr.org/download/antlr4-cpp-runtime-${PV}-source.zip -> ${P}.zip"
+S="${WORKDIR}"
+
+LICENSE="BSD"
+SLOT="4"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="test? ( dev-cpp/gtest )"
+BDEPEND="app-arch/unzip"
+
+PATCHES=( "${FILESDIR}"/${PV}-GNUInstallDirs.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ -DANTLR_BUILD_CPP_TESTS=$(usex test)
+ )
+ cmake_src_configure
+}
diff --git a/dev-cpp/antlr-cpp/files/4.11.1-GNUInstallDirs.patch b/dev-cpp/antlr-cpp/files/4.11.1-GNUInstallDirs.patch
new file mode 100644
index 000000000000..c8795e0b033c
--- /dev/null
+++ b/dev-cpp/antlr-cpp/files/4.11.1-GNUInstallDirs.patch
@@ -0,0 +1,139 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -113,11 +113,6 @@
+ set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /O1 /Oi /Ob2 /Gy /MP /DNDEBUG ${MY_CXX_WARNING_FLAGS}")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Oi /Ob2 /Gy /MP /DNDEBUG ${MY_CXX_WARNING_FLGAS}")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /O2 /Oi /Ob2 /Gy /MP /Zi ${MY_CXX_WARNING_FLAGS}")
+-else()
+- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g ${MY_CXX_WARNING_FLAGS}")
+- set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG ${MY_CXX_WARNING_FLAGS}")
+- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG ${MY_CXX_WARNING_FLGAS}")
+- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g ${MY_CXX_WARNING_FLAGS}")
+ endif()
+
+ # Compiler-specific C++17 activation.
+@@ -220,16 +215,8 @@
+
+ endif(ANTLR4_INSTALL)
+
+-if(EXISTS LICENSE.txt)
+-install(FILES LICENSE.txt
+- DESTINATION "share/doc/libantlr4")
+-elseif(EXISTS ../../LICENSE.txt)
+-install(FILES ../../LICENSE.txt
+- DESTINATION "share/doc/libantlr4")
+-endif()
+-
+ install(FILES README.md VERSION
+- DESTINATION "share/doc/libantlr4")
++ DESTINATION ${CMAKE_INSTALL_DOCDIR})
+
+ set(CPACK_PACKAGE_CONTACT "antlr-discussion@googlegroups.com")
+ set(CPACK_PACKAGE_VERSION ${ANTLR_VERSION})
+--- a/runtime/CMakeLists.txt
++++ b/runtime/CMakeLists.txt
+@@ -26,29 +26,14 @@
+ )
+
+ add_library(antlr4_shared SHARED ${libantlrcpp_SRC})
+-add_library(antlr4_static STATIC ${libantlrcpp_SRC})
+
+ # Make sure to link against threads (pthreads) library in order to be able to
+ # make use of std::call_once in the code without producing runtime errors
+ # (see also https://github.com/antlr/antlr4/issues/3708 and/or https://stackoverflow.com/q/51584960).
+ find_package(Threads REQUIRED)
+ target_link_libraries(antlr4_shared Threads::Threads)
+-target_link_libraries(antlr4_static Threads::Threads)
+
+ if (ANTLR_BUILD_CPP_TESTS)
+- include(FetchContent)
+-
+- FetchContent_Declare(
+- googletest
+- URL https://github.com/google/googletest/archive/e2239ee6043f73722e7aa812a459f54a28552929.zip
+- )
+-
+- if(WITH_STATIC_CRT)
+- set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
+- endif()
+-
+- FetchContent_MakeAvailable(googletest)
+-
+ file(GLOB libantlrcpp_TESTS
+ "${PROJECT_SOURCE_DIR}/runtime/tests/*.cpp"
+ )
+@@ -60,8 +45,9 @@
+
+ target_link_libraries(
+ antlr4_tests
+- antlr4_static
++ antlr4_shared
+ gtest_main
++ gtest
+ )
+
+ include(GoogleTest)
+@@ -71,7 +57,6 @@
+
+ if(APPLE)
+ target_link_libraries(antlr4_shared ${COREFOUNDATION_LIBRARY})
+- target_link_libraries(antlr4_static ${COREFOUNDATION_LIBRARY})
+ endif()
+
+ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+@@ -88,16 +73,11 @@
+ endif()
+
+ set(extra_share_compile_flags "")
+-set(extra_static_compile_flags "")
+-set(static_lib_suffix "")
+
+ if (WIN32)
+- set(static_lib_suffix "-static")
+ target_compile_definitions(antlr4_shared PUBLIC ANTLR4CPP_EXPORTS)
+- target_compile_definitions(antlr4_static PUBLIC ANTLR4CPP_STATIC)
+ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ set(extra_share_compile_flags "-MP /wd4251")
+- set(extra_static_compile_flags "-MP")
+ endif()
+ endif()
+
+@@ -107,13 +87,6 @@
+ OUTPUT_NAME antlr4-runtime
+ COMPILE_FLAGS "${disabled_compile_warnings} ${extra_share_compile_flags}")
+
+-set_target_properties(antlr4_static
+- PROPERTIES VERSION ${ANTLR_VERSION}
+- SOVERSION ${ANTLR_VERSION}
+- OUTPUT_NAME "antlr4-runtime${static_lib_suffix}"
+- COMPILE_PDB_NAME "antlr4-runtime${static_lib_suffix}"
+- COMPILE_FLAGS "${disabled_compile_warnings} ${extra_static_compile_flags}")
+-
+ if (ANTLR_BUILD_CPP_TESTS)
+ # Copy the generated binaries to dist folder (required by test suite)
+ add_custom_command(
+@@ -122,24 +95,12 @@
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/dist
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:antlr4_shared> ${CMAKE_HOME_DIRECTORY}/dist
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_LINKER_FILE:antlr4_shared> ${CMAKE_HOME_DIRECTORY}/dist)
+-
+- add_custom_command(
+- TARGET antlr4_static
+- POST_BUILD
+- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/dist
+- COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:antlr4_static> ${CMAKE_HOME_DIRECTORY}/dist)
+ endif()
+
+ install(TARGETS antlr4_shared
+ EXPORT antlr4-targets
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+-
+-install(TARGETS antlr4_static
+- EXPORT antlr4-targets
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ install(DIRECTORY "${PROJECT_SOURCE_DIR}/runtime/src/"