aboutsummaryrefslogtreecommitdiff
path: root/ports/liblas
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2019-11-22 09:47:40 -0800
committerGitHub <noreply@github.com>2019-11-22 09:47:40 -0800
commit45f4b820e5743b89bca3508ba2028cdd5d8bbd17 (patch)
treef874a8c4a7392309bdbb86447288597ec0a4a281 /ports/liblas
parent62d67d3bf8eeff1afa8009041fd08b8822676b7b (diff)
parent8831e8f25f1ff6546ee4a5291b91d599421637b3 (diff)
downloadvcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.tar.gz
vcpkg-45f4b820e5743b89bca3508ba2028cdd5d8bbd17.zip
Merge branch 'master' into vcpkg_nuget
Diffstat (limited to 'ports/liblas')
-rw-r--r--ports/liblas/CONTROL12
-rw-r--r--ports/liblas/fix-BuildError.patch33
-rw-r--r--ports/liblas/portfile.cmake49
3 files changed, 94 insertions, 0 deletions
diff --git a/ports/liblas/CONTROL b/ports/liblas/CONTROL
new file mode 100644
index 000000000..a08401448
--- /dev/null
+++ b/ports/liblas/CONTROL
@@ -0,0 +1,12 @@
+Source: liblas
+Version: 1.8.1-3
+Build-Depends: boost, boost-thread, boost-system, boost-iostreams, boost-filesystem, libgeotiff
+Description: A C/C++ library for reading and writing the very common LAS LiDAR format.
+
+Feature: jpeg
+Description: Support for jpeg
+Build-Depends: libjpeg-turbo
+
+Feature: zlib
+Build-Depends: zlib
+Description: Support zlib for compression \ No newline at end of file
diff --git a/ports/liblas/fix-BuildError.patch b/ports/liblas/fix-BuildError.patch
new file mode 100644
index 000000000..4f9d768dc
--- /dev/null
+++ b/ports/liblas/fix-BuildError.patch
@@ -0,0 +1,33 @@
+diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
+index beb83e2..6f216bd 100644
+--- a/apps/CMakeLists.txt
++++ b/apps/CMakeLists.txt
+@@ -155,7 +152,7 @@ endif()
+ # Targets installation
+
+ install(TARGETS ${LIBLAS_UTILITIES}
+- RUNTIME DESTINATION ${LIBLAS_BIN_DIR}
++ RUNTIME DESTINATION tools
+ LIBRARY DESTINATION ${LIBLAS_LIB_DIR}
+ ARCHIVE DESTINATION ${LIBLAS_LIB_DIR})
+
+diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
+index c7f583d..ca9e602 100644
+--- a/cmake/CMakeLists.txt
++++ b/cmake/CMakeLists.txt
+@@ -5,13 +5,8 @@
+ # Set where cmake will install liblas-config.cmake. It's installed in
+ # ${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR} and ${PROJECT_ROOT_DIR}
+ # is the relative path to the root from there.
+-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 "share/cmake/${PROJECT_NAME}")
++set (PROJECT_ROOT_DIR "../../..")
+
+ # Now create the liblas-config files using the .in templates
+ configure_file (liblas-config.cmake.in
diff --git a/ports/liblas/portfile.cmake b/ports/liblas/portfile.cmake
new file mode 100644
index 000000000..32fdd7c7e
--- /dev/null
+++ b/ports/liblas/portfile.cmake
@@ -0,0 +1,49 @@
+include(vcpkg_common_functions)
+
+set(VERSION 1.8.1)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://download.osgeo.org/liblas/libLAS-${VERSION}.tar.bz2"
+ FILENAME "libLAS-${VERSION}-src.tar.bz2"
+ SHA512 1cb39c557af0006c54f1100d0d409977fcc1886abd155c1b144d806c47f8675a9f2125d3a9aca16bae65d2aabba84d5e5e322b42085e7db312f3d53f92342acf
+ HEAD_REF master
+)
+
+vcpkg_extract_source_archive_ex(
+ ARCHIVE ${ARCHIVE}
+ OUT_SOURCE_PATH SOURCE_PATH
+ PATCHES fix-BuildError.patch
+)
+
+file(REMOVE ${SOURCE_PATH}/cmake/modules/FindPROJ4.cmake)
+file(REMOVE ${SOURCE_PATH}/cmake/modules/FindGeoTIFF.cmake)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+
+ -DBUILD_OSGEO4W=OFF # Disable osgeo4w
+ -DWITH_TESTS=OFF
+ -DWITH_UTILITIES=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB}
+ -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=${CMAKE_DISABLE_FIND_PACKAGE_JPEG}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/share/cmake/libLAS/liblas-depends.cmake)
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/libLAS)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)