aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-08-22 05:01:57 +0800
committerVictor Romero <romerosanchezv@gmail.com>2019-08-21 14:01:57 -0700
commit34a26540b1d2034aa8802feb1078a54b74368fcd (patch)
tree49d0c05d5b8784f4d535362d0bc950ae171f56aa
parentec3060c73fed32108eac8252b59b8bd42dc61af1 (diff)
downloadvcpkg-34a26540b1d2034aa8802feb1078a54b74368fcd.tar.gz
vcpkg-34a26540b1d2034aa8802feb1078a54b74368fcd.zip
[leptonica]Add dependency port libwebp and fix find libwebp in debug/release (#7712)
* [leptonica]Add dependency port libwebp and fix find libwebp in debug/release. * [leptonica]Add dependency to LeptonicaConfig.cmake. * [leptonica]Re-fix find libwebp.
-rw-r--r--ports/leptonica/CONTROL4
-rw-r--r--ports/leptonica/find-dependency.patch37
-rw-r--r--ports/leptonica/fix-find-libwebp.patch14
-rw-r--r--ports/leptonica/portfile.cmake15
4 files changed, 42 insertions, 28 deletions
diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL
index 0d65a10d5..cb700cb8a 100644
--- a/ports/leptonica/CONTROL
+++ b/ports/leptonica/CONTROL
@@ -1,5 +1,5 @@
Source: leptonica
-Version: 1.78.0
+Version: 1.78.0-1
Homepage: https://github.com/DanBloomberg/leptonica
Description: An open source library containing software that is broadly useful for image processing and image analysis applications
-Build-Depends: libjpeg-turbo, zlib, libpng, tiff, giflib
+Build-Depends: libjpeg-turbo, zlib, libpng, tiff, giflib, libwebp
diff --git a/ports/leptonica/find-dependency.patch b/ports/leptonica/find-dependency.patch
index 46348833e..2ed7fbb8c 100644
--- a/ports/leptonica/find-dependency.patch
+++ b/ports/leptonica/find-dependency.patch
@@ -1,18 +1,19 @@
-diff --git a/cmake/templates/LeptonicaConfig.cmake.in b/cmake/templates/LeptonicaConfig.cmake.in
-index d53904a..2aa2fea 100644
---- a/cmake/templates/LeptonicaConfig.cmake.in
-+++ b/cmake/templates/LeptonicaConfig.cmake.in
-@@ -20,6 +20,13 @@
- #
- # ===================================================================================
-
-+include(CMakeFindDependencyMacro)
-+find_dependency(TIFF)
-+find_dependency(ZLIB)
-+find_dependency(PNG)
-+find_dependency(JPEG)
-+find_dependency(GIF)
-+
- include(${CMAKE_CURRENT_LIST_DIR}/LeptonicaTargets.cmake)
-
- # ======================================================
+diff --git a/cmake/templates/LeptonicaConfig.cmake.in b/cmake/templates/LeptonicaConfig.cmake.in
+index 4f7527a..c6759d1 100644
+--- a/cmake/templates/LeptonicaConfig.cmake.in
++++ b/cmake/templates/LeptonicaConfig.cmake.in
+@@ -20,6 +20,14 @@
+ #
+ # ===================================================================================
+
++include(CMakeFindDependencyMacro)
++find_dependency(TIFF)
++find_dependency(ZLIB)
++find_dependency(PNG)
++find_dependency(JPEG)
++find_dependency(GIF)
++find_dependency(WebP)
++
+ include(${CMAKE_CURRENT_LIST_DIR}/LeptonicaTargets.cmake)
+
+ # ======================================================
diff --git a/ports/leptonica/fix-find-libwebp.patch b/ports/leptonica/fix-find-libwebp.patch
new file mode 100644
index 000000000..636bf655f
--- /dev/null
+++ b/ports/leptonica/fix-find-libwebp.patch
@@ -0,0 +1,14 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index debc232..2aa2d3a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -60,8 +60,7 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.cppan)
+ endif()
+ if(NOT WEBP)
+ message(STATUS "Looking for WEBP")
+- find_path(WEBP_INCLUDE_DIR /webp/decode.h)
+- find_library(WEBP_LIBRARY NAMES webp)
++ find_package(WebP CONFIG REQUIRED)
+ if (WEBP_INCLUDE_DIR AND WEBP_LIBRARY)
+ set(WEBP 1)
+ set(WEBP_FOUND TRUE)
diff --git a/ports/leptonica/portfile.cmake b/ports/leptonica/portfile.cmake
index 7b8479698..fb9214642 100644
--- a/ports/leptonica/portfile.cmake
+++ b/ports/leptonica/portfile.cmake
@@ -3,13 +3,14 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DanBloomberg/leptonica
- REF 87b8219360bca3c9929a5705c3d9c50c42c34bca
+ REF 87b8219360bca3c9929a5705c3d9c50c42c34bca #1.78.0
SHA512 b7bfa9437be7e3d9276acacf8f62ccda1cd8f88741ada5106ef0232d4965617be2c5d0b8a6b4462896a1a0b6b44d9ecefd6e6b8d0e50d4fb881bdf5e821703a4
HEAD_REF master
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch
- ${CMAKE_CURRENT_LIST_DIR}/use-tiff-libraries.patch
- ${CMAKE_CURRENT_LIST_DIR}/find-dependency.patch
+ fix-cmakelists.patch
+ use-tiff-libraries.patch
+ find-dependency.patch
+ fix-find-libwebp.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC)
@@ -29,9 +30,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
# Handle copyright
-file(COPY ${SOURCE_PATH}/leptonica-license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/leptonica)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/leptonica/leptonica-license.txt ${CURRENT_PACKAGES_DIR}/share/leptonica/copyright)
+file(COPY ${SOURCE_PATH}/leptonica-license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/leptonica-license.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)