From 9a6b6dabb4926a42098226b4fe5c7f6609ce2560 Mon Sep 17 00:00:00 2001 From: maz-1 Date: Sat, 12 Mar 2022 03:20:00 +0800 Subject: [PATCH] [ois] fix pkgconfig file not installed on windows (#23426) * [ois] fix pkgconfig file not installed on windows * fix debug suffix --- ports/ois/0001_install_pkgconfig_win32.patch | 29 ++++++++++++++++++++ ports/ois/portfile.cmake | 2 ++ ports/ois/vcpkg.json | 2 ++ versions/baseline.json | 2 +- versions/o-/ois.json | 5 ++++ 5 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 ports/ois/0001_install_pkgconfig_win32.patch diff --git a/ports/ois/0001_install_pkgconfig_win32.patch b/ports/ois/0001_install_pkgconfig_win32.patch new file mode 100644 index 0000000000..2568e3f7c9 --- /dev/null +++ b/ports/ois/0001_install_pkgconfig_win32.patch @@ -0,0 +1,29 @@ +diff -Naur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2021-05-14 03:09:42.000000000 +0800 ++++ b/CMakeLists.txt 2022-03-08 12:48:17.012589000 +0800 +@@ -255,7 +255,12 @@ + install(FILES $ DESTINATION bin OPTIONAL) + endif(MSVC AND BUILD_SHARED_LIBS) + +-if(UNIX) +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/OIS.pc.in ${CMAKE_BINARY_DIR}/OIS.pc @ONLY) +- install(FILES ${CMAKE_BINARY_DIR}/OIS.pc DESTINATION ${OIS_LIB_DIRECTORY}/pkgconfig) ++if (CMAKE_DEBUG_POSTFIX AND CMAKE_BUILD_TYPE STREQUAL "Debug") ++ set(OIS_POSTFIX ${CMAKE_DEBUG_POSTFIX}) ++else() ++ set(OIS_POSTFIX "") + endif() ++ ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/OIS.pc.in ${CMAKE_BINARY_DIR}/OIS.pc @ONLY) ++install(FILES ${CMAKE_BINARY_DIR}/OIS.pc DESTINATION ${OIS_LIB_DIRECTORY}/pkgconfig) ++ +diff -Naur a/OIS.pc.in b/OIS.pc.in +--- a/OIS.pc.in 2021-05-14 03:09:42.000000000 +0800 ++++ b/OIS.pc.in 2022-03-08 12:48:33.599696300 +0800 +@@ -6,5 +6,5 @@ + Name: OIS + Description: Cross platform C++ Input Framework + Version: @OIS_VERSION@ +-Libs: -L${libdir} -lOIS ++Libs: -L${libdir} -lOIS@OIS_POSTFIX@ + Cflags: -I${includedir} -I${includedir}/ois diff --git a/ports/ois/portfile.cmake b/ports/ois/portfile.cmake index 69e24c4393..e7b5d2bce0 100644 --- a/ports/ois/portfile.cmake +++ b/ports/ois/portfile.cmake @@ -4,6 +4,8 @@ vcpkg_from_github( REF v1.5.1 SHA512 20598aef999a70900cb7f75ffaf62059acf8e811822971cb21986b5d25d28dacb79e4b4cf4770c70e00d3c55cdd01ef3e68a77c2dd148677784fc4df38891340 HEAD_REF master + PATCHES + 0001_install_pkgconfig_win32.patch ) vcpkg_cmake_configure( diff --git a/ports/ois/vcpkg.json b/ports/ois/vcpkg.json index 9daa139ed5..c73ac9131e 100644 --- a/ports/ois/vcpkg.json +++ b/ports/ois/vcpkg.json @@ -1,8 +1,10 @@ { "name": "ois", "version": "1.5.1", + "port-version": 1, "description": "Cross Platform Object Oriented Input Lib System. Meant to be very robust and compatible with many systems and operating systems.", "homepage": "https://wgois.github.io/OIS/", + "license": "Zlib", "supports": "!(arm | arm64 | uwp)", "dependencies": [ { diff --git a/versions/baseline.json b/versions/baseline.json index 1f1a89deba..fd752abeeb 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4946,7 +4946,7 @@ }, "ois": { "baseline": "1.5.1", - "port-version": 0 + "port-version": 1 }, "ompl": { "baseline": "1.5.1", diff --git a/versions/o-/ois.json b/versions/o-/ois.json index d273f8c520..39d8df3b2b 100644 --- a/versions/o-/ois.json +++ b/versions/o-/ois.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "79d79b0c5901492572044ad873cdf4df864accea", + "version": "1.5.1", + "port-version": 1 + }, { "git-tree": "05dc4bcc0372eaa7b8a86f89a268c5ef0c69c5bf", "version": "1.5.1",