summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-12-25 21:15:48 +0000
committerSam James <sam@gentoo.org>2022-12-25 21:24:11 +0000
commit4247ccbbd16d77585fecfe51ab0b507695f31cbc (patch)
treef39e000e3f1bc346fe809ee84524f5b4fabdeea2 /sys-apps/setserial
parentsys-apps/rename: EAPI 8, fix build w/ Clang 16 (diff)
downloadgentoo-4247ccbbd16d77585fecfe51ab0b507695f31cbc.tar.gz
gentoo-4247ccbbd16d77585fecfe51ab0b507695f31cbc.tar.bz2
gentoo-4247ccbbd16d77585fecfe51ab0b507695f31cbc.zip
sys-apps/setserial: EAPI 8, fix build w/ Clang 16
Closes: https://bugs.gentoo.org/883279 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps/setserial')
-rw-r--r--sys-apps/setserial/files/setserial-2.17-darwin.patch2
-rw-r--r--sys-apps/setserial/files/setserial-2.17-implicit-int-clang16.patch11
-rw-r--r--sys-apps/setserial/setserial-2.17-r6.ebuild (renamed from sys-apps/setserial/setserial-2.17-r5.ebuild)17
3 files changed, 25 insertions, 5 deletions
diff --git a/sys-apps/setserial/files/setserial-2.17-darwin.patch b/sys-apps/setserial/files/setserial-2.17-darwin.patch
index 681f793383cd..3f1fa684ba8c 100644
--- a/sys-apps/setserial/files/setserial-2.17-darwin.patch
+++ b/sys-apps/setserial/files/setserial-2.17-darwin.patch
@@ -1,8 +1,6 @@
https://541536.bugs.gentoo.org/attachment.cgi?id=397618
https://bugs.gentoo.org/show_bug.cgi?id=541536
-diff --git a/setserial.c b/setserial.c
-index 3474402..3ce8009 100644
--- a/setserial.c
+++ b/setserial.c
@@ -31,6 +31,25 @@
diff --git a/sys-apps/setserial/files/setserial-2.17-implicit-int-clang16.patch b/sys-apps/setserial/files/setserial-2.17-implicit-int-clang16.patch
new file mode 100644
index 000000000000..62d6b6411259
--- /dev/null
+++ b/sys-apps/setserial/files/setserial-2.17-implicit-int-clang16.patch
@@ -0,0 +1,11 @@
+--- a/setserial.c
++++ b/setserial.c
+@@ -738,7 +738,7 @@ fprintf(stderr, "\t* port\t\tset the I/O port\n");
+ exit(1);
+ }
+
+-main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ int get_flag = 0, wild_intr_flag = 0;
+ int c;
diff --git a/sys-apps/setserial/setserial-2.17-r5.ebuild b/sys-apps/setserial/setserial-2.17-r6.ebuild
index 2fddb3b824a0..828b89ea43da 100644
--- a/sys-apps/setserial/setserial-2.17-r5.ebuild
+++ b/sys-apps/setserial/setserial-2.17-r6.ebuild
@@ -1,15 +1,16 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=8
-inherit toolchain-funcs
+inherit autotools toolchain-funcs
DESCRIPTION="Configure your serial ports with it"
HOMEPAGE="http://setserial.sourceforge.net/"
SRC_URI="
ftp://tsx-11.mit.edu/pub/linux/sources/sbin/${P}.tar.gz
- ftp://ftp.sunsite.org.uk/Mirrors/tsx-11.mit.edu/pub/linux/sources/sbin/${P}.tar.gz"
+ ftp://ftp.sunsite.org.uk/Mirrors/tsx-11.mit.edu/pub/linux/sources/sbin/${P}.tar.gz
+"
LICENSE="GPL-2"
SLOT="0"
@@ -22,8 +23,18 @@ PATCHES=(
"${FILESDIR}"/${P}-build.patch
"${FILESDIR}"/${P}-hayes-esp.patch
"${FILESDIR}"/${P}-darwin.patch
+ "${FILESDIR}"/${P}-implicit-int-clang16.patch
)
+src_prepare() {
+ default
+
+ sed -i -e 's:configure.in:configure.ac:' Makefile.in || die
+
+ # Clang 16
+ eautoreconf
+}
+
src_compile() {
tc-export CC
emake "${PN}"