From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9CE1915A7D9 for ; Wed, 22 Mar 2023 01:20:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BAE80E08FA; Wed, 22 Mar 2023 01:20:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8FB66E08FA for ; Wed, 22 Mar 2023 01:20:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B5365340E57 for ; Wed, 22 Mar 2023 01:20:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F0101913 for ; Wed, 22 Mar 2023 01:20:33 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1679447949.20d962742de92d136470b6a3dd2c4e6727ffa2ff.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/3proxy/files/, net-proxy/3proxy/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-proxy/3proxy/3proxy-0.9.4.ebuild net-proxy/3proxy/Manifest net-proxy/3proxy/files/3proxy-0.9.4-function-pointer-fix.patch net-proxy/3proxy/files/3proxy-0.9.4-gentoo.patch X-VCS-Directories: net-proxy/3proxy/ net-proxy/3proxy/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 20d962742de92d136470b6a3dd2c4e6727ffa2ff X-VCS-Branch: master Date: Wed, 22 Mar 2023 01:20:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 02785475-8e0c-4a69-b368-efde02e43265 X-Archives-Hash: fcb0027c0b29d8250f038490c58090a8 commit: 20d962742de92d136470b6a3dd2c4e6727ffa2ff Author: Petr Vaněk atlas cz> AuthorDate: Tue Mar 21 14:02:28 2023 +0000 Commit: Sam James gentoo org> CommitDate: Wed Mar 22 01:19:09 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20d96274 net-proxy/3proxy: add 0.9.4 - EAPI bump - update HOMEPAGE and SRC_URI - update gentoo patch - add fix for clang-16 [1,2] - remove src_compile phase, CC is now exported in src_prepare, LN is not needed anymore as it is set to $(CC) by default. [1] https://github.com/3proxy/3proxy/issues/895 [2] https://github.com/3proxy/3proxy/pull/907 Closes: https://bugs.gentoo.org/881015 Signed-off-by: Petr Vaněk atlas.cz> Closes: https://github.com/gentoo/gentoo/pull/30287 Signed-off-by: Sam James gentoo.org> net-proxy/3proxy/3proxy-0.9.4.ebuild | 47 ++++++++++++++++++ net-proxy/3proxy/Manifest | 1 + .../files/3proxy-0.9.4-function-pointer-fix.patch | 58 ++++++++++++++++++++++ net-proxy/3proxy/files/3proxy-0.9.4-gentoo.patch | 38 ++++++++++++++ 4 files changed, 144 insertions(+) diff --git a/net-proxy/3proxy/3proxy-0.9.4.ebuild b/net-proxy/3proxy/3proxy-0.9.4.ebuild new file mode 100644 index 000000000000..80444d214f60 --- /dev/null +++ b/net-proxy/3proxy/3proxy-0.9.4.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="A really tiny cross-platform proxy servers set" +HOMEPAGE=" + https://3proxy.ru/ + https://github.com/3proxy/3proxy/ +" +SRC_URI="https://github.com/3proxy/3proxy/archive/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~sparc ~x86" + +PATCHES=( + "${FILESDIR}/${P}-gentoo.patch" + "${FILESDIR}/${P}-function-pointer-fix.patch" +) + +DOCS=( README cfg ) +HTML_DOCS=( doc/html/. ) + +src_prepare() { + default + tc-export CC + cp Makefile.Linux Makefile || die +} + +src_install() { + local x + + pushd bin >/dev/null || die + dolib.so *.so + dobin 3proxy + for x in ftppr mycrypt pop3p proxy smtpp socks tcppm udppm; do + newbin ${x} ${PN}-${x} + [[ -f "${S}"/man/${x}.8 ]] && newman "${S}"/man/${x}.8 ${PN}-${x}.8 + done + popd >/dev/null + + doman man/3proxy*.[38] + + einstalldocs +} diff --git a/net-proxy/3proxy/Manifest b/net-proxy/3proxy/Manifest index 16b6fe43d8d4..dde3c28222fe 100644 --- a/net-proxy/3proxy/Manifest +++ b/net-proxy/3proxy/Manifest @@ -1 +1,2 @@ DIST 3proxy-0.9.0.tar.gz 607014 BLAKE2B dae9004ea1474080fbbd4a3ff3a2690f8a6afb2ab2c045dbdaa25adf10ff2c58501d46a5a99b24db526b153ce00d281851ec08499d908709c5801c27aa7b0ca8 SHA512 7429389bf70c38d57e7a6f34e649a04aaad4f81555b7ef131cae026123ff7877d3f1aef8d10f84b9fc2c58e9ad5ab3d55e4af7326dbce14c05f3cd9973fafd83 +DIST 3proxy-0.9.4.tar.gz 610340 BLAKE2B 7b98cc26fc943fcf15a6518a7adb79ccc79d8250b359f97318e9a48b4bb2643a88ee5fed49216d4ee71b436d0a21231e148f616c78b1dfab8b0b720a4223ccfd SHA512 d3316f6ee1217e580ce593a7bfd9d76672487a89862f247373b0acf3ea207887c758168e33b25db9fc974063deab0826c20d455cab2536d03eee49d8bddda6b5 diff --git a/net-proxy/3proxy/files/3proxy-0.9.4-function-pointer-fix.patch b/net-proxy/3proxy/files/3proxy-0.9.4-function-pointer-fix.patch new file mode 100644 index 000000000000..9c51f90f1df1 --- /dev/null +++ b/net-proxy/3proxy/files/3proxy-0.9.4-function-pointer-fix.patch @@ -0,0 +1,58 @@ +Use poll with nfds_t type + +Fixes: https://github.com/3proxy/3proxy/issues/895 +Bug: https://bugs.gentoo.org/881015 +Upstream-PR: https://github.com/3proxy/3proxy/pull/907 + +diff --git a/src/common.c b/src/common.c +index e8106e2..27ad390 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -157,7 +157,7 @@ int + WINAPI + #endif + +- mypoll(struct mypollfd *fds, unsigned int nfds, int timeout){ ++ mypoll(struct mypollfd *fds, nfds_t nfds, int timeout){ + fd_set readfd; + fd_set writefd; + fd_set oobfd; +diff --git a/src/structures.h b/src/structures.h +index 8d41374..ee778c2 100644 +--- a/src/structures.h ++++ b/src/structures.h +@@ -69,6 +69,7 @@ int mutex_unlock(int *val); + #ifdef WITH_POLL + #include + #else ++typedef unsigned int nfds_t; + #ifdef WITH_WSAPOLL + + #define poll(A,B,C) WSAPoll(A,B,C) +@@ -84,7 +85,7 @@ int + #ifdef _WIN32 + WINAPI + #endif +- mypoll(struct mypollfd *fds, unsigned int nfds, int timeout); ++ mypoll(struct mypollfd *fds, nfds_t nfds, int timeout); + #ifndef POLLIN + #define POLLIN 1 + #endif +@@ -701,7 +702,7 @@ struct sockfuncs { + int (WINAPI *_getsockname)(SOCKET s, struct sockaddr * name, int * namelen); + int (WINAPI *_getsockopt)(SOCKET s, int level, int optname, char * optval, int * optlen); + int (WINAPI *_setsockopt)(SOCKET s, int level, int optname, const char *optval, int optlen); +- int (WINAPI *_poll)(struct pollfd *fds, unsigned int nfds, int timeout); ++ int (WINAPI *_poll)(struct pollfd *fds, nfds_t nfds, int timeout); + int (WINAPI *_send)(SOCKET s, const char *msg, int len, int flags); + int (WINAPI *_sendto)(SOCKET s, const char *msg, int len, int flags, const struct sockaddr *to, int tolen); + int (WINAPI *_recv)(SOCKET s, char *buf, int len, int flags); +@@ -718,7 +719,7 @@ struct sockfuncs { + int (*_getsockname)(SOCKET s, struct sockaddr * name, socklen_t * namelen); + int (*_getsockopt)(SOCKET s, int level, int optname, void * optval, socklen_t * optlen); + int (*_setsockopt)(int s, int level, int optname, const void *optval, socklen_t optlen); +- int (*_poll)(struct pollfd *fds, unsigned int nfds, int timeout); ++ int (*_poll)(struct pollfd *fds, nfds_t nfds, int timeout); + size_t (*_send)(SOCKET s, const void *msg, size_t len, int flags); + size_t (*_sendto)(SOCKET s, const void *msg, size_t len, int flags, const struct sockaddr *to, SASIZETYPE tolen); + size_t (*_recv)(SOCKET s, void *buf, size_t len, int flags); diff --git a/net-proxy/3proxy/files/3proxy-0.9.4-gentoo.patch b/net-proxy/3proxy/files/3proxy-0.9.4-gentoo.patch new file mode 100644 index 000000000000..57a9b479f1e3 --- /dev/null +++ b/net-proxy/3proxy/files/3proxy-0.9.4-gentoo.patch @@ -0,0 +1,38 @@ +diff --git a/Makefile.Linux b/Makefile.Linux +index 4f3f2b3..f15f6ff 100644 +--- a/Makefile.Linux ++++ b/Makefile.Linux +@@ -8,13 +8,13 @@ + # library support. Add -DSAFESQL for poorely written ODBC library / drivers. + + BUILDDIR = ../bin/ +-CC = gcc ++CC ?= gcc + +-CFLAGS = -g -fPIC -O2 -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER ++CFLAGS += -fPIC -fno-strict-aliasing -c -pthread -DWITHSPLICE -D_GNU_SOURCE -DGETHOSTBYNAME_R -D_THREAD_SAFE -D_REENTRANT -DNOODBC -DWITH_STD_MALLOC -DFD_SETSIZE=4096 -DWITH_POLL -DWITH_NETFILTER + COUT = -o + LN = $(CC) + DCFLAGS = +-LDFLAGS = -fPIE -O2 -fno-strict-aliasing -pthread ++LDFLAGS += -fPIE -fno-strict-aliasing -pthread + DLFLAGS = -shared + DLSUFFICS = .ld.so + # -lpthreads may be reuqired on some platforms instead of -pthreads +@@ -40,13 +40,13 @@ PLUGINS = StringsPlugin TrafficPlugin PCREPlugin TransparentPlugin + include Makefile.inc + + allplugins: +- @list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; make ; cd ../.. ; done ++ @list='$(PLUGINS)'; for p in $$list; do cp Makefile Makefile.var plugins/$$p; cd plugins/$$p ; $(MAKE) ; cd ../.. ; done + + DESTDIR = + prefix = + exec_prefix = $(prefix) +-man_prefix = /usr/share +-chroot_prefix = /usr/local ++man_prefix = $(prefix)/usr/share ++chroot_prefix = $(prefix)/usr/local + + INSTALL = /usr/bin/install + INSTALL_BIN = $(INSTALL) -m 755