Skip to content

Commit 62a640b

Browse files
committed
games-emulation/rmg: don't hard-code pkg-config
Closes: https://bugs.gentoo.org/941889 Upstream-PR: raphnet/mupen64plus-input-raphnetraw#17 Upstream-PR: Rosalie241/RMG#296 Upstream-Commit: Rosalie241/RMG@f6b73b8 Signed-off-by: orbea <[email protected]>
1 parent 541a02a commit 62a640b

File tree

3 files changed

+65
-2
lines changed

3 files changed

+65
-2
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
From: orbea <[email protected]>
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)

games-emulation/rmg/rmg-0.6.6-r1.ebuild

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CRATES="
2727
2828
"
2929

30-
inherit cargo cmake flag-o-matic xdg
30+
inherit cargo cmake flag-o-matic toolchain-funcs xdg
3131

3232
MY_PN="${PN^^}"
3333
MY_P="${MY_PN}-${PV}"
@@ -78,6 +78,8 @@ PATCHES=(
7878
"${FILESDIR}"/${PN}-0.5.6-parallel-rdp-standalone-musl.patch
7979
# Use pkg-config(1) for SDL2 and don't depend on which(1)
8080
"${FILESDIR}"/${P}-mupen64plus-core-sdl-pkgconfig.patch
81+
# https://bugs.gentoo.org/941889
82+
"${FILESDIR}"/${P}-mupen64plus-input-raphnetraw-pkgconfig.patch
8183
)
8284

8385
pkg_setup() {
@@ -127,6 +129,7 @@ src_configure() {
127129
append-flags -fno-strict-aliasing
128130
filter-lto
129131

132+
export PKG_CONFIG="$(tc-getPKG_CONFIG)"
130133
export PKG_CONFIG_ALLOW_CROSS=1
131134

132135
local mycmakeargs=(

games-emulation/rmg/rmg-9999.ebuild

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CRATES="
2727
2828
"
2929

30-
inherit cargo cmake flag-o-matic xdg
30+
inherit cargo cmake flag-o-matic toolchain-funcs xdg
3131

3232
MY_PN="${PN^^}"
3333
MY_P="${MY_PN}-${PV}"
@@ -125,6 +125,7 @@ src_configure() {
125125
append-flags -fno-strict-aliasing
126126
filter-lto
127127

128+
export PKG_CONFIG="$(tc-getPKG_CONFIG)"
128129
export PKG_CONFIG_ALLOW_CROSS=1
129130

130131
local mycmakeargs=(

0 commit comments

Comments
 (0)