summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-26 04:08:47 +0100
committerSam James <sam@gentoo.org>2022-09-26 04:08:47 +0100
commit31173bcda1b5da8c889c911c378071968ff9bf05 (patch)
tree8e2872cba09a68e14b2ec8602a863462ad838c4c /app-admin/xtail
parentapp-admin/watchfolder: fix implicit function decls (diff)
downloadgentoo-31173bcda1b5da8c889c911c378071968ff9bf05.tar.gz
gentoo-31173bcda1b5da8c889c911c378071968ff9bf05.tar.bz2
gentoo-31173bcda1b5da8c889c911c378071968ff9bf05.zip
app-admin/xtail: add 2.1_p8 (Debian + fix musl + fix Clang 16)
Closes: https://bugs.gentoo.org/715876 Closes: https://bugs.gentoo.org/870673 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-admin/xtail')
-rw-r--r--app-admin/xtail/Manifest1
-rw-r--r--app-admin/xtail/files/xtail-2.1_p8-fix-limits-musl.patch28
-rw-r--r--app-admin/xtail/files/xtail-2.1_p8-fix-prototype.patch20
-rw-r--r--app-admin/xtail/files/xtail-2.1_p8-rename-configure.patch23
-rw-r--r--app-admin/xtail/xtail-2.1_p8.ebuild50
5 files changed, 122 insertions, 0 deletions
diff --git a/app-admin/xtail/Manifest b/app-admin/xtail/Manifest
index fe0ba2dc32a0..29b093243330 100644
--- a/app-admin/xtail/Manifest
+++ b/app-admin/xtail/Manifest
@@ -1,2 +1,3 @@
DIST 20120219-patch-aalto.zip 4991 BLAKE2B 6b3e228508bb12c1e18f3d2982c1bf23c996e1be231b4b08b640a310f9c5e9642b9f6ea25d45c717902cdf1024509fca6d804f8e64d3bb764eac8bc3e9bd0846 SHA512 ae20448944e25aa04879bdab8d61bd910b1aa6f85c3d8287e712c6d37b1154af480edc6569467e31b3b404d7f90f771ec3e4c20c58132d9125303b40a6f102f2
DIST xtail-2.1.tar.gz 26769 BLAKE2B 9a5c47810b2a8cd7aa4d8cc543ec9edce7a24ee446627f658063547276a43dfb72503f10c4d2d6a35f25415a32a2aa177dc5fde79e8ed834cf8ade5aaf9fb447 SHA512 a8519969ef960af97c4dcb75c679daa5687f553c909817ede1134dfa5d70ed71c5264f0e61c8c579cc253ccb7739a68c5213811169489a98e676ef8941d9446f
+DIST xtail_2.1-8.debian.tar.xz 7168 BLAKE2B c04a239aabd307f36b983b83384ace6f7abbe7215f84921da159da57b338affb9840e3bfb9886121fd140e1a412f017cfdc1f22afe2ac8484fc1d8b641ef196e SHA512 6c00f87f905a94c579085e5f18e27fce94642d0a5a1376deb618f464a9ca6bb2f7ac0529ef7a2439b28c5314de7ee733f86dda0d7577d3575ce085e2a02c39fc
diff --git a/app-admin/xtail/files/xtail-2.1_p8-fix-limits-musl.patch b/app-admin/xtail/files/xtail-2.1_p8-fix-limits-musl.patch
new file mode 100644
index 000000000000..c9a7ca3f2f5d
--- /dev/null
+++ b/app-admin/xtail/files/xtail-2.1_p8-fix-limits-musl.patch
@@ -0,0 +1,28 @@
+From: Sam James <sam@gentoo.org>
+Subject: [PATCH] Fix build on musl
+
+Closes: https://bugs.gentoo.org/715876
+--- a/miscfuncs.c
++++ b/miscfuncs.c
+@@ -8,6 +8,8 @@
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#include <limits.h>
++
+ #ifdef HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+@@ -65,7 +67,11 @@ int scan_directory(const char *dirname)
+ char *basename;
+ struct stat sbuf;
+ DIR *dirp;
+- static char pathname[MAXNAMLEN];
++ #ifdef NAME_MAX
++ static char pathname[NAME_MAX];
++ #else
++ static char pathname[MAXNAMLEN]
++ #endif
+
+ Dprintf(stderr, ">>> scanning directory '%s'\n", dirname);
+ if ((dirp = opendir(dirname)) == NULL)
diff --git a/app-admin/xtail/files/xtail-2.1_p8-fix-prototype.patch b/app-admin/xtail/files/xtail-2.1_p8-fix-prototype.patch
new file mode 100644
index 000000000000..29eff229772f
--- /dev/null
+++ b/app-admin/xtail/files/xtail-2.1_p8-fix-prototype.patch
@@ -0,0 +1,20 @@
+From: Sam James <sam@gentoo.org>
+Subject: [PATCH] Fix -Wdeprecated-non-prototype
+
+xtail.c:365:22: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a previous declaration [-Wdeprecated-non-prototype]
+ extern unsigned sleep();
+ ^
+/usr/include/unistd.h:464:21: note: conflicting prototype is here
+extern unsigned int sleep (unsigned int __seconds);
+ ^
+1 warning generated.
+--- a/xtail.c
++++ b/xtail.c
+@@ -362,7 +362,6 @@ int main(int argc, char *argv[])
+ * End of checking loop.
+ */
+ {
+- extern unsigned sleep();
+ (void) fflush(stdout);
+ (void) sleep(SLEEP_TIME);
+ }
diff --git a/app-admin/xtail/files/xtail-2.1_p8-rename-configure.patch b/app-admin/xtail/files/xtail-2.1_p8-rename-configure.patch
new file mode 100644
index 000000000000..56d3372aceda
--- /dev/null
+++ b/app-admin/xtail/files/xtail-2.1_p8-rename-configure.patch
@@ -0,0 +1,23 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -25,7 +25,7 @@ CFLAGS = @CFLAGS@ $(DEFS)
+ TARBALL = xtail.tar
+ XTAIL_OBJECTS = xtail.o entryfuncs.o miscfuncs.o
+ DISTFILES = Makefile.in README acconfig.h config.h.in configure \
+- configure.in entryfuncs.c install-sh miscfuncs.c xtail.1 xtail.c \
++ configure.ac entryfuncs.c install-sh miscfuncs.c xtail.1 xtail.c \
+ xtail.h
+
+ ###
+@@ -70,9 +70,9 @@ Makefile : $(srcdir)/Makefile.in config.status
+ #config.h : $(srcdir)/config.h.in config.status
+ # CONFIG_FILES= CONFIG_HEADERS=$@ $(SHELL) ./config.status
+
+-$(srcdir)/configure : $(srcdir)/configure.in
++$(srcdir)/configure : $(srcdir)/configure.ac
+ cd $(srcdir) && autoconf
+
+-$(srcdir)/config.h.in : $(srcdir)/configure.in $(srcdir)/acconfig.h
++$(srcdir)/config.h.in : $(srcdir)/configure.ac $(srcdir)/acconfig.h
+ cd $(srcdir) && autoheader
+
diff --git a/app-admin/xtail/xtail-2.1_p8.ebuild b/app-admin/xtail/xtail-2.1_p8.ebuild
new file mode 100644
index 000000000000..1ff57c0e443a
--- /dev/null
+++ b/app-admin/xtail/xtail-2.1_p8.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+MY_PV=$(ver_cut 1-2)
+DESCRIPTION="Tail multiple logfiles at once, even if rotated"
+HOMEPAGE="http://www.unicom.com/sw/xtail/"
+SRC_URI="
+ http://www.unicom.com/sw/xtail/${PN}-${MY_PV}.tar.gz
+ http://www.unicom.com/files/20120219-patch-aalto.zip
+ mirror://debian/pool/main/x/xtail/xtail_${MY_PV}-$(ver_cut 4).debian.tar.xz
+"
+S="${WORKDIR}"/${PN}-${MY_PV}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+BDEPEND="app-arch/unzip"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-rename-configure.patch
+ "${FILESDIR}"/${P}-fix-prototype.patch
+ "${FILESDIR}"/${P}-fix-limits-musl.patch
+
+ "${WORKDIR}"/0001-xtail.1-remove-SIGQUIT.patch
+ "${WORKDIR}"/debian/patches/
+)
+
+src_prepare() {
+ default
+
+ # Needed for -Wimplicit-int in old configure
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC
+ default
+}
+
+src_install() {
+ dobin xtail
+ doman xtail.1
+ dodoc README
+ newdoc ../README README.patches
+}