git: c6a9ca835e69 - main - www/nginx-devel: optimize NJS infrastructure (+)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Dec 2024 16:22:55 UTC
The branch main has been updated by osa: URL: https://cgit.FreeBSD.org/ports/commit/?id=c6a9ca835e692259d21f49277b3fda5fa2777275 commit c6a9ca835e692259d21f49277b3fda5fa2777275 Author: Sergey A. Osokin <osa@FreeBSD.org> AuthorDate: 2024-12-20 16:16:53 +0000 Commit: Sergey A. Osokin <osa@FreeBSD.org> CommitDate: 2024-12-20 16:22:50 +0000 www/nginx-devel: optimize NJS infrastructure (+) - remove NJS_QJS and NJS_XML knobs, always build such components - add arguments to NJS' configure - remove needless patches - the port depends on devel/pcre2, so move `--with-ld-opt' to the main configure level Bump PORTREVISION. --- www/nginx-devel/Makefile | 18 ++++++------------ www/nginx-devel/Makefile.extmod | 15 ++++++--------- www/nginx-devel/Makefile.options.desc | 2 -- www/nginx-devel/files/extra-patch-njs-auto-quickjs | 15 --------------- www/nginx-devel/files/extra-patch-njs-nginx-config | 13 ------------- 5 files changed, 12 insertions(+), 51 deletions(-) diff --git a/www/nginx-devel/Makefile b/www/nginx-devel/Makefile index d9ebf6441772..9c83b69d517d 100644 --- a/www/nginx-devel/Makefile +++ b/www/nginx-devel/Makefile @@ -1,6 +1,6 @@ PORTNAME?= nginx PORTVERSION= 1.27.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= www MASTER_SITES= https://nginx.org/download/ \ LOCAL/osa @@ -48,6 +48,7 @@ SUB_LIST+= WWWOWN=${WWWOWN} \ HAS_CONFIGURE= yes CONFIGURE_ARGS+=--prefix=${ETCDIR} \ --with-cc-opt="-I ${LOCALBASE}/include" \ + --with-ld-opt="-L ${LOCALBASE}/lib" \ --conf-path=${ETCDIR}/nginx.conf \ --sbin-path=${PREFIX}/sbin/nginx \ --pid-path=${NGINX_RUNDIR}/nginx.pid \ @@ -78,8 +79,7 @@ OPTIONS_GROUP_MAILGRP= MAIL MAIL_IMAP MAIL_POP3 MAIL_SMTP MAIL_SSL OPTIONS_GROUP_STREAMGRP= STREAM STREAM_REALIP STREAM_SSL \ STREAM_SSL_PREREAD -OPTIONS_DEFINE= DEBUG DEBUGLOG DSO FILE_AIO IPV6 NJS NJS_QJS NJS_XML \ - OTEL THREADS WWW +OPTIONS_DEFINE= DEBUG DEBUGLOG DSO FILE_AIO IPV6 NJS OTEL THREADS WWW OPTIONS_DEFAULT?= DSO FILE_AIO HTTP HTTP_ADDITION HTTP_AUTH_REQ HTTP_CACHE \ HTTP_DAV HTTP_FLV HTTP_GUNZIP_FILTER HTTP_GZIP_STATIC HTTP_MP4 \ HTTP_RANDOM_INDEX HTTP_REALIP HTTP_SECURE_LINK HTTP_SLICE HTTP_SSL \ @@ -246,20 +246,14 @@ CONFIGURE_ENV+= EXTRA_PRE_CXXFLAGS="-std=c++14" .endif .if empty(PORT_OPTIONS:MMODSECURITY3) -CONFIGURE_ARGS+= --with-ld-opt="-L ${LOCALBASE}/lib" -.else CONFIGURE_ARGS+= --with-ld-opt="-L ${LOCALBASE}/lib -lpcre" LIB_DEPENDS+= libpcre.so:devel/pcre .endif .if ${PORT_OPTIONS:MNJS} -. if empty(PORT_OPTIONS:MNJS_QJS) -NJS_CONFIGURE_ARGS+= --no-quickjs -. endif -. if empty(PORT_OPTIONS:MNJS_XML) -CONFIGURE_ENV+= NJS_LIBXSLT=NO -NJS_CONFIGURE_ARGS+= --no-libxml2 -. endif +NJS_CONFIGURE_ARGS= --cc-opt="-I${LOCALBASE}/include/quickjs" \ + --ld-opt="-L${LOCALBASE}/lib" \ + --with-quickjs .endif .if ${PORT_OPTIONS:MCT} diff --git a/www/nginx-devel/Makefile.extmod b/www/nginx-devel/Makefile.extmod index 433b7fd88d9a..868ff34a7424 100644 --- a/www/nginx-devel/Makefile.extmod +++ b/www/nginx-devel/Makefile.extmod @@ -242,17 +242,14 @@ NAXSI_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-naxsi-libinjection__sqli_c \ ${PATCHDIR}/extra-patch-naxsi_config NJS_GH_TUPLE= nginx:njs:0.8.8:njs -NJS_VARS= DSO_EXTMODS+=njs NJS_SUBDIR=/nginx -NJS_IMPLIES= STREAM - -NJS_QJS_IMPLIES= HTTP NJS -NJS_QJS_LIB_DEPENDS= libquickjs.so:lang/quickjs +NJS_CONFIGURE_ON= --with-cc-opt="-I ${LOCALBASE}/include/quickjs" +NJS_LIB_DEPENDS= libquickjs.so:lang/quickjs \ + libxml2.so:textproc/libxml2 \ + libxslt.so:textproc/libxslt NJS_QJS_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-njs-auto-quickjs \ ${PATCHDIR}/extra-patch-njs-nginx-config - -NJS_XML_IMPLIES= HTTP NJS -NJS_XML_LIB_DEPENDS= libxml2.so:textproc/libxml2 \ - libxslt.so:textproc/libxslt +NJS_VARS= DSO_EXTMODS+=njs NJS_SUBDIR=/nginx +NJS_IMPLIES= HTTP STREAM OTEL_GH_TUPLE= osokin:nginx-otel:3a655df:otel OTEL_VARS= DSO_EXTMODS+=otel OTEL_SUBDIR=/ diff --git a/www/nginx-devel/Makefile.options.desc b/www/nginx-devel/Makefile.options.desc index c22809086c9f..c0d32d40b727 100644 --- a/www/nginx-devel/Makefile.options.desc +++ b/www/nginx-devel/Makefile.options.desc @@ -89,8 +89,6 @@ MEMC_DESC= 3rd party memc (memcached) module MODSECURITY3_DESC= 3rd party modsecurity3 module NAXSI_DESC= 3rd party naxsi module NJS_DESC= Enable javascript (NJS) module -NJS_QJS_DESC= Enable QuickJS engine in NJS module -NJS_XML_DESC= Enable XML functionality in NJS module OTEL_DESC= Enable OpenTELemetry module PASSENGER_DESC= 3rd party passenger module POSTGRES_DESC= 3rd party postgres module diff --git a/www/nginx-devel/files/extra-patch-njs-auto-quickjs b/www/nginx-devel/files/extra-patch-njs-auto-quickjs deleted file mode 100644 index 6fe199bd9e73..000000000000 --- a/www/nginx-devel/files/extra-patch-njs-auto-quickjs +++ /dev/null @@ -1,15 +0,0 @@ ---- ../njs-0.8.8/auto/quickjs.orig 2024-12-15 17:49:15 UTC -+++ ../njs-0.8.8/auto/quickjs -@@ -46,9 +46,9 @@ if [ $NJS_TRY_QUICKJS = YES ]; then - fi - - if [ $njs_found = no ]; then -- njs_feature="QuickJS library -I/usr/include/quickjs/ -L/usr/lib/quickjs/ -lquickjs" -- njs_feature_incs="/usr/include/quickjs/" -- njs_feature_libs="-L/usr/lib/quickjs/ -lquickjs -lm -ldl -lpthread" -+ njs_feature="QuickJS library -I%%LOCALBASE%%/include/quickjs/ -L%%LOCALBASE%%/lib/ -lquickjs" -+ njs_feature_incs="%%LOCALBASE%%/include/quickjs/" -+ njs_feature_libs="-L%%LOCALBASE%%/lib/ -lquickjs -lm -ldl -lpthread" - - . auto/feature - fi diff --git a/www/nginx-devel/files/extra-patch-njs-nginx-config b/www/nginx-devel/files/extra-patch-njs-nginx-config deleted file mode 100644 index e9a340ab733f..000000000000 --- a/www/nginx-devel/files/extra-patch-njs-nginx-config +++ /dev/null @@ -1,13 +0,0 @@ ---- ../njs-0.8.8/nginx/config.orig 2024-12-16 11:16:44.892658000 -0500 -+++ ../njs-0.8.8/nginx/config 2024-12-16 11:19:57.566877000 -0500 -@@ -60,8 +60,8 @@ - fi - - if [ $ngx_found = no ]; then -- ngx_feature="QuickJS library -I/usr/include/quickjs/ -L/usr/lib/quickjs/ -lquickjs" -- ngx_feature_libs="-L/usr/lib/quickjs/ -lquickjs -lm -ldl -lpthread" -+ ngx_feature="QuickJS library -I%%LOCALBASE%%/include/quickjs/ -L%%LOCALBASE%%/lib/ -lquickjs" -+ ngx_feature_libs="-L%%LOCALBASE%%/lib/ -lquickjs -lm -ldl -lpthread" - - . auto/feature - fi