Update ANTLR4 C++ runtime to release 4.6 (#2216)
* Update ANTLR4 C++ runtime to release 4.6 - use release version instead of git - rename package to antlr4-runtime-cpp - update patch * Add replaces entry in PKGBUILD * Add replaces entry in PKGBUILD
This commit is contained in:
parent
3b48ba94fb
commit
94f73b09f9
@ -1,138 +0,0 @@
|
||||
Only in antlr4/runtime/Cpp: dist
|
||||
diff -r -c antlr4.orig/runtime/Cpp/runtime/CMakeLists.txt antlr4/runtime/Cpp/runtime/CMakeLists.txt
|
||||
*** antlr4.orig/runtime/Cpp/runtime/CMakeLists.txt 2016-08-24 09:53:36.025703100 -0300
|
||||
--- antlr4/runtime/Cpp/runtime/CMakeLists.txt 2016-08-24 09:54:23.543028500 -0300
|
||||
***************
|
||||
*** 69,80 ****
|
||||
COMPILE_FLAGS "${disabled_compile_warnings}")
|
||||
|
||||
install(TARGETS antlr4_shared
|
||||
! DESTINATION lib)
|
||||
install(TARGETS antlr4_static
|
||||
ARCHIVE DESTINATION lib)
|
||||
|
||||
install(DIRECTORY "${PROJECT_SOURCE_DIR}/runtime/src/"
|
||||
! DESTINATION "include"
|
||||
COMPONENT dev
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
--- 69,81 ----
|
||||
COMPILE_FLAGS "${disabled_compile_warnings}")
|
||||
|
||||
install(TARGETS antlr4_shared
|
||||
! ARCHIVE DESTINATION lib
|
||||
! RUNTIME DESTINATION bin)
|
||||
install(TARGETS antlr4_static
|
||||
ARCHIVE DESTINATION lib)
|
||||
|
||||
install(DIRECTORY "${PROJECT_SOURCE_DIR}/runtime/src/"
|
||||
! DESTINATION "include/antlr4"
|
||||
COMPONENT dev
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
diff -r -c antlr4.orig/runtime/Cpp/runtime/src/antlr4-common.h antlr4/runtime/Cpp/runtime/src/antlr4-common.h
|
||||
*** antlr4.orig/runtime/Cpp/runtime/src/antlr4-common.h 2016-08-24 09:53:36.607924200 -0300
|
||||
--- antlr4/runtime/Cpp/runtime/src/antlr4-common.h 2016-08-24 09:52:39.104898900 -0300
|
||||
***************
|
||||
*** 59,70 ****
|
||||
|
||||
// Defines for the Guid class and other platform dependent stuff.
|
||||
#ifdef _WIN32
|
||||
! #pragma warning (disable: 4250) // Class inherits by dominance.
|
||||
! #pragma warning (disable: 4512) // assignment operator could not be generated
|
||||
!
|
||||
! #if _MSC_VER < 1900
|
||||
! // Before VS 2015 code like "while (true)" will create a (useless) warning in level 4.
|
||||
! #pragma warning (disable: 4127) // conditional expression is constant
|
||||
#endif
|
||||
|
||||
#define GUID_WINDOWS
|
||||
--- 59,72 ----
|
||||
|
||||
// Defines for the Guid class and other platform dependent stuff.
|
||||
#ifdef _WIN32
|
||||
! #ifdef _MSC_VER
|
||||
! #pragma warning (disable: 4250) // Class inherits by dominance.
|
||||
! #pragma warning (disable: 4512) // assignment operator could not be generated
|
||||
!
|
||||
! #if _MSC_VER < 1900
|
||||
! // Before VS 2015 code like "while (true)" will create a (useless) warning in level 4.
|
||||
! #pragma warning (disable: 4127) // conditional expression is constant
|
||||
! #endif
|
||||
#endif
|
||||
|
||||
#define GUID_WINDOWS
|
||||
***************
|
||||
*** 94,100 ****
|
||||
#define EXPIMP_TEMPLATE
|
||||
#endif
|
||||
|
||||
! EXPIMP_TEMPLATE class ANTLR4CPP_PUBLIC std::exception; // Needed for VS 2015.
|
||||
|
||||
#elif __APPLE__
|
||||
#define GUID_CFUUID
|
||||
--- 96,104 ----
|
||||
#define EXPIMP_TEMPLATE
|
||||
#endif
|
||||
|
||||
! #ifdef _MSC_VER
|
||||
! EXPIMP_TEMPLATE class ANTLR4CPP_PUBLIC std::exception; // Needed for VS 2015.
|
||||
! #endif
|
||||
|
||||
#elif __APPLE__
|
||||
#define GUID_CFUUID
|
||||
diff -r -c antlr4.orig/runtime/Cpp/runtime/src/ANTLRFileStream.cpp antlr4/runtime/Cpp/runtime/src/ANTLRFileStream.cpp
|
||||
*** antlr4.orig/runtime/Cpp/runtime/src/ANTLRFileStream.cpp 2016-08-24 09:53:36.090542900 -0300
|
||||
--- antlr4/runtime/Cpp/runtime/src/ANTLRFileStream.cpp 2016-08-24 09:52:39.107919600 -0300
|
||||
***************
|
||||
*** 46,52 ****
|
||||
return;
|
||||
}
|
||||
|
||||
! #ifdef _WIN32
|
||||
std::ifstream stream(antlrcpp::s2ws(fileName), std::ios::binary);
|
||||
#else
|
||||
std::ifstream stream(fileName, std::ios::binary);
|
||||
--- 46,52 ----
|
||||
return;
|
||||
}
|
||||
|
||||
! #ifdef _MSC_VER
|
||||
std::ifstream stream(antlrcpp::s2ws(fileName), std::ios::binary);
|
||||
#else
|
||||
std::ifstream stream(fileName, std::ios::binary);
|
||||
diff -r -c antlr4.orig/runtime/Cpp/runtime/src/support/Any.h antlr4/runtime/Cpp/runtime/src/support/Any.h
|
||||
*** antlr4.orig/runtime/Cpp/runtime/src/support/Any.h 2016-08-24 09:53:37.252828700 -0300
|
||||
--- antlr4/runtime/Cpp/runtime/src/support/Any.h 2016-08-24 09:52:39.109903300 -0300
|
||||
***************
|
||||
*** 33,39 ****
|
||||
|
||||
#include "antlr4-common.h"
|
||||
|
||||
! #ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4521) // 'antlrcpp::Any': multiple copy constructors specified
|
||||
#endif
|
||||
--- 33,39 ----
|
||||
|
||||
#include "antlr4-common.h"
|
||||
|
||||
! #ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4521) // 'antlrcpp::Any': multiple copy constructors specified
|
||||
#endif
|
||||
***************
|
||||
*** 158,163 ****
|
||||
|
||||
} // namespace antlrcpp
|
||||
|
||||
! #ifdef _WIN32
|
||||
! #pragma warning(pop)
|
||||
#endif
|
||||
--- 158,163 ----
|
||||
|
||||
} // namespace antlrcpp
|
||||
|
||||
! #ifdef _MSC_VER
|
||||
! #pragma warning(pop)
|
||||
#endif
|
||||
@ -1,27 +1,24 @@
|
||||
# Maintainer: Diego Sogari <diego.sogari@gmail.com>
|
||||
|
||||
_realname=antlr4
|
||||
pkgbase=mingw-w64-${_realname}-git
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
|
||||
pkgver=4.5.3.r4904.6f62821
|
||||
pkgbase=mingw-w64-${_realname}-runtime-cpp
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-runtime-cpp"
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-git"
|
||||
"${MINGW_PACKAGE_PREFIX}-${_realname}-runtime-cpp-git")
|
||||
pkgver=4.6
|
||||
pkgrel=1
|
||||
pkgdesc="ANother Tool for Language Recognition v4 (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://www.antlr.org/"
|
||||
license=('BSD')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
source=("${_realname}::git+https://github.com/DanMcLaughlin/antlr4.git"
|
||||
source=("${_realname}-${pkgver}.tar.gz::https://codeload.github.com/antlr/antlr4/tar.gz/${pkgver}"
|
||||
"${_realname}-${pkgver}.patch")
|
||||
sha256sums=('SKIP'
|
||||
'db0222a66aff7920504ca23ee0f0acf69c06497f513277a5c0987bde65c78e0f')
|
||||
|
||||
pkgver() {
|
||||
cd "${srcdir}/${_realname}"
|
||||
printf "4.5.3.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
sha256sums=('eba012cc10fd0908c30476ea4f519490f539270ab68945109d150c5b091d6c86'
|
||||
'176763afab8f10d2483420b94deb37d05dc3e68a5774edf13009579c7164c824')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}"
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -Np1 -i "../${_realname}-${pkgver}.patch"
|
||||
}
|
||||
|
||||
@ -35,7 +32,7 @@ build() {
|
||||
-G"MSYS Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
"../${_realname}/runtime/Cpp"
|
||||
"../${_realname}-${pkgver}/runtime/Cpp"
|
||||
|
||||
make
|
||||
}
|
||||
177
mingw-w64-antlr4-runtime-cpp/antlr4-4.6.patch
Normal file
177
mingw-w64-antlr4-runtime-cpp/antlr4-4.6.patch
Normal file
@ -0,0 +1,177 @@
|
||||
diff -r -c antlr4-4.6.orig/runtime/Cpp/CMakeLists.txt antlr4-4.6/runtime/Cpp/CMakeLists.txt
|
||||
*** antlr4-4.6.orig/runtime/Cpp/CMakeLists.txt 2016-12-15 20:25:36.000000000 -0200
|
||||
--- antlr4-4.6/runtime/Cpp/CMakeLists.txt 2017-02-03 04:14:13.447920200 -0200
|
||||
***************
|
||||
*** 107,111 ****
|
||||
add_subdirectory(demo)
|
||||
endif(WITH_DEMO)
|
||||
|
||||
! install(FILES License.txt README.md VERSION
|
||||
DESTINATION "share/doc/libantlr4")
|
||||
--- 107,119 ----
|
||||
add_subdirectory(demo)
|
||||
endif(WITH_DEMO)
|
||||
|
||||
! 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")
|
||||
diff -r -c antlr4-4.6.orig/runtime/Cpp/runtime/CMakeLists.txt antlr4-4.6/runtime/Cpp/runtime/CMakeLists.txt
|
||||
*** antlr4-4.6.orig/runtime/Cpp/runtime/CMakeLists.txt 2016-12-15 20:25:36.000000000 -0200
|
||||
--- antlr4-4.6/runtime/Cpp/runtime/CMakeLists.txt 2017-02-03 04:14:13.447920200 -0200
|
||||
***************
|
||||
*** 59,75 ****
|
||||
# TODO: test in windows. DLL is treated as runtime.
|
||||
# see https://cmake.org/cmake/help/v3.0/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html
|
||||
RUNTIME_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
|
||||
! COMPILE_FLAGS "${disabled_compile_warnings}")
|
||||
|
||||
set_target_properties(antlr4_static
|
||||
PROPERTIES VERSION ${ANTLR_VERSION}
|
||||
SOVERSION ${ANTLR_VERSION}
|
||||
OUTPUT_NAME antlr4-runtime
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
|
||||
! COMPILE_FLAGS "${disabled_compile_warnings}")
|
||||
|
||||
install(TARGETS antlr4_shared
|
||||
! DESTINATION lib)
|
||||
install(TARGETS antlr4_static
|
||||
ARCHIVE DESTINATION lib)
|
||||
|
||||
--- 59,78 ----
|
||||
# TODO: test in windows. DLL is treated as runtime.
|
||||
# see https://cmake.org/cmake/help/v3.0/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html
|
||||
RUNTIME_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
|
||||
! COMPILE_FLAGS "${disabled_compile_warnings}"
|
||||
! COMPILE_DEFINITIONS "ANTLR4CPP_EXPORTS")
|
||||
|
||||
set_target_properties(antlr4_static
|
||||
PROPERTIES VERSION ${ANTLR_VERSION}
|
||||
SOVERSION ${ANTLR_VERSION}
|
||||
OUTPUT_NAME antlr4-runtime
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR}
|
||||
! COMPILE_FLAGS "${disabled_compile_warnings}"
|
||||
! COMPILE_DEFINITIONS "ANTLR4CPP_EXPORTS;ANTLR4CPP_STATIC")
|
||||
|
||||
install(TARGETS antlr4_shared
|
||||
! DESTINATION lib
|
||||
! RUNTIME DESTINATION bin)
|
||||
install(TARGETS antlr4_static
|
||||
ARCHIVE DESTINATION lib)
|
||||
|
||||
diff -r -c antlr4-4.6.orig/runtime/Cpp/runtime/src/antlr4-common.h antlr4-4.6/runtime/Cpp/runtime/src/antlr4-common.h
|
||||
*** antlr4-4.6.orig/runtime/Cpp/runtime/src/antlr4-common.h 2016-12-15 20:25:36.000000000 -0200
|
||||
--- antlr4-4.6/runtime/Cpp/runtime/src/antlr4-common.h 2017-02-03 04:14:13.447920200 -0200
|
||||
***************
|
||||
*** 36,41 ****
|
||||
--- 36,42 ----
|
||||
|
||||
// Defines for the Guid class and other platform dependent stuff.
|
||||
#ifdef _WIN32
|
||||
+ #ifdef _MSC_VER
|
||||
#pragma warning (disable: 4250) // Class inherits by dominance.
|
||||
#pragma warning (disable: 4512) // assignment operator could not be generated
|
||||
|
||||
***************
|
||||
*** 43,48 ****
|
||||
--- 44,50 ----
|
||||
// Before VS 2015 code like "while (true)" will create a (useless) warning in level 4.
|
||||
#pragma warning (disable: 4127) // conditional expression is constant
|
||||
#endif
|
||||
+ #endif
|
||||
|
||||
#define GUID_WINDOWS
|
||||
|
||||
***************
|
||||
*** 69,75 ****
|
||||
--- 71,79 ----
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+ #ifdef _MSC_VER
|
||||
class ANTLR4CPP_PUBLIC std::exception; // Needed for VS 2015.
|
||||
+ #endif
|
||||
|
||||
#elif __APPLE__
|
||||
#define GUID_CFUUID
|
||||
diff -r -c antlr4-4.6.orig/runtime/Cpp/runtime/src/ANTLRFileStream.cpp antlr4-4.6/runtime/Cpp/runtime/src/ANTLRFileStream.cpp
|
||||
*** antlr4-4.6.orig/runtime/Cpp/runtime/src/ANTLRFileStream.cpp 2016-12-15 20:25:36.000000000 -0200
|
||||
--- antlr4-4.6/runtime/Cpp/runtime/src/ANTLRFileStream.cpp 2017-02-03 04:14:13.463544300 -0200
|
||||
***************
|
||||
*** 20,26 ****
|
||||
return;
|
||||
}
|
||||
|
||||
! #ifdef _WIN32
|
||||
std::ifstream stream(antlrcpp::s2ws(fileName), std::ios::binary);
|
||||
#else
|
||||
std::ifstream stream(fileName, std::ios::binary);
|
||||
--- 20,26 ----
|
||||
return;
|
||||
}
|
||||
|
||||
! #ifdef _MSC_VER
|
||||
std::ifstream stream(antlrcpp::s2ws(fileName), std::ios::binary);
|
||||
#else
|
||||
std::ifstream stream(fileName, std::ios::binary);
|
||||
diff -r -c antlr4-4.6.orig/runtime/Cpp/runtime/src/support/Any.h antlr4-4.6/runtime/Cpp/runtime/src/support/Any.h
|
||||
*** antlr4-4.6.orig/runtime/Cpp/runtime/src/support/Any.h 2016-12-15 20:25:36.000000000 -0200
|
||||
--- antlr4-4.6/runtime/Cpp/runtime/src/support/Any.h 2017-02-03 04:14:13.463544300 -0200
|
||||
***************
|
||||
*** 9,15 ****
|
||||
|
||||
#include "antlr4-common.h"
|
||||
|
||||
! #ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4521) // 'antlrcpp::Any': multiple copy constructors specified
|
||||
#endif
|
||||
--- 9,15 ----
|
||||
|
||||
#include "antlr4-common.h"
|
||||
|
||||
! #ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4521) // 'antlrcpp::Any': multiple copy constructors specified
|
||||
#endif
|
||||
***************
|
||||
*** 139,144 ****
|
||||
|
||||
} // namespace antlrcpp
|
||||
|
||||
! #ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
--- 139,144 ----
|
||||
|
||||
} // namespace antlrcpp
|
||||
|
||||
! #ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
diff -r -c antlr4-4.6.orig/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp antlr4-4.6/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp
|
||||
*** antlr4-4.6.orig/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp 2016-12-15 20:25:36.000000000 -0200
|
||||
--- antlr4-4.6/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp 2017-02-03 04:18:45.432636000 -0200
|
||||
***************
|
||||
*** 100,106 ****
|
||||
throw e;
|
||||
#else
|
||||
} catch (std::exception & /*e*/) {
|
||||
! std::throw_with_nested("Cannot invoke start rule"); // Wrap any other exception. We should however probably use one of the ANTLR exceptions here.
|
||||
#endif
|
||||
}
|
||||
|
||||
--- 100,106 ----
|
||||
throw e;
|
||||
#else
|
||||
} catch (std::exception & /*e*/) {
|
||||
! std::throw_with_nested((const char*)"Cannot invoke start rule"); // Wrap any other exception. We should however probably use one of the ANTLR exceptions here.
|
||||
#endif
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user