1 |
commit: 31173bcda1b5da8c889c911c378071968ff9bf05 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 26 03:08:47 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 26 03:08:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31173bcd |
7 |
|
8 |
app-admin/xtail: add 2.1_p8 (Debian + fix musl + fix Clang 16) |
9 |
|
10 |
Closes: https://bugs.gentoo.org/715876 |
11 |
Closes: https://bugs.gentoo.org/870673 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
app-admin/xtail/Manifest | 1 + |
15 |
.../xtail/files/xtail-2.1_p8-fix-limits-musl.patch | 28 ++++++++++++ |
16 |
.../xtail/files/xtail-2.1_p8-fix-prototype.patch | 20 +++++++++ |
17 |
.../files/xtail-2.1_p8-rename-configure.patch | 23 ++++++++++ |
18 |
app-admin/xtail/xtail-2.1_p8.ebuild | 50 ++++++++++++++++++++++ |
19 |
5 files changed, 122 insertions(+) |
20 |
|
21 |
diff --git a/app-admin/xtail/Manifest b/app-admin/xtail/Manifest |
22 |
index fe0ba2dc32a0..29b093243330 100644 |
23 |
--- a/app-admin/xtail/Manifest |
24 |
+++ b/app-admin/xtail/Manifest |
25 |
@@ -1,2 +1,3 @@ |
26 |
DIST 20120219-patch-aalto.zip 4991 BLAKE2B 6b3e228508bb12c1e18f3d2982c1bf23c996e1be231b4b08b640a310f9c5e9642b9f6ea25d45c717902cdf1024509fca6d804f8e64d3bb764eac8bc3e9bd0846 SHA512 ae20448944e25aa04879bdab8d61bd910b1aa6f85c3d8287e712c6d37b1154af480edc6569467e31b3b404d7f90f771ec3e4c20c58132d9125303b40a6f102f2 |
27 |
DIST xtail-2.1.tar.gz 26769 BLAKE2B 9a5c47810b2a8cd7aa4d8cc543ec9edce7a24ee446627f658063547276a43dfb72503f10c4d2d6a35f25415a32a2aa177dc5fde79e8ed834cf8ade5aaf9fb447 SHA512 a8519969ef960af97c4dcb75c679daa5687f553c909817ede1134dfa5d70ed71c5264f0e61c8c579cc253ccb7739a68c5213811169489a98e676ef8941d9446f |
28 |
+DIST xtail_2.1-8.debian.tar.xz 7168 BLAKE2B c04a239aabd307f36b983b83384ace6f7abbe7215f84921da159da57b338affb9840e3bfb9886121fd140e1a412f017cfdc1f22afe2ac8484fc1d8b641ef196e SHA512 6c00f87f905a94c579085e5f18e27fce94642d0a5a1376deb618f464a9ca6bb2f7ac0529ef7a2439b28c5314de7ee733f86dda0d7577d3575ce085e2a02c39fc |
29 |
|
30 |
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 |
31 |
new file mode 100644 |
32 |
index 000000000000..c9a7ca3f2f5d |
33 |
--- /dev/null |
34 |
+++ b/app-admin/xtail/files/xtail-2.1_p8-fix-limits-musl.patch |
35 |
@@ -0,0 +1,28 @@ |
36 |
+From: Sam James <sam@g.o> |
37 |
+Subject: [PATCH] Fix build on musl |
38 |
+ |
39 |
+Closes: https://bugs.gentoo.org/715876 |
40 |
+--- a/miscfuncs.c |
41 |
++++ b/miscfuncs.c |
42 |
+@@ -8,6 +8,8 @@ |
43 |
+ #include <ctype.h> |
44 |
+ #include <fcntl.h> |
45 |
+ #include <errno.h> |
46 |
++#include <limits.h> |
47 |
++ |
48 |
+ #ifdef HAVE_UNISTD_H |
49 |
+ # include <unistd.h> |
50 |
+ #endif |
51 |
+@@ -65,7 +67,11 @@ int scan_directory(const char *dirname) |
52 |
+ char *basename; |
53 |
+ struct stat sbuf; |
54 |
+ DIR *dirp; |
55 |
+- static char pathname[MAXNAMLEN]; |
56 |
++ #ifdef NAME_MAX |
57 |
++ static char pathname[NAME_MAX]; |
58 |
++ #else |
59 |
++ static char pathname[MAXNAMLEN] |
60 |
++ #endif |
61 |
+ |
62 |
+ Dprintf(stderr, ">>> scanning directory '%s'\n", dirname); |
63 |
+ if ((dirp = opendir(dirname)) == NULL) |
64 |
|
65 |
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 |
66 |
new file mode 100644 |
67 |
index 000000000000..29eff229772f |
68 |
--- /dev/null |
69 |
+++ b/app-admin/xtail/files/xtail-2.1_p8-fix-prototype.patch |
70 |
@@ -0,0 +1,20 @@ |
71 |
+From: Sam James <sam@g.o> |
72 |
+Subject: [PATCH] Fix -Wdeprecated-non-prototype |
73 |
+ |
74 |
+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] |
75 |
+ extern unsigned sleep(); |
76 |
+ ^ |
77 |
+/usr/include/unistd.h:464:21: note: conflicting prototype is here |
78 |
+extern unsigned int sleep (unsigned int __seconds); |
79 |
+ ^ |
80 |
+1 warning generated. |
81 |
+--- a/xtail.c |
82 |
++++ b/xtail.c |
83 |
+@@ -362,7 +362,6 @@ int main(int argc, char *argv[]) |
84 |
+ * End of checking loop. |
85 |
+ */ |
86 |
+ { |
87 |
+- extern unsigned sleep(); |
88 |
+ (void) fflush(stdout); |
89 |
+ (void) sleep(SLEEP_TIME); |
90 |
+ } |
91 |
|
92 |
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 |
93 |
new file mode 100644 |
94 |
index 000000000000..56d3372aceda |
95 |
--- /dev/null |
96 |
+++ b/app-admin/xtail/files/xtail-2.1_p8-rename-configure.patch |
97 |
@@ -0,0 +1,23 @@ |
98 |
+--- a/Makefile.in |
99 |
++++ b/Makefile.in |
100 |
+@@ -25,7 +25,7 @@ CFLAGS = @CFLAGS@ $(DEFS) |
101 |
+ TARBALL = xtail.tar |
102 |
+ XTAIL_OBJECTS = xtail.o entryfuncs.o miscfuncs.o |
103 |
+ DISTFILES = Makefile.in README acconfig.h config.h.in configure \ |
104 |
+- configure.in entryfuncs.c install-sh miscfuncs.c xtail.1 xtail.c \ |
105 |
++ configure.ac entryfuncs.c install-sh miscfuncs.c xtail.1 xtail.c \ |
106 |
+ xtail.h |
107 |
+ |
108 |
+ ### |
109 |
+@@ -70,9 +70,9 @@ Makefile : $(srcdir)/Makefile.in config.status |
110 |
+ #config.h : $(srcdir)/config.h.in config.status |
111 |
+ # CONFIG_FILES= CONFIG_HEADERS=$@ $(SHELL) ./config.status |
112 |
+ |
113 |
+-$(srcdir)/configure : $(srcdir)/configure.in |
114 |
++$(srcdir)/configure : $(srcdir)/configure.ac |
115 |
+ cd $(srcdir) && autoconf |
116 |
+ |
117 |
+-$(srcdir)/config.h.in : $(srcdir)/configure.in $(srcdir)/acconfig.h |
118 |
++$(srcdir)/config.h.in : $(srcdir)/configure.ac $(srcdir)/acconfig.h |
119 |
+ cd $(srcdir) && autoheader |
120 |
+ |
121 |
|
122 |
diff --git a/app-admin/xtail/xtail-2.1_p8.ebuild b/app-admin/xtail/xtail-2.1_p8.ebuild |
123 |
new file mode 100644 |
124 |
index 000000000000..1ff57c0e443a |
125 |
--- /dev/null |
126 |
+++ b/app-admin/xtail/xtail-2.1_p8.ebuild |
127 |
@@ -0,0 +1,50 @@ |
128 |
+# Copyright 1999-2022 Gentoo Authors |
129 |
+# Distributed under the terms of the GNU General Public License v2 |
130 |
+ |
131 |
+EAPI=8 |
132 |
+ |
133 |
+inherit autotools toolchain-funcs |
134 |
+ |
135 |
+MY_PV=$(ver_cut 1-2) |
136 |
+DESCRIPTION="Tail multiple logfiles at once, even if rotated" |
137 |
+HOMEPAGE="http://www.unicom.com/sw/xtail/" |
138 |
+SRC_URI=" |
139 |
+ http://www.unicom.com/sw/xtail/${PN}-${MY_PV}.tar.gz |
140 |
+ http://www.unicom.com/files/20120219-patch-aalto.zip |
141 |
+ mirror://debian/pool/main/x/xtail/xtail_${MY_PV}-$(ver_cut 4).debian.tar.xz |
142 |
+" |
143 |
+S="${WORKDIR}"/${PN}-${MY_PV} |
144 |
+ |
145 |
+LICENSE="BSD" |
146 |
+SLOT="0" |
147 |
+KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
148 |
+ |
149 |
+BDEPEND="app-arch/unzip" |
150 |
+ |
151 |
+PATCHES=( |
152 |
+ "${FILESDIR}"/${P}-rename-configure.patch |
153 |
+ "${FILESDIR}"/${P}-fix-prototype.patch |
154 |
+ "${FILESDIR}"/${P}-fix-limits-musl.patch |
155 |
+ |
156 |
+ "${WORKDIR}"/0001-xtail.1-remove-SIGQUIT.patch |
157 |
+ "${WORKDIR}"/debian/patches/ |
158 |
+) |
159 |
+ |
160 |
+src_prepare() { |
161 |
+ default |
162 |
+ |
163 |
+ # Needed for -Wimplicit-int in old configure |
164 |
+ eautoreconf |
165 |
+} |
166 |
+ |
167 |
+src_configure() { |
168 |
+ tc-export CC |
169 |
+ default |
170 |
+} |
171 |
+ |
172 |
+src_install() { |
173 |
+ dobin xtail |
174 |
+ doman xtail.1 |
175 |
+ dodoc README |
176 |
+ newdoc ../README README.patches |
177 |
+} |