summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-08-30 00:07:57 +0000
committerSam James <sam@gentoo.org>2020-08-30 00:10:08 +0000
commit7802529ba5f3ea879e99fd96c00d7a3d07fd7e6f (patch)
tree85729fb888ad54ffbe8e802f6fc3227f9e4da03b
parentsys-devel/autoconf: Stabilize 2.69-r5 sparc, #738342 (diff)
downloadgentoo-7802529ba5f3ea879e99fd96c00d7a3d07fd7e6f.tar.gz
gentoo-7802529ba5f3ea879e99fd96c00d7a3d07fd7e6f.tar.bz2
gentoo-7802529ba5f3ea879e99fd96c00d7a3d07fd7e6f.zip
net-irc/sic: fix musl, clang builds
Closes: https://bugs.gentoo.org/712732 Closes: https://bugs.gentoo.org/731168 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net-irc/sic/files/sic-1.2-include-path.patch13
-rw-r--r--net-irc/sic/files/sic-1.2-musl-time-include.patch32
-rw-r--r--net-irc/sic/sic-1.2-r1.ebuild14
3 files changed, 55 insertions, 4 deletions
diff --git a/net-irc/sic/files/sic-1.2-include-path.patch b/net-irc/sic/files/sic-1.2-include-path.patch
new file mode 100644
index 000000000000..21170dfd9081
--- /dev/null
+++ b/net-irc/sic/files/sic-1.2-include-path.patch
@@ -0,0 +1,13 @@
+diff --git a/config.mk b/config.mk
+index 5d42b38..61d085a 100644
+--- a/config.mk
++++ b/config.mk
+@@ -9,7 +9,7 @@ MANPREFIX = ${PREFIX}/share/man
+
+ # includes and libs
+ INCS = -I. -I/usr/include
+-LIBS = -L/usr/lib -lc
++LIBS = -lc
+
+ # flags
+ CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE
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
new file mode 100644
index 000000000000..bbeaed72a571
--- /dev/null
+++ b/net-irc/sic/files/sic-1.2-musl-time-include.patch
@@ -0,0 +1,32 @@
+https://git.alpinelinux.org/aports/plain/main/sic/musl-fix.patch?id=4b6138a5f4f5cd11d49d7f96e13da661fd37655e
+https://bugs.gentoo.org/712732
+----
+From d8e9e4a013196b98576a3a759b4b27c3edb2a0d2 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 4 Feb 2014 10:06:53 +0000
+Subject: [PATCH] build fix for musl libc
+
+It fixes the following compile error with musl libc:
+sic.c:137:17: error: storage size of 'tv' isn't known
+ struct timeval tv;
+ ^
+---
+ sic.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/sic.c b/sic.c
+index d93c2ec..e4bdb74 100644
+--- a/sic.c
++++ b/sic.c
+@@ -8,6 +8,8 @@
+ #include <time.h>
+ #include <unistd.h>
+
++#include <sys/time.h>
++
+ static char *host = "irc.oftc.net";
+ static char *port = "6667";
+ static char *password;
+--
+1.8.5.3
+
diff --git a/net-irc/sic/sic-1.2-r1.ebuild b/net-irc/sic/sic-1.2-r1.ebuild
index 42dfb660ec7b..8ca301bc99ac 100644
--- a/net-irc/sic/sic-1.2-r1.ebuild
+++ b/net-irc/sic/sic-1.2-r1.ebuild
@@ -1,10 +1,11 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
+
inherit toolchain-funcs
-DESCRIPTION="An extremly simple IRC client"
+DESCRIPTION="An extremely simple IRC client"
HOMEPAGE="https://tools.suckless.org/sic"
SRC_URI="https://dl.suckless.org/tools/${P}.tar.gz"
@@ -12,6 +13,11 @@ LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 x86"
+PATCHES=(
+ "${FILESDIR}/${PN}-1.2-include-path.patch"
+ "${FILESDIR}/${PN}-1.2-musl-time-include.patch"
+)
+
src_prepare() {
default
@@ -30,5 +36,5 @@ src_compile() {
}
src_install() {
- emake DESTDIR="${D}" PREFIX="/usr" install
+ emake DESTDIR="${ED}" PREFIX="/usr" install
}