aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan <35282710+nazame@users.noreply.github.com>2020-09-09 13:47:16 -0600
committerGitHub <noreply@github.com>2020-09-09 12:47:16 -0700
commit765c780526dccb9a004124263f0b41aaa2d5be72 (patch)
treef7b831679ad3d5c415aa66fba19922e1e15d0ad6
parent7946a1d71ebe6ba837fcc59d5de99f746c37ac3d (diff)
downloadvcpkg-765c780526dccb9a004124263f0b41aaa2d5be72.tar.gz
vcpkg-765c780526dccb9a004124263f0b41aaa2d5be72.zip
[lerc] Add lerc port (#13358)
Co-authored-by: Nathan Mercer <nmercer@intermap.com>
-rw-r--r--ports/lerc/CONTROL4
-rw-r--r--ports/lerc/enable_static_build.patch16
-rw-r--r--ports/lerc/install_lib_to_archive_path.patch16
-rw-r--r--ports/lerc/portfile.cmake22
4 files changed, 58 insertions, 0 deletions
diff --git a/ports/lerc/CONTROL b/ports/lerc/CONTROL
new file mode 100644
index 000000000..54f928539
--- /dev/null
+++ b/ports/lerc/CONTROL
@@ -0,0 +1,4 @@
+Source: lerc
+Version: 2.2
+Homepage: https://github.com/Esri/lerc
+Description: An open-source image or raster format which supports rapid encoding and decoding for any pixel type
diff --git a/ports/lerc/enable_static_build.patch b/ports/lerc/enable_static_build.patch
new file mode 100644
index 000000000..92f0d7852
--- /dev/null
+++ b/ports/lerc/enable_static_build.patch
@@ -0,0 +1,16 @@
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d22ad11..e90fcdd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -12,7 +12,7 @@ file(GLOB SOURCES
+ )
+ message(${SOURCES})
+
+-add_library(LercLib SHARED ${SOURCES})
++add_library(LercLib ${SOURCES})
+
+ target_link_libraries (LercLib)
+
diff --git a/ports/lerc/install_lib_to_archive_path.patch b/ports/lerc/install_lib_to_archive_path.patch
new file mode 100644
index 000000000..3262a7ca5
--- /dev/null
+++ b/ports/lerc/install_lib_to_archive_path.patch
@@ -0,0 +1,16 @@
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ececeed..d22ad11 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -20,7 +20,7 @@ install(
+ TARGETS LercLib
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+- ARCHIVE DESTINATION ${CMAKE_INSTALL_BINDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
+
diff --git a/ports/lerc/portfile.cmake b/ports/lerc/portfile.cmake
new file mode 100644
index 000000000..44695d79f
--- /dev/null
+++ b/ports/lerc/portfile.cmake
@@ -0,0 +1,22 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Esri/lerc
+ REF v2.2
+ SHA512 5ddf1e8f0c123d3c1329e980021e25e6ff9b79c96588115e5b48ba7637f0b2bf3ebb2ab6ebf94cfbde45ea1521f14405f669e23f0b74d9ae8f9b2cf80a908215
+ HEAD_REF master
+ PATCHES
+ "install_lib_to_archive_path.patch"
+ "enable_static_build.patch"
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+