aboutsummaryrefslogtreecommitdiff
path: root/ports/proj
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-10-02 15:54:35 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-10-02 15:54:51 -0700
commit1130cc378442abd033bb99fa6dede812a5dc2825 (patch)
tree073444c8d5c05501df83b97ba1f4e9dd5804413e /ports/proj
parentd25a072c76ff81934813f20116788140621619ba (diff)
downloadvcpkg-1130cc378442abd033bb99fa6dede812a5dc2825.tar.gz
vcpkg-1130cc378442abd033bb99fa6dede812a5dc2825.zip
[proj][proj4] Rename proj to proj4. Leave empty forwarder behind.
Diffstat (limited to 'ports/proj')
-rw-r--r--ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch26
-rw-r--r--ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch52
-rw-r--r--ports/proj/0003-CMake-configurable-cmake-config-install-location.patch98
-rw-r--r--ports/proj/CONTROL5
-rw-r--r--ports/proj/portfile.cmake58
5 files changed, 4 insertions, 235 deletions
diff --git a/ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch b/ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch
deleted file mode 100644
index 9be5438aa..000000000
--- a/ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ca8bb14234091ab7b1ada2b9e5abb04f40d459cb Mon Sep 17 00:00:00 2001
-From: Manuel Massing <Manuel Massing m.massing@warped-space.de>
-Date: Tue, 22 Nov 2016 12:00:39 +0100
-Subject: [PATCH 1/3] CMake: add detection of recent visual studio versions
-
----
- cmake/Proj4SystemInfo.cmake | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/cmake/Proj4SystemInfo.cmake b/cmake/Proj4SystemInfo.cmake
-index 294a50b..c7fb6bf 100644
---- a/cmake/Proj4SystemInfo.cmake
-+++ b/cmake/Proj4SystemInfo.cmake
-@@ -50,6 +50,9 @@ if(WIN32)
- if(MSVC_VERSION EQUAL 1800)
- set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013
- endif()
-+ if(MSVC_VERSION EQUAL 1900)
-+ set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015
-+ endif()
- endif(MSVC)
-
- if(MINGW)
---
-2.9.2.windows.1
-
diff --git a/ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch b/ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
deleted file mode 100644
index 2c470570e..000000000
--- a/ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 1265d13f29259be05535241e9bcbfcf16857dc06 Mon Sep 17 00:00:00 2001
-From: Manuel Massing <Manuel Massing m.massing@warped-space.de>
-Date: Tue, 22 Nov 2016 12:04:10 +0100
-Subject: [PATCH 2/3] CMake: fix error by only setting properties for targets
- which are actually defined
-
----
- src/CMakeLists.txt | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 8d7e7d1..59ad00a 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -22,25 +22,30 @@ if(NOT MSVC)
- endif ()
- endif ()
-
-+
- if(BUILD_CS2CS)
-- include(bin_cs2cs.cmake)
-+ list(APPEND BINARY_TARGETS cs2cs)
-+ include(bin_cs2cs.cmake)
- endif(BUILD_CS2CS)
-
- if(BUILD_PROJ)
-+ list(APPEND BINARY_TARGETS proj)
- include(bin_proj.cmake)
- endif(BUILD_PROJ)
-
- if(BUILD_GEOD)
-+ list(APPEND BINARY_TARGETS geod)
- include(bin_geod.cmake)
- include(bin_geodtest.cmake)
- endif(BUILD_GEOD)
-
- if(BUILD_NAD2BIN)
-+ list(APPEND BINARY_TARGETS nad2bin)
- include(bin_nad2bin.cmake)
- endif(BUILD_NAD2BIN)
-
--if (MSVC OR CMAKE_CONFIGURATION_TYPES)
-+if ((MSVC OR CMAKE_CONFIGURATION_TYPES) AND BINARY_TARGETS)
- # Add _d suffix for your debug versions of the tools
-- set_target_properties (cs2cs binproj geod nad2bin PROPERTIES
-- DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
-+ set_target_properties(${BINARY_TARGETS} PROPERTIES
-+ DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
- endif ()
---
-2.9.2.windows.1
-
diff --git a/ports/proj/0003-CMake-configurable-cmake-config-install-location.patch b/ports/proj/0003-CMake-configurable-cmake-config-install-location.patch
deleted file mode 100644
index 5870e12ea..000000000
--- a/ports/proj/0003-CMake-configurable-cmake-config-install-location.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 0be627798d943558c674d4d92767ca255d847631 Mon Sep 17 00:00:00 2001
-From: Manuel Massing <Manuel Massing m.massing@warped-space.de>
-Date: Tue, 22 Nov 2016 12:26:39 +0100
-Subject: [PATCH 3/3] CMake: configurable cmake config install location
-
----
- CMakeLists.txt | 1 +
- cmake/CMakeLists.txt | 14 +++++++-------
- cmake/Proj4InstallPath.cmake | 12 +++++++++---
- 3 files changed, 17 insertions(+), 10 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index cde21f0..1b1f892 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -106,6 +106,7 @@ set(LIBDIR "${DEFAULT_LIBDIR}" CACHE PATH "The directory to install libraries in
- set(DATADIR "${DEFAULT_DATADIR}" CACHE PATH "The directory to install data files into.")
- set(DOCDIR "${DEFAULT_DOCDIR}" CACHE PATH "The directory to install doc files into.")
- set(INCLUDEDIR "${DEFAULT_INCLUDEDIR}" CACHE PATH "The directory to install includes into.")
-+set(CMAKEDIR "${DEFAULT_CMAKE_CONFIGDIR}" CACHE PATH "The directory to install cmake files into.")
-
- #################################################################################
- # Build configured components
-diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
-index 742da0e..2bdef0d 100644
---- a/cmake/CMakeLists.txt
-+++ b/cmake/CMakeLists.txt
-@@ -2,13 +2,13 @@
- # ${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 ${CMAKEDIR})
-+if(NOT IS_ABSOLUTE ${INSTALL_CMAKE_DIR})
-+ set(INSTALL_CMAKE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKEDIR}")
-+endif()
-+
-+file(RELATIVE_PATH PROJECT_ROOT_DIR ${INSTALL_CMAKE_DIR} ${CMAKE_INSTALL_PREFIX})
-
- string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
- configure_file (project-config.cmake.in project-config.cmake @ONLY)
-diff --git a/cmake/Proj4InstallPath.cmake b/cmake/Proj4InstallPath.cmake
-index da1491c..826fb29 100644
---- a/cmake/Proj4InstallPath.cmake
-+++ b/cmake/Proj4InstallPath.cmake
-@@ -28,13 +28,15 @@ if(WIN32)
- set(DEFAULT_DATA_SUBDIR share)
- set(DEFAULT_INCLUDE_SUBDIR local/include)
- set(DEFAULT_DOC_SUBDIR share/doc/proj)
-+ set(DEFAULT_CMAKE_CONFIG_SUBDIR "cmake")
- else()
-- # Common locatoins for Unix and Mac OS X
-+ # Common locations for Unix and Mac OS X
- set(DEFAULT_BIN_SUBDIR bin)
- set(DEFAULT_LIB_SUBDIR lib)
- set(DEFAULT_DATA_SUBDIR share/proj)
- set(DEFAULT_DOC_SUBDIR doc/proj)
- set(DEFAULT_INCLUDE_SUBDIR include)
-+ set(DEFAULT_CMAKE_CONFIG_SUBDIR "share/cmake/${PROJECT_NAME}")
- endif()
-
- # Locations are changeable by user to customize layout of PDAL installation
-@@ -49,19 +51,23 @@ set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING
- "Subdirectory where data will be installed")
- set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING
- "Subdirectory where data will be installed")
--
-+set(PROJ_CMAKE_CONFIG_SUBDIR ${DEFAULT_CMAKE_CONFIG_SUBDIR} CACHE STRING
-+ "Subdirectory where cmake configuration files will be installed")
-+
- # Mark *DIR variables as advanced and dedicated to use by power-users only.
- mark_as_advanced(PROJ_ROOT_DIR
- PROJ_BIN_SUBDIR
- PROJ_LIB_SUBDIR
- PROJ_INCLUDE_SUBDIR
- PROJ_DATA_SUBDIR
-- PROJ_DOC_SUBDIR )
-+ PROJ_DOC_SUBDIR
-+ PROJ_CMAKE_CONFIG_SUBDIR)
-
- set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}")
- set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}")
- set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}")
- set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}")
- set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}")
-+set(DEFAULT_CMAKE_CONFIGDIR "${PROJ_CMAKE_CONFIG_SUBDIR}")
-
-
---
-2.9.2.windows.1
-
diff --git a/ports/proj/CONTROL b/ports/proj/CONTROL
index 695fa53ce..d6c204fda 100644
--- a/ports/proj/CONTROL
+++ b/ports/proj/CONTROL
@@ -1,3 +1,4 @@
Source: proj
-Version: 4.9.3-1
-Description: PROJ.4 library for cartographic projections
+Version: 0
+Description: a stub package that pulls in proj4. Do not depend on this package.
+Build-Depends: proj4
diff --git a/ports/proj/portfile.cmake b/ports/proj/portfile.cmake
index 6007ab62a..cc6e26fcb 100644
--- a/ports/proj/portfile.cmake
+++ b/ports/proj/portfile.cmake
@@ -1,57 +1 @@
-include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/proj-4.9.3)
-vcpkg_download_distfile(ARCHIVE
- URLS "http://download.osgeo.org/proj/proj-4.9.3.zip"
- FILENAME "proj-4.9.3.zip"
- SHA512 c9703008cd1f75fe1239b180158e560b9b88ae2ffd900b72923c716908eb86d1abbc4230647af5e3131f8c34481bdc66b03826d669620161ffcfbe67801cb631
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}/
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/0001-CMake-add-detection-of-recent-visual-studio-versions.patch
- ${CMAKE_CURRENT_LIST_DIR}/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
- ${CMAKE_CURRENT_LIST_DIR}/0003-CMake-configurable-cmake-config-install-location.patch
-)
-
-if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=YES")
-else()
- list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=NO")
-endif()
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- OPTIONS ${CMAKE_OPTIONS}
- -DPROJ_LIB_SUBDIR=lib
- -DPROJ_INCLUDE_SUBDIR=include
- -DPROJ_DATA_SUBDIR=share/proj
- -DPROJ_CMAKE_CONFIG_SUBDIR=share/proj
- -DBUILD_CS2CS=NO
- -DBUILD_PROJ=NO
- -DBUILD_GEOD=NO
- -DBUILD_NAD2BIN=NO
- -DPROJ4_TESTS=NO
-)
-
-vcpkg_install_cmake()
-
-
-# Rename library and adapt cmake configuration
-# N.B. debug cmake export is not copied, as it's not relocatable
-file(READ ${CURRENT_PACKAGES_DIR}/share/proj/proj4-targets-release.cmake PROJ4_TARGETS_RELEASE)
-string(REPLACE "proj_4_9.lib" "proj.lib" PROJ4_TARGETS_RELEASE ${PROJ4_TARGETS_RELEASE})
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj/proj4-targets-release.cmake ${PROJ4_TARGETS_RELEASE})
-
-file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib)
-file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib)
-
-# Remove duplicate headers installed from debug build
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-# Remove data installed from debug build
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-
-# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/proj)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/proj/COPYING ${CURRENT_PACKAGES_DIR}/share/proj/copyright)
+SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)