summaryrefslogtreecommitdiff
path: root/net-proxy/3proxy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-22 06:41:43 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-22 06:41:43 +0000
commitaaeed2da8906f11cba80355688015d74b01cc604 (patch)
tree5d714c0600fd3f185c0ddb96eef8dd41a5f3ec5e /net-proxy/3proxy
parent23b767af73549eeb4dd3069e09d0f2fcb88669a8 (diff)
gentoo auto-resync : 22:03:2023 - 06:41:43
Diffstat (limited to 'net-proxy/3proxy')
-rw-r--r--net-proxy/3proxy/3proxy-0.9.4.ebuild47
-rw-r--r--net-proxy/3proxy/Manifest6
-rw-r--r--net-proxy/3proxy/files/3proxy-0.9.4-function-pointer-fix.patch58
-rw-r--r--net-proxy/3proxy/files/3proxy-0.9.4-gentoo.patch38
-rw-r--r--net-proxy/3proxy/metadata.xml2
5 files changed, 149 insertions, 2 deletions
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 df5d4a462ae0..e0e02b0b2a38 100644
--- a/net-proxy/3proxy/Manifest
+++ b/net-proxy/3proxy/Manifest
@@ -1,4 +1,8 @@
AUX 3proxy-0.9.0-gentoo.patch 1426 BLAKE2B 221bc5e87ae399ef621e687f03fbbd57a1f8ecce74e7ec0ed57f9536a4d8195563b00f4249769fe8ba3a736fc0cc5ca0441d5b879da575c3aa888d912ded2c4d SHA512 183d45fab08cf86d542f49844c8cc3e0930cc262bd928722ef021ab4bda21542f30587d3c1850d89caffc29059f7e3b5b2f22f1b5bdab15d916556e7af1951ee
+AUX 3proxy-0.9.4-function-pointer-fix.patch 2406 BLAKE2B 5153da4fd8d8547539adb5931fb17c9a1a48e7aef0202d79cd923063eabac424ce794a172358d75c6631e379d4a512f931271431baab287965eb6bbbf5a346d1 SHA512 f6e214256f4d85f7927f6a07336086cdf358191553cc9bec3864901f12755d867fbda149e414646941a0fe928264db49ec0802c30d80b4b84dddbb435f17d774
+AUX 3proxy-0.9.4-gentoo.patch 1508 BLAKE2B 4d282ec50b2e9d1c1a0a262ea45b02fe1afafb94396e414b683bd5c33108890b28866ec9bfa1c6e4cd597117624d639ee91127459c94b9a25b296e4635350423 SHA512 a7e240947ae9b0f9f2747d8dfb67b5f2db6aeaa8c75f8bc86d5e44599bd31330fec22478c9680e38c3d1c86ddf32604e04e8dff2c7aaebaba827a2343cb08850
DIST 3proxy-0.9.0.tar.gz 607014 BLAKE2B dae9004ea1474080fbbd4a3ff3a2690f8a6afb2ab2c045dbdaa25adf10ff2c58501d46a5a99b24db526b153ce00d281851ec08499d908709c5801c27aa7b0ca8 SHA512 7429389bf70c38d57e7a6f34e649a04aaad4f81555b7ef131cae026123ff7877d3f1aef8d10f84b9fc2c58e9ad5ab3d55e4af7326dbce14c05f3cd9973fafd83
+DIST 3proxy-0.9.4.tar.gz 610340 BLAKE2B 7b98cc26fc943fcf15a6518a7adb79ccc79d8250b359f97318e9a48b4bb2643a88ee5fed49216d4ee71b436d0a21231e148f616c78b1dfab8b0b720a4223ccfd SHA512 d3316f6ee1217e580ce593a7bfd9d76672487a89862f247373b0acf3ea207887c758168e33b25db9fc974063deab0826c20d455cab2536d03eee49d8bddda6b5
EBUILD 3proxy-0.9.0.ebuild 919 BLAKE2B cdafe11efccb3df2faf230c4c9442f7a8603cdabd86cd3f7f52f81029c75fd6913de09d04486e31bbbca0a98c34a6801a89bf72fc4c913ad3077a99e6557d553 SHA512 a5717bedc448ba3a8719a8538ed6921ca6d9f8906aa2ca6066b3de3fa9bb7891d677b1f790ee15a01f42986f1e2ed1bb4d0183193f0038ef8f53eac605d43c24
-MISC metadata.xml 1133 BLAKE2B c2d3c41af91347312ba65f92d10bc0faa44ae4a4cfa398499cfd9b466df030cc770818cd84c8ca668cdc30db83ff254a8269008aba8a2b7a9b88a4a147d8b8df SHA512 a2878d1a835fb250accc2134f0ce560fc7e21b241a09bb55ad6d4fc35af630b37f1aeaff1193c7076fa7eab71964e37df5e1f6ef94cfd499a1118327e638c433
+EBUILD 3proxy-0.9.4.ebuild 941 BLAKE2B 6bf7da7bbe55b34f3a6f1a91cc54be7811a01b60d9b7d925f792b8e3f200b9a9fd9672f67ae0e079d48d13c1bd183149c518739561e4d0782dfc7b2302279375 SHA512 09fe116c3c2cc92f902fe9b055ae731c831d6b97f795a670cef46ecbd22ae84a7d272e27c5186a7ba3f134c21f564bac4c0d9446ff5d00da8045f56ecf66fac7
+MISC metadata.xml 1132 BLAKE2B 2e80d4d01d54098fac00677c83d12a0948ce374bafc689f130a3e5f35adbeb3ea4ce2c8c859f2d6d598301fedf8175ffd514da02b72ac8805cb35f1146c2537f SHA512 4556e7a09d7d97d45e34ad280afcb684655ee18df58ed223470d9e1bb4f9ca0bb671fe8c308aceb9cc7d6bdcea64b38a66eeee035d44ef96c9ebef10162d80b9
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 <poll.h>
+ #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
diff --git a/net-proxy/3proxy/metadata.xml b/net-proxy/3proxy/metadata.xml
index 679db325f1dd..ae0815838456 100644
--- a/net-proxy/3proxy/metadata.xml
+++ b/net-proxy/3proxy/metadata.xml
@@ -21,6 +21,6 @@
like to say secure - but it's just a beta) and yet functional.
</longdescription>
<upstream>
- <remote-id type="github">z3APA3A/3proxy</remote-id>
+ <remote-id type="github">3proxy/3proxy</remote-id>
</upstream>
</pkgmetadata>