aboutsummaryrefslogtreecommitdiff
path: root/ports/libgeotiff
diff options
context:
space:
mode:
authorStefano Sinigardi <stesinigardi@hotmail.com>2019-05-29 01:58:00 +0200
committerVictor Romero <romerosanchezv@gmail.com>2019-05-28 16:58:00 -0700
commita9303736fdda58cf5ff3ccc969be917580493c91 (patch)
treefab5304f58fa8017e982423ee59fbfd386a1dc62 /ports/libgeotiff
parent3d4b4c02ede7b343f4cd9cdfebbd3124ad834045 (diff)
downloadvcpkg-a9303736fdda58cf5ff3ccc969be917580493c91.tar.gz
vcpkg-a9303736fdda58cf5ff3ccc969be917580493c91.zip
[LibLZMA] automatic configuration (#6000)
* [LibLZMA] add a config-generated by CMake * bump control files of LibLZMA and dependent ports * [tiff] use proper liblzma target [OpenCV] add an explicit dependency on LibLZMA for static linking * [liblzma] fix header install path * [LibLZMA] avoid using targets in old symbols * fixes for windows-static and trying to see if CI is happier with a share/lib folder written in lowercase * [LibLZMA] use only modern CMake language, remove patch in favour of target public definition * [lzma] put symbols in cmake cache * [libxmlpp] remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS regression * [lzma] fix header install path * [liblzma] install wrapper to force config mode * [liblzma] remove function check inside cmake config since we know it will pass * [liblzma] wrapper fix * [tiff,geotiff] general cleanup and patch fixes * [libgeotiff] remove debug tools * [tesseract] modernize * [tiff] fix also tiff_library symbol * [pdal,libgeotiff] better library integration * [tiff] restore using unix i/o on UWP, since it was working... for sure win32 one cannot work * [tiff] enable lzma also on uwp, since it works and is requested by many dependencies * [selene] enable build on arm/arm64-windows, which was surely broken before * [lzma] uniform naming with cmake 3.14 * [podofo] fix regression, it requires openssl which was disabled in dependencies * [many ports] remove unnecessary mods * [boost-iostream] chmod * [openssl] fix regression due to missing architecture * [podofo] fix regression on uwp due to missing include * [libpq] explicitly fail on UWP, it should avoid being marked as regression * [shiva] fix regression on linux
Diffstat (limited to 'ports/libgeotiff')
-rw-r--r--ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch88
-rw-r--r--ports/libgeotiff/0002-Fix-directory-output.patch28
-rw-r--r--ports/libgeotiff/0004-Fix-libxtiff-installation.patch64
-rw-r--r--ports/libgeotiff/0005-Control-shared-library-build-with-option.patch34
-rw-r--r--ports/libgeotiff/0006-Fix-utility-link-error.patch42
-rw-r--r--ports/libgeotiff/CONTROL4
-rw-r--r--ports/libgeotiff/cmakelists.patch124
-rw-r--r--ports/libgeotiff/portfile.cmake49
8 files changed, 147 insertions, 286 deletions
diff --git a/ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch b/ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch
deleted file mode 100644
index 93476fd2f..000000000
--- a/ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 77b4bf4e649d55b1f1df38494114727f972ec806 Mon Sep 17 00:00:00 2001
-From: Howard Butler <hobu.inc@gmail.com>
-Date: Mon, 11 Dec 2017 15:21:56 +0000
-Subject: [PATCH 1/5] Updates to CMake configuration to align with other CMake
- norms (BUILD_SHARED_LIBS mostly)
-
-git-svn-id: https://svn.osgeo.org/metacrs/geotiff/trunk/libgeotiff@2801 4e78687f-474d-0410-85f9-8d5e500ac6b2
-Signed-off-by: Hiroshi Miura <miurahr@linux.com>
----
- CMakeLists.txt | 22 ++--------------------
- cmake/project-config.cmake.in | 5 ++++-
- 2 files changed, 6 insertions(+), 21 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0c70973..55ececf 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -9,7 +9,6 @@ PROJECT(GeoTIFF)
-
- SET(GEOTIFF_LIB_NAME geotiff)
- SET(GEOTIFF_LIBRARY_TARGET geotiff_library)
--SET(GEOTIFF_ARCHIVE_TARGET geotiff_archive)
-
- ##############################################################################
- # CMake settings
-@@ -416,32 +415,15 @@ FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/epsg_incode_header.h"
-
- SET(XTIFF_SOURCES libxtiff/xtiff.c)
-
--#---
--# Static libgeotiff archive
--# NOTE: Did not put XTIFF_SOURCES in static lib because libxtiff.a is written out
--# currently.
--#---
- if (MSVC OR CMAKE_CONFIGURATION_TYPES)
- # For multi-config systems and for Visual Studio, the debug versions
- # of the libraries have a _d suffix.
- set (CMAKE_DEBUG_POSTFIX _d)
- endif ()
-
--ADD_LIBRARY(${GEOTIFF_ARCHIVE_TARGET} STATIC
-- ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES})
--SET_TARGET_PROPERTIES(${GEOTIFF_ARCHIVE_TARGET} PROPERTIES
-- OUTPUT_NAME ${GEOTIFF_LIB_NAME})
--
--# Shared libgeotiff library
--ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} SHARED
-+ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET}
- ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES} ${XTIFF_SOURCES})
-
--# Windows:
--IF(WIN32 AND MSVC)
-- SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES IMPORT_SUFFIX "_i.lib")
--ENDIF(WIN32 AND MSVC)
--
--
- # Unix, linux:
- IF(UNIX)
- SET_TARGET_PROPERTIES(
-@@ -478,7 +460,7 @@ TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET}
- # LIBRARY DESTINATION ${GEOTIFF_LIB_DIR}
- # ARCHIVE DESTINATION ${GEOTIFF_LIB_DIR})
-
--INSTALL( TARGETS ${GEOTIFF_ARCHIVE_TARGET} ${GEOTIFF_LIBRARY_TARGET}
-+INSTALL( TARGETS ${GEOTIFF_LIBRARY_TARGET}
- EXPORT depends
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
-diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
-index 6b5499f..dc5b999 100644
---- a/cmake/project-config.cmake.in
-+++ b/cmake/project-config.cmake.in
-@@ -32,8 +32,11 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin")
-
- message (STATUS " include directory: \${@PROJECT_NAME@_INCLUDE_DIRS}")
-
-+if(BUILD_SHARED_LIBS)
- set (@PROJECT_NAME@_SHARED_LIBRARIES @GEOTIFF_LIBRARY_TARGET@)
--set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_ARCHIVE_TARGET@)
-+else()
-+set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_LIBRARY_TARGET@)
-+endif()
- # Read in the exported definition of the library
- include ("${_DIR}/@PROJECT_NAME_LOWER@-depends.cmake")
-
---
-2.16.1
-
diff --git a/ports/libgeotiff/0002-Fix-directory-output.patch b/ports/libgeotiff/0002-Fix-directory-output.patch
deleted file mode 100644
index d6b79e54c..000000000
--- a/ports/libgeotiff/0002-Fix-directory-output.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 2b60f0a2c264bf3730e89739384a6d50991b2fc4 Mon Sep 17 00:00:00 2001
-From: Hiroshi Miura <miurahr@linux.com>
-Date: Wed, 14 Feb 2018 12:31:53 +0900
-Subject: [PATCH 2/5] Fix directory output
-
-Signed-off-by: Hiroshi Miura <miurahr@linux.com>
----
- cmake/CMakeLists.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
-index 47a2b00..b41f2fa 100644
---- a/cmake/CMakeLists.txt
-+++ b/cmake/CMakeLists.txt
-@@ -10,8 +10,8 @@ if (NOT WIN32)
- set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
- set (PROJECT_ROOT_DIR "../../..")
- else ()
-- set (INSTALL_CMAKE_DIR "cmake")
-- set (PROJECT_ROOT_DIR "..")
-+ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME}")
-+ set (PROJECT_ROOT_DIR "../..")
- endif ()
-
- configure_file (project-config.cmake.in project-config.cmake @ONLY)
---
-2.16.1
-
diff --git a/ports/libgeotiff/0004-Fix-libxtiff-installation.patch b/ports/libgeotiff/0004-Fix-libxtiff-installation.patch
deleted file mode 100644
index f7da51ab0..000000000
--- a/ports/libgeotiff/0004-Fix-libxtiff-installation.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 3a7c42f304ec3bb149e31bbd21c9c84048c3047c Mon Sep 17 00:00:00 2001
-From: Hiroshi Miura <miurahr@linux.com>
-Date: Thu, 15 Feb 2018 13:11:01 +0900
-Subject: [PATCH 4/5] Fix libxtiff installation
-
-Signed-off-by: Hiroshi Miura <miurahr@linux.com>
----
- CMakeLists.txt | 9 ++-------
- libxtiff/CMakeLists.txt | 9 ---------
- 2 files changed, 2 insertions(+), 16 deletions(-)
- delete mode 100644 libxtiff/CMakeLists.txt
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1e2fe3d..c52cfb4 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -354,11 +354,6 @@ INSTALL(FILES ${GEOTIFF_MAN_PAGES} DESTINATION share/man/man1)
- # INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION ${GEOTIFF_INCLUDE_DIR})
- INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include)
-
--###############################################################################
--# Build libxtiff library
--
--ADD_SUBDIRECTORY(libxtiff)
--
- ###############################################################################
- # Build libgeotiff library
-
-@@ -406,6 +401,8 @@ FOREACH(epsg_csv_file ${GEOTIFF_CSV_DATA})
- ENDIF()
- ENDFOREACH()
-
-+SET(XTIFF_SOURCES libxtiff/xtiff.c)
-+
- SET(EPSG_INCODE_EXPLANATION
- "This file is autogenerated by CMake, based on the INCODE_EPSG_* options specified during configure.\n
- Choosing an EPSG CSV file for inclusion into code will run csv/csv2c.py on the file and include the\n
-@@ -414,8 +411,6 @@ STRING(REPLACE ";" "\n" EPSG_INCLUDEFILE_POINTER_STRING "${epsg_includefile_poin
- FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/epsg_incode_header.h"
- "/* ${EPSG_INCODE_EXPLANATION} */\n${epsg_includefile_externconst}; \n\n/* Pointers to csv data included in code */\nstatic const datafile_t files[] = {\n${EPSG_INCLUDEFILE_POINTER_STRING}\n { NULL, NULL }};")
-
--SET(XTIFF_SOURCES libxtiff/xtiff.c)
--
- if (MSVC OR CMAKE_CONFIGURATION_TYPES)
- # For multi-config systems and for Visual Studio, the debug versions
- # of the libraries have a _d suffix.
-diff --git a/libxtiff/CMakeLists.txt b/libxtiff/CMakeLists.txt
-deleted file mode 100644
-index a0bbb96..0000000
---- a/libxtiff/CMakeLists.txt
-+++ /dev/null
-@@ -1,9 +0,0 @@
--###############################################################################
--#
--# CMake configuration file to build libxtiff library
--#
--# Author: Mateusz Loskot <mateusz@loskot.net>
--#
--###############################################################################
--
--ADD_LIBRARY(xtiff STATIC xtiff.c)
---
-2.16.1
-
diff --git a/ports/libgeotiff/0005-Control-shared-library-build-with-option.patch b/ports/libgeotiff/0005-Control-shared-library-build-with-option.patch
deleted file mode 100644
index ed9a4e88a..000000000
--- a/ports/libgeotiff/0005-Control-shared-library-build-with-option.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 84e537f3bd0db74b22ffebb3746d292daf4f4e59 Mon Sep 17 00:00:00 2001
-From: Hiroshi Miura <miurahr@linux.com>
-Date: Thu, 15 Feb 2018 13:17:14 +0900
-Subject: [PATCH 5/5] Control shared library build with option
-
-Signed-off-by: Hiroshi Miura <miurahr@linux.com>
----
- CMakeLists.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c52cfb4..5890203 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -5,14 +5,15 @@
- # Author: Mateusz Loskot <mateusz@loskot.net>
- #
- ###############################################################################
-+CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
- PROJECT(GeoTIFF)
-
- SET(GEOTIFF_LIB_NAME geotiff)
- SET(GEOTIFF_LIBRARY_TARGET geotiff_library)
-+option(BUILD_SHARE_LIBS "Set ON to build shared library." ON)
-
- ##############################################################################
- # CMake settings
--CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
-
- SET(CMAKE_COLOR_MAKEFILE ON)
-
---
-2.16.1
-
diff --git a/ports/libgeotiff/0006-Fix-utility-link-error.patch b/ports/libgeotiff/0006-Fix-utility-link-error.patch
deleted file mode 100644
index ef0963b26..000000000
--- a/ports/libgeotiff/0006-Fix-utility-link-error.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 2625b4a85b6cacf9b6ede3cf30af16eb795044e9 Mon Sep 17 00:00:00 2001
-From: Hiroshi Miura <miurahr@linux.com>
-Date: Sat, 24 Feb 2018 08:36:31 +0900
-Subject: [PATCH 6/6] Fix utility link error
-
-Signed-off-by: Hiroshi Miura <miurahr@linux.com>
----
- bin/CMakeLists.txt | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt
-index 583ae36..6c6cc21 100644
---- a/bin/CMakeLists.txt
-+++ b/bin/CMakeLists.txt
-@@ -6,10 +6,6 @@
- #
- ###############################################################################
-
--INCLUDE_DIRECTORIES(
-- .
-- ${CMAKE_SOURCE_DIR})
--
- IF(WIN32 AND MSVC)
- SET(GETOPT_SOURCE getopt.c)
- ENDIF()
-@@ -22,12 +18,11 @@ MESSAGE(STATUS "Adding GeoTIFF utilities to build")
-
- FOREACH(utility ${GEOTIFF_UTILITIES})
- ADD_EXECUTABLE(${utility} ${utility}.c ${GETOPT_SOURCE})
-- TARGET_LINK_LIBRARIES(${utility} xtiff ${GEOTIFF_LIBRARY_TARGET})
-+ TARGET_LINK_LIBRARIES(${utility} ${GEOTIFF_LIBRARY_TARGET})
- ENDFOREACH()
-
- ADD_EXECUTABLE(geotifcp geotifcp.c ${GETOPT_SOURCE})
- TARGET_LINK_LIBRARIES(geotifcp
-- xtiff
- ${GEOTIFF_LIBRARY_TARGET}
- ${JPEG_LIBRARIES}
- ${ZLIB_LIBRARIES})
---
-2.16.1
-
diff --git a/ports/libgeotiff/CONTROL b/ports/libgeotiff/CONTROL
index 34d804005..28cbee52d 100644
--- a/ports/libgeotiff/CONTROL
+++ b/ports/libgeotiff/CONTROL
@@ -1,4 +1,4 @@
Source: libgeotiff
-Version: 1.4.2-8
-Description: Libgeotiff is an open source library normally hosted on top of ​libtiff for reading, and writing GeoTIFF information tags.
+Version: 1.4.2-9
+Description: Libgeotiff is an open source library normally hosted on top of libtiff for reading, and writing GeoTIFF information tags.
Build-Depends: tiff, proj4, zlib, libjpeg-turbo
diff --git a/ports/libgeotiff/cmakelists.patch b/ports/libgeotiff/cmakelists.patch
new file mode 100644
index 000000000..689c6df5b
--- /dev/null
+++ b/ports/libgeotiff/cmakelists.patch
@@ -0,0 +1,124 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0c70973..617978c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -190,22 +190,6 @@ IF(WITH_TIFF)
+ endif ()
+
+ IF(TIFF_FOUND)
+- # Confirm required API is available
+- INCLUDE(CheckFunctionExists)
+- SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES})
+-
+- CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN)
+- IF(NOT HAVE_TIFFOPEN)
+- SET(TIFF_FOUND) # ReSET to NOT found for TIFF library
+- MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFOpen function not found")
+- ENDIF()
+-
+- CHECK_FUNCTION_EXISTS(TIFFMergeFieldInfo HAVE_TIFFMERGEFIELDINFO)
+- IF(NOT HAVE_TIFFMERGEFIELDINFO)
+- SET(TIFF_FOUND) # ReSET to NOT found for TIFF library
+- MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff")
+- ENDIF()
+-
+ INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR})
+ ADD_DEFINITIONS(-DHAVE_TIFF=1)
+ ENDIF(TIFF_FOUND)
+@@ -354,11 +338,6 @@ INSTALL(FILES ${GEOTIFF_MAN_PAGES} DESTINATION share/man/man1)
+ # INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION ${GEOTIFF_INCLUDE_DIR})
+ INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include)
+
+-###############################################################################
+-# Build libxtiff library
+-
+-ADD_SUBDIRECTORY(libxtiff)
+-
+ ###############################################################################
+ # Build libgeotiff library
+
+@@ -427,13 +406,9 @@ if (MSVC OR CMAKE_CONFIGURATION_TYPES)
+ set (CMAKE_DEBUG_POSTFIX _d)
+ endif ()
+
+-ADD_LIBRARY(${GEOTIFF_ARCHIVE_TARGET} STATIC
+- ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES})
+-SET_TARGET_PROPERTIES(${GEOTIFF_ARCHIVE_TARGET} PROPERTIES
+- OUTPUT_NAME ${GEOTIFF_LIB_NAME})
+
+ # Shared libgeotiff library
+-ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} SHARED
++ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET}
+ ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES} ${XTIFF_SOURCES})
+
+ # Windows:
+@@ -478,7 +453,7 @@ TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET}
+ # LIBRARY DESTINATION ${GEOTIFF_LIB_DIR}
+ # ARCHIVE DESTINATION ${GEOTIFF_LIB_DIR})
+
+-INSTALL( TARGETS ${GEOTIFF_ARCHIVE_TARGET} ${GEOTIFF_LIBRARY_TARGET}
++INSTALL( TARGETS ${GEOTIFF_LIBRARY_TARGET}
+ EXPORT depends
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt
+index 7b12341..b6b1d0c 100644
+--- a/bin/CMakeLists.txt
++++ b/bin/CMakeLists.txt
+@@ -6,9 +6,6 @@
+ #
+ ###############################################################################
+
+-INCLUDE_DIRECTORIES(
+- .
+- ${CMAKE_SOURCE_DIR})
+
+ IF(WIN32 AND MSVC)
+ SET(GETOPT_SOURCE getopt.c)
+@@ -22,12 +19,11 @@ MESSAGE(STATUS "Adding GeoTIFF utilities to build")
+
+ FOREACH(utility ${GEOTIFF_UTILITIES})
+ ADD_EXECUTABLE(${utility} ${utility}.c ${GETOPT_SOURCE})
+- TARGET_LINK_LIBRARIES(${utility} xtiff ${GEOTIFF_LIBRARY_TARGET})
++ TARGET_LINK_LIBRARIES(${utility} ${GEOTIFF_LIBRARY_TARGET})
+ ENDFOREACH()
+
+ ADD_EXECUTABLE(geotifcp geotifcp.c ${GETOPT_SOURCE})
+ TARGET_LINK_LIBRARIES(geotifcp
+- xtiff
+ ${GEOTIFF_LIBRARY_TARGET}
+ ${JPEG_LIBRARIES}
+ ${ZLIB_LIBRARIES})
+diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
+index 47a2b00..ffbd004 100644
+--- a/cmake/CMakeLists.txt
++++ b/cmake/CMakeLists.txt
+@@ -6,13 +6,8 @@
+ # ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative
+ # path to the root from there. (Note that the whole install tree can
+ # be relocated.)
+-if (NOT WIN32)
+- set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
+- set (PROJECT_ROOT_DIR "../../..")
+-else ()
+- set (INSTALL_CMAKE_DIR "cmake")
+- set (PROJECT_ROOT_DIR "..")
+-endif ()
++ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME}")
++ set (PROJECT_ROOT_DIR "../..")
+
+ configure_file (project-config.cmake.in project-config.cmake @ONLY)
+ configure_file (project-config-version.cmake.in
+diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
+index 6b5499f..e4ddd11 100644
+--- a/cmake/project-config.cmake.in
++++ b/cmake/project-config.cmake.in
+@@ -33,7 +33,7 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin")
+ message (STATUS " include directory: \${@PROJECT_NAME@_INCLUDE_DIRS}")
+
+ set (@PROJECT_NAME@_SHARED_LIBRARIES @GEOTIFF_LIBRARY_TARGET@)
+-set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_ARCHIVE_TARGET@)
++set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_LIBRARY_TARGET@)
+ # Read in the exported definition of the library
+ include ("${_DIR}/@PROJECT_NAME_LOWER@-depends.cmake")
+
diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake
index bb64e7ac2..1e4bb3370 100644
--- a/ports/libgeotiff/portfile.cmake
+++ b/ports/libgeotiff/portfile.cmake
@@ -1,12 +1,11 @@
include(vcpkg_common_functions)
set(LIBGEOTIFF_VERSION 1.4.2)
-set(LIBGEOTIFF_HASH 059c6e05eb0c47f17b102c7217a2e1636e76d622c4d1bdcf0bd89fb3505f3130bffa881e21c73cfd2ca0d6863b81322f85784658ba3539b53b63c3a8f38d1deb)
vcpkg_download_distfile(ARCHIVE
URLS "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz"
FILENAME "libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz"
- SHA512 ${LIBGEOTIFF_HASH}
+ SHA512 059c6e05eb0c47f17b102c7217a2e1636e76d622c4d1bdcf0bd89fb3505f3130bffa881e21c73cfd2ca0d6863b81322f85784658ba3539b53b63c3a8f38d1deb
)
vcpkg_extract_source_archive_ex(
@@ -14,11 +13,7 @@ vcpkg_extract_source_archive_ex(
ARCHIVE ${ARCHIVE}
REF ${LIBGEOTIFF_VERSION}
PATCHES
- 0001-Updates-to-CMake-configuration-to-align-with-other-C.patch
- 0002-Fix-directory-output.patch
- 0004-Fix-libxtiff-installation.patch
- 0005-Control-shared-library-build-with-option.patch
- 0006-Fix-utility-link-error.patch
+ cmakelists.patch
geotiff-config.patch
)
@@ -33,42 +28,40 @@ vcpkg_configure_cmake(
-DWITH_PROJ4=ON
-DWITH_ZLIB=ON
-DWITH_JPEG=ON
- OPTIONS_RELEASE -DWITH_UTILITIES=ON
- OPTIONS_DEBUG -DWITH_UTILITIES=OFF
+ -DWITH_UTILITIES=ON
)
vcpkg_install_cmake()
-if(WIN32)
- vcpkg_fixup_cmake_targets(CONFIG_PATH share/GeoTIFF)
- file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgeotiff ${CURRENT_PACKAGES_DIR}/share/geotiff) # move configs to expected location
-else()
- vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/GeoTIFF)
- file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgeotiff ${CURRENT_PACKAGES_DIR}/share/geotiff) # move configs to expected location
-endif()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
-configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libgeotiff/copyright COPYONLY)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
else()
file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
+ file(GLOB GEOTIFF_UTILS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
+ file(REMOVE ${GEOTIFF_UTILS_DEBUG})
endif()
file(COPY ${GEOTIFF_UTILS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/libgeotiff)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libgeotiff)
+file(REMOVE ${GEOTIFF_UTILS})
-file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
-if(EXES)
- file(REMOVE ${EXES})
-endif()
-
-if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore"))
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
endif()
-# Move and cleanup doc files
-file(RENAME ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/share/libgeotiff/doc)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
-
vcpkg_copy_pdbs()
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/GeoTIFF)
+file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
+file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
+file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
+file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
+file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgeotiff RENAME copyright)
+
+file(RENAME ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/share/libgeotiff/doc)