1 |
commit: 7802529ba5f3ea879e99fd96c00d7a3d07fd7e6f |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 30 00:07:57 2020 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 30 00:10:08 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7802529b |
7 |
|
8 |
net-irc/sic: fix musl, clang builds |
9 |
|
10 |
Closes: https://bugs.gentoo.org/712732 |
11 |
Closes: https://bugs.gentoo.org/731168 |
12 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
net-irc/sic/files/sic-1.2-include-path.patch | 13 +++++++++ |
16 |
net-irc/sic/files/sic-1.2-musl-time-include.patch | 32 +++++++++++++++++++++++ |
17 |
net-irc/sic/sic-1.2-r1.ebuild | 14 +++++++--- |
18 |
3 files changed, 55 insertions(+), 4 deletions(-) |
19 |
|
20 |
diff --git a/net-irc/sic/files/sic-1.2-include-path.patch b/net-irc/sic/files/sic-1.2-include-path.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..21170dfd908 |
23 |
--- /dev/null |
24 |
+++ b/net-irc/sic/files/sic-1.2-include-path.patch |
25 |
@@ -0,0 +1,13 @@ |
26 |
+diff --git a/config.mk b/config.mk |
27 |
+index 5d42b38..61d085a 100644 |
28 |
+--- a/config.mk |
29 |
++++ b/config.mk |
30 |
+@@ -9,7 +9,7 @@ MANPREFIX = ${PREFIX}/share/man |
31 |
+ |
32 |
+ # includes and libs |
33 |
+ INCS = -I. -I/usr/include |
34 |
+-LIBS = -L/usr/lib -lc |
35 |
++LIBS = -lc |
36 |
+ |
37 |
+ # flags |
38 |
+ CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE |
39 |
|
40 |
diff --git a/net-irc/sic/files/sic-1.2-musl-time-include.patch b/net-irc/sic/files/sic-1.2-musl-time-include.patch |
41 |
new file mode 100644 |
42 |
index 00000000000..bbeaed72a57 |
43 |
--- /dev/null |
44 |
+++ b/net-irc/sic/files/sic-1.2-musl-time-include.patch |
45 |
@@ -0,0 +1,32 @@ |
46 |
+https://git.alpinelinux.org/aports/plain/main/sic/musl-fix.patch?id=4b6138a5f4f5cd11d49d7f96e13da661fd37655e |
47 |
+https://bugs.gentoo.org/712732 |
48 |
+---- |
49 |
+From d8e9e4a013196b98576a3a759b4b27c3edb2a0d2 Mon Sep 17 00:00:00 2001 |
50 |
+From: Natanael Copa <ncopa@×××××××××××.org> |
51 |
+Date: Tue, 4 Feb 2014 10:06:53 +0000 |
52 |
+Subject: [PATCH] build fix for musl libc |
53 |
+ |
54 |
+It fixes the following compile error with musl libc: |
55 |
+sic.c:137:17: error: storage size of 'tv' isn't known |
56 |
+ struct timeval tv; |
57 |
+ ^ |
58 |
+--- |
59 |
+ sic.c | 2 ++ |
60 |
+ 1 file changed, 2 insertions(+) |
61 |
+ |
62 |
+diff --git a/sic.c b/sic.c |
63 |
+index d93c2ec..e4bdb74 100644 |
64 |
+--- a/sic.c |
65 |
++++ b/sic.c |
66 |
+@@ -8,6 +8,8 @@ |
67 |
+ #include <time.h> |
68 |
+ #include <unistd.h> |
69 |
+ |
70 |
++#include <sys/time.h> |
71 |
++ |
72 |
+ static char *host = "irc.oftc.net"; |
73 |
+ static char *port = "6667"; |
74 |
+ static char *password; |
75 |
+-- |
76 |
+1.8.5.3 |
77 |
+ |
78 |
|
79 |
diff --git a/net-irc/sic/sic-1.2-r1.ebuild b/net-irc/sic/sic-1.2-r1.ebuild |
80 |
index 42dfb660ec7..8ca301bc99a 100644 |
81 |
--- a/net-irc/sic/sic-1.2-r1.ebuild |
82 |
+++ b/net-irc/sic/sic-1.2-r1.ebuild |
83 |
@@ -1,10 +1,11 @@ |
84 |
-# Copyright 1999-2018 Gentoo Foundation |
85 |
+# Copyright 1999-2020 Gentoo Authors |
86 |
# Distributed under the terms of the GNU General Public License v2 |
87 |
|
88 |
-EAPI=6 |
89 |
+EAPI=7 |
90 |
+ |
91 |
inherit toolchain-funcs |
92 |
|
93 |
-DESCRIPTION="An extremly simple IRC client" |
94 |
+DESCRIPTION="An extremely simple IRC client" |
95 |
HOMEPAGE="https://tools.suckless.org/sic" |
96 |
SRC_URI="https://dl.suckless.org/tools/${P}.tar.gz" |
97 |
|
98 |
@@ -12,6 +13,11 @@ LICENSE="MIT" |
99 |
SLOT="0" |
100 |
KEYWORDS="amd64 x86" |
101 |
|
102 |
+PATCHES=( |
103 |
+ "${FILESDIR}/${PN}-1.2-include-path.patch" |
104 |
+ "${FILESDIR}/${PN}-1.2-musl-time-include.patch" |
105 |
+) |
106 |
+ |
107 |
src_prepare() { |
108 |
default |
109 |
|
110 |
@@ -30,5 +36,5 @@ src_compile() { |
111 |
} |
112 |
|
113 |
src_install() { |
114 |
- emake DESTDIR="${D}" PREFIX="/usr" install |
115 |
+ emake DESTDIR="${ED}" PREFIX="/usr" install |
116 |
} |