commit:     82c03bcdd37fd0683b77cf55626943f85861dcc3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 24 08:00:28 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 08:01:13 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82c03bcd

sys-apps/ucspi-tcp: fix build w/ clang 16, use newer IPv6 patch

Closes: https://bugs.gentoo.org/871075
Closes: https://bugs.gentoo.org/881441
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/ucspi-tcp/Manifest                      |   1 +
 sys-apps/ucspi-tcp/files/0.88-implicit-int.patch | 272 +++++++++++++++++++++++
 sys-apps/ucspi-tcp/ucspi-tcp-0.88-r19.ebuild     |  73 ++++++
 3 files changed, 346 insertions(+)

diff --git a/sys-apps/ucspi-tcp/Manifest b/sys-apps/ucspi-tcp/Manifest
index 406c5b9c1922..11788d3fe8b5 100644
--- a/sys-apps/ucspi-tcp/Manifest
+++ b/sys-apps/ucspi-tcp/Manifest
@@ -1,5 +1,6 @@
 DIST ucspi-rss.diff 1828 BLAKE2B 
1ac6f97791425b2ad4f912f4773f60d85494c52417d28ef9b8059dd78850637b5d2f70ccdfdeebc60fdb5ad0f02fa681dab7fcb1ec752a96928f1061b7d3a611
 SHA512 
643514c57570fc0b4e817b07e6d26e831cec5b4657c3d1b9948bd90267fe370a340b911897d575eb94192e24ba71a03ac68ceb2774ef7c0e7ff819c5b4285bc3
 DIST ucspi-tcp-0.88-ipv6.diff19.bz2 22632 BLAKE2B 
8fdab5cfc82151adaf85d1ea611c57b900045ea71b4557c3f788662c16c579bea90c42a4213c45e6348ed78517e93198407eb3787e2edbd1719ce844dcb5c2d5
 SHA512 
58e38f9437b03aab121c5c1b9260806b5abd5a72bf22d14468955d6ff7ad2fb2ab285cb7a37b5dc3a568389aa02b8b3ecff0026b49a097ea86cfd340f2b38000
+DIST ucspi-tcp-0.88-ipv6.diff20.bz2 22088 BLAKE2B 
faa6cf37b828241fe8b0365aadc912465ed811b28cd6a02eef638afe5d8ec2d18a0635e756c4e5ed65e5dc13d49afee37a255e229f2cb2713628e6e8eb57d6ec
 SHA512 
f8d3ae49adec2b6a643458958679b712e803b0e4609b4395ff9c4fd13b5a29b6f9fc35aee59f2928b892908d37ed83b708c67346a4a42ec21e05e7782bff215b
 DIST ucspi-tcp-0.88-man.tar.gz 7562 BLAKE2B 
8b6326665cb48dd37683a50f3fe4cb65eb2fe3c28dc90ed1461b5bd878e7a7713f01d654d7d93df63e3f7a113baa4b6abfb6eeb65fdfb820051192b36070eccc
 SHA512 
e779d6d6b24a3af0edc362def229c657c704143e5f1dfba8d16d26b3e6bcacb9c8ceaabcccac61485a4719221c144bc0c36ebca5182985dca85a6d72101d4146
 DIST ucspi-tcp-0.88-rblspp.patch 6565 BLAKE2B 
abf13c4c7cc25d555c57e29e45ead89340f01c5ddee4cc27a7acfdfd51f1dfae441d3b82b79d792f6acbc78b4d82843f5af34f0a166f4b7eeee44711cd39b26a
 SHA512 
f3212d9d3bb59ec3b1f2b2bd09a80dce1eeeaf082dea68f18350a3aef818ef221eccfeb4dc7afff5c3f9e59003ec40f5e37fff86a2a5ab3145be1fe81297c990
 DIST ucspi-tcp-0.88.tar.gz 53019 BLAKE2B 
3327de31e225c851b43e40ae9d8c5e4d3b93e2c15ed6ef993ad9f4105d60f322c56797c45a37363258e7cd9a8d52a315d6a8d65686c5cd45d4be19781e40c233
 SHA512 
44efbd477dacf31d39fc970e2d2f74526dc815b905742f6127f0d5c80928ecc7e743089eaab0492386a58d5b97905113fbe8bbc7214ae179b7be27966b7566c7

diff --git a/sys-apps/ucspi-tcp/files/0.88-implicit-int.patch 
b/sys-apps/ucspi-tcp/files/0.88-implicit-int.patch
new file mode 100644
index 000000000000..8c4bbf327800
--- /dev/null
+++ b/sys-apps/ucspi-tcp/files/0.88-implicit-int.patch
@@ -0,0 +1,272 @@
+--- a/addcr.c
++++ b/addcr.c
+@@ -1,7 +1,7 @@
+ #include "buffer.h"
+ #include "exit.h"
+ 
+-main()
++int main()
+ {
+   register int n;
+   register char *x;
+--- a/argv0.c
++++ b/argv0.c
+@@ -1,7 +1,7 @@
+ #include "pathexec.h"
+ #include "strerr.h"
+ 
+-main(int argc,char **argv,char **envp)
++int main(int argc,char **argv,char **envp)
+ {
+   if (argc < 3)
+     strerr_die1x(100,"argv0: usage: argv0 realname program [ arg ... ]");
+--- a/auto-str.c
++++ b/auto-str.c
+@@ -11,7 +11,7 @@ void puts(char *s)
+   if (buffer_puts(&b,s) == -1) _exit(111);
+ }
+ 
+-main(int argc,char **argv)
++int main(int argc,char **argv)
+ {
+   char *name;
+   char *value;
+--- a/chkshsgr.c
++++ b/chkshsgr.c
+@@ -1,7 +1,7 @@
+ #include <grp.h>
+ #include "exit.h"
+ 
+-main()
++int main()
+ {
+   gid_t x[4];
+ 
+--- a/delcr.c
++++ b/delcr.c
+@@ -1,7 +1,7 @@
+ #include "buffer.h"
+ #include "exit.h"
+ 
+-main()
++int main()
+ {
+   register int n;
+   register char *x;
+--- a/fixcrio.c
++++ b/fixcrio.c
+@@ -127,7 +127,7 @@ void doit(int fdleft,int fdright)
+   _exit(0);
+ }
+ 
+-main(int argc,char **argv,char **envp)
++int main(int argc,char **argv,char **envp)
+ {
+   int piin[2];
+   int piout[2];
+--- a/install.c
++++ b/install.c
+@@ -138,7 +138,7 @@ int mode;
+     strerr_die6sys(111,FATAL,"unable to chmod .../",subdir,"/",file,": ");
+ }
+ 
+-main()
++int main()
+ {
+   fdsourcedir = open_read(".");
+   if (fdsourcedir == -1)
+--- a/instcheck.c
++++ b/instcheck.c
+@@ -101,7 +101,7 @@ int mode;
+   perm("",home,"/",file,S_IFREG,uid,gid,mode);
+ }
+ 
+-main()
++int main()
+ {
+   hier();
+   _exit(0);
+--- a/mconnect-io.c
++++ b/mconnect-io.c
+@@ -19,7 +19,7 @@ ssize_t myread(int fd,char *buf,int len)
+   return read(fd,buf,len);
+ }
+ 
+-main()
++int main()
+ {
+   int pid;
+   int wstat;
+--- a/rblsmtpd.c
++++ b/rblsmtpd.c
+@@ -191,7 +191,7 @@ void rblsmtpd(void)
+   _exit(0);
+ }
+ 
+-main(int argc,char **argv,char **envp)
++int main(int argc,char **argv,char **envp)
+ {
+   int flagwantdefaultrbl = 1;
+   char *x;
+--- a/rblspp.c
++++ b/rblspp.c
+@@ -165,7 +165,7 @@ void rblspp(void)
+   _exit(0);
+ }
+ 
+-main(int argc,char **argv,char **envp)
++int main(int argc,char **argv,char **envp)
+ {
+   char *x;
+   int opt;
+--- a/recordio.c
++++ b/recordio.c
+@@ -142,7 +142,7 @@ void doit(int fdleft,int fdright) /* copy 0 -> fdleft, 
copy fdright -> 1 */
+   _exit(0);
+ }
+ 
+-main(int argc,char **argv,char **envp)
++int main(int argc,char **argv,char **envp)
+ {
+   int piin[2];
+   int piout[2];
+--- a/tcpclient.c
++++ b/tcpclient.c
+@@ -70,7 +70,7 @@ char ipstr[IP6_FMT];
+ 
+ char seed[128];
+ 
+-main(int argc,char **argv)
++int main(int argc,char **argv)
+ {
+   int fakev4=0;
+   unsigned long u;
+--- a/tcprules.c
++++ b/tcprules.c
+@@ -90,7 +90,7 @@ void doaddressdata(void)
+   if (cdb_make_add(&c,address.s,address.len,data.s,data.len) == -1) 
die_write();
+ }
+ 
+-main(int argc,char **argv)
++int main(int argc,char **argv)
+ {
+   int colon;
+   char *x;
+--- a/tcprulescheck.c
++++ b/tcprulescheck.c
+@@ -34,7 +34,7 @@ void found(char *data,unsigned int datalen)
+   _exit(0);
+ }
+ 
+-main(int argc,char **argv)
++int main(int argc,char **argv)
+ {
+   char *fnrules;
+   int fd;
+--- a/tcpserver.c
++++ b/tcpserver.c
+@@ -323,7 +323,7 @@ void sigchld()
+   }
+ }
+ 
+-main(int argc,char **argv)
++int main(int argc,char **argv)
+ {
+   char *hostname;
+   char *portname;
+--- a/trycpp.c
++++ b/trycpp.c
+@@ -1,4 +1,4 @@
+-main()
++int main()
+ {
+ #ifdef NeXT
+   printf("nextstep\n"); exit(0);
+--- a/tryip6.c
++++ b/tryip6.c
+@@ -2,7 +2,7 @@
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ 
+-main() {
++int main() {
+   struct sockaddr_in6 sa;
+   sa.sin6_family = PF_INET6;
+ }
+--- a/trylsock.c
++++ b/trylsock.c
+@@ -1,4 +1,4 @@
+-main()
++int main()
+ {
+   ;
+ }
+--- a/trypoll.c
++++ b/trypoll.c
+@@ -2,7 +2,7 @@
+ #include <fcntl.h>
+ #include <poll.h>
+ 
+-main()
++int main()
+ {
+   struct pollfd x;
+ 
+--- a/trysgact.c
++++ b/trysgact.c
+@@ -1,6 +1,6 @@
+ #include <signal.h>
+ 
+-main()
++int main()
+ {
+   struct sigaction sa;
+   sa.sa_handler = 0;
+--- a/trysgprm.c
++++ b/trysgprm.c
+@@ -1,6 +1,6 @@
+ #include <signal.h>
+ 
+-main()
++int main()
+ {
+   sigset_t ss;
+  
+--- a/tryshsgr.c
++++ b/tryshsgr.c
+@@ -1,4 +1,4 @@
+-main()
++int main()
+ {
+   short x[4];
+  
+--- a/tryvfork.c
++++ b/tryvfork.c
+@@ -1,4 +1,4 @@
+-main()
++int main()
+ {
+   vfork();
+ }
+--- a/trywaitp.c
++++ b/trywaitp.c
+@@ -1,7 +1,7 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ 
+-main()
++int main()
+ {
+   waitpid(0,0,0);
+ }
+--- a/x86cpuid.c
++++ b/x86cpuid.c
+@@ -5,7 +5,7 @@ void nope()
+   exit(1);
+ }
+ 
+-main()
++int main()
+ {
+   unsigned long x[4];
+   unsigned long y[4];

diff --git a/sys-apps/ucspi-tcp/ucspi-tcp-0.88-r19.ebuild 
b/sys-apps/ucspi-tcp/ucspi-tcp-0.88-r19.ebuild
new file mode 100644
index 000000000000..af7bfc881cea
--- /dev/null
+++ b/sys-apps/ucspi-tcp/ucspi-tcp-0.88-r19.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit qmail toolchain-funcs
+
+DESCRIPTION="Collection of tools for managing UNIX services"
+HOMEPAGE="https://cr.yp.to/ucspi-tcp.html";
+SRC_URI="
+       https://cr.yp.to/${PN}/${P}.tar.gz
+       mirror://qmail/ucspi-rss.diff
+       http://smarden.org/pape/djb/manpages/${P}-man.tar.gz
+       http://xs3.b92.net/tomislavr/${P}-rblspp.patch
+       ipv6? ( https://www.fefe.de/ucspi/${P}-ipv6.diff20.bz2 )"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
+IUSE="ipv6 qmail-spp selinux"
+RESTRICT="test"
+
+RDEPEND="
+       !app-doc/ucspi-tcp-man
+       selinux? ( sec-policy/selinux-ucspitcp )"
+
+src_prepare() {
+       eapply "${FILESDIR}"/${PV}-protos.patch
+       if use ipv6; then
+               eapply "${WORKDIR}"/${P}-ipv6.diff20
+               eapply "${FILESDIR}"/${PV}-protos-ipv6.patch
+               eapply "${FILESDIR}"/${PV}-tcprules.patch #135571
+               eapply "${FILESDIR}"/${PV}-bigendian.patch #18892
+       else
+               eapply "${FILESDIR}"/${PV}-protos-no-ipv6.patch
+       fi
+       eapply "${DISTDIR}"/ucspi-rss.diff
+       eapply "${FILESDIR}"/${PV}-rblsmtpd-ignore-on-RELAYCLIENT.patch
+       eapply "${DISTDIR}"/${P}-rblspp.patch
+       eapply "${FILESDIR}"/${PV}-protos-rblspp.patch
+       eapply "${FILESDIR}"/${PV}-large-responses.patch
+       eapply "${FILESDIR}"/${PV}-uint-headers.patch
+       eapply "${FILESDIR}"/${PV}-ar-ranlib.patch
+       eapply "${FILESDIR}"/${PV}-implicit-int.patch
+
+       eapply_user
+}
+
+src_configure() {
+       qmail_set_cc
+       # The AR/RANLIB logic probably should get moved to the qmail eclass.
+       # See also the patch above for generating the "makelib" script.
+       tc-export AR RANLIB
+
+       echo "${EPREFIX}/usr/" > conf-home || die
+}
+
+src_install() {
+       dobin tcpserver tcprules tcprulescheck argv0 recordio tcpclient *\@ \
+               tcpcat mconnect mconnect-io addcr delcr fixcrio rblsmtpd
+
+       if use qmail-spp; then
+               insinto "${QMAIL_HOME}"/plugins
+               insopts -m 755
+               doins rblspp
+       fi
+
+       doman "${WORKDIR}"/${P}-man/*.[1-8]
+       dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION
+
+       insinto /etc/tcprules.d
+       newins "${FILESDIR}"/tcprules-Makefile Makefile
+}

Reply via email to