summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lang/njs/Makefile33
1 files changed, 18 insertions, 15 deletions
diff --git a/lang/njs/Makefile b/lang/njs/Makefile
index 9eec92d2b98a..383deb57faef 100644
--- a/lang/njs/Makefile
+++ b/lang/njs/Makefile
@@ -2,6 +2,7 @@
PORTNAME= njs
DISTVERSION= 0.7.4
+PORTREVISION= 1
CATEGORIES= lang www
MAINTAINER= osa@FreeBSD.org
@@ -18,21 +19,23 @@ USE_GITHUB= yes
GH_TUPLE= nginx:njs:${DISTVERSION}
HAS_CONFIGURE= yes
-OPTIONS_DEFINE= SSL
-OPTIONS_RADIO+= PCRE
-OPTIONS_RADIO_PCRE= NOPCRE PCRE_ONE PCRE_TWO
-NOPCRE_CONFIGURE_ON= --no-pcre
-PCRE_ONE_LIB_DEPENDS= libpcre.so:devel/pcre
-PCRE_ONE_CONFIGURE_ON= --no-pcre2
-PCRE_TWO_LIB_DEPENDS= libpcre2-8.so:devel/pcre2
-OPTIONS_DEFAULT= PCRE_ONE SSL
-SSL_CONFIGURE_OFF= --no-openssl
-SSL_USES= ssl
-
-NOPCRE_DESC= Disable PCRE support
-PCRE_ONE_DESC= Enable PCRE1 support
-PCRE_TWO_DESC= Enable PCRE2 support
-SSL_DESC= Enable OpenSSL support
+FLAVORS= pcre pcre2
+FLAVOR?= ${FLAVORS:[1]}
+
+pcre_PKGNAMESUFFIX=
+pcre2_PKGNAMESUFFIX= -pcre2
+
+pcre_CONFLICTS_INSTALL= ${PORTNAME}-pcre2
+pcre2_CONFLICTS_INSTALL= ${PORTNAME}
+
+USES= ssl
+
+.if ${FLAVOR} == pcre
+LIB_DEPENDS= libpcre.so:devel/pcre
+CONFIGURE_FLAGS+= --no-pcre2
+.else
+LIB_DEPENDS= libpcre2-8.so:devel/pcre2
+.endif
PLIST_FILES= bin/njs