1 |
|
# Copyright 1999-2024 Gentoo Authors
|
|
1 |
# Copyright 1999-2025 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
5 |
|
|
|
4 |
EAPI=8
|
6 |
5 |
inherit autotools systemd
|
7 |
6 |
|
8 |
7 |
DESCRIPTION="A free socks4,5 and msproxy implementation"
|
9 |
8 |
HOMEPAGE="https://www.inet.no/dante/"
|
10 |
9 |
SRC_URI="https://www.inet.no/dante/files/${P}.tar.gz"
|
11 |
10 |
|
|
11 |
PATCH_LEVEL="dfsg-2"
|
|
12 |
[[ -n "${PATCH_LEVEL}" ]] && \
|
|
13 |
SRC_URI+=" mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}+${PATCH_LEVEL}.debian.tar.xz"
|
|
14 |
|
12 |
15 |
LICENSE="BSD GPL-2"
|
13 |
16 |
SLOT="0"
|
14 |
17 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
... | ... | |
22 |
25 |
tcpd? ( sys-apps/tcp-wrappers )
|
23 |
26 |
upnp? ( net-libs/miniupnpc:= )
|
24 |
27 |
"
|
25 |
|
DEPEND="
|
26 |
|
${CDEPEND}
|
|
28 |
DEPEND="${CDEPEND}
|
27 |
29 |
app-alternatives/yacc
|
28 |
30 |
app-alternatives/lex
|
29 |
31 |
"
|
30 |
|
RDEPEND="
|
31 |
|
${CDEPEND}
|
|
32 |
RDEPEND="${CDEPEND}
|
32 |
33 |
acct-group/sockd
|
33 |
34 |
acct-user/sockd
|
34 |
35 |
selinux? ( sec-policy/selinux-dante )
|
... | ... | |
39 |
40 |
PATCHES=(
|
40 |
41 |
"${FILESDIR}"/${PN}-1.4.0-socksify.patch
|
41 |
42 |
"${FILESDIR}"/${PN}-1.4.0-osdep-format-macro.patch
|
42 |
|
"${FILESDIR}"/${PN}-1.4.0-cflags.patch
|
43 |
|
"${FILESDIR}"/${PN}-1.4.0-HAVE_SENDBUF_IOCTL.patch
|
44 |
|
"${FILESDIR}"/${PN}-1.4.1-sigpwr-siginfo.patch #517528
|
45 |
|
"${FILESDIR}"/${PN}-1.4.1-miniupnp14.patch #564680
|
|
43 |
"${FILESDIR}"/${PN}-1.4.2-cflags.patch
|
|
44 |
#"${FILESDIR}"/${PN}-1.4.0-HAVE_SENDBUF_IOCTL.patch # included in debian series
|
|
45 |
#${FILESDIR}"/${PN}-1.4.1-sigpwr-siginfo.patch #517528 # included in debian series
|
|
46 |
#"${FILESDIR}"/${PN}-1.4.1-miniupnp14.patch #564680 # upstreamed
|
|
47 |
"${FILESDIR}"/${PN}-1.4.3-osdep-debug.patch
|
|
48 |
"${FILESDIR}"/${PN}-1.4.3-gai-symbol.patch
|
|
49 |
"${FILESDIR}"/${PN}-1.4.3-upnp-2.2.8.patch
|
46 |
50 |
)
|
47 |
51 |
|
48 |
52 |
src_prepare() {
|
|
53 |
DEB_PATCHES=${S}/../debian/patches
|
|
54 |
PATCHES+=(
|
|
55 |
$( sed "s,^,${DEB_PATCHES}/," < "${DEB_PATCHES}"/series )
|
|
56 |
)
|
49 |
57 |
default
|
50 |
58 |
|
51 |
59 |
# 780039
|
52 |
60 |
sed -e 's/-all-dynamic//' -i dlib/Makefile.am dlib64/Makefile.am || die
|
53 |
61 |
|
54 |
|
sed \
|
|
62 |
sed -i \
|
55 |
63 |
-e 's:/etc/socks\.conf:"${EPREFIX}"/etc/socks/socks.conf:' \
|
56 |
64 |
-e 's:/etc/sockd\.conf:"${EPREFIX}"/etc/socks/sockd.conf:' \
|
57 |
|
-i doc/{socksify.1,socks.conf.5,sockd.conf.5,sockd.8} \
|
|
65 |
doc/{socksify.1,socks.conf.5,sockd.conf.5,sockd.8} \
|
58 |
66 |
|| die
|
59 |
67 |
|
60 |
|
sed -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' -i configure.ac || die
|
|
68 |
sed -i \
|
|
69 |
-e 's:AM_CONFIG_HEADER\>:AC_CONFIG_HEADERS:' \
|
|
70 |
configure.ac || die
|
61 |
71 |
|
62 |
72 |
eautoreconf
|
63 |
73 |
}
|
... | ... | |
66 |
76 |
# hardcoded the libc name otherwise the scan on a amd64 multilib system
|
67 |
77 |
# ends up finding /usr/lib32/libc.so.5. That cascades and causes the
|
68 |
78 |
# preload/libdsocks to not be built.
|
69 |
|
econf \
|
|
79 |
econf -C \
|
70 |
80 |
--with-socks-conf="${EPREFIX}"/etc/socks/socks.conf \
|
71 |
81 |
--with-sockd-conf="${EPREFIX}"/etc/socks/sockd.conf \
|
72 |
82 |
--enable-preload \
|