mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-04 03:09:07 +08:00
[tre] fix macos build (#25343)
This commit is contained in:
parent
f93b8354d1
commit
a80c81b405
@ -25,6 +25,9 @@ set (SRCS
|
||||
|
||||
include_directories(win32 include/tre)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -DHAVE_CONFIG_H)
|
||||
if (WIN32)
|
||||
add_definitions(-DHAVE_MALLOC_H)
|
||||
endif()
|
||||
add_library(tre ${SRCS})
|
||||
|
||||
install(
|
||||
|
17
ports/tre/fix-config.patch
Normal file
17
ports/tre/fix-config.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/win32/config.h b/win32/config.h
|
||||
index 93b8210..db7a9e1 100644
|
||||
--- a/win32/config.h
|
||||
+++ b/win32/config.h
|
||||
@@ -20,7 +20,6 @@
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define to 1 if you have <malloc.h> and it should be used. */
|
||||
-#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
@@ -180,4 +179,3 @@
|
||||
/* Avoid silly warnings about "insecure" functions. */
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
|
||||
-#define snprintf sprintf_s
|
@ -4,12 +4,10 @@ vcpkg_from_github(
|
||||
REF 6fb7206b935b35814c5078c20046dbe065435363
|
||||
SHA512 f1d664719eab23b665d71e34ca3d11f8ba49da23ff20dc28f46d4ce30fe155c12208ba7fd212dbeb20a7037e069909f0c2120ce1fc01074656399805e3289a90
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-config.patch
|
||||
)
|
||||
|
||||
file(READ ${SOURCE_PATH}/win32/config.h CONFIG_H)
|
||||
string(REPLACE "#define snprintf sprintf_s" "" CONFIG_H ${CONFIG_H})
|
||||
file(WRITE ${SOURCE_PATH}/win32/config.h "${CONFIG_H}")
|
||||
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
vcpkg_replace_string(${SOURCE_PATH}/win32/tre.def "tre.dll" "libtre.dll")
|
||||
endif()
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tre",
|
||||
"version-string": "0.8.0",
|
||||
"port-version": 3,
|
||||
"version": "0.8.0",
|
||||
"port-version": 4,
|
||||
"description": "TRE is a lightweight, robust, and efficient POSIX compliant regexp matching library with some exciting features such as approximate (fuzzy) matching.",
|
||||
"homepage": "https://github.com/laurikari/tre"
|
||||
}
|
||||
|
@ -1126,7 +1126,6 @@ torch-th:arm64-windows=fail
|
||||
torch-th:arm-uwp=fail
|
||||
torch-th:x64-uwp=fail
|
||||
torch-th:x64-windows-static=fail
|
||||
tre:x64-osx=fail
|
||||
treehopper:x64-windows-static=fail
|
||||
treehopper:x64-linux=fail
|
||||
unicorn-lib:arm-uwp=fail
|
||||
|
@ -7186,7 +7186,7 @@
|
||||
},
|
||||
"tre": {
|
||||
"baseline": "0.8.0",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"treehh": {
|
||||
"baseline": "3.16",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "576df391c1e53ba1d3e8895ce7965d71b78d8236",
|
||||
"version": "0.8.0",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "9a43049be2abc5f27fa5b1f77eaeda7a3a63d4a0",
|
||||
"version-string": "0.8.0",
|
||||
|
Loading…
Reference in New Issue
Block a user