diff options
Diffstat (limited to 'ports/tiff')
| -rw-r--r-- | ports/tiff/CONTROL | 4 | ||||
| -rw-r--r-- | ports/tiff/add-component-options.patch | 43 | ||||
| -rw-r--r-- | ports/tiff/cmakelists.patch | 99 | ||||
| -rw-r--r-- | ports/tiff/crt-secure-no-deprecate.patch | 12 | ||||
| -rw-r--r-- | ports/tiff/fix-cxx-shared-libs.patch | 23 | ||||
| -rw-r--r-- | ports/tiff/portfile.cmake | 25 | ||||
| -rw-r--r-- | ports/tiff/usage | 4 | ||||
| -rw-r--r-- | ports/tiff/vcpkg-cmake-wrapper.cmake | 12 |
8 files changed, 116 insertions, 106 deletions
diff --git a/ports/tiff/CONTROL b/ports/tiff/CONTROL index 97d25bcdb..d4ad07dc6 100644 --- a/ports/tiff/CONTROL +++ b/ports/tiff/CONTROL @@ -1,4 +1,4 @@ Source: tiff -Version: 4.0.10-4 -Build-Depends: zlib, libjpeg-turbo, liblzma (!uwp) +Version: 4.0.10-6 +Build-Depends: zlib, libjpeg-turbo, liblzma Description: A library that supports the manipulation of TIFF image files diff --git a/ports/tiff/add-component-options.patch b/ports/tiff/add-component-options.patch deleted file mode 100644 index 513d37ad6..000000000 --- a/ports/tiff/add-component-options.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1ee6fd4..439e26a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -122,6 +122,11 @@ set(EXTRA_DIST - nmake.opt - libtiff-4.pc.in) - -+option(BUILD_TOOLS "Build tool executables" ON) -+option(BUILD_DOCS "Build docs" ON) -+option(BUILD_CONTRIB "Build contributed executables" ON) -+option(BUILD_TESTS "Build tests" ON) -+ - # These are annoyingly verbose, produce false positives or don't work - # nicely with all supported compiler versions, so are disabled unless - # explicitly enabled. -@@ -719,12 +724,20 @@ endif() - # Process subdirectories - add_subdirectory(port) - add_subdirectory(libtiff) --add_subdirectory(tools) --add_subdirectory(test) --add_subdirectory(contrib) --add_subdirectory(build) --add_subdirectory(man) --add_subdirectory(html) -+if(BUILD_TOOLS) -+ add_subdirectory(tools) -+endif() -+if(BUILD_TESTS) -+ add_subdirectory(test) -+endif() -+if(BUILD_CONTRIB) -+ add_subdirectory(contrib) -+endif() -+if(BUILD_DOCS) -+ add_subdirectory(build) -+ add_subdirectory(man) -+ add_subdirectory(html) -+endif() - - #message(STATUS "EXTRA_DIST: ${EXTRA_DIST}") - diff --git a/ports/tiff/cmakelists.patch b/ports/tiff/cmakelists.patch new file mode 100644 index 000000000..597c980c5 --- /dev/null +++ b/ports/tiff/cmakelists.patch @@ -0,0 +1,99 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 845ddf0..9ccb9b3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -181,9 +181,7 @@ foreach(flag ${test_flags}) + endif (${test_c_flag}) + endforeach(flag ${test_flags}) + +-if(MSVC) +- set(CMAKE_DEBUG_POSTFIX "d") +-endif() ++set(CMAKE_DEBUG_POSTFIX "d") + + option(ld-version-script "Enable linker version script" ON) + # Check if LD supports linker scripts. +@@ -601,12 +599,15 @@ check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H) + check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H) + + # Win32 IO +-set(win32_io FALSE) +-if(WIN32) +- set(win32_io TRUE) ++set(USE_WIN32_FILEIO FALSE CACHE BOOL "") ++if(MSVC) ++ if (NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") #on UWP we use the unix I/O api ++ set(USE_WIN32_FILEIO TRUE CACHE BOOL "" FORCE) ++ add_definitions(-DUSE_WIN32_FILEIO) ++ endif() ++ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS /wd4996) + endif() + +-set(USE_WIN32_FILEIO ${win32_io}) + + # Orthogonal features + +@@ -708,16 +709,28 @@ endif() + + #report_values(TIFF_INCLUDES TIFF_LIBRARY_DEPS) + ++option(BUILD_TOOLS "Build tool executables" ON) ++option(BUILD_DOCS "Build docs" ON) ++option(BUILD_CONTRIB "Build contributed executables" ON) ++option(BUILD_TESTS "Build tests" ON) ++ + # Process subdirectories + add_subdirectory(port) + add_subdirectory(libtiff) +-add_subdirectory(tools) +-add_subdirectory(test) +-add_subdirectory(contrib) +-add_subdirectory(build) +-add_subdirectory(man) +-add_subdirectory(html) +- ++if(BUILD_TOOLS) ++ add_subdirectory(tools) ++endif() ++if(BUILD_TESTS) ++ add_subdirectory(test) ++endif() ++if(BUILD_CONTRIB) ++ add_subdirectory(contrib) ++endif() ++if(BUILD_DOCS) ++ add_subdirectory(build) ++ add_subdirectory(man) ++ add_subdirectory(html) ++endif() + #message(STATUS "EXTRA_DIST: ${EXTRA_DIST}") + + message(STATUS "") +diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt +index 1cf1b75..4ee29f6 100644 +--- a/libtiff/CMakeLists.txt ++++ b/libtiff/CMakeLists.txt +@@ -104,11 +104,11 @@ set(tiffxx_HEADERS + set(tiffxx_SOURCES + tif_stream.cxx) + +-if(WIN32_IO) +- extra_dist(tif_unix.c) ++if(USE_WIN32_FILEIO) ++ extra_dist(tif_win32.c) + list(APPEND tiff_SOURCES tif_win32.c) + else() +- extra_dist(tif_win32.c) ++ extra_dist(tif_unix.c) + list(APPEND tiff_SOURCES tif_unix.c) + endif() + +@@ -143,7 +143,7 @@ install(FILES ${tiff_HEADERS} ${nodist_tiff_HEADERS} + DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + + if(CXX_SUPPORT) +- add_library(tiffxx ${tiffxx_SOURCES} ${tiffxx_HEADERS}) ++ add_library(tiffxx STATIC ${tiffxx_SOURCES} ${tiffxx_HEADERS}) + target_link_libraries(tiffxx tiff) + set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION}) + if(NOT CYGWIN) diff --git a/ports/tiff/crt-secure-no-deprecate.patch b/ports/tiff/crt-secure-no-deprecate.patch deleted file mode 100644 index 476a931a9..000000000 --- a/ports/tiff/crt-secure-no-deprecate.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 439e26a..05416d8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -187,6 +187,7 @@ endforeach(flag ${test_flags}) - - if(MSVC) - set(CMAKE_DEBUG_POSTFIX "d") -+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS /wd4996) - endif() - - option(ld-version-script "Enable linker version script" ON) diff --git a/ports/tiff/fix-cxx-shared-libs.patch b/ports/tiff/fix-cxx-shared-libs.patch deleted file mode 100644 index 37389ca81..000000000 --- a/ports/tiff/fix-cxx-shared-libs.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 4370dea04189fb9d9a94e1f4ee96ef2d24937fc9 Mon Sep 17 00:00:00 2001 -From: Mikhail Paulyshka <me@mixaill.tk> -Date: Thu, 23 Mar 2017 17:55:14 +0300 -Subject: [PATCH] fix shared libs building - ---- - libtiff/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt -index 087dfa9..20fa8b4 100644 ---- a/libtiff/CMakeLists.txt -+++ b/libtiff/CMakeLists.txt -@@ -142,6 +142,7 @@ if(cxx) - add_library(tiffxx ${tiffxx_SOURCES} ${tiffxx_HEADERS}) - target_link_libraries(tiffxx tiff) - set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION}) -+ set_target_properties(tiffxx PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) - if(NOT CYGWIN) - # This property causes shared libraries on Linux to have the full version - # encoded into their final filename. We disable this on Cygwin because --- -2.11.0.windows.1 diff --git a/ports/tiff/portfile.cmake b/ports/tiff/portfile.cmake index 3a0ee0b8a..d36dce238 100644 --- a/ports/tiff/portfile.cmake +++ b/ports/tiff/portfile.cmake @@ -2,22 +2,19 @@ include(vcpkg_common_functions) set(LIBTIFF_VERSION 4.0.10) -vcpkg_check_linkage(ONLY_STATIC_LIBRARY) - vcpkg_download_distfile(ARCHIVE URLS "http://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz" FILENAME "tiff-${LIBTIFF_VERSION}.tar.gz" SHA512 d213e5db09fd56b8977b187c5a756f60d6e3e998be172550c2892dbdb4b2a8e8c750202bc863fe27d0d1c577ab9de1710d15e9f6ed665aadbfd857525a81eea8 ) + vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${LIBTIFF_VERSION} PATCHES - add-component-options.patch - fix-cxx-shared-libs.patch - crt-secure-no-deprecate.patch fix-stddef.patch + cmakelists.patch ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") @@ -46,19 +43,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share ) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/tiff) -configure_file( - ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake - ${CURRENT_PACKAGES_DIR}/share/tiff - @ONLY -) -file(INSTALL - ${SOURCE_PATH}/COPYRIGHT - DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff - RENAME copyright -) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff) -vcpkg_copy_pdbs() -vcpkg_test_cmake(PACKAGE_NAME TIFF MODULE) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/tiff/usage b/ports/tiff/usage deleted file mode 100644 index 6b2f0f89e..000000000 --- a/ports/tiff/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package tiff is compatible with built-in CMake targets: - - find_package(TIFF REQUIRED) - target_link_libraries(main PRIVATE TIFF::TIFF) diff --git a/ports/tiff/vcpkg-cmake-wrapper.cmake b/ports/tiff/vcpkg-cmake-wrapper.cmake index c950b512b..a35deceee 100644 --- a/ports/tiff/vcpkg-cmake-wrapper.cmake +++ b/ports/tiff/vcpkg-cmake-wrapper.cmake @@ -1,17 +1,23 @@ _find_package(${ARGS}) -find_package(LibLZMA) +find_package(LibLZMA CONFIG) find_package(JPEG) find_package(ZLIB) if(TARGET TIFF::TIFF) - set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES} JPEG::JPEG ZLIB::ZLIB) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES LibLZMA::LibLZMA JPEG::JPEG ZLIB::ZLIB) if(UNIX) set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES m) endif() endif() if(TIFF_LIBRARIES) - list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) + list(APPEND TIFF_LIBRARIES ${LZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) if(UNIX) list(APPEND TIFF_LIBRARIES m) endif() endif() +if(TIFF_LIBRARY) + list(APPEND TIFF_LIBRARY ${LZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) + if(UNIX) + list(APPEND TIFF_LIBRARY m) + endif() +endif() |
