diff options
| author | Be <be@mixxx.org> | 2021-10-04 19:18:49 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-04 17:18:49 -0700 |
| commit | 3799a5f722f10e21d4bc62397a4c7d41910d9501 (patch) | |
| tree | a017b7b02a743d112ba0a8045b9f02ee011d71e5 | |
| parent | c264dba458a47b1345c37f3a02af46aab772bd18 (diff) | |
| download | vcpkg-3799a5f722f10e21d4bc62397a4c7d41910d9501.tar.gz vcpkg-3799a5f722f10e21d4bc62397a4c7d41910d9501.zip | |
[hidapi] update to 0.11.0; switch to CMake (#20460)
| -rw-r--r-- | ports/hidapi/hidapi-config.cmake | 48 | ||||
| -rw-r--r-- | ports/hidapi/portfile.cmake | 91 | ||||
| -rw-r--r-- | ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch | 12 | ||||
| -rw-r--r-- | ports/hidapi/vcpkg.json | 16 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/h-/hidapi.json | 5 |
6 files changed, 40 insertions, 136 deletions
diff --git a/ports/hidapi/hidapi-config.cmake b/ports/hidapi/hidapi-config.cmake deleted file mode 100644 index 126685a89..000000000 --- a/ports/hidapi/hidapi-config.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# - try to find HIDAPI library
-# from http://www.signal11.us/oss/hidapi/
-#
-# Cache Variables: (probably not for direct use in your scripts)
-# HIDAPI_INCLUDE_DIR
-# HIDAPI_LIBRARY
-#
-# Non-cache variables you might use in your CMakeLists.txt:
-# HIDAPI_FOUND
-# HIDAPI_INCLUDE_DIRS
-# HIDAPI_LIBRARIES
-#
-# Requires these CMake modules:
-# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
-#
-# Original Author:
-# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
-# http://academic.cleardefinition.com
-# Iowa State University HCI Graduate Program/VRAC
-#
-# Copyright Iowa State University 2009-2010.
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-# hacking FindHIDAPI.cmake as hidapi-config.cmake
-
-find_library(HIDAPI_LIBRARY
- NAMES hidapi hidapi-libusb)
-
-find_path(HIDAPI_INCLUDE_DIR
- NAMES hidapi.h
- PATH_SUFFIXES
- hidapi)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(HIDAPI
- DEFAULT_MSG
- HIDAPI_LIBRARY
- HIDAPI_INCLUDE_DIR)
-
-if(HIDAPI_FOUND)
- set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}")
-
- set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}")
-endif()
-
-mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY)
diff --git a/ports/hidapi/portfile.cmake b/ports/hidapi/portfile.cmake index 1e13ee197..1c9edd1ff 100644 --- a/ports/hidapi/portfile.cmake +++ b/ports/hidapi/portfile.cmake @@ -1,70 +1,21 @@ -vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp")
-
-vcpkg_from_github(
- OUT_SOURCE_PATH SOURCE_PATH
- REPO libusb/hidapi
- REF hidapi-0.10.1
- SHA512 0479706c631775483378070ff7170542725678eabc202a5bd07436c951fd766e01743417999ac3fb2b5436c865f6ace2cfced1f210fa3a3e88c19ceb3bbe0534
- HEAD_REF master
- PATCHES remove-duplicate-AC_CONFIG_MACRO_DIR.patch
-)
-
-if(VCPKG_TARGET_IS_WINDOWS)
- file(READ "${SOURCE_PATH}/windows/hidapi.vcxproj" _contents)
- if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic")
- string(REGEX REPLACE
- "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>"
- "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>"
- _contents "${_contents}")
- string(REGEX REPLACE
- "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>"
- "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>"
- _contents "${_contents}")
- else()
- string(REGEX REPLACE
- "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>"
- "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>"
- _contents "${_contents}")
- string(REGEX REPLACE
- "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>"
- "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>"
- _contents "${_contents}")
- endif()
-
- if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic")
- string(REPLACE
- "<ConfigurationType>StaticLibrary</ConfigurationType>"
- "<ConfigurationType>DynamicLibrary</ConfigurationType>"
- _contents "${_contents}")
- else()
- string(REPLACE
- "<ConfigurationType>DynamicLibrary</ConfigurationType>"
- "<ConfigurationType>StaticLibrary</ConfigurationType>"
- _contents "${_contents}")
- endif()
- file(WRITE "${SOURCE_PATH}/windows/hidapi.vcxproj" "${_contents}")
-
- vcpkg_install_msbuild(
- SOURCE_PATH ${SOURCE_PATH}
- PROJECT_SUBPATH windows/hidapi.vcxproj
- INCLUDES_SUBPATH hidapi ALLOW_ROOT_INCLUDES
- LICENSE_SUBPATH LICENSE-bsd.txt # use BSD license
- )
-
- 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()
+vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libusb/hidapi + REF hidapi-0.11.0 + SHA512 0de4abc963600d159ce231416c468b9e81a8361e4d2c2202988d6eb2e58a923700e9b9be639fbddc6bc14625131848409e2e88dbc4b34a1f8a726c8fa4692d92 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS -DHIDAPI_BUILD_HIDTEST=OFF +) +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE-bsd.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch b/ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch deleted file mode 100644 index 0eae649af..000000000 --- a/ports/hidapi/remove-duplicate-AC_CONFIG_MACRO_DIR.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 b4b1f1a73..cefc523a4 100644 --- a/ports/hidapi/vcpkg.json +++ b/ports/hidapi/vcpkg.json @@ -1,14 +1,22 @@ { "name": "hidapi", - "version-semver": "0.10.1", - "port-version": 2, + "version-semver": "0.11.0", "description": "A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac and Windows.", "homepage": "https://github.com/libusb/hidapi", - "supports": "!(arm | uwp)", + "license": "BSD-3-Clause-Clear", + "supports": "!uwp", "dependencies": [ { "name": "libusb", - "platform": "!windows" + "platform": "!(windows | osx)" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true } ] } diff --git a/versions/baseline.json b/versions/baseline.json index 2b1e8b81f..f2ba1a89a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2633,8 +2633,8 @@ "port-version": 1 }, "hidapi": { - "baseline": "0.10.1", - "port-version": 2 + "baseline": "0.11.0", + "port-version": 0 }, "highfive": { "baseline": "2.3", diff --git a/versions/h-/hidapi.json b/versions/h-/hidapi.json index d3e0af407..6bbe71ea2 100644 --- a/versions/h-/hidapi.json +++ b/versions/h-/hidapi.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "2540911a0c10b731ac15a04c6f9c5153003c19fd", + "version-semver": "0.11.0", + "port-version": 0 + }, + { "git-tree": "8ddfc714e198b19f67260bfeb2e5ae58e37fd909", "version-semver": "0.10.1", "port-version": 2 |
