This commit is contained in:
Daniel 2024-01-28 10:24:47 -05:00
parent 5c750fc8f1
commit 46f68a6432
13 changed files with 343 additions and 0 deletions

132
www/elinks/Makefile Normal file
View file

@ -0,0 +1,132 @@
PORTNAME= elinks
DISTVERSIONPREFIX= v
DISTVERSION= 0.17.0
PORTREVISION= 1
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
BUILD_DEPENDS= xmlto:textproc/xmlto libcss:textproc/libcss libdom:www/libdom
USES= bison:alias cpe gmake iconv meson perl5 pkgconfig python ssl
USE_GITHUB= yes
GH_ACCOUNT= rkd77
LDFLAGS+= -lexecinfo
MESON_ARGS= -Dgpm=false -Dperl=true
OPTIONS_DEFINE= 256COLORS 88COLORS TRUECOLORS BITTORRENT BROTLI CSS \
CURL 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
CSS_DESC= Cascading Style Sheets support (via libcss & libdom)
EXMODE_DESC= Exmode (CLI) support
FASTMEM_DESC= Fast memory allocation functions
FSP_DESC= FSP protocol support (via fsplib)
HIGHLIGHT_DESC= HTML highlighting using DOM engine
LOCAL_CGI_DESC= Local CGI support
NOROOT_DESC= Prevention of usage by root
SPIDERMONKEY_DESC= ECMAScript support (via SpiderMonkey)
TRE_DESC= TRE regex search support
XBELMARKS_DESC= XBEL bookmarks (via expat)
256COLORS_MESON_TRUE= 256-colors
88COLORS_MESON_TRUE= 88-colors
TRUECOLORS_MESON_TRUE= true-color
BITTORRENT_MESON_TRUE= bittorrent
BROTLI_LIB_DEPENDS= libbrotlidec.so:archivers/brotli
BROTLI_MESON_TRUE= brotli
CSS_LIB_DEPENDS= libcss.so:textproc/libcss \
libdom.so:www/libdom
CSS_MESON_TRUE= libcss
CURL_LIB_DEPENDS= libcurl.so:ftp/curl
CURL_MESON_TRUE= libcurl
EXMODE_MESON_TRUE= exmode
FASTMEM_MESON_TRUE= fastmem
FINGER_MESON_TRUE= finger
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
GOPHER_MESON_TRUE= gopher
GUILE_USES= guile:3.0
GUILE_MESON_TRUE= guile
HIGHLIGHT_MESON_TRUE= html-highlight
IDN_LIB_DEPENDS= libidn2.so:dns/libidn2
IDN_USES= localbase
IDN_MESON_TRUE= idn
LOCAL_CGI_MESON_TRUE= cgi
LUA_USES= lua:52-53
LUA_MESON_ON= -Dluapkg=lua-${LUA_VER}
LZMA_MESON_TRUE= lzma
MOUSE_MESON_TRUE= mouse
NLS_USES= gettext
NLS_MESON_TRUE= nls
NNTP_MESON_TRUE= nntp
NOROOT_MESON_TRUE= no-root
SMB_USES= samba # smbclient
SMB_MESON_TRUE= smb
SPIDERMONKEY_USES= compiler:c++17-lang sqlite
SPIDERMONKEY_BUILD_DEPENDS= ${LOCALBASE}/lib/libmozjs-102.so:lang/spidermonkey102 \
${LOCALBASE}/lib/libxml++-5.0.so:textproc/libxml++
SPIDERMONKEY_LIB_DEPENDS= libnspr4.so:devel/nspr \
libxml++-5.0.so:textproc/libxml++
SPIDERMONKEY_CFLAGS= -I${LOCALBASE}/include/nspr \
-I${LOCALBASE}/include/js-102
SPIDERMONKEY_CXXFLAGS= -I${LOCALBASE}/include/nspr \
-I${LOCALBASE}/include/js-102
SPIDERMONKEY_LDFLAGS= -L${LOCALBASE}/lib -lnspr4 -lpthread -lm
SPIDERMONKEY_MESON_ON= -Dsm-scripting=true -Dspidermonkey=true
SPIDERMONKEY_IMPLIES= CURL
TRE_LIB_DEPENDS= libtre.so:textproc/libtre
TRE_MESON_TRUE= tre
XBELMARKS_LIB_DEPENDS= libexpat.so:textproc/expat2
XBELMARKS_MESON_TRUE= xbel
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 <bsd.port.mk>

3
www/elinks/distinfo Normal file
View file

@ -0,0 +1,3 @@
TIMESTAMP = 1703503620
SHA256 (rkd77-elinks-v0.17.0_GH0.tar.gz) = 250a55198bb3e16a49a52fde85ffc54f1e654b7615369467725a3d74bc469f22
SIZE (rkd77-elinks-v0.17.0_GH0.tar.gz) = 4006073

View file

@ -0,0 +1,41 @@
--- meson.build.orig 2023-12-25 11:25:27 UTC
+++ meson.build
@@ -211,6 +211,10 @@ endif
conf_data.set('HAVE_FCNTL_H', 1)
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
@@ -396,7 +400,8 @@ if conf_data.get('CONFIG_OPENSSL')
if conf_data.get('CONFIG_OPENSSL')
ssldeps = dependency('openssl', static: st, required: false)
if not ssldeps.found()
- ssldeps = compiler.find_library('ssl', static: st, dirs: [get_option('prefix')+'/lib', '/usr/local/lib'])
+ ssldeps = compiler.find_library('crypto', static: st, dirs: [get_option('prefix')+'/lib', '/usr/local/lib'])
+ ssldeps += compiler.find_library('ssl', static: st, dirs: [get_option('prefix')+'/lib', '/usr/local/lib'])
endif
deps += ssldeps
conf_data.set('USE_OPENSSL', true)
@@ -959,7 +964,7 @@ endif
conf_data.set('HAVE_ICONV', 1)
endif
-if conf_data.get('CONFIG_OS_DOS') or compiler.has_function('alloca', prefix: '#include <alloca.h>')
+if conf_data.get('CONFIG_OS_DOS') or compiler.has_function('alloca', prefix: '#include <stdlib.h>')
conf_data.set('HAVE_ALLOCA', 1)
endif
@@ -975,7 +980,7 @@ endif
conf_data.set('HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST', 1)
endif
-if compiler.has_function('mkstemps', prefix: '#include <stdlib.h>', args: '-D_GNU_SOURCE')
+if compiler.has_function('mkstemps', prefix: '#include <unistd.h>')
conf_data.set('HAVE_MKSTEMPS', 1)
endif

View file

@ -0,0 +1,16 @@
--- src/document/renderer.c.orig 2023-12-27 03:03:28 UTC
+++ src/document/renderer.c
@@ -415,11 +415,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);

View file

@ -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

View file

@ -0,0 +1,25 @@
--- src/intl/gettext/Makefile.orig 2021-12-24 19:53:43 UTC
+++ src/intl/gettext/Makefile
@@ -49,14 +49,12 @@ install-local: $(builddir)/charset.alias all
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
orig=$(DESTDIR)$(libdir)/charset.alias; \
sed -f ref-add.sed $$orig > $$temp; \
- $(INSTALL_DATA) $$temp $$dest; \
rm -f $$temp; \
else \
if test $(GLIBC21) = no; then \
$(MKINSTALLDIRS) $(DESTDIR)$(libdir); \
orig=charset.alias; \
sed -f ref-add.sed $$orig > $$temp; \
- $(INSTALL_DATA) $$temp $$dest; \
rm -f $$temp; \
fi; \
fi; \
@@ -67,7 +65,6 @@ install-local: $(builddir)/charset.alias all
temp=$(DESTDIR)$(localedir)/t-locale.alias; \
dest=$(DESTDIR)$(localedir)/locale.alias; \
sed -f ref-add.sed $$orig > $$temp; \
- $(INSTALL_DATA) $$temp $$dest; \
rm -f $$temp; \
else \
: ; \

View file

@ -0,0 +1,11 @@
--- 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 (char *)gettext_noop(msg1);

View file

@ -0,0 +1,13 @@
--- src/osdep/unix/bsd.c.orig 2022-01-29 20:03:00 UTC
+++ src/osdep/unix/bsd.c
@@ -15,6 +15,10 @@
#endif /* HAVE_SYS_CONSIO_H */
#endif /* CONFIG_SYSMOUSE */
+#if defined(__FreeBSD__)
+#include <signal.h>
+#endif
+
#include "elinks.h"
#include "main/select.h"

View file

@ -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;

View file

@ -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 *);

View file

@ -0,0 +1,11 @@
--- src/scripting/lua/Makefile.orig 2021-12-24 19:53:43 UTC
+++ src/scripting/lua/Makefile
@@ -1,7 +1,7 @@
top_builddir=../../..
include $(top_builddir)/Makefile.config
-INCLUDES += $(LUA_CFLAGS)
+INCLUDES += $(LUA_CFLAGS) $(CPPFLAGS)
OBJS = lua.o hooks.o core.o

19
www/elinks/pkg-descr Normal file
View file

@ -0,0 +1,19 @@
elinks is the links text WWW browser with many bugfixes and enhancements.
So far elinks adds the following to links:
many bugfixes
new translations and some updates of the original ones
some very minor features not worth mentioning here
code cleanup
lua support (from links-lua project)
HTTP referrer support
updated manpage
--help lists all options now
cookie expiration and saving/loading from disk
ability to modify user-agent string
unhistory
support for editing textareas in external editor
ability to switch off document-specific colors
Spidermonkey-based ECMAScript support
Syntax highlighting for HTML, RSS, and XBEL

36
www/elinks/pkg-plist Normal file
View file

@ -0,0 +1,36 @@
bin/elinks
share/man/man1/elinks.1.gz
share/man/man5/elinkskeys.5.gz
share/man/man5/elinks.conf.5.gz
%%NLS%%share/locale/af/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/be/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/bg/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/ca/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/cs/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/da/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/de/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/el/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/es/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/et/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/fi/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/fr/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/gl/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/hr/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/hu/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/id/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/is/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/it/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/ja/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/lt/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/nb/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/nl/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/pl/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/pt/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/pt_BR/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/ro/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/ru/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/sk/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/sr/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/sv/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/tr/LC_MESSAGES/elinks.mo
%%NLS%%share/locale/uk/LC_MESSAGES/elinks.mo