aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2022-06-16 15:05:44 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2022-06-16 15:05:44 +0000
commit72fa35d5cb531c78702fc467df019369e3676eff (patch)
tree66783f37a66868fc2ff1469305317b11485d24e3
parent4e7ee356bbfdef75435f4fd3e395ebb806eb8790 (diff)
downloadports-72fa35d5cb531c78702fc467df019369e3676eff.tar.gz
ports-72fa35d5cb531c78702fc467df019369e3676eff.zip
www/elinks: improve support for various available (de)compressors
- Build with zlib support (looking at the commit history, it is unclear why it was disabled in the first place) - Add BROTLI, LZMA, and ZSTD options; disable the latter by default as it is being described as experimental in the configure script - Drop ICONV option as it typically does not pull additional dependency but is required for the BROTLI option (at least) - While here, sort the OPTIONS_* lists alphabetically as appropriate
-rw-r--r--www/elinks/Makefile24
-rw-r--r--www/elinks/files/patch-configure.ac12
2 files changed, 25 insertions, 11 deletions
diff --git a/www/elinks/Makefile b/www/elinks/Makefile
index 4ff9a066ba88..2365c6fb3d1f 100644
--- a/www/elinks/Makefile
+++ b/www/elinks/Makefile
@@ -12,19 +12,19 @@ LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
GNU_CONFIGURE= yes
-USES= autoreconf bison:alias cpe gmake pkgconfig ssl
-CONFIGURE_ARGS= --without-zlib
+USES= autoreconf bison:alias cpe gmake iconv pkgconfig ssl
USE_GITHUB= yes
GH_ACCOUNT= rkd77
LIBS+= -lexecinfo
-OPTIONS_DEFINE= 88COLORS 256COLORS SPIDERMONKEY XBELMARKS LOCAL_CGI \
- FINGER GOPHER BITTORRENT NNTP FTP FSP SMB EXMODE \
- HIGHLIGHT IDN NOROOT FASTMEM PERL \
- LUA GUILE ICONV MOUSE NLS
-OPTIONS_DEFAULT= 88COLORS 256COLORS FTP EXMODE HIGHLIGHT FASTMEM MOUSE
+OPTIONS_DEFINE= 256COLORS 88COLORS BITTORRENT BROTLI EXMODE \
+ FASTMEM FINGER FSP FTP GOPHER GUILE HIGHLIGHT \
+ IDN LOCAL_CGI LUA LZMA MOUSE NLS NNTP NOROOT \
+ PERL SMB SPIDERMONKEY XBELMARKS ZSTD
+OPTIONS_DEFAULT= 256COLORS 88COLORS BROTLI EXMODE FASTMEM FTP \
+ HIGHLIGHT LZMA MOUSE
OPTIONS_SUB= yes
88COLORS_DESC= 88 color support
@@ -38,6 +38,9 @@ HIGHLIGHT_DESC= HTML highlighting using DOM engine
NOROOT_DESC= Prevention of usage by root
FASTMEM_DESC= Fast memory allocation functions
+BROTLI_LIB_DEPENDS= libbrotlidec.so:archivers/brotli
+BROTLI_CONFIGURE_ON= --with-brotli
+
NLS_USES= gettext
NLS_CONFIGURE_OFF= --disable-nls
@@ -47,6 +50,8 @@ GUILE_CONFIGURE_WITH= guile
LUA_USES= lua
LUA_CONFIGURE_ON= --with-luapkg=lua-${LUA_VER}
+LZMA_CONFIGURE_ON= --with-lzma
+
PERL_USES= perl5
PERL_CONFIGURE_WITH= perl
@@ -99,7 +104,8 @@ SPIDERMONKEY_LDFLAGS= -L${LOCALBASE}/lib -lnspr4 -lpthread -lm
SPIDERMONKEY_CONFIGURE_ON= --enable-sm-scripting --with-spidermonkey
SPIDERMONKEY_CONFIGURE_OFF= --disable-sm-scripting --without-spidermonkey
-ICONV_USES= iconv
-ICONV_CONFIGURE_ON= ${ICONV_CONFIGURE_ARG}
+ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd
+ZSTD_USES= localbase
+ZSTD_CONFIGURE_ON= --with-zstd
.include <bsd.port.mk>
diff --git a/www/elinks/files/patch-configure.ac b/www/elinks/files/patch-configure.ac
index e7db5138422c..3c9bfe209491 100644
--- a/www/elinks/files/patch-configure.ac
+++ b/www/elinks/files/patch-configure.ac
@@ -1,6 +1,14 @@
---- configure.ac.orig 2022-01-29 19:43:50 UTC
+--- configure.ac.orig 2021-12-24 19:53:43 UTC
+++ configure.ac
-@@ -1861,7 +1861,7 @@ if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
+@@ -531,6 +531,7 @@ else
+ if $PKG_CONFIG $pkg_config_static libbrotlidec; then
+ BROTLI_CFLAGS=`$PKG_CONFIG $pkg_config_static --cflags libbrotlidec`
+ BROTLI_LIBS=`$PKG_CONFIG $pkg_config_static --libs libbrotlidec`
++ CFLAGS="$BROTLI_CFLAGS $CFLAGS"
+ LIBS="$BROTLI_LIBS $LIBS"
+ CONFIG_BROTLI=yes
+ AC_DEFINE([CONFIG_BROTLI], [1], [Define as 1 to use the libbrotli library.])
+@@ -1861,7 +1862,7 @@ if test "x$ac_cv_c_compiler_gnu" = "xyes"; then
;;
10|10.*|11|11.*)
# gettext