diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2018-02-20 15:31:38 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-20 15:31:38 -0800 |
| commit | 4bf37bb3b3a190451370ec2610de8c36ecf5a874 (patch) | |
| tree | 6faa8b235c7e7e55ca5b9a14c0611f1c11c9d954 | |
| parent | 536ddf4bd41a48091075d55c48a8a3e1fd5242bb (diff) | |
| parent | 67d3662845ce2613b1788731a62f017d536c49e6 (diff) | |
| download | vcpkg-4bf37bb3b3a190451370ec2610de8c36ecf5a874.tar.gz vcpkg-4bf37bb3b3a190451370ec2610de8c36ecf5a874.zip | |
Merge pull request #2831 from miurahr/libgeotiff_fix_xtiff
[Libgeotiff] fix xtiff error
| -rw-r--r-- | ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch | 88 | ||||
| -rw-r--r-- | ports/libgeotiff/0002-Fix-directory-output.patch | 28 | ||||
| -rw-r--r-- | ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch (renamed from ports/libgeotiff/fix-cmake-tiff-detection.patch) | 23 | ||||
| -rw-r--r-- | ports/libgeotiff/0004-Fix-libxtiff-installation.patch | 64 | ||||
| -rw-r--r-- | ports/libgeotiff/0005-Control-shared-library-build-with-option.patch | 34 | ||||
| -rw-r--r-- | ports/libgeotiff/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libgeotiff/fix-directory-output.patch | 14 | ||||
| -rw-r--r-- | ports/libgeotiff/portfile.cmake | 8 |
8 files changed, 240 insertions, 21 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 new file mode 100644 index 000000000..93476fd2f --- /dev/null +++ b/ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch @@ -0,0 +1,88 @@ +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 new file mode 100644 index 000000000..d6b79e54c --- /dev/null +++ b/ports/libgeotiff/0002-Fix-directory-output.patch @@ -0,0 +1,28 @@ +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/fix-cmake-tiff-detection.patch b/ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch index 166aa7d44..14929e10c 100644 --- a/ports/libgeotiff/fix-cmake-tiff-detection.patch +++ b/ports/libgeotiff/0003-Fix-cmake-TIFF-detection.patch @@ -1,6 +1,18 @@ ---- a/CMakeLists.txt 2016-08-12 00:40:12.000000000 +0900 -+++ b/CMakeLists.txt 2018-02-09 13:27:05.721561755 +0900 -@@ -192,7 +192,8 @@ +From bc0003ab3d94f271b27f6897259b734709a5d6cf Mon Sep 17 00:00:00 2001 +From: Hiroshi Miura <miurahr@linux.com> +Date: Wed, 14 Feb 2018 12:32:11 +0900 +Subject: [PATCH 3/5] Fix cmake TIFF detection + +Signed-off-by: Hiroshi Miura <miurahr@linux.com> +--- + CMakeLists.txt | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 55ececf..1e2fe3d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -191,7 +191,8 @@ IF(WITH_TIFF) IF(TIFF_FOUND) # Confirm required API is available INCLUDE(CheckFunctionExists) @@ -10,7 +22,7 @@ CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) IF(NOT HAVE_TIFFOPEN) -@@ -205,7 +206,7 @@ +@@ -204,7 +205,7 @@ IF(WITH_TIFF) 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() @@ -19,3 +31,6 @@ INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) ADD_DEFINITIONS(-DHAVE_TIFF=1) ENDIF(TIFF_FOUND) +-- +2.16.1 + diff --git a/ports/libgeotiff/0004-Fix-libxtiff-installation.patch b/ports/libgeotiff/0004-Fix-libxtiff-installation.patch new file mode 100644 index 000000000..f7da51ab0 --- /dev/null +++ b/ports/libgeotiff/0004-Fix-libxtiff-installation.patch @@ -0,0 +1,64 @@ +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 new file mode 100644 index 000000000..ed9a4e88a --- /dev/null +++ b/ports/libgeotiff/0005-Control-shared-library-build-with-option.patch @@ -0,0 +1,34 @@ +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/CONTROL b/ports/libgeotiff/CONTROL index f9fb872bb..e737058e8 100644 --- a/ports/libgeotiff/CONTROL +++ b/ports/libgeotiff/CONTROL @@ -1,4 +1,4 @@ Source: libgeotiff -Version: 1.4.2-1 +Version: 1.4.2-2 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/fix-directory-output.patch b/ports/libgeotiff/fix-directory-output.patch deleted file mode 100644 index 82032daa1..000000000 --- a/ports/libgeotiff/fix-directory-output.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -urN a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt ---- a/cmake/CMakeLists.txt 2016-08-12 00:40:10.000000000 +0900 -+++ b/cmake/CMakeLists.txt 2018-02-09 07:12:40.422110239 +0900 -@@ -10,8 +10,8 @@ - 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) diff --git a/ports/libgeotiff/portfile.cmake b/ports/libgeotiff/portfile.cmake index 443c07acb..8f78edf4d 100644 --- a/ports/libgeotiff/portfile.cmake +++ b/ports/libgeotiff/portfile.cmake @@ -13,8 +13,12 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch" - "${CMAKE_CURRENT_LIST_DIR}/fix-cmake-tiff-detection.patch") + PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch" + "${CMAKE_CURRENT_LIST_DIR}/0002-Fix-directory-output.patch" + "${CMAKE_CURRENT_LIST_DIR}/0003-Fix-cmake-TIFF-detection.patch" + "${CMAKE_CURRENT_LIST_DIR}/0004-Fix-libxtiff-installation.patch" + "${CMAKE_CURRENT_LIST_DIR}/0005-Control-shared-library-build-with-option.patch" +) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(BUILD_SHARED_LIBS ON) |
