| 1 | 
   | 
    
    # Copyright 1999-2022 Gentoo Authors 
   | 
  
   | 
  1 | 
    
    # Copyright 1999-2025 Gentoo Authors 
   | 
  
  | 2 | 
  2 | 
    
    # Distributed under the terms of the GNU General Public License v2 
   | 
  
  | 3 | 
  3 | 
    
    
   | 
  
  | 4 | 
  4 | 
    
    EAPI=8 
   | 
  
| ... | ... |  | 
  | 7 | 
  7 | 
    
    
   | 
  
  | 8 | 
  8 | 
    
    DESCRIPTION="Simple FastCGI wrapper for CGI scripts (CGI support for nginx)" 
   | 
  
  | 9 | 
  9 | 
    
    HOMEPAGE="https://github.com/gnosek/fcgiwrap" 
   | 
  
  | 10 | 
   | 
    
    SRC_URI="https://github.com/gnosek/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
   | 
  
   | 
  10 | 
    
    if [[ ${PV} == *_p* ]] ; then
   | 
  
   | 
  11 | 
    
    	FCGIWRAP_COMMIT="99c942c90063c73734e56bacaa65f947772d9186" 
   | 
  
   | 
  12 | 
    
    	SRC_URI="https://github.com/gnosek/fcgiwrap/archive/${FCGIWRAP_COMMIT}.tar.gz -> ${P}.gh.tar.gz"
   | 
  
   | 
  13 | 
    
    	S="${WORKDIR}"/${PN}-${FCGIWRAP_COMMIT}
   | 
  
   | 
  14 | 
    
    else 
   | 
  
   | 
  15 | 
    
    	# https://github.com/gnosek/fcgiwrap/issues/31 
   | 
  
   | 
  16 | 
    
    	SRC_URI="https://github.com/gnosek/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
   | 
  
   | 
  17 | 
    
    fi 
   | 
  
  | 11 | 
  18 | 
    
    
   | 
  
  | 12 | 
  19 | 
    
    LICENSE="BSD" 
   | 
  
  | 13 | 
   | 
    
    KEYWORDS="amd64 ~arm x86" 
   | 
  
  | 14 | 
  20 | 
    
    SLOT="0" 
   | 
  
   | 
  21 | 
    
    KEYWORDS="amd64 ~arm x86" 
   | 
  
  | 15 | 
  22 | 
    
    IUSE="systemd" 
   | 
  
  | 16 | 
  23 | 
    
    
   | 
  
  | 17 | 
  24 | 
    
    RDEPEND=" 
   | 
  
  | 18 | 
  25 | 
    
    	dev-libs/fcgi 
   | 
  
  | 19 | 
   | 
    
    	systemd? ( sys-apps/systemd ) 
   | 
  
   | 
  26 | 
    
    	systemd? ( sys-apps/systemd:= ) 
   | 
  
  | 20 | 
  27 | 
    
    " 
   | 
  
  | 21 | 
  28 | 
    
    DEPEND="${RDEPEND}"
   | 
  
  | 22 | 
  29 | 
    
    BDEPEND="virtual/pkgconfig" 
   | 
  
  | 23 | 
  30 | 
    
    
   | 
  
  | 24 | 
  31 | 
    
    DOCS=( README.rst ) 
   | 
  
  | 25 | 
  32 | 
    
    
   | 
  
   | 
  33 | 
    
    PATCHES=( 
   | 
  
   | 
  34 | 
    
    	"${FILESDIR}"/${PN}-1.1.0-kill.patch
   | 
  
   | 
  35 | 
    
    	"${FILESDIR}"/${PN}-1.1.0-systemd.patch
   | 
  
   | 
  36 | 
    
    	"${FILESDIR}"/${PN}-1.1.0-uninit-ipv6.patch
   | 
  
   | 
  37 | 
    
    ) 
   | 
  
   | 
  38 | 
    
    
   | 
  
  | 26 | 
  39 | 
    
    src_prepare() {
   | 
  
   | 
  40 | 
    
    	default 
   | 
  
   | 
  41 | 
    
    
   | 
  
  | 27 | 
  42 | 
    
    	sed -e "s/-Werror//" \ 
   | 
  
  | 28 | 
  43 | 
    
    		-i configure.ac || die "sed failed" 
   | 
  
  | 29 | 
   | 
    
    
   | 
  
  | 30 | 
  44 | 
    
    	sed -e '/man8dir = $(DESTDIR)/s/@prefix@//' \ 
   | 
  
  | 31 | 
  45 | 
    
    		-i Makefile.in || die "sed failed" 
   | 
  
  | 32 | 
  46 | 
    
    
   | 
  
  | 33 | 
   | 
    
    	sed -e "s/libsystemd-daemon/libsystemd/" \ 
   | 
  
  | 34 | 
   | 
    
    		-i configure.ac || die "sed failed" 
   | 
  
  | 35 | 
  47 | 
    
    	tc-export CC 
   | 
  
  | 36 | 
  48 | 
    
    
   | 
  
  | 37 | 
  49 | 
    
    	# Fix systemd units for Gentoo 
   | 
  
  | 38 | 
  50 | 
    
    	sed -i -e '/User/d' systemd/fcgiwrap.service || die 
   | 
  
  | 39 | 
  51 | 
    
    	sed -i -e '/Group/d' systemd/fcgiwrap.service || die 
   | 
  
  | 40 | 
  52 | 
    
    
   | 
  
  | 41 | 
   | 
    
    	eapply_user 
   | 
  
  | 42 | 
  53 | 
    
    	eautoreconf 
   | 
  
  | 43 | 
  54 | 
    
    } 
   | 
  
  | 44 | 
  55 | 
    
    
   |