diff options
| author | Stefano Sinigardi <stesinigardi@hotmail.com> | 2021-01-17 04:26:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-16 19:26:38 -0800 |
| commit | f89336d703bf3ffd2aa4f832f214b42a11c7d044 (patch) | |
| tree | 891f90e6a3e714c4af552984425a2987cfe0d352 /ports/libarchive | |
| parent | 31eda3e931f30a480d90eac5f5ffa9fa9944121d (diff) | |
| download | vcpkg-f89336d703bf3ffd2aa4f832f214b42a11c7d044.tar.gz vcpkg-f89336d703bf3ffd2aa4f832f214b42a11c7d044.zip | |
[libarchive+tesseract+opencv] add missing libarchiveConfig.cmake, fix tesseract downstream and unblock opencv CI (#15089)
* [tesseract] add missing reference for downstream projects
* [tesseract] restore ci, fix many regressions that are uncovered by that
* Update ports/opencv2/CONTROL
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
* [opencv] fix regressions on uwp, accept failure on arm64 for now
* Apply suggestions from code review
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
* [opencv4] allow failures on all arm windows targets, both win32 and uwp
* adopts hints from #15180
* [libarchive] bump control version
* [libarchive] use vcpkg-cmake-wrapper instead of a custom libarchiveConfig, since it is vcpkg-provided and not port-provided
* enable features to be visible in parent scope
* apply documentation fix from CI
* [libarchive] remove unnecessary lines in portfile
* fix regressions
* Update ports/gdcm/CONTROL
* use more compact logic syntax
* add new versions to baseline
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Diffstat (limited to 'ports/libarchive')
| -rw-r--r-- | ports/libarchive/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libarchive/portfile.cmake | 14 | ||||
| -rw-r--r-- | ports/libarchive/vcpkg-cmake-wrapper.cmake.in (renamed from ports/libarchive/vcpkg-cmake-wrapper.cmake) | 37 |
3 files changed, 33 insertions, 20 deletions
diff --git a/ports/libarchive/CONTROL b/ports/libarchive/CONTROL index e15f1da44..a16b6179e 100644 --- a/ports/libarchive/CONTROL +++ b/ports/libarchive/CONTROL @@ -1,6 +1,6 @@ Source: libarchive
Version: 3.4.3
-Port-Version: 2
+Port-Version: 3
Homepage: https://github.com/libarchive/libarchive
Description: Library for reading and writing streaming archives
Build-Depends: zlib
diff --git a/ports/libarchive/portfile.cmake b/ports/libarchive/portfile.cmake index df7b6ce77..4e6a5fd85 100644 --- a/ports/libarchive/portfile.cmake +++ b/ports/libarchive/portfile.cmake @@ -64,19 +64,13 @@ vcpkg_configure_cmake( )
vcpkg_install_cmake()
+
vcpkg_copy_pdbs()
-foreach(_feature IN LISTS FEATURE_OPTIONS)
- string(REPLACE "-D" "" _feature "${_feature}")
- string(REPLACE "=" ";" _feature "${_feature}")
- string(REPLACE "ON" "1" _feature "${_feature}")
- string(REPLACE "OFF" "0" _feature "${_feature}")
- list(GET _feature 0 _feature_name)
- list(GET _feature 1 _feature_status)
- set(${_feature_name} ${_feature_status})
-endforeach()
-configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
+configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
foreach(HEADER ${CURRENT_PACKAGES_DIR}/include/archive.h ${CURRENT_PACKAGES_DIR}/include/archive_entry.h)
file(READ ${HEADER} CONTENTS)
string(REPLACE "(!defined LIBARCHIVE_STATIC)" "0" CONTENTS "${CONTENTS}")
diff --git a/ports/libarchive/vcpkg-cmake-wrapper.cmake b/ports/libarchive/vcpkg-cmake-wrapper.cmake.in index 006dde98d..2e0ef0f9c 100644 --- a/ports/libarchive/vcpkg-cmake-wrapper.cmake +++ b/ports/libarchive/vcpkg-cmake-wrapper.cmake.in @@ -1,29 +1,50 @@ _find_package(${ARGS})
+include(CMakeFindDependencyMacro)
+
+if(@ENABLE_ZLIB@)
+ find_dependency(ZLIB)
+endif()
+if(@ENABLE_BZip2@)
+ find_dependency(BZip2)
+endif()
+if(@ENABLE_LIBXML2@)
+ find_dependency(LibXml2)
+endif()
+if(@ENABLE_LZ4@)
+ find_dependency(lz4)
+endif()
+if(@ENABLE_LZMA@)
+ find_dependency(LibLZMA)
+endif()
+if(@ENABLE_ZSTD@)
+ find_dependency(zstd)
+endif()
+if(@ENABLE_OPENSSL@)
+ find_dependency(OpenSSL)
+endif()
+if(@ENABLE_LZO@)
+ find_library(LZO_LIBRARY_DEBUG NAMES lzo2d lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
+ find_library(LZO_LIBRARY_RELEASE NAMES lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
+endif()
+
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
if(@ENABLE_ZLIB@)
- find_package(ZLIB REQUIRED)
list(APPEND LibArchive_LIBRARIES ZLIB::ZLIB)
endif()
if(@ENABLE_BZip2@)
- find_package(BZip2 REQUIRED)
list(APPEND LibArchive_LIBRARIES BZip2::BZip2)
endif()
if(@ENABLE_LIBXML2@)
- find_package(LibXml2 REQUIRED)
list(APPEND LibArchive_LIBRARIES LibXml2::LibXml2)
endif()
if(@ENABLE_LZ4@)
- find_package(lz4 REQUIRED)
list(APPEND LibArchive_LIBRARIES lz4::lz4)
endif()
if(@ENABLE_LZMA@)
- find_package(LibLZMA REQUIRED)
list(APPEND LibArchive_LIBRARIES LibLZMA::LibLZMA)
endif()
if(@ENABLE_LZO@)
- find_library(LZO_LIBRARY_DEBUG NAMES lzo2d lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
- find_library(LZO_LIBRARY_RELEASE NAMES lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
if(LZO_LIBRARY_RELEASE)
list(APPEND LibArchive_LIBRARIES optimized ${LZO_LIBRARY_RELEASE})
endif()
@@ -32,7 +53,6 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") endif()
endif()
if(@ENABLE_ZSTD@)
- find_package(zstd CONFIG REQUIRED)
if(TARGET zstd::libzstd_shared)
list(APPEND LibArchive_LIBRARIES zstd::libzstd_shared)
else(TARGET zstd::libzstd_shared)
@@ -40,7 +60,6 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") endif(TARGET zstd::libzstd_shared)
endif()
if(@ENABLE_OPENSSL@)
- find_package(OpenSSL REQUIRED)
list(APPEND LibArchive_LIBRARIES OpenSSL::Crypto)
endif()
|
