diff --git a/www/elinks/Makefile b/www/elinks/Makefile index e9c840823ab1..3075c2f63981 100644 --- a/www/elinks/Makefile +++ b/www/elinks/Makefile @@ -1,124 +1,122 @@ PORTNAME= elinks DISTVERSIONPREFIX= v -DISTVERSION= 0.15.1 -PORTREVISION= 1 +DISTVERSION= 0.16.0 CATEGORIES= www MAINTAINER= jailbird@fdf.net COMMENT= Links text WWW browser with enhancements WWW= https://github.com/rkd77/elinks/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING USES= bison:alias cpe gmake iconv meson perl5 pkgconfig python:3.7+ ssl BUILD_DEPENDS= xmlto:textproc/xmlto USE_GITHUB= yes GH_ACCOUNT= rkd77 LDFLAGS+= -lexecinfo MESON_ARGS= -Dgpm=false -Dperl=true OPTIONS_DEFINE= 256COLORS 88COLORS TRUECOLORS BITTORRENT BROTLI EXMODE \ FASTMEM FINGER FSP FTP GOPHER GUILE HIGHLIGHT \ IDN LOCAL_CGI LUA LZMA MOUSE NLS NNTP NOROOT \ SMB SPIDERMONKEY TRE XBELMARKS ZSTD OPTIONS_DEFAULT= 256COLORS 88COLORS BROTLI EXMODE FASTMEM FTP \ HIGHLIGHT LZMA MOUSE OPTIONS_SUB= yes 88COLORS_DESC= 88 color support 256COLORS_DESC= 256 color support TRUECOLORS_DESC= True color support SPIDERMONKEY_DESC= ECMAScript support (via SpiderMonkey) XBELMARKS_DESC= XBEL bookmarks (via expat) LOCAL_CGI_DESC= Local CGI support FSP_DESC= FSP protocol support (via fsplib) EXMODE_DESC= Exmode (CLI) support HIGHLIGHT_DESC= HTML highlighting using DOM engine NOROOT_DESC= Prevention of usage by root FASTMEM_DESC= Fast memory allocation functions TRE_DESC= TRE regex search support BROTLI_LIB_DEPENDS= libbrotlidec.so:archivers/brotli BROTLI_MESON_TRUE= brotli NLS_USES= gettext NLS_MESON_TRUE= nls GUILE_LIB_DEPENDS= libguile-3.0.so:lang/guile GUILE_MESON_TRUE= guile LUA_USES= lua:52-53 LUA_MESON_ON= -Dluapkg=lua-${LUA_VER} LZMA_MESON_TRUE= lzma FASTMEM_MESON_TRUE= fastmem IDN_LIB_DEPENDS= libidn.so:dns/libidn IDN_USES= localbase IDN_MESON_TRUE= idn NOROOT_MESON_TRUE= no-root HIGHLIGHT_MESON_TRUE= html-highlight EXMODE_MESON_TRUE= exmode SMB_USES= samba # smbclient SMB_MESON_TRUE= smb FSP_RUN_DEPENDS= ${LOCALBASE}/lib/libfsplib.a:net/fsplib FSP_BUILD_DEPENDS= ${LOCALBASE}/lib/libfsplib.a:net/fsplib FSP_MESON_TRUE= fsp FTP_MESON_TRUE= ftp NNTP_MESON_TRUE= nntp BITTORRENT_MESON_TRUE= bittorrent GOPHER_MESON_TRUE= gopher MOUSE_MESON_TRUE= mouse FINGER_MESON_TRUE= finger LOCAL_CGI_MESON_TRUE= cgi XBELMARKS_LIB_DEPENDS= libexpat.so:textproc/expat2 XBELMARKS_MESON_TRUE= xbel 256COLORS_MESON_TRUE= 256-colors 88COLORS_MESON_TRUE= 88-colors TRUECOLORS_MESON_TRUE= true-color SPIDERMONKEY_USES= compiler:c++17-lang sqlite -SPIDERMONKEY_BUILD_DEPENDS= ${LOCALBASE}/lib/libmozjs-78.so:lang/spidermonkey78 \ +SPIDERMONKEY_BUILD_DEPENDS= ${LOCALBASE}/lib/libmozjs-102.so:lang/spidermonkey102 \ ${LOCALBASE}/lib/libxml++-5.0.so:textproc/libxml++ -SPIDERMONKEY_RUN_DEPENDS= js78:lang/spidermonkey78 SPIDERMONKEY_LIB_DEPENDS= libnspr4.so:devel/nspr \ libxml++-5.0.so:textproc/libxml++ SPIDERMONKEY_CFLAGS= -I${LOCALBASE}/include/nspr \ - -I${LOCALBASE}/include/js-78 + -I${LOCALBASE}/include/js-102 SPIDERMONKEY_CXXFLAGS= -I${LOCALBASE}/include/nspr \ - -I${LOCALBASE}/include/js-78 + -I${LOCALBASE}/include/js-102 SPIDERMONKEY_LDFLAGS= -L${LOCALBASE}/lib -lnspr4 -lpthread -lm SPIDERMONKEY_MESON_ON= -Dsm-scripting=true -Dspidermonkey=true TRE_LIB_DEPENDS= libtre.so:textproc/libtre TRE_MESON_TRUE= tre ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd ZSTD_USES= localbase ZSTD_MESON_TRUE= zstd post-patch: @${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL}|g' ${WRKSRC}/doc/tools/help2xml @${REINPLACE_CMD} -e 's|/usr/bin/env python3|${PYTHON_CMD}|g' ${WRKSRC}/doc/tools/asciidoc/asciidoc.py .include diff --git a/www/elinks/distinfo b/www/elinks/distinfo index 1d11b36105a2..ab63d2e5479b 100644 --- a/www/elinks/distinfo +++ b/www/elinks/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1659262740 -SHA256 (rkd77-elinks-v0.15.1_GH0.tar.gz) = a3ebb14e179fcf97f93874b7771b4b05c1b7fdc704807334e865273d9de8428f -SIZE (rkd77-elinks-v0.15.1_GH0.tar.gz) = 3860003 +TIMESTAMP = 1671992400 +SHA256 (rkd77-elinks-v0.16.0_GH0.tar.gz) = 5494a73737eeb182fe2333b74e9b6192170f583c7722a0650dcd14ef088b9dfb +SIZE (rkd77-elinks-v0.16.0_GH0.tar.gz) = 3937345 diff --git a/www/elinks/files/patch-meson.build b/www/elinks/files/patch-meson.build index 77b35a8981b2..d381c0c3e10d 100644 --- a/www/elinks/files/patch-meson.build +++ b/www/elinks/files/patch-meson.build @@ -1,24 +1,42 @@ ---- meson.build.orig 2022-07-31 10:16:29 UTC +--- meson.build.orig 2022-12-25 18:17:02 UTC +++ meson.build @@ -3,9 +3,7 @@ srcdir = meson.source_root() srcdir = meson.source_root() --txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD').stdout().strip() --dirty = run_command(srcdir + '/git-dirty.sh').stdout().strip() +-txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD', check:false).stdout().strip() +-dirty = run_command(srcdir + '/git-dirty.sh', check:false).stdout().strip() -add_global_arguments('-DBUILD_ID="' + txt + dirty + '"', language : 'c') +add_global_arguments('-DBUILD_ID="\\0"', language : 'c') conf_data = configuration_data() conf_data.set('VERSION', meson.project_version()) -@@ -158,6 +156,10 @@ if compiler.has_header('fcntl.h') - - if compiler.has_header('fcntl.h') +@@ -171,6 +169,10 @@ endif conf_data.set('HAVE_FCNTL_H', 1) -+endif -+ + endif + +if compiler.has_header('execinfo.h') + conf_data.set('HAVE_EXECINFO_H', 1) ++endif ++ + if compiler.has_header('libgen.h') + conf_data.set('HAVE_LIBGEN_H', 1) + endif +@@ -838,7 +840,7 @@ endif + conf_data.set('HAVE_ICONV', 1) + endif + +-if conf_data.get('CONFIG_OS_DOS') or compiler.has_function('alloca', prefix: '#include ') ++if conf_data.get('CONFIG_OS_DOS') or compiler.has_function('alloca', prefix: '#include ') + conf_data.set('HAVE_ALLOCA', 1) + endif + +@@ -854,7 +856,7 @@ endif + conf_data.set('HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST', 1) + endif + +-if compiler.has_function('mkstemps', prefix: '#include ', args: '-D_GNU_SOURCE') ++if compiler.has_function('mkstemps', prefix: '#include ') + conf_data.set('HAVE_MKSTEMPS', 1) endif - if compiler.has_header('libgen.h') diff --git a/www/elinks/files/patch-src_config_options.c b/www/elinks/files/patch-src_config_options.c deleted file mode 100644 index b59ebc61f415..000000000000 --- a/www/elinks/files/patch-src_config_options.c +++ /dev/null @@ -1,28 +0,0 @@ ---- src/config/options.c.orig 2022-07-31 10:16:29 UTC -+++ src/config/options.c -@@ -892,6 +892,7 @@ change_hook_ui_double_esc(struct session *ses, struct - return 0; - } - -+#ifdef CONFIG_MOUSE - static int - change_hook_ui_mouse_disable(struct session *ses, struct option *current, struct option *changed) - { -@@ -907,6 +908,7 @@ change_hook_ui_mouse_disable(struct session *ses, stru - } - return 0; - } -+#endif - - - /** Make option templates visible or invisible in the option manager. -@@ -984,7 +986,9 @@ static const struct change_hook_info change_hooks[] = - { "ui.colors", change_hook_ui_colors }, - { "ui.double_esc", change_hook_ui_double_esc }, - { "ui.language", change_hook_language }, -+#ifdef CONFIG_MOUSE - { "ui.mouse_disable", change_hook_ui_mouse_disable }, -+#endif - { "ui", change_hook_ui }, - { NULL, NULL }, - }; diff --git a/www/elinks/files/patch-src_document_renderer.cpp b/www/elinks/files/patch-src_document_renderer.cpp new file mode 100644 index 000000000000..56bc49fb5991 --- /dev/null +++ b/www/elinks/files/patch-src_document_renderer.cpp @@ -0,0 +1,16 @@ +--- src/document/renderer.cpp.orig 2022-12-25 18:17:02 UTC ++++ src/document/renderer.cpp +@@ -615,11 +615,11 @@ struct conv_table * + } + + struct conv_table * +-get_convert_table(char *head, int to_cp, ++get_convert_table(const char *head, int to_cp, + int default_cp, int *from_cp, + enum cp_status *cp_status, int ignore_server_cp) + { +- char *part = head; ++ const char *part = head; + int cp_index = -1; + + assert(head); diff --git a/www/elinks/files/patch-src_document_renderer.h b/www/elinks/files/patch-src_document_renderer.h new file mode 100644 index 000000000000..3f5795e6d245 --- /dev/null +++ b/www/elinks/files/patch-src_document_renderer.h @@ -0,0 +1,11 @@ +--- src/document/renderer.h.orig 2022-12-25 18:17:02 UTC ++++ src/document/renderer.h +@@ -16,7 +16,7 @@ void render_document_frames(struct session *ses, int n + + void render_document(struct view_state *, struct document_view *, struct document_options *); + void render_document_frames(struct session *ses, int no_cache); +-struct conv_table *get_convert_table(char *head, int to_cp, int default_cp, int *from_cp, enum cp_status *cp_status, int ignore_server_cp); ++struct conv_table *get_convert_table(const char *head, int to_cp, int default_cp, int *from_cp, enum cp_status *cp_status, int ignore_server_cp); + void sort_links(struct document *document); + + #ifdef __cplusplus diff --git a/www/elinks/files/patch-src_intl_gettext_libintl.h b/www/elinks/files/patch-src_intl_gettext_libintl.h index 827752d8ad8f..0c5d55c9e75b 100644 --- a/www/elinks/files/patch-src_intl_gettext_libintl.h +++ b/www/elinks/files/patch-src_intl_gettext_libintl.h @@ -1,11 +1,11 @@ ---- src/intl/gettext/libintl.h.orig 2022-07-31 10:16:29 UTC +--- src/intl/gettext/libintl.h.orig 2022-12-25 18:17:02 UTC +++ src/intl/gettext/libintl.h @@ -44,7 +44,7 @@ _(const char *msg, struct terminal *term) return (char *)gettext_noop(msg); } -static inline char * +static inline const char * n_(const char *msg1, const char *msg2, unsigned long int n, struct terminal *term) { - return gettext_noop(msg1); + return (char *)gettext_noop(msg1); diff --git a/www/elinks/files/patch-src_protocol_header.c b/www/elinks/files/patch-src_protocol_header.c new file mode 100644 index 000000000000..b0c1c7fcf96d --- /dev/null +++ b/www/elinks/files/patch-src_protocol_header.c @@ -0,0 +1,14 @@ +--- src/protocol/header.c.orig 2022-12-25 18:17:02 UTC ++++ src/protocol/header.c +@@ -141,9 +141,9 @@ char * + * The terms message-header, field-name, start-line, and field-content + * are defined in RFC 2616 sections 4.1 and 4.2. */ + char * +-parse_header(char *head, const char *item, char **ptr) ++parse_header(const char *head, const char *item, const char **ptr) + { +- char *pos = head; ++ const char *pos = head; + + if (!pos) return NULL; + diff --git a/www/elinks/files/patch-src_protocol_header.h b/www/elinks/files/patch-src_protocol_header.h new file mode 100644 index 000000000000..7fcb5a265568 --- /dev/null +++ b/www/elinks/files/patch-src_protocol_header.h @@ -0,0 +1,11 @@ +--- src/protocol/header.h.orig 2022-12-25 18:17:02 UTC ++++ src/protocol/header.h +@@ -13,7 +13,7 @@ enum parse_header_param { + * Unknown values should be treated as errors. */ + }; + +-char *parse_header(char *, const char *, char **); ++char *parse_header(const char *, const char *, const char **); + enum parse_header_param parse_header_param(char *, const char *, char **, int); + char *get_header_param(char *, const char *); + diff --git a/www/elinks/files/patch-src_util_error.c b/www/elinks/files/patch-src_util_error.c deleted file mode 100644 index 30424736bf20..000000000000 --- a/www/elinks/files/patch-src_util_error.c +++ /dev/null @@ -1,29 +0,0 @@ ---- src/util/error.c.orig 2022-07-31 10:16:29 UTC -+++ src/util/error.c -@@ -301,26 +301,6 @@ dump_backtrace(FILE *f, int trouble) - fprintf(f, "[%p] %s\n", stack[i], strings[i]); - - free(strings); -- --#else -- /* User torturation. */ -- /* You are worried about what you see here? You don't see anything in -- * the first place. Also, be assured that we know what are we doing. */ -- /* (We are killing the user, obviously.) */ -- -- /* TODO: Gettextify? Er, better not. More people (translators) could -- * find out what are we doing... ;-) --pasky */ -- /* TODO: Be more cruel when in trouble? ;-) --pasky */ -- -- fputs( "Wheeeeeeeeeee! You played with the config.h by hand, didn't you?\n" -- "Of _COURSE_ you did! Is that how a nice .. creature behaves like?\n" -- "Of _COURSE_ it isn't! I feel offended and thus I will revenge now!\n" -- "You will _suffer_ >:).\n" -- "\n" -- "CPU burning sequence initiated...\n", f); -- -- /* TODO: Include cpuburn.c here. --pasky */ -- while (1); - #endif - fflush(f); - }