diff options
author | Ralph Seichter <ralph@seichter.de> | 2018-07-28 15:04:43 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-07-30 22:22:59 +0200 |
commit | a781960b31e293725e20ed04279a6684883c9e9c (patch) | |
tree | e98f6925b9d81de2710260f3270025c17c856a95 /www-servers | |
parent | www-servers/nginx-unit: Added 'ruby' use flag (diff) | |
download | gentoo-a781960b31e293725e20ed04279a6684883c9e9c.tar.gz gentoo-a781960b31e293725e20ed04279a6684883c9e9c.tar.bz2 gentoo-a781960b31e293725e20ed04279a6684883c9e9c.zip |
www-servers/nginx-unit: Fixed modules directory, Python dependencies
Also added pkg_setup() to conditionally support Python and fixed
contents of REQUIRED_USE.
Closes: https://github.com/gentoo/gentoo/pull/9278
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/nginx-unit/nginx-unit-1.3-r1.ebuild | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/www-servers/nginx-unit/nginx-unit-1.3-r1.ebuild b/www-servers/nginx-unit/nginx-unit-1.3-r1.ebuild index 9a9a22e39cd3..304602c948a5 100644 --- a/www-servers/nginx-unit/nginx-unit-1.3-r1.ebuild +++ b/www-servers/nginx-unit/nginx-unit-1.3-r1.ebuild @@ -3,8 +3,11 @@ EAPI=7 -MY_P="unit-${PV}" +PYTHON_COMPAT=(python2_7 python3_{3,4,5,6}) + +inherit python-single-r1 +MY_P="unit-${PV}" DESCRIPTION="A dynamic web and application server" HOMEPAGE="https://unit.nginx.org" SRC_URI="https://unit.nginx.org/download/${MY_P}.tar.gz -> ${P}.tar.gz" @@ -12,23 +15,29 @@ SRC_URI="https://unit.nginx.org/download/${MY_P}.tar.gz -> ${P}.tar.gz" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64" -IUSE="perl python ruby" -REQUIRED_USE="|| ( ${IUSE} )" +MY_IUSE="perl python ruby" +IUSE="${MY_IUSE}" +REQUIRED_USE="|| ( ${MY_IUSE} ) python? ( ${PYTHON_REQUIRED_USE} )" DEPEND="perl? ( dev-lang/perl:= ) - python? ( dev-lang/python:= ) + python? ( ${PYTHON_DEPS} ) ruby? ( dev-lang/ruby:= )" RDEPEND="${DEPEND}" S="${WORKDIR}/${MY_P}" +pkg_setup() { + use python && python-single-r1_pkg_setup +} + src_configure() { ./configure \ --prefix=/usr \ + --modules=$(get_libdir)/${PN} \ --log=/var/log/${PN} \ --state=/var/lib/${PN} \ --pid=/run/${PN}.pid \ --control=unix:/run/${PN}.sock || die "Core configuration failed" - for flag in ${IUSE} ; do + for flag in ${MY_IUSE} ; do if use ${flag} ; then ./configure ${flag} || die "Module configuration failed: ${flag}" fi |