mirror of
https://github.com/microsoft/vcpkg.git
synced 2026-01-18 01:11:23 +01:00
[libversion] add new port (#48066)
This commit is contained in:
14
ports/libversion/disable-test.patch
Normal file
14
ports/libversion/disable-test.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5309a30..f5fafa6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
|
||||
project(libversion VERSION 3.0.4)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
-enable_testing()
|
||||
|
||||
# subdirs
|
||||
add_subdirectory(libversion)
|
||||
-add_subdirectory(tests)
|
||||
-add_subdirectory(utils)
|
||||
22
ports/libversion/portfile.cmake
Normal file
22
ports/libversion/portfile.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO repology/libversion
|
||||
REF ${VERSION}
|
||||
SHA512 5be723103f33d764ad9c426fb915144d7ab0ca0de9c2650099060a543d01184c68d0849325d964b4815372ae9d71c9dbcb114049828ccd87d6dd6ad186d91fee
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
disable-test.patch
|
||||
separate-build-type.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libversion)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
18
ports/libversion/separate-build-type.patch
Normal file
18
ports/libversion/separate-build-type.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
diff --git a/libversion/CMakeLists.txt b/libversion/CMakeLists.txt
|
||||
index 52a6ba7..71760dc 100644
|
||||
--- a/libversion/CMakeLists.txt
|
||||
+++ b/libversion/CMakeLists.txt
|
||||
@@ -89,8 +89,11 @@ install(FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/export.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libversion
|
||||
)
|
||||
-install(TARGETS libversion libversion_static EXPORT libversion)
|
||||
-
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+install(TARGETS libversion EXPORT libversion)
|
||||
+else()
|
||||
+install(TARGETS libversion_static EXPORT libversion)
|
||||
+endif()
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libversion.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
|
||||
install(EXPORT libversion NAMESPACE libversion:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libversion FILE libversionConfig.cmake)
|
||||
17
ports/libversion/vcpkg.json
Normal file
17
ports/libversion/vcpkg.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "libversion",
|
||||
"version": "3.0.4",
|
||||
"description": "Advanced version string comparison library",
|
||||
"homepage": "https://github.com/repology/libversion",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5676,6 +5676,10 @@
|
||||
"baseline": "0.63.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"libversion": {
|
||||
"baseline": "3.0.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"libvhdi": {
|
||||
"baseline": "20231127",
|
||||
"port-version": 0
|
||||
|
||||
9
versions/l-/libversion.json
Normal file
9
versions/l-/libversion.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "0f42989b5eede826f634ebd8fc463b27f41b0f69",
|
||||
"version": "3.0.4",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user