Skip to content

Commit 5fbf1be

Browse files
immoloflint2
authored andcommitted
www-servers/varnish: add 7.7.1
Fixes C23 issue and adds Python3.13 support. Have scanned with pkgdiff-mg and everything looks good, however I will monitor bugs for a while and correct if I missed something in my limited testing. Closes: https://bugs.gentoo.org/945982 Closes: https://bugs.gentoo.org/952764 Closes: https://bugs.gentoo.org/959267 Signed-off-by: Ian Jordan <[email protected]> Part-of: gentoo#42802 Closes: gentoo#42802 Signed-off-by: Sam James <[email protected]>
1 parent 48d3400 commit 5fbf1be

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed

www-servers/varnish/Manifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
DIST varnish-7.5.0.tgz 4033962 BLAKE2B c53500d1b95b4af1b43f3d2ffa5b12592bbd1e446f03d90a8147fe37c4d602af743369629f8a1423455a3c4de6867fb5fe19d6028fd1ea457d35622e85dcbc9c SHA512 ca77abcb21299942b2bfd433e5f964d2e974cdae92d6a8889217fcd81933a3b7bc1e70ba87d7e842a4f90b59d7948242155380054d67ad49aab8dcea343055a2
2+
DIST varnish-7.7.1.tgz 4350220 BLAKE2B 3764ab80de0277f48a94682737099b4abef113f7a6c4bf952de015046aa270d009060456d4c140a50779f1b3e270cb569d78907b6b314b601e9d48d477dd454c SHA512 4a15ff23dc07cb19959031be5070e7da46a2be2d1a1d2e3950966ca593849d3f8be4f41bd35dae75876bbc121bf268345b47aa35764645362aa42b822b634ad9
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Copyright 1999-2025 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
PYTHON_COMPAT=( python3_{11..13} )
7+
8+
inherit autotools systemd python-r1
9+
10+
DESCRIPTION="Varnish is a state-of-the-art, high-performance HTTP accelerator"
11+
HOMEPAGE="https://varnish-cache.org/"
12+
SRC_URI="http://varnish-cache.org/_downloads/${P}.tgz"
13+
14+
LICENSE="BSD-2 GPL-2"
15+
SLOT="0/2"
16+
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
17+
# From Fedora:
18+
# Default: Use jemalloc, as adviced by upstream project
19+
IUSE="+jemalloc jit selinux static-libs unwind"
20+
21+
CDEPEND="
22+
sys-libs/readline:=
23+
dev-libs/libedit
24+
dev-libs/libpcre2[jit?]
25+
sys-libs/ncurses:=
26+
jemalloc? ( dev-libs/jemalloc:= )
27+
unwind? ( sys-libs/libunwind:= )
28+
"
29+
30+
# varnish compiles stuff at run time
31+
RDEPEND="
32+
${PYTHON_DEPS}
33+
${CDEPEND}
34+
acct-user/varnish
35+
acct-group/varnish
36+
sys-devel/gcc
37+
selinux? ( sec-policy/selinux-varnishd )
38+
"
39+
DEPEND="
40+
${CDEPEND}
41+
dev-python/docutils
42+
dev-python/sphinx
43+
virtual/pkgconfig
44+
"
45+
46+
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
47+
48+
PATCHES=( "${FILESDIR}/${PN}-7.1.2-disable-tests.patch" )
49+
50+
src_prepare() {
51+
default
52+
53+
# Remove -Werror bug #528354
54+
sed -i -e 's/-Werror\([^=]\)/\1/g' configure.ac || die
55+
56+
# Upstream doesn't put varnish.m4 in the m4/ directory
57+
# We link because the Makefiles look for the file in
58+
# the original location
59+
ln -sf ../varnish.m4 m4/varnish.m4 || die
60+
61+
eautoreconf
62+
}
63+
64+
src_configure() {
65+
local myeconfargs=(
66+
--with-contrib
67+
$(use_enable static-libs static)
68+
$(use_enable jit pcre2-jit)
69+
$(use_with jemalloc)
70+
$(use_with unwind)
71+
)
72+
econf "${myeconfargs[@]}"
73+
}
74+
75+
src_install() {
76+
emake DESTDIR="${D}" install
77+
78+
python_replicate_script "${D}/usr/share/varnish/vmodtool.py"
79+
80+
newinitd "${FILESDIR}"/varnishlog.initd varnishlog
81+
newconfd "${FILESDIR}"/varnishlog.confd varnishlog
82+
83+
newinitd "${FILESDIR}"/varnishncsa.initd varnishncsa
84+
newconfd "${FILESDIR}"/varnishncsa.confd varnishncsa
85+
86+
newinitd "${FILESDIR}"/varnishd.initd-r4 varnishd
87+
newconfd "${FILESDIR}"/varnishd.confd-r4 varnishd
88+
89+
insinto /etc/logrotate.d/
90+
newins "${FILESDIR}/varnishd.logrotate-r2" varnishd
91+
92+
diropts -m750
93+
94+
keepdir /var/lib/varnish
95+
keepdir /var/log/varnish
96+
97+
systemd_dounit "${FILESDIR}/${PN}d.service"
98+
99+
insinto /etc/varnish/
100+
doins vmod/vmod_*.vcc
101+
doins etc/example.vcl
102+
103+
dodoc README.rst
104+
dodoc doc/changes.rst
105+
106+
fowners root:varnish /etc/varnish/
107+
fowners varnish:varnish /var/lib/varnish/
108+
fperms 0750 /var/lib/varnish/ /etc/varnish/
109+
110+
find "${ED}" -name "*.la" -delete || die
111+
}

0 commit comments

Comments
 (0)