diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2021-05-01 02:11:21 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-30 11:11:21 -0700 |
| commit | efddfbf13e65a096146bda3580abb11a1aac5288 (patch) | |
| tree | b16c17d51d57a99d68f7f49e042dda2bea1e56c7 | |
| parent | d36f68e33664487c80dcd7d200af9f86b2cc76c6 (diff) | |
| download | vcpkg-efddfbf13e65a096146bda3580abb11a1aac5288.tar.gz vcpkg-efddfbf13e65a096146bda3580abb11a1aac5288.zip | |
[hidapi] Add support linux and osx (#17231)
* [hidapi] Add support linux and osx
* Update versions
* Remove duplicate AC_CONFIG_MACRO_DIR
* Update versions/h-/hidapi.json
| -rw-r--r-- | ports/hidapi/portfile.cmake | 18 | ||||
| -rw-r--r-- | ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch | 12 | ||||
| -rw-r--r-- | ports/hidapi/vcpkg.json | 11 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 5 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/h-/hidapi.json | 5 |
6 files changed, 44 insertions, 9 deletions
diff --git a/ports/hidapi/portfile.cmake b/ports/hidapi/portfile.cmake index cf506171b..a89993f21 100644 --- a/ports/hidapi/portfile.cmake +++ b/ports/hidapi/portfile.cmake @@ -1,4 +1,4 @@ -vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "linux" "osx" "uwp")
+vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@@ -6,6 +6,7 @@ vcpkg_from_github( REF hidapi-0.10.1
SHA512 0479706c631775483378070ff7170542725678eabc202a5bd07436c951fd766e01743417999ac3fb2b5436c865f6ace2cfced1f210fa3a3e88c19ceb3bbe0534
HEAD_REF master
+ patch remove-duplicate-AC_CONFIG_MACRO_DIR.patch
)
if(VCPKG_TARGET_IS_WINDOWS)
@@ -51,4 +52,19 @@ if(VCPKG_TARGET_IS_WINDOWS) )
file(COPY ${CMAKE_CURRENT_LIST_DIR}/hidapi-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+else(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
+ vcpkg_configure_make(
+ SOURCE_PATH ${SOURCE_PATH}
+ AUTOCONFIG
+ )
+
+ vcpkg_install_make()
+
+ vcpkg_copy_pdbs()
+
+ vcpkg_fixup_pkgconfig()
+
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+ file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
endif()
diff --git a/ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch b/ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch new file mode 100644 index 000000000..0eae649af --- /dev/null +++ b/ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch @@ -0,0 +1,12 @@ +diff --git a/configure.ac b/configure.ac +index 220909a..77da67a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -13,7 +13,6 @@ LTLDFLAGS="-version-info ${lt_current}:${lt_revision}:${lt_age}" + + AC_CONFIG_MACRO_DIR([m4]) + AM_INIT_AUTOMAKE([foreign -Wall -Werror]) +-AC_CONFIG_MACRO_DIR([m4]) + + m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + LT_INIT diff --git a/ports/hidapi/vcpkg.json b/ports/hidapi/vcpkg.json index 2f9181f55..01b7f7ba7 100644 --- a/ports/hidapi/vcpkg.json +++ b/ports/hidapi/vcpkg.json @@ -1,7 +1,14 @@ { "name": "hidapi", - "version-string": "0.10.1", + "version-semver": "0.10.1", + "port-version": 1, "description": "A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac and Windows.", "homepage": "https://github.com/libusb/hidapi", - "supports": "windows & !(arm | arm64 | uwp)" + "supports": "!(arm | uwp)", + "dependencies": [ + { + "name": "libusb", + "platform": "!windows" + } + ] } diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 32cf4e13c..dfb81c700 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -454,11 +454,6 @@ healpix:x64-uwp=fail healpix:arm64-windows=fail healpix:arm-uwp=fail healpix:x64-osx=fail -hidapi:arm64-windows=fail -hidapi:arm-uwp=fail -hidapi:x64-linux=fail -hidapi:x64-osx=fail -hidapi:x64-uwp=fail hiredis:arm-uwp=fail hiredis:x64-uwp=fail hpx:x64-windows-static=fail diff --git a/versions/baseline.json b/versions/baseline.json index a51b875f7..0d9854ed2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2458,7 +2458,7 @@ }, "hidapi": { "baseline": "0.10.1", - "port-version": 0 + "port-version": 1 }, "highfive": { "baseline": "2.2.2", diff --git a/versions/h-/hidapi.json b/versions/h-/hidapi.json index 56a48cbe6..d9e09e47f 100644 --- a/versions/h-/hidapi.json +++ b/versions/h-/hidapi.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "5322c7526edb02f08688e2831978b2be542755c9", + "version-semver": "0.10.1", + "port-version": 1 + }, + { "git-tree": "e252d2cc9ecde0cdecdf424af08a4292440f9efd", "version-string": "0.10.1", "port-version": 0 |
