Skip to content

Commit

Permalink
www/elinks: Update to 0.18.0
Browse files Browse the repository at this point in the history
- The package can now be built with JavaScript support. It uses
  lang/quickjs by default. Note that even if it's built with JS support it
  is disabled by default, because JS support is still an experimental
  feature. One needs to change the run-time configuration to enable it.

- The package is now built with libcss to support CSS.

- The package is now built with libsixel to support Sixel graphics on
  supported terminal emulators. (Currently none in pkgsrc!)

Release notes from the upstream:

ELinks 0.18.0
-------------

Released on 2024-12-26

* redirect also for 308 #343
* ignore HUBBUB_UNKNOWN #344


ELinks 0.18.0rc1
----------------

Released on 2024-12-07

* drop combining compile time option
* bump mozjs dependency to 128
* console.assert (and extension console.exit)
* test option for testing js code
* added document.scripting_sleep_on_error option #319
* skip hidden elements #341
* fix linking -lexecinfo #337
* Serbian translation update
* Polish translation update
* detect if gettext has _nl_msg_cat_cntr #325
* added reopen-last-closed-tab action #309
* added options for memory limits of Spidermonkey and QuickJS
* gemini input #121
* compilation fixes


ELinks 0.17.1.1
---------------

Released on 2024-10-05

* bump requirements: libCSS to 0.9.2 and libdom to 0.4.2
* revert "[head] addcrlf". #281
* main, article and nav elements #282
* bashism in configure.ac #285
* eliminate GNUism in sed #305
* python module imp is deprecated #313
* fix hooks.py detection #333
* cast to unsigned char * in inpfield #315
* fix suspend in session master when fork_on_start #296
* remove 300ms startup delay and optimize fork_on_start #297
* missing <sys/cdefs.h> on systems with musl libc #306
  • Loading branch information
depressed-pho committed Feb 7, 2025
1 parent b61795c commit e7765fd
Show file tree
Hide file tree
Showing 6 changed files with 239 additions and 73 deletions.
72 changes: 45 additions & 27 deletions www/elinks/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.88 2024/11/14 22:22:04 wiz Exp $
# $NetBSD: Makefile,v 1.89 2025/02/07 16:18:13 pho Exp $

DISTNAME= elinks-0.17.0
PKGREVISION= 5
DISTNAME= elinks-0.18.0
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_GITHUB:=rkd77/}
GITHUB_RELEASE= v${PKGVERSION_NOREV}
Expand All @@ -16,38 +15,57 @@ CONFLICTS+= felinks-[0-9]*
SUPERSEDES+= felinks-[0-9]*

USE_PKGLOCALEDIR= yes
GNU_CONFIGURE= yes
USE_LANGUAGES= c c++
USE_CXX_FEATURES+= c++17
USE_TOOLS+= bash gmake pkg-config
USE_TOOLS+= msgfmt xgettext

# uses '<<<'
CONFIG_SHELL= bash

# ld: no input files
MAKE_JOBS_SAFE= no

post-install:
${RM} -f ${DESTDIR}${PREFIX}/lib/charset.alias

CONFIGURE_ARGS+= --datadir=${PREFIX}/share/${PKGBASE}
CONFIGURE_ARGS+= --enable-256-colors
CONFIGURE_ARGS+= --enable-utf-8
CONFIGURE_ARGS+= --without-bzlib
CONFIGURE_ARGS+= --without-lzma
CONFIGURE_ARGS+= --without-lua
USE_TOOLS+= perl pkg-config

.include "../../mk/bsd.prefs.mk"

# for backtrace
.if ${OPSYS} == "NetBSD" && exists(/usr/include/execinfo.h)
LIBS+= -lexecinfo
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 "../../converters/libiconv/buildlink3.mk"
.include "../../devel/libidn/buildlink3.mk"
TOOL_DEPENDS+= xmlto-[0-9]*:../../textproc/xmlto

.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"
93 changes: 58 additions & 35 deletions www/elinks/PLIST
Original file line number Diff line number Diff line change
@@ -1,39 +1,62 @@
@comment $NetBSD: PLIST,v 1.13 2023/04/14 21:35:06 nia Exp $
@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/elinks/locale/af/LC_MESSAGES/elinks.mo
share/elinks/locale/be/LC_MESSAGES/elinks.mo
share/elinks/locale/bg/LC_MESSAGES/elinks.mo
share/elinks/locale/ca/LC_MESSAGES/elinks.mo
share/elinks/locale/cs/LC_MESSAGES/elinks.mo
share/elinks/locale/da/LC_MESSAGES/elinks.mo
share/elinks/locale/de/LC_MESSAGES/elinks.mo
share/elinks/locale/el/LC_MESSAGES/elinks.mo
share/elinks/locale/es/LC_MESSAGES/elinks.mo
share/elinks/locale/et/LC_MESSAGES/elinks.mo
share/elinks/locale/fi/LC_MESSAGES/elinks.mo
share/elinks/locale/fr/LC_MESSAGES/elinks.mo
share/elinks/locale/gl/LC_MESSAGES/elinks.mo
share/elinks/locale/hr/LC_MESSAGES/elinks.mo
share/elinks/locale/hu/LC_MESSAGES/elinks.mo
share/elinks/locale/id/LC_MESSAGES/elinks.mo
share/elinks/locale/is/LC_MESSAGES/elinks.mo
share/elinks/locale/it/LC_MESSAGES/elinks.mo
share/elinks/locale/ja/LC_MESSAGES/elinks.mo
share/elinks/locale/locale.alias
share/elinks/locale/lt/LC_MESSAGES/elinks.mo
share/elinks/locale/nb/LC_MESSAGES/elinks.mo
share/elinks/locale/nl/LC_MESSAGES/elinks.mo
share/elinks/locale/pl/LC_MESSAGES/elinks.mo
share/elinks/locale/pt/LC_MESSAGES/elinks.mo
share/elinks/locale/pt_BR/LC_MESSAGES/elinks.mo
share/elinks/locale/ro/LC_MESSAGES/elinks.mo
share/elinks/locale/ru/LC_MESSAGES/elinks.mo
share/elinks/locale/sk/LC_MESSAGES/elinks.mo
share/elinks/locale/sr/LC_MESSAGES/elinks.mo
share/elinks/locale/sv/LC_MESSAGES/elinks.mo
share/elinks/locale/tr/LC_MESSAGES/elinks.mo
share/elinks/locale/uk/LC_MESSAGES/elinks.mo
@pkgdir lib
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
10 changes: 6 additions & 4 deletions www/elinks/distinfo
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
$NetBSD: distinfo,v 1.36 2024/02/20 07:15:02 wiz Exp $
$NetBSD: distinfo,v 1.37 2025/02/07 16:18:14 pho Exp $

BLAKE2s (elinks-0.17.0.tar.xz) = 2012aaae0094c6fcc4ffcf1cf25ff658abd8633ca8a6b8078c9bb066e8788f4b
SHA512 (elinks-0.17.0.tar.xz) = 276c648174d067cdd92cbbf25e8a353a3a482a65a4f1080ff42f932cdc0239e5110a51653f5136188a0b9135be2928f2bd1a92f37fa83ce14d8fc1267b87cf56
Size (elinks-0.17.0.tar.xz) = 2076460 bytes
BLAKE2s (elinks-0.18.0.tar.xz) = 65d0190de47ff7953789b90b861cf45ac50c6a9e858560b4f3c5078aea56a124
SHA512 (elinks-0.18.0.tar.xz) = e0ff737e06d4b591d362257b9a375b938f9d6222cf6ee4df2065c7b47f883a5eacf76dabae8fc7c0b32cf9b7df56267752217d6999b0ae24c2482763b5b0ccb9
Size (elinks-0.18.0.tar.xz) = 2078656 bytes
SHA1 (patch-meson.build) = 11a16613cef254e8e179e844bb302f98ce925e2d
SHA1 (patch-src_terminal_sixel.c) = 330bf0c751f1b37944be6afd7b022782411224ec
SHA1 (patch-src_util_memory.c) = dc390442f65d7cee70d28d6a6cba5ee0981eb83a
106 changes: 99 additions & 7 deletions www/elinks/options.mk
Original file line number Diff line number Diff line change
@@ -1,19 +1,111 @@
# $NetBSD: options.mk,v 1.20 2024/10/06 16:24:45 nia Exp $
# $NetBSD: options.mk,v 1.21 2025/02/07 16:18:14 pho Exp $

PKG_OPTIONS_VAR= PKG_OPTIONS.elinks
PKG_OPTIONS_REQUIRED_GROUPS= tls
PKG_SUPPORTED_OPTIONS= cgi elinks-exmode gssapi nls samba terminfo x11
PKG_OPTIONS_OPTIONAL_GROUPS= js tls
PKG_OPTIONS_GROUP.js= mujs quickjs spidermonkey
PKG_OPTIONS_GROUP.tls= gnutls openssl
PKG_SUGGESTED_OPTIONS= gnutls
# spidermonkey (mozjs) runs faster than quickjs, but it's less portable
# because it uses Rust. The default should be a portable interpreter.
PKG_SUGGESTED_OPTIONS= nls terminfo quickjs 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)
MESON_ARGS+= -Dquickjs=true
. include "../../lang/quickjs/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"
CONFIGURE_ARGS+= --without-openssl
.endif

.if !empty(PKG_OPTIONS:Mopenssl)
.elif !empty(PKG_OPTIONS:Mopenssl)
MESON_ARGS+= -Dgnutls=false -Dopenssl=true
. include "../../security/openssl/buildlink3.mk"
CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}

.else
MESON_ARGS+= -Dgnutls=false -Dopenssl=false
.endif
16 changes: 16 additions & 0 deletions www/elinks/patches/patch-meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$NetBSD: patch-meson.build,v 1.1 2025/02/07 16:18:14 pho Exp $

Fix build with quickjs: it only installs static libraries so "static:
false" never succeeds. Did the upstream actually test this?

--- meson.build.orig 2025-02-07 12:39:03.321364259 +0000
+++ meson.build
@@ -669,7 +669,7 @@ if not compiler.links('''#include <stdin
endif

if conf_data.get('CONFIG_QUICKJS')
- quickjsdeps = compiler.find_library('quickjs', static: st, required: false)
+ quickjsdeps = compiler.find_library('quickjs', required: false)
if not quickjsdeps.found()
quickjsdeps = compiler.find_library('quickjs/libquickjs', static: true, required: not conf_data.get('CONFIG_OS_DOS'))
endif
15 changes: 15 additions & 0 deletions www/elinks/patches/patch-src_terminal_sixel.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$NetBSD: patch-src_terminal_sixel.c,v 1.1 2025/02/07 16:18:14 pho Exp $

There is no such function as sixel_output_set_ormode() in libsixel. Where
did it come from?

--- src/terminal/sixel.c.orig 2025-02-07 13:19:29.650027658 +0000
+++ src/terminal/sixel.c
@@ -733,7 +733,6 @@ sixel_encoder_encode_frame(
sixel_output_set_penetrate_multiplexer(
output, encoder->penetrate_multiplexer);
sixel_output_set_encode_policy(output, encoder->encode_policy);
- sixel_output_set_ormode(output, encoder->ormode);

#if 0
if (sixel_frame_get_multiframe(frame) && !encoder->fstatic) {

0 comments on commit e7765fd

Please sign in to comment.