# Copyright 2020-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 MY_PN="njs" NGINX_MOD_S="${WORKDIR}/${MY_PN}-${PV}/nginx" inherit nginx-module DESCRIPTION="A subset of JavaScript language to use in nginx" HOMEPAGE="https://github.com/nginx/njs/" SRC_URI="https://github.com/nginx/njs/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="BSD-2" SLOT="0" KEYWORDS="~amd64 ~arm64" IUSE="+quickjs" REQUIRED_USE="" # Tests require too much manual patching to get working. RESTRICT="test" BDEPEND="virtual/pkgconfig" DEPEND="www-servers/nginx[nginx_modules_http_rewrite] quickjs? ( dev-libs/quickjs )" RDEPEND="${DEPEND}" src_configure() { if use quickjs ; then export NJS_QUICKJS="YES" else export NJS_QUICKJS="NO" fi # Always build the stream module. myconf=( --with-stream ) nginx-module_src_configure "${myconf[@]}" }