1 |
commit: aa59b7b0761874e3478702334b14a7df8c08b912 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 29 06:17:40 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 29 06:27:10 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa59b7b0 |
7 |
|
8 |
sys-apps/pcmciautils: fix musl build |
9 |
|
10 |
Closes: https://bugs.gentoo.org/716120 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../pcmciautils-018_p8-musl-unsigned-type.patch | 24 ++++++++++++++++++++++ |
14 |
sys-apps/pcmciautils/pcmciautils-018_p8-r3.ebuild | 13 ++++++------ |
15 |
2 files changed, 31 insertions(+), 6 deletions(-) |
16 |
|
17 |
diff --git a/sys-apps/pcmciautils/files/pcmciautils-018_p8-musl-unsigned-type.patch b/sys-apps/pcmciautils/files/pcmciautils-018_p8-musl-unsigned-type.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..6039b8147096 |
20 |
--- /dev/null |
21 |
+++ b/sys-apps/pcmciautils/files/pcmciautils-018_p8-musl-unsigned-type.patch |
22 |
@@ -0,0 +1,24 @@ |
23 |
+https://git.alpinelinux.org/aports/plain/main/pcmciautils/unsigned.patch |
24 |
+https://bugs.gentoo.org/716120 |
25 |
+--- a/src/read-cis.c |
26 |
++++ b/src/read-cis.c |
27 |
+@@ -51,7 +51,7 @@ |
28 |
+ /* Get indirect link from the MFC tuple */ |
29 |
+ read_cis(tuple->Flags.link_space, |
30 |
+ tuple->LinkOffset, 5, link); |
31 |
+- ofs = *(u_int *)(link+1); |
32 |
++ ofs = *(unsigned int *)(link+1); |
33 |
+ tuple->Flags.space = (link[0] == CISTPL_MFC_ATTR); |
34 |
+ /* Move to the next indirect link */ |
35 |
+ tuple->LinkOffset += 5; |
36 |
+--- a/src/yacc_config.y |
37 |
++++ b/src/yacc_config.y |
38 |
+@@ -40,7 +40,7 @@ |
39 |
+ |
40 |
+ %union { |
41 |
+ char *str; |
42 |
+- u_long num; |
43 |
++ unsigned long num; |
44 |
+ struct adjust_list_t *adjust; |
45 |
+ } |
46 |
+ |
47 |
|
48 |
diff --git a/sys-apps/pcmciautils/pcmciautils-018_p8-r3.ebuild b/sys-apps/pcmciautils/pcmciautils-018_p8-r3.ebuild |
49 |
index d27c8288425f..e42d81c1d8d8 100644 |
50 |
--- a/sys-apps/pcmciautils/pcmciautils-018_p8-r3.ebuild |
51 |
+++ b/sys-apps/pcmciautils/pcmciautils-018_p8-r3.ebuild |
52 |
@@ -24,6 +24,13 @@ DEPEND="${RDEPEND} |
53 |
|
54 |
S=${WORKDIR}/${PN}-${MY_PV} |
55 |
|
56 |
+PATCHES=( |
57 |
+ "${WORKDIR}"/debian/patches/no-modprobe-rules.patch |
58 |
+ "${WORKDIR}"/debian/patches/remove-libsysfs-dep.patch |
59 |
+ "${FILESDIR}"/${P}-flex-2.6.3-fix.patch |
60 |
+ "${FILESDIR}"/${PN}-018_p8-musl-unsigned-type.patch |
61 |
+) |
62 |
+ |
63 |
pkg_setup() { |
64 |
CONFIG_CHECK="~PCMCIA" |
65 |
linux-info_pkg_setup |
66 |
@@ -49,12 +56,6 @@ pkg_setup() { |
67 |
use debug && append-cppflags -DDEBUG |
68 |
} |
69 |
|
70 |
-PATCHES=( |
71 |
- "${WORKDIR}"/debian/patches/no-modprobe-rules.patch |
72 |
- "${WORKDIR}"/debian/patches/remove-libsysfs-dep.patch |
73 |
- "${FILESDIR}"/${P}-flex-2.6.3-fix.patch |
74 |
-) |
75 |
- |
76 |
src_prepare() { |
77 |
default |
78 |
sed -i \ |