Accepting request 1084819 from network

- update to 0.16.1.1:
  * updated POTFILES

- Update to version 0.16.1
  * handle SECTION html element #207
  * allocate more memory for BLOCKQUOTE #214
  * encode A href to terminal codepage and encode bytes with 
    highest bit set as %HEX #221
  * Serbian translation update
  * install doc by default in meson #224
  * tests fixes

- Update to rkd77 git version 0.16.0
- Enable javascript with mujs on Tumbleweed (missing libxml++-5.0 on leap)
- Use LuaJIT for lua compiler until someone fix it with standart Lua
- Removed unneeded patches:
  * build-with-new-ruby.patch
- Added the following patches:
  * 0006-elinks-0.16.0-libidn2.patch

OBS-URL: https://build.opensuse.org/request/show/1084819
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/elinks?expand=0&rev=7
This commit is contained in:
Dominique Leuenberger 2023-05-06 20:08:26 +00:00 committed by Git OBS Bridge
commit 61328d13ce
6 changed files with 154 additions and 226 deletions

View File

@ -0,0 +1,98 @@
From 41461147907ed9a93792309f074072e981b33f42 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 11 Apr 2022 09:39:48 +0200
Subject: [PATCH] Resolves: #1098789 - add support for GNU Libidn2
patch by Robert Scheck
---
Makefile.config.in | 2 +-
configure.ac | 4 ++--
src/osdep/win32/win32.c | 2 +-
src/protocol/uri.c | 12 ++++++------
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/Makefile.config.in b/Makefile.config.in
index bf01d78..73d9762 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -139,7 +139,7 @@ CONFIG_GOPHER = @CONFIG_GOPHER@
CONFIG_GPM = @CONFIG_GPM@
CONFIG_GZIP = @CONFIG_GZIP@
CONFIG_HTML_HIGHLIGHT = @CONFIG_HTML_HIGHLIGHT@
-CONFIG_IDN = @CONFIG_IDN@
+CONFIG_IDN2 = @CONFIG_IDN2@
CONFIG_INTERLINK = @CONFIG_INTERLINK@
CONFIG_IPV6 = @CONFIG_IPV6@
CONFIG_DBLATEX = @CONFIG_DBLATEX@
diff --git a/configure.ac b/configure.ac
index d4537ab..d3bf724 100644
--- a/configure.ac
+++ b/configure.ac
@@ -556,8 +556,8 @@ EL_LOG_CONFIG([CONFIG_BROTLI], [[brotli]], [[$enable_brotli]])
EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_LZMA, lzma, lzma.h, lzma, lzma_code,
[ --with-lzma enable lzma encoding support])
-EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_IDN, idn, idna.h, idn, stringprep_check_version,
- [ --without-idn disable international domain names support])
+EL_CONFIG_OPTIONAL_LIBRARY(CONFIG_IDN2, idn2, idn2.h, idn2, idn2_lookup_ul,
+ [ --without-idn2 disable international domain names support])
# ===================================================================
# Check for GSSAPI, optional even if installed.
diff --git a/src/osdep/win32/win32.c b/src/osdep/win32/win32.c
index 02b1834..f4c148d 100644
--- a/src/osdep/win32/win32.c
+++ b/src/osdep/win32/win32.c
@@ -44,7 +44,7 @@ init_osdep(void)
}
#endif
setlocale(LC_ALL, "");
-#ifdef CONFIG_IDN
+#ifdef CONFIG_IDN2
{
char buf[60];
UINT cp = GetACP();
diff --git a/src/protocol/uri.c b/src/protocol/uri.c
index a8f15d1..218d1af 100644
--- a/src/protocol/uri.c
+++ b/src/protocol/uri.c
@@ -9,8 +9,8 @@
#ifdef HAVE_ICONV
#include <iconv.h>
#endif
-#ifdef HAVE_IDNA_H
-#include <idna.h>
+#ifdef HAVE_IDN2_H
+#include <idn2.h>
#endif
#include <stdio.h>
#include <stdlib.h>
@@ -535,10 +535,10 @@ add_uri_to_string(struct string *string, const struct uri *uri,
* --pasky */
if (uri->ipv6 && wants(URI_PORT)) add_char_to_string(string, '[');
#endif
-#ifdef CONFIG_IDN
+#ifdef CONFIG_IDN2
/* Support for the GNU International Domain Name library.
*
- * http://www.gnu.org/software/libidn/manual/html_node/IDNA-Functions.html
+ * http://www.gnu.org/software/libidn/libidn2/manual/libidn2.html
*/
if (wants(URI_IDN)) {
char *host = NULL;
@@ -556,10 +556,10 @@ add_uri_to_string(struct string *string, const struct uri *uri,
if (host) {
char *idname;
- int code = idna_to_ascii_8z(host, &idname, 0);
+ int code = idn2_lookup_ul(host, &idname, 0);
/* FIXME: Return NULL if it coughed? --jonas */
- if (code == IDNA_SUCCESS) {
+ if (code == IDN2_OK) {
add_to_string(string, idname);
free(idname);
add_host = 0;
--
2.38.1

View File

@ -1,191 +0,0 @@
Index: elinks-0.13-20190401/config/m4/ruby.m4
===================================================================
--- elinks-0.13-20190401.orig/config/m4/ruby.m4
+++ elinks-0.13-20190401/config/m4/ruby.m4
@@ -32,36 +32,40 @@ if test "$CONFIG_SCRIPTING_RUBY" = "yes"
if test "$CONFIG_SCRIPTING_RUBY" != "no"; then
AC_MSG_CHECKING(Ruby version)
- if $CONFIG_SCRIPTING_RUBY -e 'exit((VERSION or RUBY_VERSION) >= "1.6.0")' >/dev/null 2>/dev/null; then
+ if $CONFIG_SCRIPTING_RUBY -e 'exit((VERSION rescue RUBY_VERSION) >= "1.6.0")' >/dev/null 2>/dev/null; then
ruby_version=`$CONFIG_SCRIPTING_RUBY -e 'puts "#{VERSION rescue RUBY_VERSION}"'`
AC_MSG_RESULT($ruby_version)
AC_MSG_CHECKING(for Ruby header files)
- rubyhdrdir=`$CONFIG_SCRIPTING_RUBY -r mkmf -e 'print Config::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null`
+ rubyhdrdir=`$CONFIG_SCRIPTING_RUBY -r mkmf -e 'print RbConfig::CONFIG[["rubyhdrdir"]] || RbConfig::CONFIG[["archdir"]] || $hdrdir' 2>/dev/null`
if test "X$rubyhdrdir" != "X"; then
AC_MSG_RESULT($rubyhdrdir)
RUBY_CFLAGS="-I$rubyhdrdir"
- rubylibs=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config::CONFIG[["LIBS"]]'`
+ rubyarch=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print RbConfig::CONFIG[["arch"]]'`
+ if test -d "$rubyhdrdir/$rubyarch"; then
+ RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
+ fi
+ rubylibs=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print RbConfig::CONFIG[["LIBS"]]'`
if test "X$rubylibs" != "X"; then
RUBY_LIBS="$rubylibs"
fi
- librubyarg=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config.expand(Config::CONFIG[["LIBRUBYARG"]])'`
+ librubyarg=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print RbConfig.expand(RbConfig::CONFIG[["LIBRUBYARG"]])'`
if test -f "$rubyhdrdir/$librubyarg"; then
librubyarg="$rubyhdrdir/$librubyarg"
else
- rubylibdir=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
+ rubylibdir=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print RbConfig.expand(RbConfig::CONFIG[["libdir"]])'`
if test -f "$rubylibdir/$librubyarg"; then
librubyarg="$rubylibdir/$librubyarg"
elif test "$librubyarg" = "libruby.a"; then
dnl required on Mac OS 10.3 where libruby.a doesn't exist
librubyarg="-lruby"
else
- librubyarg=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
+ librubyarg=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{RbConfig.expand(RbConfig::CONFIG[\"libdir\"])}')"`
fi
fi
@@ -69,7 +73,7 @@ if test "$CONFIG_SCRIPTING_RUBY" = "yes"
RUBY_LIBS="$librubyarg $RUBY_LIBS"
fi
- rubyldflags=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print Config::CONFIG[["LDFLAGS"]]'`
+ rubyldflags=`$CONFIG_SCRIPTING_RUBY -r rbconfig -e 'print RbConfig::CONFIG[["LDFLAGS"]]'`
if test "X$rubyldflags" != "X"; then
LDFLAGS="$rubyldflags $LDFLAGS"
fi
@@ -86,6 +90,15 @@ if test "$CONFIG_SCRIPTING_RUBY" = "yes"
AC_MSG_RESULT(too old; need Ruby version 1.6.0 or later)
fi
fi
+ if test "$CONFIG_SCRIPTING_RUBY" = "yes"; then
+ AC_MSG_CHECKING([for rb_errinfo])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ruby.h>]], [[rb_errinfo();]])],have_rb_errinfo="yes",have_rb_errinfo="no")
+ AC_MSG_RESULT($have_rb_errinfo)
+ if test "$have_rb_errinfo" = "yes"; then
+ AC_DEFINE([HAVE_RB_ERRINFO], [1],
+ [Define to 1 if you have the `rb_errinfo' function.])
+ fi
+ fi
fi
EL_RESTORE_FLAGS
Index: elinks-0.13-20190401/src/scripting/ruby/core.c
===================================================================
--- elinks-0.13-20190401.orig/src/scripting/ruby/core.c
+++ elinks-0.13-20190401/src/scripting/ruby/core.c
@@ -76,10 +76,10 @@ erb_report_error(struct session *ses, in
break;
case TAG_RAISE:
case TAG_FATAL:
- eclass = CLASS_OF(ruby_errinfo);
- einfo = rb_obj_as_string(ruby_errinfo);
+ eclass = CLASS_OF(RB_ERRINFO);
+ einfo = rb_obj_as_string(RB_ERRINFO);
- if (eclass == rb_eRuntimeError && RSTRING(einfo)->len == 0) {
+ if (eclass == rb_eRuntimeError && RSTRING_LEN(einfo) == 0) {
msg = "unhandled exception";
} else {
@@ -88,7 +88,7 @@ erb_report_error(struct session *ses, in
epath = rb_class_path(eclass);
snprintf(buff, MAX_STR_LEN, "%s: %s",
- RSTRING(epath)->ptr, RSTRING(einfo)->ptr);
+ RSTRING_PTR(epath), RSTRING_PTR(einfo));
p = strchr((const char *)buff, '\n');
if (p) *p = '\0';
@@ -116,7 +116,7 @@ erb_module_message(VALUE self, VALUE str
struct terminal *term;
str = rb_obj_as_string(str);
- message = memacpy(RSTRING(str)->ptr, RSTRING(str)->len);
+ message = memacpy(RSTRING_PTR(str), RSTRING_LEN(str));
if (!message) return Qnil;
line_end = strchr((const char *)message, '\n');
@@ -165,8 +165,8 @@ erb_stdout_p(int argc, VALUE *argv, VALU
* the inspect() method, which adds quotes to the strings, so
* gently ignore them. */
- ptr = RSTRING(substr)->ptr;
- len = RSTRING(substr)->len;
+ ptr = RSTRING_PTR(substr);
+ len = RSTRING_LEN(substr);
if (*ptr == '"')
ptr++, len--;
Index: elinks-0.13-20190401/src/scripting/ruby/core.h
===================================================================
--- elinks-0.13-20190401.orig/src/scripting/ruby/core.h
+++ elinks-0.13-20190401/src/scripting/ruby/core.h
@@ -7,6 +7,20 @@ struct session;
#include <ruby.h> /* for VALUE */
+#ifndef RSTRING_LEN
+#define RSTRING_LEN(string) (RSTRING(string)->len)
+#endif
+
+#ifndef RSTRING_PTR
+#define RSTRING_PTR(string) (RSTRING(string)->ptr)
+#endif
+
+#ifdef HAVE_RB_ERRINFO
+#define RB_ERRINFO (rb_errinfo())
+#else
+#define RB_ERRINFO (ruby_errinfo)
+#endif
+
VALUE erb_module;
void alert_ruby_error(struct session *ses, unsigned char *msg);
Index: elinks-0.13-20190401/src/scripting/ruby/hooks.c
===================================================================
--- elinks-0.13-20190401.orig/src/scripting/ruby/hooks.c
+++ elinks-0.13-20190401/src/scripting/ruby/hooks.c
@@ -83,7 +83,7 @@ script_hook_goto_url(va_list ap, void *d
{
unsigned char *new_url;
- new_url = memacpy(RSTRING(result)->ptr, RSTRING(result)->len);
+ new_url = memacpy(RSTRING_PTR(result), RSTRING_LEN(result));
if (new_url) {
mem_free_set(url, new_url);
}
@@ -126,7 +126,7 @@ script_hook_follow_url(va_list ap, void
{
unsigned char *new_url;
- new_url = memacpy(RSTRING(result)->ptr, RSTRING(result)->len);
+ new_url = memacpy(RSTRING_PTR(result), RSTRING_LEN(result));
if (new_url) {
mem_free_set(url, new_url);
}
@@ -170,9 +170,9 @@ script_hook_pre_format_html(va_list ap,
switch (rb_type(result)) {
case T_STRING:
{
- int len = RSTRING(result)->len;
+ int len = RSTRING_LEN(result);
- add_fragment(cached, 0, RSTRING(result)->ptr, len);
+ add_fragment(cached, 0, RSTRING_PTR(result), len);
normalize_cache_entry(cached, len);
break;
@@ -216,7 +216,7 @@ script_hook_get_proxy(va_list ap, void *
{
unsigned char *proxy;
- proxy = memacpy(RSTRING(result)->ptr, RSTRING(result)->len);
+ proxy = memacpy(RSTRING_PTR(result), RSTRING_LEN(result));
if (proxy) {
mem_free_set(new_proxy_url, proxy);
}

BIN
elinks-0.16.1.1.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d01d380f414478c7cf52e19db4ade4e41d5e3fa94613fe14fbe41038ba461f91
size 2926098

View File

@ -1,3 +1,32 @@
-------------------------------------------------------------------
Thu May 4 17:00:50 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 0.16.1.1:
* updated POTFILES
-------------------------------------------------------------------
Mon May 1 03:49:11 UTC 2023 - Muhammad Akbar Yanuar Mantari <mantarimay@pm.me>
- Update to version 0.16.1
* handle SECTION html element #207
* allocate more memory for BLOCKQUOTE #214
* encode A href to terminal codepage and encode bytes with
highest bit set as %HEX #221
* Serbian translation update
* install doc by default in meson #224
* tests fixes
-------------------------------------------------------------------
Sun Apr 30 02:08:20 UTC 2023 - Muhammad Akbar Yanuar Mantari <mantarimay@pm.me>
- Update to rkd77 git version 0.16.0
- Enable javascript with mujs on Tumbleweed (missing libxml++-5.0 on leap)
- Use LuaJIT for lua compiler until someone fix it with standart Lua
- Removed unneeded patches:
* build-with-new-ruby.patch
- Added the following patches:
* 0006-elinks-0.16.0-libidn2.patch
-------------------------------------------------------------------
Wed Aug 24 10:44:19 UTC 2022 - Andreas Schwab <schwab@suse.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package elinks
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,46 +16,43 @@
#
%define tar_version 0.13
%define snapshot 20190723
%if 0%{?suse_version} > 1500
%bcond_without js
%else
%bcond_with js
%endif
Name: elinks
Version: %{tar_version}~0.%{snapshot}
Version: 0.16.1.1
Release: 0
Summary: An advanced and well-established feature-rich text mode web browser
License: GPL-2.0-or-later
Group: Productivity/Networking/Web/Browsers
URL: http://elinks.or.cz/
# Volatile download URL http://elinks.or.cz/download/%{name}-current-%{tar_version}.tar.bz2
Source0: %{name}-current-%{tar_version}.tar.bz2
Patch0: build-with-new-ruby.patch
%if 0%{?suse_version} > 1140
BuildRequires: gc-devel
%endif
Source0: https://github.com/rkd77/elinks/releases/download/v%{version}/elinks-%{version}.tar.xz
Patch0: 0006-elinks-0.16.0-libidn2.patch
BuildRequires: gcc-c++
BuildRequires: gpm-devel
%if %{with js}
BuildRequires: gcc-c++
BuildRequires: mozjs24-devel
%endif
BuildRequires: krb5-devel
BuildRequires: libbz2-devel
BuildRequires: libexpat-devel
BuildRequires: libidn-devel
%if 0%{?suse_version} > 1210
BuildRequires: lua51-devel
%else
BuildRequires: lua-devel
BuildRequires: pkgconfig(libcss)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libxml++-5.0)
BuildRequires: pkgconfig(mujs)
BuildRequires: pkgconfig(sqlite3)
%endif
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: krb5-devel
BuildRequires: libbz2-devel
BuildRequires: libexpat-devel
BuildRequires: libidn2-devel
BuildRequires: libtool
BuildRequires: openssl-devel
BuildRequires: pkg-config
BuildRequires: ruby-devel
BuildRequires: tre-devel
BuildRequires: zlib-devel
BuildRequires: pkgconfig(luajit)
Provides: web_browser
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%perl_requires
@ -69,7 +66,7 @@ and runs on a variety of platforms. Check the about page for a more complete
description.
%prep
%setup -q -n %{name}-%{tar_version}-%{snapshot}
%setup -q -n %{name}-%{version}
%patch0 -p1
# Remove build time references so build-compare can do its work
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
@ -97,22 +94,17 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
--enable-html-highlight \
--enable-fastmem \
--with-xterm \
%if 0%{?suse_version} > 1140
--with-gc \
%else
--without-gc \
%endif
%if %{without js}
--without-spidermonkey \
--without-mujs \
%else
--with-spidermonkey=%{_includedir}/mozjs-24 \
--with-mujs \
%endif
--without-lzma \
--with-gssapi \
--without-guile \
--with-perl \
--without-python \
--with-lua \
--with-luapkg=luajit \
--with-ruby \
--without-gnutls \
--without-x
@ -130,7 +122,7 @@ rm -f %{buildroot}%{_datadir}/locale/locale.alias
# Install documentation
%define _pkgdocdir %{buildroot}%{_docdir}/%{name}
install -Dd -m 0755 %{_pkgdocdir}
install -pm 0644 AUTHORS BUGS COPYING ChangeLog NEWS README SITES THANKS TODO features.conf %{_pkgdocdir}
install -pm 0644 AUTHORS BUGS COPYING ChangeLog NEWS SITES THANKS TODO features.conf %{_pkgdocdir}
cp -a doc/ %{_pkgdocdir}
rm -rf %{_pkgdocdir}/doc/{.deps/,.gitignore,Doxyfile.in,Makefile,man/,tools/}
install -Dd -m 0755 %{_pkgdocdir}/contrib/