Skip to content

Commit acca474

Browse files
authored
[lerc] Update to 3.0, move config to unofficial (#24634)
* Update to 3.0 * Modernize portfile * Install NOTICE as required by license * Move CMake config to unofficial namespace The target name changed, so old configs would break anyways, without polyfill. The unofficial namespace reflects such risks. * Add include path to CMake config * Update versions
1 parent a6a97cd commit acca474

7 files changed

Lines changed: 37 additions & 63 deletions

File tree

ports/lerc/create_package.patch

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
1-
CMakeLists.txt | 8 +++++++-
2-
1 file changed, 7 insertions(+), 1 deletion(-)
3-
41
diff --git a/CMakeLists.txt b/CMakeLists.txt
52
index e90fcdd..17c79e8 100644
63
--- a/CMakeLists.txt
74
+++ b/CMakeLists.txt
8-
@@ -17,7 +17,7 @@ add_library(LercLib ${SOURCES})
9-
target_link_libraries (LercLib)
5+
@@ -26,9 +26,16 @@ add_library(LercLib ${SOURCES})
6+
endif()
107

118
install(
12-
- TARGETS LercLib
13-
+ TARGETS LercLib EXPORT LercTargets
9+
TARGETS Lerc
10+
+ EXPORT LercTargets
1411
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
1512
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1613
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
17-
@@ -28,3 +28,9 @@ install(
18-
FILES "include/Lerc_types.h" "include/Lerc_c_api.h"
19-
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
14+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
2015
)
21-
+
16+
+target_include_directories(Lerc PUBLIC "$<INSTALL_INTERFACE:include>")
2217
+install(EXPORT LercTargets
23-
+ FILE lercConfig.cmake
24-
+ NAMESPACE Esri::
25-
+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/lerc"
18+
+ FILE unofficial-lerc-config.cmake
19+
+ NAMESPACE unofficial::Lerc::
20+
+ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/unofficial-lerc"
2621
+)

ports/lerc/enable_static_build.patch

Lines changed: 0 additions & 16 deletions
This file was deleted.

ports/lerc/install_lib_to_archive_path.patch

Lines changed: 0 additions & 16 deletions
This file was deleted.

ports/lerc/portfile.cmake

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
vcpkg_from_github(
22
OUT_SOURCE_PATH SOURCE_PATH
33
REPO Esri/lerc
4-
REF v2.2
5-
SHA512 5ddf1e8f0c123d3c1329e980021e25e6ff9b79c96588115e5b48ba7637f0b2bf3ebb2ab6ebf94cfbde45ea1521f14405f669e23f0b74d9ae8f9b2cf80a908215
4+
REF v3.0
5+
SHA512 8e04d890c4d46528641b354ec3f47f2b0563e1740927ac894925a30f7de2b235cb3517ce7e477886bd3eb50ebd6c6e78f22d73d5500877e552d9e684e626293b
66
HEAD_REF master
77
PATCHES
8-
"install_lib_to_archive_path.patch"
9-
"enable_static_build.patch"
108
"create_package.patch"
119
)
1210

13-
vcpkg_configure_cmake(
14-
SOURCE_PATH ${SOURCE_PATH}
15-
PREFER_NINJA
11+
vcpkg_cmake_configure(
12+
SOURCE_PATH "${SOURCE_PATH}"
1613
)
17-
18-
vcpkg_install_cmake()
19-
vcpkg_fixup_cmake_targets()
14+
vcpkg_cmake_install()
15+
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-lerc)
2016

2117
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
2218

23-
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
24-
19+
file(INSTALL "${SOURCE_PATH}/NOTICE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
20+
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

ports/lerc/vcpkg.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
{
22
"name": "lerc",
3-
"version-string": "2.2",
4-
"port-version": 2,
3+
"version": "3.0",
54
"description": "An open-source image or raster format which supports rapid encoding and decoding for any pixel type",
6-
"homepage": "https://github.com/Esri/lerc"
5+
"homepage": "https://github.com/Esri/lerc",
6+
"license": "Apache-2.0",
7+
"dependencies": [
8+
{
9+
"name": "vcpkg-cmake",
10+
"host": true
11+
},
12+
{
13+
"name": "vcpkg-cmake-config",
14+
"host": true
15+
}
16+
]
717
}

versions/baseline.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3369,8 +3369,8 @@
33693369
"port-version": 0
33703370
},
33713371
"lerc": {
3372-
"baseline": "2.2",
3373-
"port-version": 2
3372+
"baseline": "3.0",
3373+
"port-version": 0
33743374
},
33753375
"lest": {
33763376
"baseline": "1.35.1",

versions/l-/lerc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "3037b9fd610059bc84e89607a3e58aa13641cdd8",
5+
"version": "3.0",
6+
"port-version": 0
7+
},
38
{
49
"git-tree": "81c91f19fa142f53370b1a7ecac53fd2ba10aaf6",
510
"version-string": "2.2",

0 commit comments

Comments
 (0)