www-misc/fcgiwrap: Sync ebuilds
authorMatt Turner <mattst88@gentoo.org>
Sun, 18 Jun 2017 16:02:39 +0000 (09:02 -0700)
committerMatt Turner <mattst88@gentoo.org>
Sun, 18 Jun 2017 16:22:36 +0000 (09:22 -0700)
www-misc/fcgiwrap/fcgiwrap-9999.ebuild

index 33cef8e6ed1356bdee29ed5e158cb02a660e4546..7f64c53a10a97cca4877c0e8cf5a6a5c6f584d47 100644 (file)
@@ -1,33 +1,33 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="4"
+EAPI="5"
 
 [[ ${PV} = *9999* ]] && VCS_ECLASS="git-r3" || VCS_ECLASS=""
-inherit autotools ${VCS_ECLASS}
+inherit autotools systemd toolchain-funcs ${VCS_ECLASS}
 
 DESCRIPTION="Simple FastCGI wrapper for CGI scripts (CGI support for nginx)"
 HOMEPAGE="http://nginx.localdomain.pl/wiki/FcgiWrap"
 
 LICENSE="BSD"
 SLOT="0"
-IUSE=""
+IUSE="systemd"
 
 if [[ ${PV} == *9999* ]]; then
        EGIT_REPO_URI="git://github.com/gnosek/${PN}.git"
 
        KEYWORDS=""
 else
-       MY_REV="58ec209"
-       #SRC_URI="https://download.github.com/gnosek-${P}-4-g${MY_REV}.tar.gz"
-       SRC_URI="mirror://gentoo/${P}.tar.gz"
-       S="${WORKDIR}/gnosek-${PN}-${MY_REV}"
-
-       KEYWORDS="~amd64 ~x86"
+       SRC_URI="https://github.com/gnosek/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm ~x86"
 fi
 
-DEPEND="dev-libs/fcgi"
-RDEPEND="${DEPEND}"
+RDEPEND="
+       dev-libs/fcgi
+       systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
 
 DOCS=( README.rst )
 
@@ -38,9 +38,23 @@ src_prepare() {
        sed -e '/man8dir = $(DESTDIR)/s/@prefix@//' \
                -i Makefile.in || die "sed failed"
 
+       sed -e "s/libsystemd-daemon/libsystemd/" \
+               -i configure.ac || die "sed failed"
+       tc-export CC
+
+       # Fix systemd units for Gentoo
+       sed -i -e '/User/d' systemd/fcgiwrap.service || die
+       sed -i -e '/Group/d' systemd/fcgiwrap.service || die
+
        eautoreconf
 }
 
+src_configure() {
+       econf \
+               $(use_with systemd) \
+               "$(systemd_with_unitdir)"
+}
+
 pkg_postinst() {
        einfo 'You may want to install www-servers/spawn-fcgi to use with fcgiwrap.'
 }