summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-11 23:45:17 +0000
committerSam James <sam@gentoo.org>2023-02-12 02:04:14 +0000
commitbee5b20ba22f21c8b3ae0fd0d6282717456605c3 (patch)
tree15b723b7e651a26ae10a4cc8e7870cacd7a456bb /app-misc/delay
parentmedia-sound/mt-daapd: update EAPI 7 -> 8; fix musl; fix clang 16 (diff)
downloadgentoo-bee5b20ba22f21c8b3ae0fd0d6282717456605c3.tar.gz
gentoo-bee5b20ba22f21c8b3ae0fd0d6282717456605c3.tar.bz2
gentoo-bee5b20ba22f21c8b3ae0fd0d6282717456605c3.zip
app-misc/delay: fix clang 16 (again)
We reverted the previous fix (19c56f45a25af6da76133b2e27beb40fd5ad78df) in 6c7fb619c8661e72230fe3669d6e238288132430 as it led to a segfault at runtime, but not for the reason I expected. Our clang16 patch forces regeneration of the yacc files and going from an ancient bison to a modern one makes 'delay until now + 5 minutes' segfault. It happens even if the patch is empty, as the regeneration is the breaking part. So, just force byacc, as it seems to work, and this is a package with no active upstream. Closes: https://bugs.gentoo.org/881319 See: 19c56f45a25af6da76133b2e27beb40fd5ad78df See: 6c7fb619c8661e72230fe3669d6e238288132430 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-misc/delay')
-rw-r--r--app-misc/delay/delay-1.6-r6.ebuild43
-rw-r--r--app-misc/delay/files/delay-1.6-clang16.patch12
2 files changed, 55 insertions, 0 deletions
diff --git a/app-misc/delay/delay-1.6-r6.ebuild b/app-misc/delay/delay-1.6-r6.ebuild
new file mode 100644
index 000000000000..056c0f45b6a2
--- /dev/null
+++ b/app-misc/delay/delay-1.6-r6.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Sleeplike program that counts down the number of seconds specified"
+HOMEPAGE="https://onegeek.org/~tom/software/delay/"
+SRC_URI="https://onegeek.org/~tom/software/delay/dl/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+RDEPEND="sys-libs/ncurses:="
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-util/byacc
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-headers.patch
+ "${FILESDIR}"/${P}-tinfo.patch
+ "${FILESDIR}"/${P}-clang16.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # Our clang16 patch forces regeneration of the yacc files and going from
+ # an ancient bison to a modern one makes 'delay until now + 5 minutes'
+ # segfault. It happens even if the patch is empty, as the regeneration
+ # is the breaking part. So, just force byacc, as it seems to work, and
+ # this is a package with no active upstream.
+ export YACC=byacc
+
+ econf
+}
diff --git a/app-misc/delay/files/delay-1.6-clang16.patch b/app-misc/delay/files/delay-1.6-clang16.patch
new file mode 100644
index 000000000000..5deec4ea5194
--- /dev/null
+++ b/app-misc/delay/files/delay-1.6-clang16.patch
@@ -0,0 +1,12 @@
+--- a/parsetimey.y
++++ b/parsetimey.y
+@@ -7,6 +7,9 @@
+
+ #define YYDEBUG 1
+
++int yyerror(char *s);
++int yylex(void);
++
+ time_t currtime;
+ struct tm exectm;
+ static int isgmt;