diff options
| -rw-r--r-- | ports/gdal/CONTROL | 2 | ||||
| -rw-r--r-- | ports/proj/CONTROL | 5 | ||||
| -rw-r--r-- | ports/proj/portfile.cmake | 58 | ||||
| -rw-r--r-- | ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch (renamed from ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch) | 0 | ||||
| -rw-r--r-- | ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch (renamed from ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch) | 0 | ||||
| -rw-r--r-- | ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch (renamed from ports/proj/0003-CMake-configurable-cmake-config-install-location.patch) | 0 | ||||
| -rw-r--r-- | ports/proj4/CONTROL | 3 | ||||
| -rw-r--r-- | ports/proj4/portfile.cmake | 68 | ||||
| -rw-r--r-- | ports/vtk/CONTROL | 2 |
9 files changed, 77 insertions, 61 deletions
diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index 868a5e929..083a52800 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,4 +1,4 @@ Source: gdal Version: 1.11.3-5 Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. -Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma +Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma 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)
diff --git a/ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch b/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch index 9be5438aa..9be5438aa 100644 --- a/ports/proj/0001-CMake-add-detection-of-recent-visual-studio-versions.patch +++ b/ports/proj4/0001-CMake-add-detection-of-recent-visual-studio-versions.patch diff --git a/ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch b/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch index 2c470570e..2c470570e 100644 --- a/ports/proj/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch +++ b/ports/proj4/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch diff --git a/ports/proj/0003-CMake-configurable-cmake-config-install-location.patch b/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch index 5870e12ea..5870e12ea 100644 --- a/ports/proj/0003-CMake-configurable-cmake-config-install-location.patch +++ b/ports/proj4/0003-CMake-configurable-cmake-config-install-location.patch diff --git a/ports/proj4/CONTROL b/ports/proj4/CONTROL new file mode 100644 index 000000000..cf2519b12 --- /dev/null +++ b/ports/proj4/CONTROL @@ -0,0 +1,3 @@ +Source: proj4 +Version: 4.9.3-1 +Description: PROJ.4 library for cartographic projections diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake new file mode 100644 index 000000000..626d6b2e4 --- /dev/null +++ b/ports/proj4/portfile.cmake @@ -0,0 +1,68 @@ +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/proj4 + -DPROJ_CMAKE_CONFIG_SUBDIR=share/proj4 + -DBUILD_CS2CS=NO + -DBUILD_PROJ=NO + -DBUILD_GEOD=NO + -DBUILD_NAD2BIN=NO + -DPROJ4_TESTS=NO +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/proj4) + +# Rename library and adapt cmake configuration +file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake _contents) +string(REPLACE "proj_4_9.lib" "proj.lib" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake "${_contents}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake _contents) +string(REPLACE "proj_4_9_d.lib" "projd.lib" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake "${_contents}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake _contents) +string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" + "set(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}\")\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents "${_contents}" +) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake "${_contents}") + +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/proj4) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/proj4/COPYING ${CURRENT_PACKAGES_DIR}/share/proj4/copyright) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index fdf8d42c4..284ccecd3 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,4 +1,4 @@ Source: vtk Version: 8.0.0-2 Description: Software system for 3D computer graphics, image processing, and visualization -Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj, lz4, libtheora +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, qt5, msmpi, libjpeg-turbo, proj4, lz4, libtheora |
