Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions ports/libgeotiff/0007-Fix-install-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 409c34f..692704d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -298,7 +298,7 @@ SET(GEOTIFF_MAN_PAGES

# ${PROJECT_BINARY_DIR}/geotiff_version.h

-IF(WIN32)
+IF(0)
SET(DEFAULT_LIB_SUBDIR lib)
SET(DEFAULT_DATA_SUBDIR .)
SET(DEFAULT_INCLUDE_SUBDIR include)
@@ -313,6 +313,7 @@ ELSE()
SET(DEFAULT_BIN_SUBDIR bin)
SET(DEFAULT_LIB_SUBDIR lib)
SET(DEFAULT_DATA_SUBDIR share)
+ SET(DEFAULT_TOOLS_SUBDIR tools)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to make the path tools/libgeotiff or tools/geotiff.
That way we don't have to add special handling in the portfile.

SET(DEFAULT_INCLUDE_SUBDIR include)
ENDIF()

@@ -326,20 +327,23 @@ SET(GEOTIFF_INCLUDE_SUBDIR ${DEFAULT_INCLUDE_SUBDIR} CACHE STRING
"Subdirectory where header files will be installed")
SET(GEOTIFF_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING
"Subdirectory where data will be installed")
+SET(GEOTIFF_TOOLS_SUBDIR ${DEFAULT_TOOLS_SUBDIR} CACHE STRING
+ "Subdirectory where data will be installed")

# Mark *_SUBDIR variables as advanced and dedicated to use by power-users only.
-MARK_AS_ADVANCED(GEOTIFF_BIN_SUBDIR GEOTIFF_LIB_SUBDIR GEOTIFF_INCLUDE_SUBDIR GEOTIFF_DATA_SUBDIR)
+MARK_AS_ADVANCED(GEOTIFF_BIN_SUBDIR GEOTIFF_LIB_SUBDIR GEOTIFF_INCLUDE_SUBDIR GEOTIFF_DATA_SUBDIR GEOTIFF_TOOLS_SUBDIR)

# Full paths for the installation
SET(GEOTIFF_BIN_DIR ${GEOTIFF_BIN_SUBDIR})
SET(GEOTIFF_LIB_DIR ${GEOTIFF_LIB_SUBDIR})
SET(GEOTIFF_INCLUDE_DIR ${GEOTIFF_INCLUDE_SUBDIR})
SET(GEOTIFF_DATA_DIR ${GEOTIFF_DATA_SUBDIR})
+SET(GEOTIFF_TOOLS_DIR ${GEOTIFF_TOOLS_SUBDIR})

# Install doc files
INSTALL(FILES
AUTHORS ChangeLog COPYING INSTALL LICENSE README README_BIN README.WIN
- DESTINATION doc)
+ DESTINATION share/libgeotiff)
# DESTINATION ${GEOTIFF_DATA_DIR}/doc)

# Install CSV data files
diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt
index 6c6cc21..6bfc3b9 100644
--- a/bin/CMakeLists.txt
+++ b/bin/CMakeLists.txt
@@ -35,6 +35,6 @@ MESSAGE(STATUS "Adding GeoTIFF utilities to build - done: ${GEOTIFF_UTILITIES}")
# Targets installation

INSTALL(TARGETS ${GEOTIFF_UTILITIES}
- RUNTIME DESTINATION ${GEOTIFF_BIN_DIR}
+ RUNTIME DESTINATION ${GEOTIFF_TOOLS_DIR}
LIBRARY DESTINATION ${GEOTIFF_LIB_DIR}
ARCHIVE DESTINATION ${GEOTIFF_LIB_DIR})
29 changes: 6 additions & 23 deletions ports/libgeotiff/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ vcpkg_extract_source_archive_ex(
0004-Fix-libxtiff-installation.patch
0005-Control-shared-library-build-with-option.patch
0006-Fix-utility-link-error.patch
0007-Fix-install-path.patch
geotiff-config.patch
)

Expand Down Expand Up @@ -46,29 +47,11 @@ else()
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)

if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*)
else()
file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
endif()

file(COPY ${GEOTIFF_UTILS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/libgeotiff)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libgeotiff)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/GeoTIFF TARGET_PATH share/libgeotiff)

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"))
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
endif()
vcpkg_copy_pdbs()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libgeotiff/*.exe ${CURRENT_PACKAGES_DIR}/debug/tools/libgeotiff/*.exe)

# 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)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)

vcpkg_copy_pdbs()
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgeotiff/COPYING ${CURRENT_PACKAGES_DIR}/share/libgeotiff/copyright)