blob: 4dae15ab4f305fcaf9cb2c29d6163808ed9201f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic
DESCRIPTION="Forwarding, non-caching, compressing web proxy server"
HOMEPAGE="https://ziproxy.sourceforge.net/"
SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${P}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~riscv ~sparc ~x86"
IUSE="sasl xinetd"
RDEPEND="
acct-group/ziproxy
acct-user/ziproxy
media-libs/giflib:=
media-libs/libpng:=
media-libs/libjpeg-turbo:=
virtual/zlib:=
sasl? ( dev-libs/cyrus-sasl )
xinetd? ( virtual/inetd )
"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-Fix-clang-build-errors.patch
"${FILESDIR}"/${P}-fix_gcc15.patch
)
src_prepare() {
default
# fix sample config file
sed -i \
-e "s:/var/ziproxy/:${EPREFIX}/var/lib/ziproxy/:g" \
etc/ziproxy/ziproxy.conf || die
# fix sample xinetd config
sed -i \
-e "s:/usr/bin/:/usr/sbin/:g" \
-e "s:\(.*port.*\):\1\n\ttype\t\t\t= UNLISTED:g" \
-e "s:root:ziproxy:g" \
etc/xinetd.d/ziproxy || die
}
src_configure() {
# -Werror=lto-type-mismatch
# https://bugs.gentoo.org/861863
# Upstream is sourceforge and has been dead for 3 years. No upstream bug reported.
filter-lto
# fix -Wincompatible-pointer-types-discards-qualifiers
append-cppflags -DUSE_CUSTOM_STRING_ROUTINES=OFF
local myeconfargs=(
--without-jasper
$(use_with sasl sasl2)
--with-cfgfile="${EPREFIX}"/etc/ziproxy/ziproxy.conf
)
econf "${myeconfargs[@]}"
}
src_install() {
default
dodir /usr/sbin
mv -vf "${ED}"/usr/{,s}bin/ziproxy || die
dobin src/tools/ziproxy_genhtml_stats.sh
newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}
insinto /etc
doins -r etc/ziproxy
insinto /var/lib/ziproxy/error
doins var/ziproxy/error/*.html
if use xinetd; then
insinto /etc/xinetd.d
doins etc/xinetd.d/ziproxy
fi
diropts -m0750 -o ziproxy -g ziproxy
keepdir /var/log/ziproxy
}
|