[new-package] hidapitester 0.5 (#24899)

This commit is contained in:
llm96 2025-07-22 06:12:42 +01:00 committed by GitHub
parent cbfc71ce7c
commit 8448af4975
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,14 @@
diff --git a/Makefile b/Makefile
index d0c2f93..93fdd88 100644
--- a/Makefile
+++ b/Makefile
@@ -57,8 +57,7 @@ ifeq (default,$(origin CC))
CC = gcc
endif
-LIBS += -lsetupapi -Wl,--enable-auto-import -static-libgcc -static-libstdc++
-OBJS = $(HIDAPI_DIR)/windows/hid.o
+LIBS += -lsetupapi -lhidapi -Wl,--enable-auto-import
EXE=.exe
endif

View File

@ -0,0 +1,37 @@
# Maintainer: llm96 <llm96@fervidex.net>
_realname=hidapitester
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver="0.5"
pkgrel=1
pkgdesc="Simple command-line program to test HIDAPI (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://github.com/todbot/hidapitester'
license=('spdx:GPL-3.0-or-later')
makedepends=("${MINGW_PACKAGE_PREFIX}-make"
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-hidapi")
source=("${url}/archive/refs/tags/v${pkgver}.tar.gz"
"0001-Shared-link-with-hidapi.patch")
sha256sums=('286b7d3b3b8660adf9ce3360916d03bbeb99886a5890069ec57578174de7b299'
'a76d5128f92415b5f7f07eb96d0c676883ff7e1f4ba2eff468dfd8642ec6be7d')
prepare() {
cd "${_realname}-${pkgver}"
patch -p1 -i "${srcdir}/0001-Shared-link-with-hidapi.patch"
}
build() {
cd "${_realname}-${pkgver}"
HIDAPI_DIR="${MINGW_PREFIX}/include" make
}
package() {
cd "${_realname}-${pkgver}"
install -Dm755 "${srcdir}/${_realname}-${pkgver}/hidapitester.exe" "${pkgdir}${MINGW_PREFIX}/bin/hidapitester.exe"
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}