[packages/elinks] - updated to 0.15.0 - some patches aplied upstream - added options document.browse.search.beginning_

witekfl witekfl at pld-linux.org
Sat Dec 25 13:31:33 CET 2021


commit 612abce50be7a51a483bb4a1629e98eff1c783a2
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date:   Sat Dec 25 13:26:04 2021 +0100

    - updated to 0.15.0
    - some patches aplied upstream
    - added options document.browse.search.beginning_only
      document.browse.search.ignore_history
      ui.double_esc have functionality from patches
    - js is unusable in this version, so better disable it
      or do not compile in at all

 elinks-date-format.patch     |  86 ---------------------------
 elinks-double-esc.patch      |  25 --------
 elinks-home_etc.patch        |  29 ---------
 elinks-old_incremental.patch |  10 ----
 elinks.spec                  | 136 ++++++++++++++++++-------------------------
 lua53.patch                  |  11 ----
 6 files changed, 57 insertions(+), 240 deletions(-)
---
diff --git a/elinks.spec b/elinks.spec
index de485e4..a65aa4c 100644
--- a/elinks.spec
+++ b/elinks.spec
@@ -10,20 +10,20 @@
 %bcond_without	openssl		# OpenSSL-based SSL support
 # - content
 %bcond_without	cgi		# Local CGI support
-%bcond_with	brotli		# Brotli compression support
-%bcond_without	js		# experimental (yet quite usable) JavaScript support (using SpiderMonkey)
+%bcond_without	brotli		# Brotli compression support
+%bcond_without	js		# experimental (yet quite usable) JavaScript support (using quickjs)
 %bcond_with	lzma		# LZMA support (old API, incompatible with xz-libs)
+%bcond_without	zstd	# zstd compression support
 # - scripting
 %bcond_with	guile		# Guile scripting support (non-distrib: guile 2 is LGPL v3+)
 %bcond_without	lua		# Lua scripting
-%bcond_without	perl		# Perl scripting
+%bcond_with	perl		# Perl scripting
 %bcond_with	python		# Python scripting support
 %bcond_with	ruby		# (experimental) Ruby scripting support
 # - display and UI
 %bcond_without	256		# 256 colors support
 %bcond_without	led		# LEDs
 %bcond_without	truecolor	# true color
-%bcond_with	olderisbetter	# variuos pre-0.10.0 behaviour rules (typeahead and esc-esc)
 %bcond_with	x		# Use the X Window System
 # - misc
 %bcond_without	verbose		# verbose build (V=1)
@@ -37,26 +37,15 @@ Summary(es.UTF-8):	El links es un browser para modo texto, similar a lynx
 Summary(pl.UTF-8):	Eksperymentalny Links (tekstowa przeglądarka WWW)
 Summary(pt_BR.UTF-8):	O links é um browser para modo texto, similar ao lynx
 Name:		elinks
-Version:	0.13
-%define	snap	20180901
-%define	rel	8
-Release:	4.%{snap}.%{rel}
+Version:	0.15.0
+Release:	1
 Epoch:		1
 License:	GPL v2
 Group:		Applications/Networking
-# github gives different archive on each download
-# http://www.elinks.cz/download/%{name}-current-%{version}.tar.bz2
-Source0:	http://elinks.cz/download/elinks-current-%{version}.tar.bz2
-# Source0-md5:	6e45361ed14855ad02d3ae9b7a6ad809
+Source0:	https://github.com/rkd77/elinks/releases/download/v%{version}/%{name}-%{version}.tar.xz
+# Source0-md5:	8fe2e81d2cea75f57cd3cf9bdda6821b
 Source1:	%{name}.desktop
 Source2:	links.png
-Patch0:		%{name}-home_etc.patch
-Patch1:		lua53.patch
-Patch2:		%{name}-date-format.patch
-Patch3:		%{name}-old_incremental.patch
-Patch4:		%{name}-0.10.0-0.9.3-typeahead-beginning.patch
-Patch5:		%{name}-double-esc.patch
-Patch6:		js187.patch
 URL:		http://www.elinks.cz/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
@@ -67,22 +56,26 @@ BuildRequires:	gettext-tools
 %{?with_gnutls:BuildRequires:	gnutls-devel >= 1.2.5}
 BuildRequires:	gpm-devel
 %{?with_guile:BuildRequires: guile-devel}
-#BuildRequires:	heimdal-devel
-%{?with_js:BuildRequires:	js187-devel}
+%{?with_js:BuildRequires:	libxml++5-devel >= 5.0.1-2}
+%{?with_js:BuildRequires:	quickjs-devel >= 20210327-2}
+%{?with_js:BuildRequires:	sqlite3-devel}
 %{?with_brotli:BuildRequires:	libbrotli-devel}
 %{?with_idn:BuildRequires:	libidn-devel}
 %{?with_smb:BuildRequires:	libsmbclient-devel}
-%{?with_lua:BuildRequires:	lua-devel >= 5.3}
+%{?with_lua:BuildRequires:	lua53-devel}
 %{?with_lzma:BuildRequires:	lzma-devel}
+BuildRequires:	meson
 BuildRequires:	ncurses-devel >= 5.1
 %{?with_openssl:BuildRequires:	openssl-devel >= 0.9.7d}
 %{?with_perl:BuildRequires:	perl-devel}
 BuildRequires:	pkgconfig
-%{?with_python:BuildRequires:	python-devel}
+%{?with_python:BuildRequires:	python3-devel}
 %{?with_ruby:BuildRequires:	ruby-devel}
+BuildRequires:	sed
 BuildRequires:	tre-devel
 BuildRequires:	which
 BuildRequires:	zlib-devel
+%{?with_zstd:BuildRequires:	zstd-devel}
 Suggests:	mailcap
 Provides:	webclient
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -112,74 +105,59 @@ tabelas, baixa arquivos em segundo plano, e usa as conexões HTTP/1.1
 keepalive.
 
 %prep
-%setup -q -n %{name}-%{version}-%{snap}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%if %{with olderisbetter}
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%endif
-%patch6 -p1
+%setup -q
 
 %build
-cp -f /usr/share/automake/config.sub config
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%configure \
-	%{?with_bittorrent:--enable-bittorrent} \
-	%{?with_cgi:--enable-cgi} \
-	--enable-88-colors \
-	%{?with_256:--enable-256-colors} \
-	%{?with_truecolor:--enable-true-color} \
-	--enable-exmode \
-	%{?debug:--enable-debug} \
-	%{!?debug:--enable-fastmem} \
-	--enable-finger \
-	%{?with_fsp:--enable-fsp} \
-	--enable-gopher \
-	--enable-html-highlight \
-	%{!?with_ipv6:--disable-ipv6} \
-	%{?with_leds:--enable-leds} \
-	--enable-marks \
-	--enable-nntp \
-	--disable-no-root \
-	%{?with_smb:--enable-smb} \
-	%{!?with_brotli:--without-brotli} \
-	--without-gc \
-	%{?with_gnutls:--with-gnutls} \
-	%{?with_guile:--with-guile} \
-	%{!?with_idn:--without-idn} \
-	%{!?with_lua:--without-lua} \
-	%{!?with_lzma:--without-lzma} \
-	%{!?with_openssl:--without-openssl} \
-	%{?with_perl:--with-perl} \
-	%{?with_python:--with-python} \
-	%{?with_ruby:--with-ruby} \
-	%{!?with_js:--without-spidermonkey} \
-	--with-x%{!?with_x:=no}
-# xterm -e is default, one might want to change it to something else:
-#	--with-xterm="xterm -e"
-
-%{__make} %{?with_verbose:V=1}
+%meson build \
+	%{?with_bittorrent:-Dbittorrent=true} \
+	%{?with_cgi:-Dcgi=true} \
+	-D88-colors=true \
+	%{?with_256:-D256-colors=true} \
+	%{?with_truecolor:-Dtrue-color=true} \
+	-Dexmode=true \
+	%{?debug:-Ddebug=true} \
+	%{!?debug:-Dfastmem=true} \
+	-Dfinger=true \
+	%{?with_fsp:-Dfsp=true} \
+	-Dgemini=true \
+	-Dgettext=true \
+	-Dgopher=true \
+	-Dhtml-highlight=true \
+	%{!?with_ipv6:-Dipv6=false} \
+	%{?with_leds:-Dleds=true} \
+	-Dmarks=true \
+	-Dnntp=true \
+	-Dno-root=false \
+	%{?with_smb:-Dsmb=true} \
+	%{?with_brotli:-Dbrotli=true} \
+	%{?with_zstd:-Dzstd=true} \
+	%{?with_gnutls:-Dgnutls=true} \
+	%{?with_guile:-Dguile=true} \
+	%{!?with_idn:-Didn=false} \
+	%{?with_lua:-Dluapkg=lua5.3} \
+	%{?with_lzma:-Dlzma=true} \
+	%{?with_openssl:-Dopenssl=true} \
+	%{?with_perl:-Dperl=true} \
+	%{?with_python:-Dpython=true} \
+	%{?with_ruby:-Druby=true} \
+	%{?with_js:-Dquickjs=true} \
+	%{?with_x:-Dx=true}
+
+%ninja_build -C build
 
 %install
 rm -rf $RPM_BUILD_ROOT
+%ninja_install -C build
+
 install -d $RPM_BUILD_ROOT%{_desktopdir} \
 	$RPM_BUILD_ROOT%{_datadir}/%{name} \
 	$RPM_BUILD_ROOT{%{_sysconfdir},%{_pixmapsdir}}
 
-%{__make} install %{?with_verbose:V=1} \
-	DESTDIR=$RPM_BUILD_ROOT
-
-%{__rm} $RPM_BUILD_ROOT%{_datadir}/locale/locale.alias
-
 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
 
 %{?with_lua:install contrib/lua/*.lua $RPM_BUILD_ROOT%{_sysconfdir}}
+sed -i -e 's|bin/lua|bin/lua5.3|g' $RPM_BUILD_ROOT%{_sysconfdir}/*lua
 
 %find_lang %{name}
 
@@ -188,7 +166,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc AUTHORS BUGS ChangeLog NEWS README SITES TODO doc/html/*.html
+%doc AUTHORS BUGS ChangeLog NEWS README SITES TODO
 %doc contrib/{keybind*,wipe-out-ssl*,lua/elinks-remote} contrib/conv/{*awk,*.pl,*.sh}
 %attr(755,root,root) %{_bindir}/elinks
 %{_mandir}/man1/elinks.1*
diff --git a/elinks-date-format.patch b/elinks-date-format.patch
deleted file mode 100644
index bb506a6..0000000
--- a/elinks-date-format.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-diff -urNp -x '*.orig' elinks-0.13-20180901.org/po/pl.po elinks-0.13-20180901/po/pl.po
---- elinks-0.13-20180901.org/po/pl.po	2017-07-23 19:50:15.000000000 +0200
-+++ elinks-0.13-20180901/po/pl.po	2021-05-07 22:58:24.518524650 +0200
-@@ -7194,6 +7194,18 @@ msgstr "Czy na pewno chcesz skasować ws
- msgid "Authentication manager"
- msgstr "Zarządca uwierzytelniania"
- 
-+#: src/protocol/ftp/ftp.c:1160 src/util/file.c:464
-+msgid "%b %e  %Y"
-+msgstr "%e.%m.%Y "
-+
-+#: src/protocol/ftp/ftp.c:1162 src/util/file.c:466
-+msgid "%b %e %H:%M"
-+msgstr "%e.%m %H:%M"
-+
-+#: src/protocol/ftp/ftp.c:1165 src/protocol/ftp/ftp.c:1172 src/util/file.c:473
-+msgid "             "
-+msgstr "             "
-+
- #. name:
- #: src/protocol/bittorrent/bittorrent.c:26
- #: src/protocol/bittorrent/bittorrent.c:339
-diff -urNp -x '*.orig' elinks-0.13-20180901.org/src/protocol/ftp/ftp.c elinks-0.13-20180901/src/protocol/ftp/ftp.c
---- elinks-0.13-20180901.org/src/protocol/ftp/ftp.c	2017-07-23 19:50:15.000000000 +0200
-+++ elinks-0.13-20180901/src/protocol/ftp/ftp.c	2021-05-07 22:58:24.518524650 +0200
-@@ -1237,7 +1237,7 @@ display_dir_entry(struct cache_entry *ca
- 		/* LC_TIME=fi_FI.UTF_8 can generate "elo___ 31 23:59"
- 		 * where each _ denotes U+00A0 encoded as 0xC2 0xA0,
- 		 * thus needing a 19-byte buffer.  */
--		unsigned char date[80];
-+		unsigned char date[MAX_STR_LEN];
- 		int wr;
- 
- 		if (ftp_info->local_time_zone)
-@@ -1247,16 +1247,16 @@ display_dir_entry(struct cache_entry *ca
- 
- 		if (current_time > when + 6L * 30L * 24L * 60L * 60L
- 		    || current_time < when - 60L * 60L)
--			fmt = "%b %e  %Y";
-+			fmt = gettext("%b %e  %Y");
- 		else
--			fmt = "%b %e %H:%M";
-+			fmt = gettext("%b %e %H:%M");
- 
- 		wr = strftime(date, sizeof(date), fmt, when_tm);
- 		add_cp_html_to_string(&string, format->libc_codepage,
- 				      date, wr);
- 	} else
- #endif
--	add_to_string(&string, "            ");
-+	add_to_string(&string, gettext("             "));
- 	/* TODO: Above, the number of spaces might not match the width
- 	 * of the string generated by strftime.  It depends on the
- 	 * locale.  So if ELinks knows the timestamps of some FTP
-@@ -1270,8 +1270,6 @@ display_dir_entry(struct cache_entry *ca
- 	 * Any solution chosen here should also be applied to the
- 	 * file: protocol handler.  */
- 
--	add_char_to_string(&string, ' ');
--
- 	if (ftp_info->type == FTP_FILE_DIRECTORY && format->colorize_dir) {
- 		add_to_string(&string, "<font color=\"");
- 		add_to_string(&string, format->dircolor);
-diff -urNp -x '*.orig' elinks-0.13-20180901.org/src/util/file.h elinks-0.13-20180901/src/util/file.h
---- elinks-0.13-20180901.org/src/util/file.h	2017-07-23 19:50:15.000000000 +0200
-+++ elinks-0.13-20180901/src/util/file.h	2021-05-07 22:58:24.518524650 +0200
-@@ -248,16 +248,16 @@ stat_date(struct string *string, struct
- 
- 		if (current_time > when + 6L * 30L * 24L * 60L * 60L
- 		    || current_time < when - 60L * 60L)
--			fmt = "%b %e  %Y";
-+			fmt = gettext("%b %e  %Y");
- 		else
--			fmt = "%b %e %H:%M";
-+			fmt = gettext("%b %e %H:%M");
- 
- 		add_date_to_string(string, fmt, &when);
- 		add_char_to_string(string, ' ');
- 		return;
- 	}
- #endif
--	add_to_string(string, "             ");
-+	add_to_string(string, gettext("             "));
- }
- 
- 
diff --git a/elinks-double-esc.patch b/elinks-double-esc.patch
deleted file mode 100644
index fb0c517..0000000
--- a/elinks-double-esc.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -urp elinks-0.12pre5.orig/src/terminal/kbd.c elinks-0.12pre5/src/terminal/kbd.c
---- elinks-0.12pre5.orig/src/terminal/kbd.c	2009-07-07 14:23:17.000000000 +0200
-+++ elinks-0.12pre5/src/terminal/kbd.c	2011-06-06 02:29:58.000000000 +0200
-@@ -765,6 +765,11 @@ decode_terminal_escape_sequence(struct i
- 	int v;
- 	int el;
- 
-+	if (itrm->in.queue.len == 2 && itrm->in.queue.data[1] == ASCII_ESC) {
-+		kbd.key = KBD_ESC;
-+		set_kbd_interlink_event(ev, kbd.key, kbd.modifier);
-+		return 2;
-+	}
- 	if (itrm->in.queue.len < 3) return -1;
- 
- 	if (itrm->in.queue.data[2] == '[') {
-@@ -1108,8 +1113,7 @@ process_queue(struct itrm *itrm)
- 			 * beginning of e.g. ESC ESC 0x5B 0x41,
- 			 * which we should parse as Esc Up.  */
- 			if (itrm->in.queue.len < 3) {
--				/* Need more data to figure it out.  */
--				el = -1;
-+				el = decode_terminal_escape_sequence(itrm, &ev);
- 			} else if (itrm->in.queue.data[2] == 0x5B
- 				   || itrm->in.queue.data[2] == 0x4F) {
- 				/* The first ESC appears to be followed
diff --git a/elinks-home_etc.patch b/elinks-home_etc.patch
deleted file mode 100644
index 334fff3..0000000
--- a/elinks-home_etc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -urNp -x '*.orig' elinks-0.13-20180901.org/doc/man/man1/elinks.1.in elinks-0.13-20180901/doc/man/man1/elinks.1.in
---- elinks-0.13-20180901.org/doc/man/man1/elinks.1.in	2017-07-23 19:50:15.000000000 +0200
-+++ elinks-0.13-20180901/doc/man/man1/elinks.1.in	2021-05-07 22:58:22.368520341 +0200
-@@ -322,6 +322,12 @@ The path to the users home directory\&.
- ~/\&.
- .RE
- .PP
-+HOME_ETC
-+.RS 4
-+If set the location of the directory containing configuration files
-+is \fI$HOME_ETC/.elinks/\fR instead of \fI~/.elinks/\fR.
-+.RE
-+.PP
- WWW_HOME
- .RS 4
- Homepage location (as in
-diff -urNp -x '*.orig' elinks-0.13-20180901.org/src/config/home.c elinks-0.13-20180901/src/config/home.c
---- elinks-0.13-20180901.org/src/config/home.c	2017-07-23 19:50:15.000000000 +0200
-+++ elinks-0.13-20180901/src/config/home.c	2021-05-07 22:58:22.368520341 +0200
-@@ -110,7 +110,8 @@ static unsigned char *
- get_home(void)
- {
- 	unsigned char *home_elinks;
--	unsigned char *envhome = getenv("HOME");
-+	unsigned char *home_etc = getenv("HOME_ETC");
-+	unsigned char *envhome = home_etc ? home_etc : getenv("HOME");
- 	unsigned char *home = NULL;
- 
- 	if (!home && envhome)
diff --git a/elinks-old_incremental.patch b/elinks-old_incremental.patch
deleted file mode 100644
index 94b57c7..0000000
--- a/elinks-old_incremental.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- elinks-0.12pre1/src/viewer/text/search.c.orig	2008-07-01 02:11:44.000000000 +0200
-+++ elinks-0.12pre1/src/viewer/text/search.c	2008-08-21 23:13:57.000000000 +0200
-@@ -1551,6 +1551,7 @@
- 		default:
- 			if (doc_view->document->nlinks) {
- 				handler = link_typeahead_handler;
-+				history = NULL;
- 				break;
- 			}
- 
diff --git a/lua53.patch b/lua53.patch
deleted file mode 100644
index 7b56a47..0000000
--- a/lua53.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- elinks-0.13-20180901/src/scripting/lua/hooks.c~	2021-05-09 13:37:55.000000000 +0200
-+++ elinks-0.13-20180901/src/scripting/lua/hooks.c	2021-05-09 13:40:47.132600486 +0200
-@@ -145,7 +145,7 @@
- 	if (err) return EVENT_HOOK_STATUS_NEXT;
- 
- 	if (lua_isstring(L, -1)) {
--		int len = lua_strlen(L, -1);
-+		int len = lua_rawlen(L, -1);
- 
- 		add_fragment(cached, 0, (unsigned char *) lua_tostring(L, -1), len);
- 		normalize_cache_entry(cached, len);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/elinks.git/commitdiff/612abce50be7a51a483bb4a1629e98eff1c783a2



More information about the pld-cvs-commit mailing list