net-proxy/dante: add 1.4.4

Updated to new debian patchset, removed upstreamed patch, fixed
build with USE=debug
Won't build on musl due to missing `bindresvport(3)` and unused
guard macro.

Closes: https://bugs.gentoo.org/943718
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/401
Merges: https://codeberg.org/gentoo/gentoo/pulls/401
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
NHOrus
2026-03-22 21:22:41 +03:00
committed by Sam James
parent 8740d612f8
commit 7b3b20b6c8
2 changed files with 123 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
DIST dante-1.4.1.tar.gz 1284288 BLAKE2B 34c78007245339088d79e0b969b8f55d20b0ee59d89c1bf19510b563799ac3c54c6b8b5f37bfb64410d60e893beb0e2d1d79893c0264b7481aeb4cdab2037e90 SHA512 1c8e2966ba68c8584fb99ff76ae1d9c8dfe669c7e5e61c7e6e7f87295d1280c3e7849491a6369ce27795040f951dcc11f4f2b3d7e46c54219594c89315d0487e
DIST dante-1.4.3.tar.gz 1343935 BLAKE2B dc069fd99a0d4a606b1eb7ce5dabbb20be63a4b4b3b02ee5e7c6d9b5614ae89226559df9c0bdaa3bee803b04e452311ab016c9116d57f3f8f48205ec797c5475 SHA512 c19675b2dee931366caf4a0dd4f44045ae731cc2f986e5d2e4bf498925c7d93a92a32088234d4a9443424f6dfb0796a1fa3fdc7c47e5aa11612c29a101f47888
DIST dante-1.4.4.tar.gz 1378352 BLAKE2B 30abb4faa31b31cba317b09c3c622098bacb553fa19db3ad422428613c243d881624242c05456e49b8ed4f2a29a7a3645395c31686c5ff4e616a7cd7908ca2cd SHA512 bf6b82fcad63d0920b77cebe360612a639c8532fbda6dc84f1bc88e89671e358f4819bf9759b1ba3bb7fbe703eec7e59d9cef620b6e65f177686d5b00e5f221a
DIST dante_1.4.3+dfsg-2.debian.tar.xz 42736 BLAKE2B 3e385eb4dee0278edfe72720139b19d4900b828372e6dc5b8361dbcf2ba76f0a0a5b523680068aa0c61fcbabac25ce413f23c96ab56c368ddda1ef8dd1fee528 SHA512 0acbb82eba1e37af0b485ac5b43cb06f5d699e5cac427a8c678fe8633a08ce5697ff936d3f1dd747cb2cc3c7ac7c713193ae07c1913e794f35fd55278c8fec16
DIST dante_1.4.4+dfsg-1.debian.tar.xz 47680 BLAKE2B 14d77be9b76b5e4b03a6c14e1eb0a7257bb7d1ddc6f1819868e29e49ebcf2da88e0b73f714ea1fe055ad931979d39b9b9ab338e1e1d6d5fe30ccd00ea7822cf1 SHA512 cf5993020fb443b39fb11fad25a70cf8c838e9e5868f93bf5c95f4dfa70e7825ef032406591229265f9e5b2d02eaafa981b9c4bce2475ceb1e00b88a1a891006

View File

@@ -0,0 +1,121 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools systemd flag-o-matic
DESCRIPTION="A free socks4,5 and msproxy implementation"
HOMEPAGE="https://www.inet.no/dante/"
SRC_URI="https://www.inet.no/dante/files/${P}.tar.gz"
PATCH_LEVEL="dfsg-1"
[[ -n "${PATCH_LEVEL}" ]] && \
SRC_URI+=" mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}+${PATCH_LEVEL}.debian.tar.xz"
LICENSE="BSD GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="debug kerberos pam selinux static-libs tcpd upnp"
CDEPEND="
sys-apps/shadow
virtual/libcrypt:=
kerberos? ( virtual/krb5 )
pam? ( sys-libs/pam )
tcpd? ( sys-apps/tcp-wrappers )
upnp? ( net-libs/miniupnpc:= )
"
DEPEND="${CDEPEND}
app-alternatives/yacc
app-alternatives/lex
"
RDEPEND="${CDEPEND}
acct-group/sockd
acct-user/sockd
selinux? ( sec-policy/selinux-dante )
"
DOCS="BUGS CREDITS NEWS README SUPPORT doc/README* doc/*.txt doc/SOCKS4.protocol"
PATCHES=(
"${FILESDIR}"/${PN}-1.4.0-socksify.patch
"${FILESDIR}"/${PN}-1.4.0-osdep-format-macro.patch
"${FILESDIR}"/${PN}-1.4.2-cflags.patch
"${FILESDIR}"/${PN}-1.4.3-osdep-debug.patch
"${FILESDIR}"/${PN}-1.4.3-gai-symbol.patch
)
src_prepare() {
DEB_PATCHES=${S}/../debian/patches
PATCHES+=(
$( sed "s,^,${DEB_PATCHES}/," < "${DEB_PATCHES}"/series )
)
default
# 780039
sed -e 's/-all-dynamic//' -i dlib/Makefile.am dlib64/Makefile.am || die
sed -i \
-e 's:/etc/socks\.conf:"${EPREFIX}"/etc/socks/socks.conf:' \
-e 's:/etc/sockd\.conf:"${EPREFIX}"/etc/socks/sockd.conf:' \
doc/{socksify.1,socks.conf.5,sockd.conf.5,sockd.8} \
|| die
sed -i \
-e 's:AM_CONFIG_HEADER\>:AC_CONFIG_HEADERS:' \
configure.ac || die
eautoreconf
}
src_configure() {
# K&R declarations fail on LLVM with -std=C23
append-cflags -std=gnu17
# Configure fails to find functions in netdb.h due to missing include,
# which causes missing symbols in library. Easier to disable error.
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
# hardcoded the libc name otherwise the scan on a amd64 multilib system
# ends up finding /usr/lib32/libc.so.5. That cascades and causes the
# preload/libdsocks to not be built.
econf -C \
--with-socks-conf="${EPREFIX}"/etc/socks/socks.conf \
--with-sockd-conf="${EPREFIX}"/etc/socks/sockd.conf \
--enable-preload \
--enable-clientdl \
--enable-serverdl \
--enable-drt-fallback \
--with-libc=libc.so.6 \
$(use_enable debug) \
$(use_enable debug diagnostic) \
$(use_with kerberos gssapi) \
$(use_with pam) \
$(use_with upnp) \
$(use_enable static-libs static) \
$(use_with tcpd libwrap)
}
src_install() {
default
# default configuration files
insinto /etc/socks
doins "${FILESDIR}"/sock?.conf
pushd "${ED}"/etc/socks > /dev/null
use pam && eapply -p0 "${FILESDIR}"/sockd.conf-with-pam.patch
use tcpd && eapply -p0 "${FILESDIR}"/sockd.conf-with-libwrap.patch
popd > /dev/null
# init script
newinitd "${FILESDIR}"/${PN}-1.3.2-sockd-init dante-sockd
newconfd "${FILESDIR}"/dante-sockd-conf dante-sockd
systemd_dounit "${FILESDIR}"/dante-sockd.service
# example configuration files
docinto examples
dodoc example/*.conf
find "${ED}" -name '*.la' -delete || die
}