diff options
| author | Long Nguyen <nguyen.long.908132@gmail.com> | 2021-05-29 00:09:56 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-28 10:09:56 -0700 |
| commit | a29126f785b1ace2b3ef9f600d4f3c8aed63cea2 (patch) | |
| tree | b2ff3afa84314817762a99650d6bcd90aca04077 /ports/libmagic/0001-Use-libtre.patch | |
| parent | 0de461216d66a4d5ca1870254e27258a66f6e361 (diff) | |
| download | vcpkg-a29126f785b1ace2b3ef9f600d4f3c8aed63cea2.tar.gz vcpkg-a29126f785b1ace2b3ef9f600d4f3c8aed63cea2.zip | |
[tre, libmagic] Windows + mingw support (#17769)
* [tre] mingw support
* [libmagic] Windows support
* [libmagic] Apply @Neumann-A suggestions
* [libmagic] Add host dependency
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
* [libmagic] Copy the magic file to the corresponding tools dir
* [ci baseline] libmagic now passes
* Update ports/libmagic/portfile.cmake
* [libmagic] Import patch from MSYS2
* [vcpkg baseline] Update libmagic, tre
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
Diffstat (limited to 'ports/libmagic/0001-Use-libtre.patch')
| -rw-r--r-- | ports/libmagic/0001-Use-libtre.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/ports/libmagic/0001-Use-libtre.patch b/ports/libmagic/0001-Use-libtre.patch new file mode 100644 index 000000000..a1080d5a0 --- /dev/null +++ b/ports/libmagic/0001-Use-libtre.patch @@ -0,0 +1,53 @@ +From e6e59f41c082be94c4fef007e276b1dffe7dc240 Mon Sep 17 00:00:00 2001 +From: Long Nguyen <nguyen.long.908132@gmail.com> +Date: Sat, 8 May 2021 19:28:01 +0700 +Subject: [PATCH 01/14] Use libtre + +--- + configure.ac | 2 +- + src/Makefile.am | 2 +- + src/file.h | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 02eac8f..b05c334 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -185,7 +185,7 @@ if test "$enable_libseccomp" != "no"; then + AC_CHECK_LIB(seccomp, seccomp_init) + fi + if test "$MINGW" = 1; then +- AC_CHECK_LIB(gnurx,regexec,,AC_MSG_ERROR([libgnurx is required to build file(1) with MinGW])) ++ AC_SEARCH_LIBS(tre_regexec,tre,,AC_MSG_ERROR([libtre is required to build file(1) with MinGW])) + fi + + dnl See if we are cross-compiling +diff --git a/src/Makefile.am b/src/Makefile.am +index 3f67f2c..34781b9 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -13,7 +13,7 @@ libmagic_la_SOURCES = buffer.c magic.c apprentice.c softmagic.c ascmagic.c \ + file_opts.h elfclass.h mygetopt.h cdf.c cdf_time.c readcdf.c cdf.h + libmagic_la_LDFLAGS = -no-undefined -version-info 1:0:0 + if MINGW +-MINGWLIBS = -lgnurx -lshlwapi ++MINGWLIBS = -lshlwapi + else + MINGWLIBS = + endif +diff --git a/src/file.h b/src/file.h +index c548e97..299ac0c 100644 +--- a/src/file.h ++++ b/src/file.h +@@ -79,7 +79,7 @@ + #include <stdio.h> /* Include that here, to make sure __P gets defined */ + #include <errno.h> + #include <fcntl.h> /* For open and flags */ +-#include <regex.h> ++#include <tre/regex.h> + #include <time.h> + #include <sys/types.h> + #ifndef WIN32 +-- +2.29.2.windows.2 + |
