|
| 1 | +https://bugs.gentoo.org/941889 |
| 2 | +https://github.com/raphnet/mupen64plus-input-raphnetraw/pull/17 |
| 3 | +https://github.com/Rosalie241/RMG/pull/296 |
| 4 | +https://github.com/Rosalie241/RMG/pull/297 |
| 5 | +https://github.com/Rosalie241/RMG/commit/f6b73b86c6625fa5a268b74b1e36114a5bdd535c |
| 6 | +https://github.com/Rosalie241/RMG/commit/69c24b9131909c338b03c48438744b253501146a |
| 7 | + |
| 8 | +From e8ec98eb7e7ee4b769232ce143af6c6f9cf29bc6 Mon Sep 17 00:00:00 2001 |
| 9 | + |
| 10 | +Date: Sun, 20 Oct 2024 08:59:56 -0700 |
| 11 | +Subject: [PATCH 1/2] 3rdParty: don't hard-code pkg-config in |
| 12 | + mupen64plus-input-raphnetraw (#296) 3rdParty: improve the hidapi check in |
| 13 | + mupen64plus-input-raphnetraw (#297) |
| 14 | + |
| 15 | +--- |
| 16 | + .../projects/unix/Makefile | 22 ++++++++++--------- |
| 17 | + 1 file changed, 12 insertions(+), 10 deletions(-) |
| 18 | + |
| 19 | +diff --git a/Source/3rdParty/mupen64plus-input-raphnetraw/projects/unix/Makefile b/Source/3rdParty/mupen64plus-input-raphnetraw/projects/unix/Makefile |
| 20 | +index a2571378..18dcaf19 100644 |
| 21 | +--- a/Source/3rdParty/mupen64plus-input-raphnetraw/projects/unix/Makefile |
| 22 | ++++ b/Source/3rdParty/mupen64plus-input-raphnetraw/projects/unix/Makefile |
| 23 | +@@ -141,6 +141,14 @@ ifeq ($(OS), OSX) |
| 24 | + endif |
| 25 | + endif |
| 26 | + |
| 27 | ++# test for essential build dependencies |
| 28 | ++ifeq ($(origin PKG_CONFIG), undefined) |
| 29 | ++ PKG_CONFIG = $(CROSS_COMPILE)pkg-config |
| 30 | ++ ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null),) |
| 31 | ++ $(error $(PKG_CONFIG) not found) |
| 32 | ++ endif |
| 33 | ++endif |
| 34 | ++ |
| 35 | + ifeq ($(OS), LINUX) |
| 36 | + HIDAPI_NAME=hidapi-hidraw |
| 37 | + else |
| 38 | +@@ -149,17 +157,11 @@ endif |
| 39 | + |
| 40 | + # test for presence of HIDLIB |
| 41 | + ifeq ($(origin HID_CFLAGS) $(origin HID_LDLIBS), undefined undefined) |
| 42 | +- HIDAPI_CONFIG = $(CROSS_COMPILE)pkg-config $(HIDAPI_NAME) |
| 43 | +- ifeq ($(shell which $(HIDAPI_CONFIG) 2>/dev/null),) |
| 44 | +- HIDAPI_CONFIG = $(CROSS_COMPILE)pkg-config $(HIDAPI_NAME) |
| 45 | +- ifeq ($(shell which $(HIDAPI_CONFIG) 2>/dev/null),) |
| 46 | +- $(error No HIDAPI development libraries found!) |
| 47 | +- else |
| 48 | +- $(warning Using HIDAPI libraries) |
| 49 | +- endif |
| 50 | ++ ifeq ($(shell $(PKG_CONFIG) --modversion $(HIDAPI_NAME) 2>/dev/null),) |
| 51 | ++ $(error No HIDAPI development libraries found!) |
| 52 | + endif |
| 53 | +- HID_CFLAGS += $(shell $(HIDAPI_CONFIG) --cflags) |
| 54 | +- HID_LDLIBS += $(shell $(HIDAPI_CONFIG) --libs) |
| 55 | ++ HID_CFLAGS = $(shell $(PKG_CONFIG) --cflags $(HIDAPI_NAME)) |
| 56 | ++ HID_LDLIBS = $(shell $(PKG_CONFIG) --libs $(HIDAPI_NAME)) |
| 57 | + endif |
| 58 | + CFLAGS += $(HID_CFLAGS) |
| 59 | + LDLIBS += $(HID_LDLIBS) |
0 commit comments