diff --git a/devel/proxychains-ng/Portfile b/devel/proxychains-ng/Portfile index dc7f95841c4c3..5fdc10a69e70a 100644 --- a/devel/proxychains-ng/Portfile +++ b/devel/proxychains-ng/Portfile @@ -2,6 +2,10 @@ PortSystem 1.0 PortGroup github 1.0 +PortGroup legacysupport 1.1 + +# dprintf +legacysupport.newest_darwin_requires_legacy 10 github.setup rofl0r proxychains-ng 4.17 v maintainers nomaintainer @@ -12,8 +16,6 @@ long_description ${name} is a {*}${description} which hooks calls to \ sockets indynamically linked programs and redirects \ it through one or more socks/http proxies. -platforms darwin - master_sites ${homepage}/archive/ distname ${github.tag_prefix}${version} worksrcdir ${name}-${version} @@ -22,4 +24,21 @@ checksums rmd160 83073f3df35c28c0a8d6ad2b522669c8727a1a8b \ sha256 1a2dc68fcbcb2546a07a915343c1ffc75845f5d9cc3ea5eb3bf0b62a66c0196f \ size 52568 +patchfiles-append patch-EAI_OVERFLOW.diff + +# https://github.com/rofl0r/proxychains-ng/issues/578 +patchfiles-append patch-fix-memcpy.diff + +# error: ‘struct ’ has no member named ‘in_addr’ +compiler.blacklist-append \ + *gcc-4.0 *gcc-4.2 + +platform darwin { + # https://github.com/rofl0r/proxychains-ng/issues/579 + if {${os.major} > 22 && [string match *clang* ${configure.compiler}]} { + configure.cflags-append \ + -Wno-error=incompatible-function-pointer-types + } +} + destroot.target-append install-config diff --git a/devel/proxychains-ng/files/patch-EAI_OVERFLOW.diff b/devel/proxychains-ng/files/patch-EAI_OVERFLOW.diff new file mode 100644 index 0000000000000..b0531d6172db5 --- /dev/null +++ b/devel/proxychains-ng/files/patch-EAI_OVERFLOW.diff @@ -0,0 +1,13 @@ +--- src/libproxychains.c.orig 2024-01-22 01:28:35.000000000 +0800 ++++ src/libproxychains.c 2024-08-29 05:25:20.000000000 +0800 +@@ -55,6 +55,10 @@ + connect_t true___xnet_connect; + #endif + ++#ifndef EAI_OVERFLOW ++#define EAI_OVERFLOW EAI_FAIL ++#endif ++ + close_t true_close; + close_range_t true_close_range; + connect_t true_connect; diff --git a/devel/proxychains-ng/files/patch-fix-memcpy.diff b/devel/proxychains-ng/files/patch-fix-memcpy.diff new file mode 100644 index 0000000000000..2c84674e6d159 --- /dev/null +++ b/devel/proxychains-ng/files/patch-fix-memcpy.diff @@ -0,0 +1,11 @@ +--- src/core.c.orig 2024-01-22 01:28:35.000000000 +0800 ++++ src/core.c 2024-08-29 05:32:43.000000000 +0800 +@@ -999,7 +999,7 @@ + } else if(!node && !(hints->ai_flags & AI_PASSIVE)) { + af = ((struct sockaddr_in *) &space->sockaddr_space)->sin_family = AF_INET; + memcpy(&((struct sockaddr_in *) &space->sockaddr_space)->sin_addr, +- (char[]){127,0,0,1}, 4); ++ ((char[]){127,0,0,1}), 4); + } + if(service) mygetservbyname_r(service, NULL, &se_buf, buf, sizeof(buf), &se); +