commit:     5b7dc497f33a127dbf5706db72e9c5a077a8b82c
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  7 10:33:24 2021 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sun Mar  7 10:35:55 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b7dc497

net-proxy/squid: add systemd support

Closes: https://bugs.gentoo.org/454878
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 net-proxy/squid/{squid-4.13.ebuild => squid-4.13-r1.ebuild} | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/net-proxy/squid/squid-4.13.ebuild 
b/net-proxy/squid/squid-4.13-r1.ebuild
similarity index 96%
rename from net-proxy/squid/squid-4.13.ebuild
rename to net-proxy/squid/squid-4.13-r1.ebuild
index 6201b7c4543..3b6b5c6f58f 100644
--- a/net-proxy/squid/squid-4.13.ebuild
+++ b/net-proxy/squid/squid-4.13-r1.ebuild
@@ -5,7 +5,7 @@ EAPI=7
 
 WANT_AUTOMAKE="1.15"
 
-inherit autotools flag-o-matic linux-info pam toolchain-funcs
+inherit autotools flag-o-matic linux-info pam systemd toolchain-funcs
 
 DESCRIPTION="A full-featured web proxy cache"
 HOMEPAGE="http://www.squid-cache.org/";
@@ -25,7 +25,7 @@ SLOT="0"
 KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~sparc x86"
 IUSE="caps gnutls ipv6 pam ldap samba sasl kerberos nis radius ssl snmp 
selinux logrotate test \
        ecap esi ssl-crtd \
-       mysql postgres sqlite \
+       mysql postgres sqlite systemd \
        perl qos tproxy \
        +htcp +wccp +wccpv2 \
        pf-transparent ipf-transparent kqueue \
@@ -46,6 +46,7 @@ COMMON_DEPEND="acct-group/squid
                !gnutls? ( dev-libs/openssl:0 )
                dev-libs/nettle:= )
        sasl? ( dev-libs/cyrus-sasl )
+       systemd? ( sys-apps/systemd:= )
        ecap? ( net-libs/libecap:1 )
        esi? ( dev-libs/expat dev-libs/libxml2 )
        gnutls? ( >=net-libs/gnutls-3.1.5 )
@@ -105,6 +106,8 @@ src_prepare() {
        sed -i -e 's:_LTDL_SETUP:LTDL_INIT([installable]):' \
                libltdl/configure.ac || die
 
+        sed -i 's:/var/run/:/run/:g' tools/systemd/squid.service || die
+
        eapply_user
        eautoreconf
 }
@@ -211,6 +214,7 @@ src_configure() {
                $(use_with ssl nettle) \
                $(use_with gnutls) \
                $(use_enable ssl-crtd) \
+               $(use_with systemd) \
                $(use_enable ecap) \
                $(use_enable esi) \
                $(use_enable htcp) \
@@ -223,6 +227,8 @@ src_configure() {
 src_install() {
        default
 
+       systemd_dounit "tools/systemd/squid.service"
+
        # need suid root for looking into /etc/shadow
        fowners root:squid /usr/libexec/squid/basic_ncsa_auth
        fperms 4750 /usr/libexec/squid/basic_ncsa_auth

Reply via email to