diff options
| author | Phoebe <20694052+PhoebeHui@users.noreply.github.com> | 2020-10-22 08:42:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-21 17:42:47 -0700 |
| commit | aff62d3487cd4c47ebc7f1dfd7a7023665403e20 (patch) | |
| tree | 8c5f01eec304a94ceea346ab546882b8ac8efb51 | |
| parent | b1dea7104f38eae95284470af2833b628a4847bb (diff) | |
| download | vcpkg-aff62d3487cd4c47ebc7f1dfd7a7023665403e20.tar.gz vcpkg-aff62d3487cd4c47ebc7f1dfd7a7023665403e20.zip | |
[leptonica] Update to 1.80.0 (#14125)
| -rw-r--r-- | ports/leptonica/CONTROL | 2 | ||||
| -rw-r--r-- | ports/leptonica/find-dependency.patch | 38 | ||||
| -rw-r--r-- | ports/leptonica/fix-cmakelists.patch | 24 | ||||
| -rw-r--r-- | ports/leptonica/fix-find-libwebp.patch | 41 | ||||
| -rw-r--r-- | ports/leptonica/portfile.cmake | 12 | ||||
| -rw-r--r-- | ports/leptonica/use-tiff-libraries.patch | 13 |
6 files changed, 63 insertions, 67 deletions
diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL index cb700cb8a..292ad0b74 100644 --- a/ports/leptonica/CONTROL +++ b/ports/leptonica/CONTROL @@ -1,5 +1,5 @@ Source: leptonica -Version: 1.78.0-1 +Version: 1.80.0 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, libwebp diff --git a/ports/leptonica/find-dependency.patch b/ports/leptonica/find-dependency.patch index 2ed7fbb8c..8a92389c8 100644 --- a/ports/leptonica/find-dependency.patch +++ b/ports/leptonica/find-dependency.patch @@ -1,19 +1,19 @@ -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/cmake/templates/LeptonicaConfig.cmake.in b/cmake/templates/LeptonicaConfig.cmake.in
+index 342c37d..b358b7b 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-cmakelists.patch b/ports/leptonica/fix-cmakelists.patch index b08a971f6..6d1d28169 100644 --- a/ports/leptonica/fix-cmakelists.patch +++ b/ports/leptonica/fix-cmakelists.patch @@ -1,12 +1,12 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 945100a..6daad98 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -14,7 +14,6 @@ if (MSVC) - set_source_files_properties(${src} PROPERTIES LANGUAGE CXX) - endif() - --string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) - - add_library (leptonica ${LIBRARY_TYPE} ${src} ${hdr}) - set_target_properties (leptonica PROPERTIES VERSION ${VERSION_PLAIN}) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index e474463..d2b999d 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -14,7 +14,6 @@ if (MSVC)
+ set_source_files_properties(${src} PROPERTIES LANGUAGE CXX)
+ endif()
+
+-string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
+
+ add_library (leptonica ${src} ${hdr})
+ set_target_properties (leptonica PROPERTIES VERSION ${VERSION_PLAIN})
diff --git a/ports/leptonica/fix-find-libwebp.patch b/ports/leptonica/fix-find-libwebp.patch index 636bf655f..588cf0c54 100644 --- a/ports/leptonica/fix-find-libwebp.patch +++ b/ports/leptonica/fix-find-libwebp.patch @@ -1,14 +1,27 @@ -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/CMakeLists.txt b/CMakeLists.txt
+index 6535632..1740841 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -70,8 +70,7 @@ if(NOT SW_BUILD)
+ pkg_check_modules(JP2K libopenjp2>=2.0 QUIET)
+ endif()
+ if(NOT 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/src/CMakeLists.txt b/src/CMakeLists.txt
+index d2b999d..019ec7b 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -52,7 +52,7 @@ if (TIFF_LIBRARIES)
+ endif()
+ if (WEBP_FOUND)
+ target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIRS})
+- target_link_libraries (leptonica ${WEBP_LIBRARIES})
++ target_link_libraries (leptonica WebP::webp WebP::libwebpmux)
+ endif()
+ if (ZLIB_LIBRARIES)
+ target_include_directories (leptonica PUBLIC ${ZLIB_INCLUDE_DIRS})
diff --git a/ports/leptonica/portfile.cmake b/ports/leptonica/portfile.cmake index fb9214642..5cb5aa882 100644 --- a/ports/leptonica/portfile.cmake +++ b/ports/leptonica/portfile.cmake @@ -1,14 +1,11 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DanBloomberg/leptonica - REF 87b8219360bca3c9929a5705c3d9c50c42c34bca #1.78.0 - SHA512 b7bfa9437be7e3d9276acacf8f62ccda1cd8f88741ada5106ef0232d4965617be2c5d0b8a6b4462896a1a0b6b44d9ecefd6e6b8d0e50d4fb881bdf5e821703a4 + REF 1ac72c93fef1a5eb76b76d6723d2aee843dd6e51 # 1.80.0 + SHA512 d6d1af744691b70601b9f3d292d4593c36d392bcfd9e4c190fd533c2df40fcedfc226868429c25fad9b54c8ed68b61750832c9984c47ff72fc702dd3c3f438d6 HEAD_REF master PATCHES fix-cmakelists.patch - use-tiff-libraries.patch find-dependency.patch fix-find-libwebp.patch ) @@ -19,6 +16,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DSW_BUILD=OFF -DSTATIC=${STATIC} -DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file() ) @@ -31,6 +29,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# Handle 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) +file(INSTALL ${SOURCE_PATH}/leptonica-license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/leptonica/use-tiff-libraries.patch b/ports/leptonica/use-tiff-libraries.patch deleted file mode 100644 index 4db86ef7b..000000000 --- a/ports/leptonica/use-tiff-libraries.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 6daad98..5119895 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -48,7 +48,7 @@ if (PNG_LIBRARY)
- endif()
- if (TIFF_LIBRARY)
- target_include_directories (leptonica PUBLIC ${TIFF_INCLUDE_DIR})
-- target_link_libraries (leptonica ${TIFF_LIBRARY})
-+ target_link_libraries (leptonica ${TIFF_LIBRARIES})
- endif()
- if (WEBP_FOUND)
- target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIRS})
|
