[antlr4] update to 4.9.1 (#16383)

* [antlr4] update to 4.9.1

* update version

* [antlr4] fix utfcpp dependency issue

* fix version SHA to account for utfcpp patch

* [antlr4] Minimize patch

Co-authored-by: Jonliu1993 <13720414433@163.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
This commit is contained in:
Nick Strupat 2021-04-01 13:31:47 -04:00 committed by GitHub
parent 5d1b3e8081
commit c72572f731
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 60 additions and 9 deletions

View File

@ -1,6 +1,5 @@
Source: antlr4
Version: 4.8
Port-Version: 1
Version: 4.9.1
Homepage: https://www.antlr.org
Description: ANother Tool for Language Recognition
Build-Depends: libuuid (!uwp&!windows&!osx)

View File

@ -0,0 +1,45 @@
diff --git a/runtime/Cpp/runtime/CMakeLists.txt b/runtime/Cpp/runtime/CMakeLists.txt
index a8503bb61..e7b01b7cb 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -1,17 +1,3 @@
-
-include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
-
-set(THIRDPARTY_DIR ${CMAKE_BINARY_DIR}/runtime/thirdparty)
-set(UTFCPP_DIR ${THIRDPARTY_DIR}/utfcpp)
-ExternalProject_Add(
- utfcpp
- GIT_REPOSITORY "git://github.com/nemtrif/utfcpp"
- GIT_TAG "v3.1.1"
- SOURCE_DIR ${UTFCPP_DIR}
- UPDATE_DISCONNECTED 1
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${UTFCPP_DIR}/install -Dgtest_force_shared_crt=ON
- TEST_AFTER_INSTALL 1
- STEP_TARGETS build)
include_directories(
@@ -23,8 +13,6 @@ include_directories(
${PROJECT_SOURCE_DIR}/runtime/src/tree
${PROJECT_SOURCE_DIR}/runtime/src/tree/pattern
${PROJECT_SOURCE_DIR}/runtime/src/tree/xpath
- ${UTFCPP_DIR}/install/include/utf8cpp
- ${UTFCPP_DIR}/install/include/utf8cpp/utf8
)
@@ -131,13 +119,6 @@ install(DIRECTORY "${PROJECT_SOURCE_DIR}/runtime/src/"
FILES_MATCHING PATTERN "*.h"
)
-install(FILES "${UTFCPP_DIR}/source/utf8.h"
- DESTINATION "include/antlr4-runtime")
-install(DIRECTORY "${UTFCPP_DIR}/source/utf8"
- DESTINATION "include/antlr4-runtime"
- COMPONENT dev
- FILES_MATCHING PATTERN "*.h"
- )

View File

@ -1,11 +1,11 @@
vcpkg_fail_port_install(ON_TARGET "uwp")
set(VERSION 4.8)
set(VERSION 4.9.1)
vcpkg_download_distfile(ARCHIVE
URLS "http://www.antlr.org/download/antlr4-cpp-runtime-${VERSION}-source.zip"
FILENAME "antlr4-cpp-runtime-${VERSION}-source.zip"
SHA512 df76a724e8acf29018ad122d909e1d43e7c8842e1c0df8022a3e8c840cb2b99de49cc148f75fef519b65ece9bd27b92cf0067c9099b664c127e80559c6492322
SHA512 fe33005f73f8d408fcea8ebab62c0def119bbe0c075f04a66404d0df258126eb6caf0a8bbac34d5c4c9e79d4aa8896f32698a560d4be7d71a32dcc3457245cee
)
# license not exist in antlr folder.
@ -20,9 +20,11 @@ vcpkg_extract_source_archive_ex(
ARCHIVE ${ARCHIVE}
NO_REMOVE_ONE_LEVEL
REF ${VERSION}
PATCHES fixed_build.patch
PATCHES
fixed_build.patch
uuid_discovery_fix.patch
export_guid.patch
fix_utfcpp_dependency.patch
)
vcpkg_configure_cmake(

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "846cffb150c26539ce36129c5a45d7ce54e6a1c8",
"version-string": "4.9.1",
"port-version": 0
},
{
"git-tree": "ed270bdb7075f6ed46cbe345c367ecb00ef64eff",
"version-string": "4.8",

View File

@ -81,8 +81,8 @@
"port-version": 2
},
"antlr4": {
"baseline": "4.8",
"port-version": 1
"baseline": "4.9.1",
"port-version": 0
},
"any-lite": {
"baseline": "0.2.0",