aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libgeotiff
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/libgeotiff')
-rw-r--r--vcpkg/ports/libgeotiff/cmakelists.patch23
-rw-r--r--vcpkg/ports/libgeotiff/portfile.cmake51
-rw-r--r--vcpkg/ports/libgeotiff/usage10
-rw-r--r--vcpkg/ports/libgeotiff/vcpkg.json36
4 files changed, 120 insertions, 0 deletions
diff --git a/vcpkg/ports/libgeotiff/cmakelists.patch b/vcpkg/ports/libgeotiff/cmakelists.patch
new file mode 100644
index 0000000..8f41fcb
--- /dev/null
+++ b/vcpkg/ports/libgeotiff/cmakelists.patch
@@ -0,0 +1,23 @@
+diff --git a/libgeotiff/cmake/CMakeLists.txt b/libgeotiff/cmake/CMakeLists.txt
+index 47a2b00..3809ba3 100644
+--- a/libgeotiff/cmake/CMakeLists.txt
++++ b/libgeotiff/cmake/CMakeLists.txt
+@@ -6,6 +6,7 @@
+ # ${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 (0)
+ if (NOT WIN32)
+ set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
+ set (PROJECT_ROOT_DIR "../../..")
+@@ -13,6 +14,10 @@ else ()
+ set (INSTALL_CMAKE_DIR "cmake")
+ set (PROJECT_ROOT_DIR "..")
+ endif ()
++else()
++ set (INSTALL_CMAKE_DIR "share/geotiff")
++ set (PROJECT_ROOT_DIR "../..")
++endif()
+
+ configure_file (project-config.cmake.in project-config.cmake @ONLY)
+ configure_file (project-config-version.cmake.in
diff --git a/vcpkg/ports/libgeotiff/portfile.cmake b/vcpkg/ports/libgeotiff/portfile.cmake
new file mode 100644
index 0000000..ad859e3
--- /dev/null
+++ b/vcpkg/ports/libgeotiff/portfile.cmake
@@ -0,0 +1,51 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO OSGeo/libgeotiff
+ REF ${VERSION}
+ SHA512 03468e8eeaf97d82798bf341cf2e27753eb47af985fb08fc6176be799bd0e1e879c6d1701577f7568f269cbef0bb0a20ae460bb943f847daf49aa54601441683
+ HEAD_REF master
+ PATCHES
+ cmakelists.patch
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ tools WITH_JPEG
+ tools WITH_UTILITIES
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}/libgeotiff"
+ OPTIONS
+ -DWITH_TIFF=1
+ -DHAVE_TIFFOPEN=1
+ -DHAVE_TIFFMERGEFIELDINFO=1
+ -DCMAKE_MACOSX_BUNDLE=0
+ -DCMAKE_INSTALL_MANDIR=share/unused
+ -DCMAKE_INSTALL_DOCDIR=share/unused
+ ${FEATURE_OPTIONS}
+)
+
+vcpkg_cmake_install()
+
+if(WITH_UTILITIES)
+ vcpkg_copy_tools(TOOL_NAMES applygeo geotifcp listgeo makegeo AUTO_CLEAN)
+endif()
+
+vcpkg_copy_pdbs()
+vcpkg_cmake_config_fixup(PACKAGE_NAME geotiff)
+vcpkg_fixup_pkgconfig()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin")
+endif()
+
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/debug/include"
+ "${CURRENT_PACKAGES_DIR}/debug/share"
+ "${CURRENT_PACKAGES_DIR}/share/unused"
+)
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/libgeotiff/LICENSE")
diff --git a/vcpkg/ports/libgeotiff/usage b/vcpkg/ports/libgeotiff/usage
new file mode 100644
index 0000000..87ef4d8
--- /dev/null
+++ b/vcpkg/ports/libgeotiff/usage
@@ -0,0 +1,10 @@
+libgeotiff provides a CMake config file:
+
+ find_package(GeoTIFF CONFIG REQUIRED)
+ target_include_directories(main PRIVATE ${GEOTIFF_INCLUDE_DIR})
+ target_link_libraries(main PRIVATE ${GEOTIFF_LIBRARIES})
+
+libgeotiff provides pkg-config modules:
+
+ # GeoTIFF file format library
+ libgeotiff
diff --git a/vcpkg/ports/libgeotiff/vcpkg.json b/vcpkg/ports/libgeotiff/vcpkg.json
new file mode 100644
index 0000000..6da33e2
--- /dev/null
+++ b/vcpkg/ports/libgeotiff/vcpkg.json
@@ -0,0 +1,36 @@
+{
+ "name": "libgeotiff",
+ "version": "1.7.4",
+ "description": "Libgeotiff is an open source library on top of libtiff for reading and writing GeoTIFF information tags.",
+ "homepage": "https://github.com/OSGeo/libgeotiff",
+ "license": "MIT",
+ "dependencies": [
+ {
+ "name": "proj",
+ "default-features": false,
+ "features": [
+ "tiff"
+ ]
+ },
+ {
+ "name": "tiff",
+ "default-features": false
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "tools": {
+ "description": "Install libgeotiff utility programs",
+ "dependencies": [
+ "libjpeg-turbo"
+ ]
+ }
+ }
+}