Skip to content

Commit 46a114b

Browse files
authored
[libversion] add new port (microsoft#48066)
1 parent 36e8657 commit 46a114b

File tree

6 files changed

+84
-0
lines changed

6 files changed

+84
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 5309a30..f5fafa6 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
6+
project(libversion VERSION 3.0.4)
7+
8+
include(GNUInstallDirs)
9+
-enable_testing()
10+
11+
# subdirs
12+
add_subdirectory(libversion)
13+
-add_subdirectory(tests)
14+
-add_subdirectory(utils)

ports/libversion/portfile.cmake

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
vcpkg_from_github(
2+
OUT_SOURCE_PATH SOURCE_PATH
3+
REPO repology/libversion
4+
REF ${VERSION}
5+
SHA512 5be723103f33d764ad9c426fb915144d7ab0ca0de9c2650099060a543d01184c68d0849325d964b4815372ae9d71c9dbcb114049828ccd87d6dd6ad186d91fee
6+
HEAD_REF master
7+
PATCHES
8+
disable-test.patch
9+
separate-build-type.patch
10+
)
11+
12+
vcpkg_cmake_configure(
13+
SOURCE_PATH "${SOURCE_PATH}"
14+
)
15+
16+
vcpkg_cmake_install()
17+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libversion)
18+
vcpkg_fixup_pkgconfig()
19+
20+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
21+
22+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/libversion/CMakeLists.txt b/libversion/CMakeLists.txt
2+
index 52a6ba7..71760dc 100644
3+
--- a/libversion/CMakeLists.txt
4+
+++ b/libversion/CMakeLists.txt
5+
@@ -89,8 +89,11 @@ install(FILES
6+
${CMAKE_CURRENT_BINARY_DIR}/export.h
7+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libversion
8+
)
9+
-install(TARGETS libversion libversion_static EXPORT libversion)
10+
-
11+
+if(BUILD_SHARED_LIBS)
12+
+install(TARGETS libversion EXPORT libversion)
13+
+else()
14+
+install(TARGETS libversion_static EXPORT libversion)
15+
+endif()
16+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libversion.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
17+
18+
install(EXPORT libversion NAMESPACE libversion:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libversion FILE libversionConfig.cmake)

ports/libversion/vcpkg.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "libversion",
3+
"version": "3.0.4",
4+
"description": "Advanced version string comparison library",
5+
"homepage": "https://github.com/repology/libversion",
6+
"license": "MIT",
7+
"dependencies": [
8+
{
9+
"name": "vcpkg-cmake",
10+
"host": true
11+
},
12+
{
13+
"name": "vcpkg-cmake-config",
14+
"host": true
15+
}
16+
]
17+
}

versions/baseline.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5676,6 +5676,10 @@
56765676
"baseline": "0.63.0",
56775677
"port-version": 0
56785678
},
5679+
"libversion": {
5680+
"baseline": "3.0.4",
5681+
"port-version": 0
5682+
},
56795683
"libvhdi": {
56805684
"baseline": "20231127",
56815685
"port-version": 0

versions/l-/libversion.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"versions": [
3+
{
4+
"git-tree": "0f42989b5eede826f634ebd8fc463b27f41b0f69",
5+
"version": "3.0.4",
6+
"port-version": 0
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)