diff options
| author | Akihisa Yagi <capra314cabra@gmail.com> | 2020-10-17 18:01:36 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-17 02:01:36 -0700 |
| commit | 9f2bb7091458d393a424c0ab14cd39c49332446c (patch) | |
| tree | b472fc747142f2c6ce267c16bbc998e2907a6957 | |
| parent | c2e6708f5272380cdeaa400e54423ef3168794fa (diff) | |
| download | vcpkg-9f2bb7091458d393a424c0ab14cd39c49332446c.tar.gz vcpkg-9f2bb7091458d393a424c0ab14cd39c49332446c.zip | |
[antlr4] update to 4.8 (#14036)
* [antlr4] update to 4.8
* [antlr4] Add supports
* [antlr4] Regenerate patch files
* [antlr4] Remove spaces from patch files
Co-authored-by: wangli28 <wangli28@beyondsoft.com>
| -rw-r--r-- | ports/antlr4/CONTROL | 5 | ||||
| -rw-r--r-- | ports/antlr4/export_guid.patch | 8 | ||||
| -rw-r--r-- | ports/antlr4/fixed_build.patch | 36 | ||||
| -rw-r--r-- | ports/antlr4/portfile.cmake | 12 | ||||
| -rw-r--r-- | ports/antlr4/uuid_discovery_fix.patch | 39 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 2 |
6 files changed, 41 insertions, 61 deletions
diff --git a/ports/antlr4/CONTROL b/ports/antlr4/CONTROL index 46852dbf5..31614905a 100644 --- a/ports/antlr4/CONTROL +++ b/ports/antlr4/CONTROL @@ -1,5 +1,6 @@ Source: antlr4 -Version: 4.7.1-3 +Version: 4.8 Homepage: https://www.antlr.org Description: ANother Tool for Language Recognition -Build-Depends: libuuid (!uwp&!windows&!osx)
\ No newline at end of file +Build-Depends: libuuid (!uwp&!windows&!osx) +Supports: !uwp
\ No newline at end of file diff --git a/ports/antlr4/export_guid.patch b/ports/antlr4/export_guid.patch index a92c034db..4974718a7 100644 --- a/ports/antlr4/export_guid.patch +++ b/ports/antlr4/export_guid.patch @@ -1,6 +1,6 @@ -diff -urN c/runtime/src/support/guid.h d/runtime/src/support/guid.h ---- c/runtime/src/support/guid.h 2017-07-01 09:51:22.000000000 +0800 -+++ d/runtime/src/support/guid.h 2018-09-05 10:16:23.847717700 +0800 +diff -urN a/runtime/src/support/guid.h b/runtime/src/support/guid.h +--- a/runtime/src/support/guid.h ++++ b/runtime/src/support/guid.h @@ -38,7 +38,7 @@ // 16 byte value that can be passed around by value. It also supports // conversion to string (via the stream operator <<) and conversion from a @@ -9,7 +9,7 @@ diff -urN c/runtime/src/support/guid.h d/runtime/src/support/guid.h +class ANTLR4CPP_PUBLIC Guid { public: - + @@ -90,7 +90,7 @@ // function would no longer be cross-platform if we parameterized the android // version. Instead, construction of the GuidGenerator may be different on diff --git a/ports/antlr4/fixed_build.patch b/ports/antlr4/fixed_build.patch index 72697a388..e0f8ff91f 100644 --- a/ports/antlr4/fixed_build.patch +++ b/ports/antlr4/fixed_build.patch @@ -1,28 +1,38 @@ diff -urN a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt ---- a/runtime/CMakeLists.txt 2017-11-29 09:51:54.000000000 +0800 -+++ b/runtime/CMakeLists.txt 2018-08-30 19:06:03.718401800 +0800 +--- a/runtime/CMakeLists.txt ++++ b/runtime/CMakeLists.txt @@ -25,7 +25,7 @@ add_library(antlr4_shared SHARED ${libantlrcpp_SRC}) add_library(antlr4_static STATIC ${libantlrcpp_SRC}) - + -set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here. +# set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here. message(STATUS "Output libraries to ${LIB_OUTPUT_DIR}") - + # make sure 'make' works fine even if ${LIB_OUTPUT_DIR} is deleted. -@@ -63,10 +63,10 @@ +@@ -63,15 +63,15 @@ set(extra_share_compile_flags "-DANTLR4CPP_EXPORTS") set(extra_static_compile_flags "-DANTLR4CPP_STATIC") endif(WIN32) --if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") -- target_compile_options(antlr4_shared PRIVATE "/MD$<$<CONFIG:Debug>:d>") -- target_compile_options(antlr4_static PRIVATE "/MT$<$<CONFIG:Debug>:d>") +-if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") +- if(WITH_STATIC_CRT) +- target_compile_options(antlr4_shared PRIVATE "/MT$<$<CONFIG:Debug>:d>") +- target_compile_options(antlr4_static PRIVATE "/MT$<$<CONFIG:Debug>:d>") +- else() +- target_compile_options(antlr4_shared PRIVATE "/MD$<$<CONFIG:Debug>:d>") +- target_compile_options(antlr4_static PRIVATE "/MD$<$<CONFIG:Debug>:d>") +- endif() -endif() -+# if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") -+# target_compile_options(antlr4_shared PRIVATE "/MD$<$<CONFIG:Debug>:d>") -+# target_compile_options(antlr4_static PRIVATE "/MT$<$<CONFIG:Debug>:d>") ++# if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") ++# if(WITH_STATIC_CRT) ++# target_compile_options(antlr4_shared PRIVATE "/MT$<$<CONFIG:Debug>:d>") ++# target_compile_options(antlr4_static PRIVATE "/MT$<$<CONFIG:Debug>:d>") ++# else() ++# target_compile_options(antlr4_shared PRIVATE "/MD$<$<CONFIG:Debug>:d>") ++# target_compile_options(antlr4_static PRIVATE "/MD$<$<CONFIG:Debug>:d>") ++# endif() +# endif() - + set(static_lib_suffix "") - if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
\ No newline at end of file diff --git a/ports/antlr4/portfile.cmake b/ports/antlr4/portfile.cmake index b0749e123..5160648f3 100644 --- a/ports/antlr4/portfile.cmake +++ b/ports/antlr4/portfile.cmake @@ -1,15 +1,11 @@ -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
- message(FATAL_ERROR "${PORT} does not currently support UWP")
-endif()
-
-include(vcpkg_common_functions)
+vcpkg_fail_port_install(ON_TARGET "uwp")
-set(VERSION 4.7.1)
+set(VERSION 4.8)
vcpkg_download_distfile(ARCHIVE
URLS "http://www.antlr.org/download/antlr4-cpp-runtime-${VERSION}-source.zip"
FILENAME "antlr4-cpp-runtime-${VERSION}-source.zip"
- SHA512 24d53278db56b199e6787242f22339f74e07d2cd3ed56f851ad905b110c2ba3cb001e1e2fcbc8624f0e93e00ba1fe1b23630dd1a736558c694655aeb1c3129da
+ SHA512 df76a724e8acf29018ad122d909e1d43e7c8842e1c0df8022a3e8c840cb2b99de49cc148f75fef519b65ece9bd27b92cf0067c9099b664c127e80559c6492322
)
# license not exist in antlr folder.
@@ -88,6 +84,6 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/antlr4-runtime) vcpkg_copy_pdbs()
-file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/antlr4 RENAME copyright)
+file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
message(STATUS "Installing done")
\ No newline at end of file diff --git a/ports/antlr4/uuid_discovery_fix.patch b/ports/antlr4/uuid_discovery_fix.patch index 6d6e6fab7..818a9307b 100644 --- a/ports/antlr4/uuid_discovery_fix.patch +++ b/ports/antlr4/uuid_discovery_fix.patch @@ -1,10 +1,9 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f4940c0..978b6ea 100644 +diff -urN a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -38,8 +38,10 @@ if(CMAKE_VERSION VERSION_EQUAL "3.3.0" OR +@@ -40,8 +40,10 @@ endif() - + if(CMAKE_SYSTEM_NAME MATCHES "Linux") - find_package(PkgConfig REQUIRED) - pkg_check_modules(UUID REQUIRED uuid) @@ -15,39 +14,15 @@ index f4940c0..978b6ea 100644 endif() if(APPLE) find_library(COREFOUNDATION_LIBRARY CoreFoundation) -@@ -115,7 +117,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_SYSTEM_NAME MATCHES - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") - endif() - elseif ( MSVC_VERSION GREATER 1800 OR MSVC_VERSION EQUAL 1800 ) -- # Visual Studio 2012+ supports c++11 features -+ # Visual Studio 2012+ supports c++11 features - else () - message(FATAL_ERROR "Your C++ compiler does not support C++11.") - endif () -@@ -129,10 +131,10 @@ endif(WITH_DEMO) - if( EXISTS LICENSE.txt) - install(FILES LICENSE.txt - DESTINATION "share/doc/libantlr4") --elseif(EXISTS ../../LICENSE.txt) -+elseif(EXISTS ../../LICENSE.txt) - install(FILES ../../LICENSE.txt - DESTINATION "share/doc/libantlr4") - endif() - --install(FILES README.md VERSION -+install(FILES README.md VERSION - DESTINATION "share/doc/libantlr4") -diff --git a/runtime/src/support/guid.cpp b/runtime/src/support/guid.cpp -index b6105d7..5baadb0 100644 +diff -urN a/runtime/src/support/guid.cpp b/runtime/src/support/guid.cpp --- a/runtime/src/support/guid.cpp +++ b/runtime/src/support/guid.cpp -@@ -21,7 +21,7 @@ - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +@@ -22,6 +22,7 @@ THE SOFTWARE. */ -- + +#include "antlr4-common.h" #include "guid.h" - + #ifdef GUID_LIBUUID
\ No newline at end of file diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 190ed852c..da069b8d6 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -49,8 +49,6 @@ amqpcpp:arm-uwp=fail amqpcpp:x64-uwp=fail angelscript:arm64-windows=fail angelscript:arm-uwp=fail -antlr4:arm-uwp=fail -antlr4:x64-uwp=fail apr:arm-uwp=fail apr:x64-uwp=fail # Cross compiling CI machine cannot run gen_test_char to generate apr_escape_test_char.h |
