pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

www/elinks: Update elinks to version elinks-0.20.0



Module Name:	pkgsrc-wip
Committed By:	adr <adr%sdf.org@localhost>
Pushed By:	adr
Date:		Sat Nov 21 03:54:46 2026 +0000
Changeset:	4e26cf7fcc7c8146a2f4c6be88206dc108ba4363

Added Files:
	elinks/COMMIT_MSG
	elinks/DESCR
	elinks/Makefile
	elinks/PLIST
	elinks/distinfo
	elinks/options.mk
	elinks/patches/patch-src_js_quickjs_heartbeat.c
	elinks/patches/patch-src_js_quickjs_heartbeat.h
	elinks/patches/patch-src_util_memory.c

Log Message:
www/elinks: Update elinks to version elinks-0.20.0

Packaging changes:
* Delete incompatibility with extinct felinks
* Switch to quickjs-ng
* Delete applied patches upstream and add fixes not present on last
release

Upstream changes:
Elinks 0.20.0
-------------
Released on 2026-07-26
* bump mozjs to 140
* switch from quickjs to quickjs-ng
* Added color "default" in colors settings (\e[39m and \e[49m
sequences)
* support for SVG #423
* infinite loop in mailcap code #425
* Use /usr/bin/env to determine awk interpreter path for awk example
scripts #426
* skip DNS lookup for local files which have empty hostname #428
* check declaration of fgets_unlocked for bionic libc #429
* fix parallel build race #431
* added document.browse.sorting_type (and let sort "numerically",
for example kernel versions)
* increase max number of concurrent connections
* extend document.browse.images.display_style, adding value -1 (no
text)
* apply libcss twice (similar to elinks css implementation)
* refresh-view, set-mark, goto-mark and onload-oneshot actions for
exmode #220
* back to smb based on smbclient binary

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4e26cf7fcc7c8146a2f4c6be88206dc108ba4363

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 elinks/COMMIT_MSG                               |  32 +++++++
 elinks/DESCR                                    |   6 ++
 elinks/Makefile                                 |  75 ++++++++++++++++
 elinks/PLIST                                    |  62 +++++++++++++
 elinks/distinfo                                 |   8 ++
 elinks/options.mk                               | 111 ++++++++++++++++++++++++
 elinks/patches/patch-src_js_quickjs_heartbeat.c |  15 ++++
 elinks/patches/patch-src_js_quickjs_heartbeat.h |  15 ++++
 elinks/patches/patch-src_util_memory.c          |  31 +++++++
 9 files changed, 355 insertions(+)

diffs:
diff --git a/elinks/COMMIT_MSG b/elinks/COMMIT_MSG
new file mode 100644
index 0000000000..0ef0592d6d
--- /dev/null
+++ b/elinks/COMMIT_MSG
@@ -0,0 +1,32 @@
+www/elinks: Update elinks to version elinks-0.20.0
+
+Update prepared in wip by adr
+
+Delete incompatibility with extinct felinks
+Switch to quickjs-ng
+Delete applied patches upstream and add fixes not present on last
+release
+
+Elinks 0.20.0
+-------------
+Released on 2026-07-26
+* bump mozjs to 140
+* switch from quickjs to quickjs-ng
+* Added color "default" in colors settings (\e[39m and \e[49m
+sequences)
+* support for SVG #423
+* infinite loop in mailcap code #425
+* Use /usr/bin/env to determine awk interpreter path for awk example
+scripts #426
+* skip DNS lookup for local files which have empty hostname #428
+* check declaration of fgets_unlocked for bionic libc #429
+* fix parallel build race #431
+* added document.browse.sorting_type (and let sort "numerically",
+for example kernel versions)
+* increase max number of concurrent connections
+* extend document.browse.images.display_style, adding value -1 (no
+text)
+* apply libcss twice (similar to elinks css implementation)
+* refresh-view, set-mark, goto-mark and onload-oneshot actions for
+exmode #220
+* back to smb based on smbclient binary
diff --git a/elinks/DESCR b/elinks/DESCR
new file mode 100644
index 0000000000..d42ef99f4d
--- /dev/null
+++ b/elinks/DESCR
@@ -0,0 +1,6 @@
+ELinks is an advanced and well-established feature-rich text mode web
+(HTTP/FTP/..) browser. ELinks can render both frames and tables, is highly
+customizable and can be extended via scripts. It is very portable and runs
+on a variety of platforms.
+
+This package was previously known as felinks, a fork of elinks.
diff --git a/elinks/Makefile b/elinks/Makefile
new file mode 100644
index 0000000000..78b05c3b64
--- /dev/null
+++ b/elinks/Makefile
@@ -0,0 +1,75 @@
+# $NetBSD: Makefile,v 1.98 2026/11/11 11:56:14 wiz Exp $
+
+DISTNAME=	elinks-0.20.0
+CATEGORIES=	www
+MASTER_SITES=	${MASTER_SITE_GITHUB:=rkd77/}
+GITHUB_RELEASE=	v${PKGVERSION_NOREV}
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/rkd77/elinks
+COMMENT=	Feature-rich text mode web browser
+LICENSE=	gnu-gpl-v2
+
+TOOL_DEPENDS+=	vim-share-[0-9]*:../../editors/vim-share
+TOOL_DEPENDS+=	xmlto-[0-9]*:../../textproc/xmlto
+
+USE_PKGLOCALEDIR=	yes
+USE_LANGUAGES=		c c++
+USE_CXX_FEATURES+=	c++17
+USE_TOOLS+=		perl pkg-config
+
+REPLACE_PYTHON+=	doc/tools/*.py
+REPLACE_PYTHON+=	doc/tools/*/*.py
+REPLACE_PYTHON+=	test/*/*.py
+REPLACE_PYTHON+=	po/*.py
+
+.include "../../mk/bsd.prefs.mk"
+
+MESON_ARGS+=	-Dxbel=true	# requires textproc/expat
+MESON_ARGS+=	-Dfinger=true
+MESON_ARGS+=	-Dgopher=true
+MESON_ARGS+=	-Dnntp=true
+MESON_ARGS+=	-D88-colors=true
+MESON_ARGS+=	-D256-colors=true
+MESON_ARGS+=	-Dtrue-color=true
+.if ${OPSYS} != "Linux"
+MESON_ARGS+=	-Dgpm=false	# only makes sense on Linux
+.endif
+MESON_ARGS+=	-Dbzlib=true	# requires archivers/bzip2
+MESON_ARGS+=	-Dbrotli=true	# requires archivers/brotli
+MESON_ARGS+=	-Dzstd=true	# requires archivers/zstd
+MESON_ARGS+=	-Didn=true	# requires archivers/libidn2
+MESON_ARGS+=	-Dlzma=true	# requires archivers/xz
+MESON_ARGS+=	-Dtre=true	# requires devel/tre
+MESON_ARGS+=	-Dlibevent=true	# requires devel/libevent
+MESON_ARGS+=	-Dgemini=true
+MESON_ARGS+=	-Dapidoc=false	# requires devel/doxygen
+MESON_ARGS+=	-Dhtmldoc=true	# requires textproc/xmlto and perl
+MESON_ARGS+=	-Dpdfdoc=false	# requires textproc/dblatex
+MESON_ARGS+=	-Dlibcss=true	# requires textproc/libcss and textproc/libdom
+MESON_ARGS+=	-Dlibsixel=true	# requires graphics/libsixel
+MESON_ARGS+=	-Dlibcurl=true	# requires www/curl
+MESON_ARGS+=	-Dsftp=true	# requires www/curl
+
+REPLACE_PERL+=	doc/tools/help2xml
+
+.include "options.mk"
+
+.include "../../lang/python/application.mk"
+.include "../../textproc/expat/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../archivers/brotli/buildlink3.mk"
+.include "../../archivers/zstd/buildlink3.mk"
+.include "../../devel/libidn2/buildlink3.mk"
+.include "../../archivers/xz/buildlink3.mk"
+BUILDLINK_API_DEPENDS.libevent+=	libevent>=2.0.0
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../devel/tre/buildlink3.mk"
+.include "../../textproc/libcss/buildlink3.mk"
+.include "../../textproc/libdom/buildlink3.mk"
+.include "../../graphics/libsixel/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
+.include "../../devel/meson/build.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/elinks/PLIST b/elinks/PLIST
new file mode 100644
index 0000000000..c48818627a
--- /dev/null
+++ b/elinks/PLIST
@@ -0,0 +1,62 @@
+@comment $NetBSD: PLIST,v 1.14 2025/02/07 16:18:13 pho Exp $
+bin/elinks
+man/man1/elinks.1
+man/man5/elinks.conf.5
+man/man5/elinkskeys.5
+share/doc/elinks/elinks.1.html
+share/doc/elinks/elinkskeys.5.html
+share/doc/elinks/features.txt
+share/doc/elinks/keymap-defaults.txt
+share/doc/elinks/manual.html
+share/doc/elinks/manual.html-chunked/ar01s02.html
+share/doc/elinks/manual.html-chunked/ar01s03.html
+share/doc/elinks/manual.html-chunked/ar01s04.html
+share/doc/elinks/manual.html-chunked/ar01s05.html
+share/doc/elinks/manual.html-chunked/ar01s06.html
+share/doc/elinks/manual.html-chunked/ar01s07.html
+share/doc/elinks/manual.html-chunked/ar01s08.html
+share/doc/elinks/manual.html-chunked/ar01s09.html
+share/doc/elinks/manual.html-chunked/ar01s10.html
+share/doc/elinks/manual.html-chunked/ar01s11.html
+share/doc/elinks/manual.html-chunked/ar01s12.html
+share/doc/elinks/manual.html-chunked/ar01s13.html
+share/doc/elinks/manual.html-chunked/ar01s14.html
+share/doc/elinks/manual.html-chunked/ar01s15.html
+share/doc/elinks/manual.html-chunked/ar01s16.html
+share/doc/elinks/manual.html-chunked/index.html
+share/doc/elinks/manual.html-chunked/manual.proc
+share/doc/elinks/option-command.frag.xhtml
+share/doc/elinks/perl-hooks.html
+share/doc/elinks/perl.html
+${PLIST.nls}share/locale/af/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/be/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/bg/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/ca/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/cs/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/da/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/de/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/el/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/es/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/et/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/fi/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/fr/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/gl/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/hr/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/hu/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/id/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/is/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/it/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/ja/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/lt/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/nb/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/nl/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/pl/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/pt/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/pt_BR/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/ro/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/ru/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/sk/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/sr/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/sv/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/tr/LC_MESSAGES/elinks.mo
+${PLIST.nls}share/locale/uk/LC_MESSAGES/elinks.mo
diff --git a/elinks/distinfo b/elinks/distinfo
new file mode 100644
index 0000000000..1168d1ba13
--- /dev/null
+++ b/elinks/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.38 2025/11/13 23:18:47 leot Exp $
+
+BLAKE2s (elinks-0.20.0.tar.xz) = dd22e871a15d3287aecefdbc2145034a204e1770052821e42b994ee4dc00167f
+SHA512 (elinks-0.20.0.tar.xz) = a1ad2e94c73f20f7bbed6b47634d7c3b2343bd2e7a13a0563f701711724cae08a4906cc3adc24000742287a1653468ab3edd82db7708d3e5a336889a326dda44
+Size (elinks-0.20.0.tar.xz) = 2220344 bytes
+SHA1 (patch-src_js_quickjs_heartbeat.c) = 14572dea0536af6da33a202f8195f5f1857e5955
+SHA1 (patch-src_js_quickjs_heartbeat.h) = 2542f51c60eee7dd96c00b34c1bab78e1fdae6ed
+SHA1 (patch-src_util_memory.c) = 4d0c89ff99ca3a46c496b1a4e196c3f71d10335e
diff --git a/elinks/options.mk b/elinks/options.mk
new file mode 100644
index 0000000000..f1b9184312
--- /dev/null
+++ b/elinks/options.mk
@@ -0,0 +1,111 @@
+# $NetBSD: options.mk,v 1.21 2025/02/07 16:18:14 pho Exp $
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.elinks
+PKG_SUPPORTED_OPTIONS=		cgi elinks-exmode gssapi nls samba terminfo x11
+PKG_OPTIONS_OPTIONAL_GROUPS=	js tls
+PKG_OPTIONS_GROUP.js=		mujs quickjs-ng spidermonkey
+PKG_OPTIONS_GROUP.tls=		gnutls openssl
+# spidermonkey (mozjs) runs faster than quickjs-ng, but it's less portable
+# because it uses Rust. The default should be a portable interpreter.
+PKG_SUGGESTED_OPTIONS=		nls terminfo quickjs-ng gnutls
+
+.include "../../mk/bsd.options.mk"
+
+###
+### CGI support
+###
+.if !empty(PKG_OPTIONS:Mcgi)
+# This doesn't require any external libraries but since it can cause
+# security issues it should be toggleable.
+MESON_ARGS+=	-Dcgi=true
+.endif
+
+###
+### Enable ex-mode, turning the UI into something vim-like
+###
+.if !empty(PKG_OPTIONS:Melinks-exmode)
+# The upstream says this is an incomplete feature, which is why it's a
+# build-time option but not a run-time one.
+MESON_ARGS+=	-Dexmode=true
+.endif
+
+###
+### GSSAPI support
+###
+.if !empty(PKG_OPTIONS:Mgssapi)
+MESON_ARGS+=	-Dgssapi=true
+.  include "../../mk/krb5.buildlink3.mk"
+.endif
+
+###
+### Native language support
+###
+PLIST_VARS+=	nls
+.if !empty(PKG_OPTIONS:Mnls)
+MESON_ARGS+=	-Dnls=true
+USE_TOOLS+=	msgfmt xgettext
+PLIST.nls=	yes
+.  include "../../devel/gettext-lib/buildlink3.mk"
+.else
+MESON_ARGS+=	-Dnls=false
+.endif
+
+###
+### Samba protocol support
+###
+.if !empty(PKG_OPTIONS:Msamba)
+MESON_ARGS+=	-Dsmb=true
+.  include "../../net/samba4/buildlink3.mk"
+.endif
+
+###
+### Use terminfo for detecting terminal capabilities
+###
+.if !empty(PKG_OPTIONS:Mterminfo)
+MESON_ARGS+=	-Dterminfo=true
+USE_CURSES=	wide
+.  include "../../devel/ncurses/buildlink3.mk"
+.endif
+
+###
+### Use the X Window System
+###
+.if !empty(PKG_OPTIONS:Mx11)
+MESON_ARGS+=	-Dx=true
+.  include "../../x11/libX11/buildlink3.mk"
+.endif
+
+###
+### ECMAScript support
+###
+.if !empty(PKG_OPTIONS:Mmujs)
+MESON_ARGS+=	-Dmujs=true
+.  include "../../lang/mujs/buildlink3.mk"
+.  include "../../databases/sqlite3/buildlink3.mk"
+
+.elif !empty(PKG_OPTIONS:Mquickjs-ng)
+MESON_ARGS+=	-Dquickjs=true
+.  include "../../lang/quickjs-ng/buildlink3.mk"
+.  include "../../databases/sqlite3/buildlink3.mk"
+
+.elif !empty(PKG_OPTIONS:Mspidermonkey)
+MESON_ARGS+=	-Dsm-scripting=true -Dspidermonkey=true
+.  include "../../lang/mozjs128/buildlink3.mk"
+.  include "../../databases/sqlite3/buildlink3.mk"
+.endif
+
+###
+### TLS support
+###
+.if !empty(PKG_OPTIONS:Mgnutls)
+MESON_ARGS+=	-Dgnutls=true -Dopenssl=false
+.  include "../../security/gnutls/buildlink3.mk"
+.  include "../../security/libgcrypt/buildlink3.mk"
+
+.elif !empty(PKG_OPTIONS:Mopenssl)
+MESON_ARGS+=	-Dgnutls=false -Dopenssl=true
+.  include "../../security/openssl/buildlink3.mk"
+
+.else
+MESON_ARGS+=	-Dgnutls=false -Dopenssl=false
+.endif
diff --git a/elinks/patches/patch-src_js_quickjs_heartbeat.c b/elinks/patches/patch-src_js_quickjs_heartbeat.c
new file mode 100644
index 0000000000..8514512800
--- /dev/null
+++ b/elinks/patches/patch-src_js_quickjs_heartbeat.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Fix parameter type
+
+--- src/js/quickjs/heartbeat.c.orig	2026-07-26 09:58:12.000000000 +0000
++++ src/js/quickjs/heartbeat.c
+@@ -33,7 +33,7 @@ int
+  * Returning 1 terminates script execution immediately. */
+ 
+ int
+-js_heartbeat_callback(JSRuntime *rt, void *opaque)
++js_heartbeat_callback(JSContext *ctx, void *opaque)
+ {
+ 	ELOG
+ 	struct ecmascript_interpreter *interpreter = (struct ecmascript_interpreter *)opaque;
diff --git a/elinks/patches/patch-src_js_quickjs_heartbeat.h b/elinks/patches/patch-src_js_quickjs_heartbeat.h
new file mode 100644
index 0000000000..924e6701c7
--- /dev/null
+++ b/elinks/patches/patch-src_js_quickjs_heartbeat.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Fix parameter type
+
+--- src/js/quickjs/heartbeat.h.orig	2026-07-26 09:58:12.000000000 +0000
++++ src/js/quickjs/heartbeat.h
+@@ -23,7 +23,7 @@ void done_heartbeat(struct heartbeat *hb);
+ struct heartbeat *add_heartbeat(struct ecmascript_interpreter *interpreter);
+ void check_heartbeats(void *data);
+ void done_heartbeat(struct heartbeat *hb);
+-int js_heartbeat_callback(JSRuntime *rt, void *opaque);
++int js_heartbeat_callback(JSContext *ctx, void *opaque);
+ 
+ #ifdef __cplusplus
+ }
diff --git a/elinks/patches/patch-src_util_memory.c b/elinks/patches/patch-src_util_memory.c
new file mode 100644
index 0000000000..68c8240371
--- /dev/null
+++ b/elinks/patches/patch-src_util_memory.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_util_memory.c,v 1.1 2023/04/14 21:35:06 nia Exp $
+
+Use macro to make mremap compatible to NetBSD
+
+--- src/util/memory.c.orig	2026-07-26 09:58:12.000000000 +0000
++++ src/util/memory.c
+@@ -21,7 +21,15 @@
+ #include "util/error.h"
+ #include "util/memory.h"
+ 
++#if defined(__NetBSD__)
++# define MREMAP(p, oldsz, newsz, f)    mremap(p, oldsz, NULL, newsz, 0)
++# define MREMAP_MAYMOVE    0
++#else
++# define MREMAP(p, oldsz, newsz, f)    mremap(p, oldsz, newsz, f)
++#endif
+ 
++
++
+ #if !defined(DEBUG_MEMLEAK) && !defined(CONFIG_FASTMEM)
+ 
+ static int alloc_try = 0;
+@@ -174,7 +182,7 @@ mem_mmap_realloc(void *p, size_t old_size, size_t new_
+ 
+ 	if (new_size) {
+ #ifdef HAVE_MREMAP
+-		void *p2 = mremap(p, round_size(old_size), round_size(new_size), MREMAP_MAYMOVE);
++		void *p2 = MREMAP(p, round_size(old_size), round_size(new_size), MREMAP_MAYMOVE);
+ 
+ 		if (p2 != MAP_FAILED)
+ 			return p2;


Home | Main Index | Thread Index | Old Index