Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libarchive] fix build with VS2017 #586

Merged
merged 3 commits into from
Jan 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/libarchive/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: libarchive
Version: 3.2.2
Version: 3.2.2-1
Description: Library for reading and writing streaming archives
Build-Depends: zlib, bzip2, libxml2, libiconv, lz4, liblzma, openssl
55 changes: 55 additions & 0 deletions ports/libarchive/override-broken-feature-checks.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d035a1..1e32afd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1226,7 +1226,8 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R)
CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT)
CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES)
CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC)
-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE)
+#CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE)
+set(HAVE_MEMMOVE 1)
CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR)
CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO)
CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD)
@@ -1257,11 +1258,16 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME)
CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES)
CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT)
CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK)
-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB)
-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP)
-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY)
-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN)
-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB)
+#CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB)
+set(HAVE_WCRTOMB 1)
+#CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP)
+set(HAVE_WCSCMP 1)
+#CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY)
+set(HAVE_WCSCPY 1)
+#CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN)
+set(HAVE_WCSLEN 1)
+#CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB)
+set(HAVE_WCTOMB 1)
CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S)
CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64)
CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE)
@@ -1273,10 +1279,14 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH)
CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO)
CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R)
CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME)
-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF)
-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP)
-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY)
-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE)
+#CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF)
+set(HAVE_VPRINTF 1)
+#CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP)
+set(HAVE_WMEMCMP 1)
+#CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY)
+set(HAVE_WMEMCPY 1)
+#CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE)
+set(HAVE_WMEMMOVE 1)

CMAKE_POP_CHECK_STATE() # Restore the state of the variables

3 changes: 2 additions & 1 deletion ports/libarchive/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch
${CMAKE_CURRENT_LIST_DIR}/use-memset-not-bzero.patch)
${CMAKE_CURRENT_LIST_DIR}/use-memset-not-bzero.patch
${CMAKE_CURRENT_LIST_DIR}/override-broken-feature-checks.patch)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
Expand Down