forked from hasufell/hasufell-repository
Compare commits
29 Commits
trickle-fi
...
blink-pyth
| Author | SHA1 | Date | |
|---|---|---|---|
|
e7709635e1
|
|||
|
6ccc96c19c
|
|||
|
ef01d455f5
|
|||
|
8d9b5e8f48
|
|||
|
b3ef4f9133
|
|||
|
fd97252f65
|
|||
|
62aeb09052
|
|||
|
1691d3e7df
|
|||
|
|
b37c6f9236 | ||
|
|
74bc1725cb | ||
|
|
41a1c2f45d | ||
|
|
275f7e4042 | ||
| e9338bf434 | |||
| 25abfe55b5 | |||
| 38572bd717 | |||
| 71f5fd7e1d | |||
| 8b391c4392 | |||
|
|
d31b43fcd1 | ||
| c8ac1ca574 | |||
| 8ddf1769e9 | |||
| 5f84e028e3 | |||
| 3809fdd8ac | |||
| 5a02234b81 | |||
| 207b36f01b | |||
| 96c276e7e3 | |||
| 7766cab320 | |||
| edeb38c438 | |||
|
|
a905f6a69b | ||
| 22a4b8c88d |
@@ -1,34 +0,0 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require cmake [ api=2 ]
|
||||
|
||||
SUMMARY="A system information and benchmark tool for Linux systems"
|
||||
HOMEPAGE="http://hardinfo.org/"
|
||||
DOWNLOADS="https://dev.gentoo.org/~hasufell/distfiles/${PNV}.tar.xz"
|
||||
|
||||
LICENCES="GPL-2"
|
||||
SLOT="0"
|
||||
PLATFORMS="~amd64 ~x86"
|
||||
MYOPTIONS=""
|
||||
|
||||
DEPENDENCIES="
|
||||
build:
|
||||
virtual/pkg-config
|
||||
build+run:
|
||||
dev-libs/glib:2
|
||||
gnome-desktop/libsoup
|
||||
x11-libs/gdk-pixbuf
|
||||
x11-libs/gtk+:2
|
||||
x11-libs/pango
|
||||
"
|
||||
|
||||
REMOTE_IDS="github:lpereira/${PN}"
|
||||
|
||||
src_prepare() {
|
||||
edo sed -i \
|
||||
-e '/PREFIX/s:@CMAKE_INSTALL_PREFIX@/share:@CMAKE_INSTALL_DATAROOTDIR@:' \
|
||||
"${CMAKE_SOURCE}"/config.h.cmake
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Snapshot until release work in progress: https://github.com/lpereira/hardinfo/issues/530
|
||||
GITHUB_REVISION=f6a4f52868c2404f3ad58ef04e513ffe5fa090c7
|
||||
require github [ user=lpereira ]
|
||||
require cmake
|
||||
require gtk-icon-cache
|
||||
|
||||
SUMMARY="A system information and benchmark tool for Linux systems"
|
||||
HOMEPAGE="http://hardinfo.org/"
|
||||
|
||||
LICENCES="GPL-2"
|
||||
SLOT="0"
|
||||
PLATFORMS="~amd64 ~x86"
|
||||
MYOPTIONS=""
|
||||
|
||||
DEPENDENCIES="
|
||||
build:
|
||||
sys-devel/gettext
|
||||
virtual/pkg-config
|
||||
build+run:
|
||||
core/json-glib
|
||||
dev-libs/glib:2
|
||||
gnome-desktop/libsoup
|
||||
x11-libs/cairo
|
||||
x11-libs/gdk-pixbuf
|
||||
x11-libs/gtk+:3
|
||||
x11-libs/libX11
|
||||
x11-libs/pango
|
||||
suggestion:
|
||||
app-benchmarks/sysbench [[ description = [ additional cpu/memory benchmarks ] ]]
|
||||
sys-apps/fwupd [[ description = [ read firmware details ] ]]
|
||||
sys-apps/udisks [[ description = [ read nvme storage information ] ]]
|
||||
x11-dri/mesa-demos [[ description = [ show GLX info ] ]]
|
||||
"
|
||||
|
||||
CMAKE_SRC_CONFIGURE_PARAMS=(
|
||||
-DHARDINFO_GTK3:BOOL=TRUE
|
||||
)
|
||||
|
||||
@@ -14,8 +14,6 @@ PLATFORMS="~amd64 ~x86"
|
||||
MYOPTIONS=""
|
||||
|
||||
DEPENDENCIES="
|
||||
run:
|
||||
dev-python/meld3[python_abis:*(-)?]
|
||||
test:
|
||||
dev-python/pexpect[python_abis:*(-)?]
|
||||
python_abis:2.7? ( dev-python/mock[python_abis:2.7] )
|
||||
@@ -0,0 +1,50 @@
|
||||
Upstream: yes
|
||||
Reason: https://github.com/daa84/neovim-gtk/issues/208
|
||||
|
||||
From c1dbe9b9549383b22807a2de9c76094ca9204f51 Mon Sep 17 00:00:00 2001
|
||||
From: daa <daa@localhost.localdomain>
|
||||
Date: Tue, 26 Nov 2019 19:25:42 +0300
|
||||
Subject: [PATCH] Try to fix render issues due to changes in pango_1.44 (#208)
|
||||
|
||||
---
|
||||
src/render/context.rs | 20 +++++++++-----------
|
||||
1 file changed, 9 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/render/context.rs b/src/render/context.rs
|
||||
index 8168296..0c19437 100644
|
||||
--- a/src/render/context.rs
|
||||
+++ b/src/render/context.rs
|
||||
@@ -111,21 +111,19 @@ pub struct CellMetrics {
|
||||
|
||||
impl CellMetrics {
|
||||
fn new(font_metrics: &pango::FontMetrics, line_space: i32) -> Self {
|
||||
+ let ascent = (f64::from(font_metrics.get_ascent()) / f64::from(pango::SCALE)).ceil();
|
||||
+ let descent = (f64::from(font_metrics.get_descent()) / f64::from(pango::SCALE)).ceil();
|
||||
+ let underline_position = (f64::from(font_metrics.get_underline_position()) / f64::from(pango::SCALE)).ceil();
|
||||
CellMetrics {
|
||||
pango_ascent: font_metrics.get_ascent(),
|
||||
pango_descent: font_metrics.get_descent(),
|
||||
pango_char_width: font_metrics.get_approximate_digit_width(),
|
||||
- ascent: f64::from(font_metrics.get_ascent()) / f64::from(pango::SCALE),
|
||||
- line_height: f64::from(font_metrics.get_ascent() + font_metrics.get_descent())
|
||||
- / f64::from(pango::SCALE)
|
||||
- + f64::from(line_space),
|
||||
- char_width: f64::from(font_metrics.get_approximate_digit_width())
|
||||
- / f64::from(pango::SCALE),
|
||||
- underline_position: f64::from(
|
||||
- font_metrics.get_ascent() - font_metrics.get_underline_position(),
|
||||
- ) / f64::from(pango::SCALE),
|
||||
- underline_thickness: f64::from(font_metrics.get_underline_thickness())
|
||||
- / f64::from(pango::SCALE),
|
||||
+ ascent,
|
||||
+ line_height: ascent + descent + f64::from(line_space),
|
||||
+ char_width: (f64::from(font_metrics.get_approximate_digit_width())
|
||||
+ / f64::from(pango::SCALE)).ceil(),
|
||||
+ underline_position: ascent - underline_position,
|
||||
+ underline_thickness: f64::from(font_metrics.get_underline_thickness()) / f64::from(pango::SCALE),
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@@ -11,16 +11,13 @@ DEPENDENCIES="
|
||||
app-editors/neovim
|
||||
dev-libs/glib:2
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:3[>=3.10.0]
|
||||
x11-libs/gtk+:3[>=3.22.0]
|
||||
x11-libs/pango
|
||||
run:
|
||||
gnome-desktop/gsettings-desktop-schemas
|
||||
"
|
||||
|
||||
src_install() {
|
||||
ecargo_install
|
||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||
"${FILES}"/Try-to-fix-render-issues-due-to-changes-in-pango_1.4.patch
|
||||
)
|
||||
|
||||
insinto /usr/share/applications
|
||||
doins desktop/*.desktop
|
||||
|
||||
insinto /usr/share/icons/hicolor/128x128/apps
|
||||
doins desktop/nvim-gtk.png
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2018 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require neovim-gtk gtk-icon-cache
|
||||
require neovim-gtk
|
||||
|
||||
DOWNLOADS=""
|
||||
|
||||
@@ -15,27 +15,11 @@ DEPENDENCIES="
|
||||
x11-libs/cairo
|
||||
x11-libs/gtk+:3[>=3.22.0]
|
||||
x11-libs/pango[>=1.38]
|
||||
run:
|
||||
gnome-desktop/gsettings-desktop-schemas
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
cargo_src_unpack
|
||||
}
|
||||
|
||||
src_install() {
|
||||
ecargo_install
|
||||
|
||||
insinto /usr/share/nvim-gtk
|
||||
doins -r runtime
|
||||
|
||||
insinto /usr/share/applications
|
||||
doins desktop/*.desktop
|
||||
|
||||
insinto /usr/share/icons/hicolor/128x128/apps
|
||||
newins desktop/org.daa.NeovimGtk_128.png org.daa.NeovimGtk.png
|
||||
insinto /usr/share/icons/hicolor/48x48/apps
|
||||
newins desktop/org.daa.NeovimGtk_48.png org.daa.NeovimGtk.png
|
||||
insinto /usr/share/icons/hicolor/scalable/apps
|
||||
newins desktop/org.daa.NeovimGtk.svg org.daa.NeovimGtk.png
|
||||
insinto /usr/share/icons/hicolor/symbolic/apps
|
||||
newins desktop/org.daa.NeovimGtk-symbolic.svg org.daa.NeovimGtk.png
|
||||
}
|
||||
|
||||
@@ -11,11 +11,26 @@ HOMEPAGE="https://github.com/daa84/neovim-gtk ${HOMEPAGE}"
|
||||
LICENCES="GPL-3.0"
|
||||
MYOPTIONS=""
|
||||
|
||||
BUGS_TO="hasufell@posteo.de"
|
||||
src_install() {
|
||||
ecargo_install
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
export PREFIX=/usr
|
||||
insinto /usr/share/nvim-gtk
|
||||
doins -r runtime
|
||||
|
||||
insinto /usr/share/applications
|
||||
doins desktop/*.desktop
|
||||
|
||||
local s
|
||||
for s in 48 128; do
|
||||
insinto /usr/share/icons/hicolor/${s}x${s}/apps
|
||||
newins desktop/org.daa.NeovimGtk_${s}.png org.daa.NeovimGtk.png
|
||||
done
|
||||
|
||||
insinto /usr/share/icons/hicolor/scalable/apps
|
||||
newins desktop/org.daa.NeovimGtk.svg org.daa.NeovimGtk.png
|
||||
|
||||
insinto /usr/share/icons/hicolor/symbolic/apps
|
||||
newins desktop/org.daa.NeovimGtk-symbolic.svg org.daa.NeovimGtk.png
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
# Copyright 2019 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require github [ user="jarun" tag="v${PV}" ]
|
||||
require bash-completion zsh-completion
|
||||
|
||||
SUMMARY="Lean, fast, zero-config, full-featured file manager with batteries "
|
||||
|
||||
LICENCES="BSD-2"
|
||||
SLOT="0"
|
||||
PLATFORMS="~amd64 ~x86"
|
||||
MYOPTIONS=""
|
||||
|
||||
DEPENDENCIES="
|
||||
build:
|
||||
virtual/pkg-config
|
||||
build+run:
|
||||
sys-libs/ncurses:=
|
||||
sys-libs/readline:=
|
||||
suggestion:
|
||||
app-arch/libarchive [[ description = [ create, list and extract archives ] ]]
|
||||
media/mediainfo [[ description = [ multimedia file details ] ]]
|
||||
sys-auth/vlock [[ description = [ terminal locker ] ]]
|
||||
sys-fs/sshfs-fuse [[ description = [ mount, unmount over SSHFS ] ]]
|
||||
x11-apps/xdg-utils [[ description = [ desktop opener ] ]]
|
||||
"
|
||||
|
||||
BUGS_TO="hasufell@posteo.de"
|
||||
|
||||
src_install() {
|
||||
emake PREFIX="/usr/$(exhost --target)" MANPREFIX="/usr/share/man" DESTDIR="${IMAGE}" install
|
||||
emagicdocs
|
||||
|
||||
dobashcompletion scripts/auto-completion/bash/*
|
||||
dozshcompletion scripts/auto-completion/zsh/*
|
||||
}
|
||||
@@ -36,7 +36,7 @@ DEPENDENCIES="
|
||||
sys-libs/zlib
|
||||
test:
|
||||
dev-lang/perl:*
|
||||
dev-lang/python[>=3]
|
||||
dev-lang/python:*[>=3]
|
||||
"
|
||||
|
||||
CMAKE_SRC_CONFIGURE_PARAMS=(
|
||||
@@ -1,7 +1,8 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require pypi setup-py [ import=distutils blacklist="3" ]
|
||||
require setup-py [ import=distutils blacklist="2" multibuild=false ]
|
||||
require github [ user="AGProjects" pn="python3-application" tag="${PV}" ]
|
||||
|
||||
SUMMARY="Basic building blocks for python applications"
|
||||
HOMEPAGE="http://ag-projects.com/"
|
||||
@@ -1,8 +1,8 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require github [ user="AGProjects" tag="release-${PV}" ]
|
||||
require setup-py [ import=distutils blacklist="3" work="${PN}-release-${PV}" ]
|
||||
require github [ user="AGProjects" pn="python3-eventlib" tag="${PV}" ]
|
||||
require setup-py [ import=distutils blacklist="2" multibuild=false ]
|
||||
|
||||
SUMMARY="Coroutine-based networking library"
|
||||
HOMEPAGE="http://sipsimpleclient.org"
|
||||
@@ -1,7 +1,8 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require pypi setup-py [ import=distutils blacklist="3" ]
|
||||
require setup-py [ import=distutils blacklist="2" multibuild=false ]
|
||||
require github [ user="AGProjects" pn="python3-gnutls" tag="${PV}" ]
|
||||
|
||||
SUMMARY="High level object oriented wrapper around libgnutls"
|
||||
HOMEPAGE="http://ag-projects.com/"
|
||||
@@ -1,8 +1,8 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require github [ user="AGProjects" tag="release-${PV}" ]
|
||||
require setup-py [ import=distutils blacklist="3" work="${PN}-release-${PV}" ]
|
||||
require github [ user="AGProjects" pn="python3-msrplib" tag="${PV}" ]
|
||||
require setup-py [ import=distutils blacklist="2" multibuild=false ]
|
||||
|
||||
SUMMARY="Client library for MSRP protocol and its relay extension"
|
||||
HOMEPAGE="http://sipsimpleclient.org"
|
||||
@@ -14,9 +14,9 @@ MYOPTIONS=""
|
||||
|
||||
DEPENDENCIES="
|
||||
run:
|
||||
dev-python/python-application[python_abis:*(-)?]
|
||||
dev-python/python-eventlib[python_abis:*(-)?]
|
||||
dev-python/python-gnutls[>=3.0.0][python_abis:*(-)?]
|
||||
dev-python/python-application[>=3.0.3][python_abis:*(-)?]
|
||||
dev-python/python-eventlib[>=0.3.0][python_abis:*(-)?]
|
||||
dev-python/python-gnutls[>=3.1.8][python_abis:*(-)?]
|
||||
net-twisted/Twisted[python_abis:*(-)?]
|
||||
"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require pypi setup-py [ import=distutils blacklist="3" ]
|
||||
require setup-py [ import=distutils blacklist="2" multibuild=false ]
|
||||
require github [ user="AGProjects" pn="python3-otr" tag="${PV}" ]
|
||||
|
||||
SUMMARY="Off-The-Record Messaging protocol implementation for Python"
|
||||
HOMEPAGE="https://github.com/AGProjects/python-otr"
|
||||
@@ -14,9 +15,8 @@ MYOPTIONS=""
|
||||
DEPENDENCIES="
|
||||
build+run:
|
||||
dev-python/cryptography[>=1.6][python_abis:*(-)?]
|
||||
dev-python/enum34[python_abis:*(-)?]
|
||||
dev-python/gmpy2[python_abis:*(-)?]
|
||||
dev-python/python-application[>=2.0.0][python_abis:*(-)?]
|
||||
dev-python/python-application[>=3.0.3][python_abis:*(-)?]
|
||||
dev-python/zopeinterface[python_abis:*(-)?]
|
||||
net-libs/libotr
|
||||
"
|
||||
@@ -1,26 +0,0 @@
|
||||
From 8e0874b1be515abc8845e3ad41c4332f992e5687 Mon Sep 17 00:00:00 2001
|
||||
From: Julian Ospald <hasufell@posteo.de>
|
||||
Date: Tue, 24 Dec 2019 22:17:28 +0100
|
||||
Subject: [PATCH] Fix build with LibreSSL 2.7
|
||||
Upstream: submitted, https://github.com/AGProjects/python-sipsimple/pull/8
|
||||
|
||||
---
|
||||
deps/pjsip/third_party/zsrtp/include/openssl_compat.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/deps/pjsip/third_party/zsrtp/include/openssl_compat.h b/deps/pjsip/third_party/zsrtp/include/openssl_compat.h
|
||||
index 5b6e183e..aebbf996 100644
|
||||
--- a/deps/pjsip/third_party/zsrtp/include/openssl_compat.h
|
||||
+++ b/deps/pjsip/third_party/zsrtp/include/openssl_compat.h
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <openssl/hmac.h>
|
||||
|
||||
-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)
|
||||
+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
|
||||
static HMAC_CTX *HMAC_CTX_new(void)
|
||||
{
|
||||
HMAC_CTX *ctx = (HMAC_CTX*)OPENSSL_malloc(sizeof(HMAC_CTX));
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
Upstream: Yes
|
||||
Source: https://github.com/AGProjects/python3-sipsimple/commit/d75b225e566cae2c998504dc5cd76bb30226cb43
|
||||
|
||||
From d75b225e566cae2c998504dc5cd76bb30226cb43 Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Georgescu <ag@ag-projects.com>
|
||||
Date: Tue, 16 Mar 2021 13:54:03 +0000
|
||||
Subject: [PATCH] Decode uri.transport if is bytes in DNS Lookup
|
||||
|
||||
---
|
||||
sipsimple/lookup.py | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sipsimple/lookup.py b/sipsimple/lookup.py
|
||||
index 8ce86a92..27672da7 100644
|
||||
--- a/sipsimple/lookup.py
|
||||
+++ b/sipsimple/lookup.py
|
||||
@@ -255,8 +255,9 @@ def lookup_sip_proxy(self, uri, supported_transports, timeout=3.0, lifetime=15.0
|
||||
|
||||
try:
|
||||
# If the host part of the URI is an IP address, we will not do any lookup
|
||||
+ transport = uri.transport.decode() if isinstance(uri.transport, bytes) else uri.transport
|
||||
if re.match("^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$", uri.host.decode()):
|
||||
- transport = 'tls' if uri.secure else uri.transport.lower()
|
||||
+ transport = 'tls' if uri.secure else transport.lower()
|
||||
if transport not in supported_transports:
|
||||
raise DNSLookupError("IP transport %s dictated by URI is not supported" % transport)
|
||||
port = uri.port or (5061 if transport=='tls' else 5060)
|
||||
@@ -270,7 +271,7 @@ def lookup_sip_proxy(self, uri, supported_transports, timeout=3.0, lifetime=15.0
|
||||
|
||||
# If the port is specified in the URI, we will only do an A lookup
|
||||
if uri.port:
|
||||
- transport = 'tls' if uri.secure else uri.transport.lower()
|
||||
+ transport = 'tls' if uri.secure else transport.lower()
|
||||
if transport not in supported_transports:
|
||||
raise DNSLookupError("Host transport %s dictated by URI is not supported" % transport)
|
||||
addresses = self._lookup_a_records(resolver, [uri.host.decode()], log_context=log_context)
|
||||
@@ -1,45 +0,0 @@
|
||||
From f786808a36deab01f301905ecdae27e6e17ce197 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Barcza <info@blackpanther.hu>
|
||||
Date: Mon, 13 Mar 2017 14:46:34 +0100
|
||||
Subject: [PATCH 1/2] Build fix on Linux
|
||||
Upstream: submitted, https://github.com/AGProjects/python-sipsimple/pull/1
|
||||
|
||||
---
|
||||
setup_pjsip.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/setup_pjsip.py b/setup_pjsip.py
|
||||
index 4760e64..a43533d 100644
|
||||
--- a/setup_pjsip.py
|
||||
+++ b/setup_pjsip.py
|
||||
@@ -157,6 +157,7 @@ def configure_pjsip(self):
|
||||
if sys_platform == "win32":
|
||||
cmd = ["bash", "configure"]
|
||||
else:
|
||||
+ os.system("chmod +x "+ self.build_dir +"/*configure")
|
||||
cmd = ["./configure"]
|
||||
cmd.extend(["--disable-g7221-codec"])
|
||||
ffmpeg_path = env.get("SIPSIMPLE_FFMPEG_PATH", None)
|
||||
|
||||
From b80cf7ee9d4c32b4e068eb74492f31ccab1296b2 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Barcza <info@blackpanther.hu>
|
||||
Date: Mon, 13 Mar 2017 14:55:29 +0100
|
||||
Subject: [PATCH 2/2] Build fix on Linux
|
||||
|
||||
---
|
||||
setup_pjsip.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup_pjsip.py b/setup_pjsip.py
|
||||
index a43533d..5f1b27b 100644
|
||||
--- a/setup_pjsip.py
|
||||
+++ b/setup_pjsip.py
|
||||
@@ -157,7 +157,7 @@ def configure_pjsip(self):
|
||||
if sys_platform == "win32":
|
||||
cmd = ["bash", "configure"]
|
||||
else:
|
||||
- os.system("chmod +x "+ self.build_dir +"/*configure")
|
||||
+ os.system("chmod +x "+ self.build_dir +"/*configure")
|
||||
cmd = ["./configure"]
|
||||
cmd.extend(["--disable-g7221-codec"])
|
||||
ffmpeg_path = env.get("SIPSIMPLE_FFMPEG_PATH", None)
|
||||
@@ -0,0 +1,22 @@
|
||||
From f786808a36deab01f301905ecdae27e6e17ce197 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Barcza <info@blackpanther.hu>
|
||||
Date: Mon, 13 Mar 2017 14:46:34 +0100
|
||||
Subject: [PATCH 1/2] Build fix on Linux
|
||||
Upstream: submitted, https://github.com/AGProjects/python-sipsimple/pull/1
|
||||
|
||||
---
|
||||
setup_pjsip.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/setup_pjsip.py b/setup_pjsip.py
|
||||
index 7dd6c13ff..82e7bd1ca 100644
|
||||
--- a/setup_pjsip.py
|
||||
+++ b/setup_pjsip.py
|
||||
@@ -160,6 +160,7 @@ class PJSIP_build_ext(build_ext):
|
||||
if sys_platform == "win32":
|
||||
cmd = ["bash", "configure"]
|
||||
else:
|
||||
+ os.system("chmod +x "+ self.build_dir +"/*configure")
|
||||
cmd = ["./configure"]
|
||||
cmd.extend(["--disable-g7221-codec"])
|
||||
ffmpeg_path = env.get("SIPSIMPLE_FFMPEG_PATH", None)
|
||||
@@ -1,8 +1,8 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require github [ user="AGProjects" tag="release-${PV}" ]
|
||||
require setup-py [ import=distutils blacklist="3" work="${PN}-release-${PV}" ]
|
||||
require github [ user="AGProjects" pn="python3-sipsimple" tag="${PV}" ]
|
||||
require setup-py [ import=distutils blacklist="2" multibuild=false ]
|
||||
|
||||
SUMMARY="SIP SIMPLE client SDK is a Software Development Kit"
|
||||
HOMEPAGE="http://sipsimpleclient.org ${HOMEPAGE}"
|
||||
@@ -21,7 +21,7 @@ DEPENDENCIES="
|
||||
build+run:
|
||||
dev-db/sqlite:3
|
||||
dev-libs/icu:=
|
||||
dev-python/python-application[>=2.5.0][python_abis:*(-)?]
|
||||
dev-python/python-application[>=3.0.3][python_abis:*(-)?]
|
||||
media/ffmpeg[h264]
|
||||
media-libs/libvpx
|
||||
media-libs/v4l-utils
|
||||
@@ -33,22 +33,21 @@ DEPENDENCIES="
|
||||
dev-python/dnspython[python_abis:*(-)?]
|
||||
dev-python/greenlet[python_abis:*(-)?]
|
||||
dev-python/lxml[python_abis:*(-)?]
|
||||
dev-python/python-cjson[python_abis:*(-)?]
|
||||
dev-python/python-dateutil[python_abis:*(-)?]
|
||||
dev-python/python-eventlib[python_abis:*(-)?]
|
||||
dev-python/python-gnutls[python_abis:*(-)?]
|
||||
dev-python/python-msrplib[>=0.19.0][python_abis:*(-)?]
|
||||
dev-python/python-otr[>=1.2.0][python_abis:*(-)?]
|
||||
dev-python/python-xcaplib[python_abis:*(-)?]
|
||||
dev-python/python-eventlib[>=0.3.0][python_abis:*(-)?]
|
||||
dev-python/python-gnutls[>=3.1.8][python_abis:*(-)?]
|
||||
dev-python/python-msrplib[>=0.21.0][python_abis:*(-)?]
|
||||
dev-python/python-otr[>=2.0.1][python_abis:*(-)?]
|
||||
dev-python/python-xcaplib[>=2.0.0][python_abis:*(-)?]
|
||||
dev-python/zopeinterface[python_abis:*(-)?]
|
||||
media-libs/x264[-10bit]
|
||||
net-twisted/Twisted[python_abis:*(-)?]
|
||||
"
|
||||
|
||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||
"${FILES}"/${PNV}-fix-build.patch
|
||||
"${FILES}"/0001-Fix-build-with-LibreSSL-2.7.patch
|
||||
"${FILES}"/${PN}-fix-build.patch
|
||||
"${FILES}"/${PN}-gcc10-fix.patch
|
||||
"${FILES}"/d75b225e566cae2c998504dc5cd76bb30226cb43.patch
|
||||
)
|
||||
|
||||
src_compile() {
|
||||
@@ -0,0 +1,70 @@
|
||||
Upstream: Yes
|
||||
Source: https://github.com/AGProjects/python3-xcaplib/commit/066759cf355b152375767bee4c3858dc0b8087e4
|
||||
|
||||
From 066759cf355b152375767bee4c3858dc0b8087e4 Mon Sep 17 00:00:00 2001
|
||||
From: Worawut Boonpeang <worawut@ag-projects.com>
|
||||
Date: Fri, 4 Dec 2020 13:49:54 +0000
|
||||
Subject: [PATCH] xcaplib (Python3) work with eventlib
|
||||
|
||||
---
|
||||
xcaplib/green.py | 4 +++-
|
||||
xcaplib/xcapclient.py | 10 ++++++++--
|
||||
2 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/xcaplib/green.py b/xcaplib/green.py
|
||||
index 237d9d8..d01ee11 100644
|
||||
--- a/xcaplib/green.py
|
||||
+++ b/xcaplib/green.py
|
||||
@@ -2,6 +2,8 @@
|
||||
from eventlib.green import socket, ssl, httplib, urllib2
|
||||
from xcaplib import httpclient
|
||||
from xcaplib import client
|
||||
+import urllib
|
||||
+import http
|
||||
|
||||
|
||||
class HTTPConnection(httplib.HTTPConnection):
|
||||
@@ -22,7 +24,7 @@ def http_open(self, req):
|
||||
|
||||
class HTTPSHandler(urllib.request.HTTPSHandler):
|
||||
def https_open(self, req):
|
||||
- return self.do_open(HTTPSConnection, req)
|
||||
+ return self.do_open(http.client.HTTPSConnection, req)
|
||||
|
||||
|
||||
class HTTPClient(httpclient.HTTPClient):
|
||||
diff --git a/xcaplib/xcapclient.py b/xcaplib/xcapclient.py
|
||||
index cd409df..384c237 100755
|
||||
--- a/xcaplib/xcapclient.py
|
||||
+++ b/xcaplib/xcapclient.py
|
||||
@@ -129,6 +129,8 @@ def setup_parser_request(parser):
|
||||
parser.add_option('--etag', help="perform a conditional operation", metavar='ETAG')
|
||||
parser.add_option('--add-header', dest='headers',
|
||||
action='append', default=[], help=optparse.SUPPRESS_HELP)
|
||||
+ parser.add_option("--eventlib", dest='eventlib_enable',
|
||||
+ help="Enables non-blocking mode using eventlib library")
|
||||
parser.add_option("-i", dest='input_filename',
|
||||
help="source file for the PUT request; default is <stdin>")
|
||||
parser.add_option("-o", dest='output_filename',
|
||||
@@ -366,7 +368,11 @@ def update_options_from_config(options):
|
||||
setattr(options, key, value)
|
||||
|
||||
def parse_args():
|
||||
- argv = sys.argv[1:]
|
||||
+ argv = None
|
||||
+ if "--eventlib" in sys.argv[1:]:
|
||||
+ argv = sys.argv[2:]
|
||||
+ else:
|
||||
+ argv = sys.argv[1:]
|
||||
|
||||
if not argv:
|
||||
sys.exit('Type %s -h for help.' % sys.argv[0])
|
||||
@@ -496,7 +502,7 @@ def get_exit_code(http_error):
|
||||
return 3
|
||||
|
||||
def main():
|
||||
- if sys.argv[0].endswith('-eventlib'):
|
||||
+ if "--eventlib" in sys.argv[1:]:
|
||||
from xcaplib.green import XCAPClient as client_class
|
||||
else:
|
||||
client_class = XCAPClient
|
||||
@@ -1,11 +1,11 @@
|
||||
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require setup-py [ import=distutils blacklist="3" ]
|
||||
require setup-py [ import=distutils blacklist="2" multibuild=false ]
|
||||
require github [ user="AGProjects" pn="python3-xcaplib" tag="${PV}" ]
|
||||
|
||||
SUMMARY="Python library for managing XML documents on XCAP server"
|
||||
HOMEPAGE="http://sipsimpleclient.org"
|
||||
DOWNLOADS="http://download.ag-projects.com/XCAP/${PNV}.tar.gz"
|
||||
|
||||
LICENCES="GPL-2"
|
||||
SLOT="0"
|
||||
@@ -15,6 +15,10 @@ MYOPTIONS=""
|
||||
DEPENDENCIES="
|
||||
run:
|
||||
dev-python/lxml[python_abis:*(-)?]
|
||||
dev-python/python-application[python_abis:*(-)?]
|
||||
dev-python/python-application[>=3.0.3][python_abis:*(-)?]
|
||||
"
|
||||
|
||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||
"${FILES}"/${PN}-work-with-eventlib.patch
|
||||
)
|
||||
|
||||
31
packages/sys-apps/evrouter/evrouter-0.4.exheres-0
Normal file
31
packages/sys-apps/evrouter/evrouter-0.4.exheres-0
Normal file
@@ -0,0 +1,31 @@
|
||||
# Copyright 2020 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 ] ]
|
||||
|
||||
SUMMARY="An input event router"
|
||||
DOWNLOADS="https://files.bedroomlan.org/debian/pool/main/e/evrouter/evrouter_${PV}.tar.gz"
|
||||
|
||||
LICENCES="GPL-2"
|
||||
SLOT="0"
|
||||
PLATFORMS="~amd64 ~x86"
|
||||
MYOPTIONS=""
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DEPENDENCIES="
|
||||
build+run:
|
||||
x11-libs/libX11
|
||||
x11-libs/libXtst
|
||||
"
|
||||
|
||||
BUGS_TO="hasufell@posteo.de"
|
||||
|
||||
DEFAULT_SRC_CONFIGURE_PARAMS=(
|
||||
--without-xmms
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
From 375ef42393f3dc6edbaa2cb70c79b2366072db38 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Sun, 19 Jan 2020 15:24:20 +0000
|
||||
Subject: [PATCH] src/rc/rc-logger.h: fix build failure against gcc-10
|
||||
|
||||
On gcc-10 (and gcc-9 -fno-common) build fails as:
|
||||
|
||||
```
|
||||
cc -L../librc -L../libeinfo -O2 -g -std=c99 -Wall -Wextra -Wimplicit -Wshadow \
|
||||
-Wformat=2 -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn \
|
||||
-Wmissing-format-attribute -Wnested-externs -Winline -Wwrite-strings \
|
||||
-Wcast-align -Wcast-qual -Wpointer-arith -Wdeclaration-after-statement \
|
||||
-Wsequence-point -Werror=implicit-function-declaration \
|
||||
-Wl,-rpath=/lib -o openrc rc.o rc-logger.o rc-misc.o rc-plugin.o _usage.o -lutil -lrc -leinfo -Wl,-Bdynamic -ldl
|
||||
ld: rc-logger.o:/home/slyfox/dev/git/openrc/src/rc/rc-logger.h:16:
|
||||
multiple definition of `rc_logger_pid'; rc.o:openrc/src/rc/rc-logger.h:16: first defined here
|
||||
ld: rc-logger.o:/home/slyfox/dev/git/openrc/src/rc/rc-logger.h:17:
|
||||
multiple definition of `rc_logger_tty'; rc.o:openrc/src/rc/rc-logger.h:17: first defined here
|
||||
```
|
||||
|
||||
gcc-10 will change the default from -fcommon to fno-common:
|
||||
https://gcc.gnu.org/PR85678.
|
||||
|
||||
The error also happens if CFLAGS=-fno-common passed explicitly.
|
||||
|
||||
This fixes #348.
|
||||
---
|
||||
src/rc/rc-logger.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/rc/rc-logger.h b/src/rc/rc-logger.h
|
||||
index bf6e3e57..1da294b0 100644
|
||||
--- a/src/rc/rc-logger.h
|
||||
+++ b/src/rc/rc-logger.h
|
||||
@@ -13,8 +13,8 @@
|
||||
#ifndef RC_LOGGER_H
|
||||
#define RC_LOGGER_H
|
||||
|
||||
-pid_t rc_logger_pid;
|
||||
-int rc_logger_tty;
|
||||
+extern pid_t rc_logger_pid;
|
||||
+extern int rc_logger_tty;
|
||||
extern bool rc_in_logger;
|
||||
|
||||
void rc_logger_open(const char *runlevel);
|
||||
--
|
||||
2.29.0
|
||||
|
||||
@@ -47,6 +47,10 @@ DEPENDENCIES="
|
||||
|
||||
REMOTE_IDS="github:OpenRC/${PN}"
|
||||
|
||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||
"${FILES}"/src-rc-rc-logger.h-fix-build-failure-against-gcc-10.patch
|
||||
)
|
||||
|
||||
DEFAULT_SRC_COMPILE_PARAMS=(
|
||||
LIBNAME=lib
|
||||
LIBEXECDIR=/usr/$(exhost --target)/libexec/rc
|
||||
@@ -2,8 +2,8 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
require desktop-utils gtk-icon-cache
|
||||
require setup-py [ import=distutils blacklist="3" multibuild=false ]
|
||||
require github [ user="AGProjects" pn="blink-qt" tag="release-${PV}" ]
|
||||
require setup-py [ import=distutils blacklist="2" multibuild=false ]
|
||||
require github [ user="AGProjects" pn="blink-qt" tag="${PV}" ]
|
||||
|
||||
SUMMARY="A state of the art, easy to use SIP client"
|
||||
HOMEPAGE="http://iCanBlink.com"
|
||||
@@ -22,17 +22,16 @@ DEPENDENCIES="
|
||||
dev-python/PyQt5[>=5.0][webkit][python_abis:*(-)?]
|
||||
dev-python/google-api-python-client[python_abis:*(-)?]
|
||||
dev-python/lxml[python_abis:*(-)?]
|
||||
dev-python/python-application[>=2.5.0][python_abis:*(-)?]
|
||||
dev-python/python-cjson[python_abis:*(-)?]
|
||||
dev-python/python-application[>=3.0.3][python_abis:*(-)?]
|
||||
dev-python/python-dateutil[python_abis:*(-)?]
|
||||
dev-python/python-eventlib[python_abis:*(-)?]
|
||||
dev-python/python-sipsimple[>=3.0.0][python_abis:*(-)?]
|
||||
dev-python/python-eventlib[>=0.3.0][python_abis:*(-)?]
|
||||
dev-python/python-sipsimple[>=4.0.1][python_abis:*(-)?]
|
||||
dev-python/zopeinterface[python_abis:*(-)?]
|
||||
net-twisted/Twisted[python_abis:*(-)?]
|
||||
"
|
||||
|
||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||
"${FILES}/${PNV}-data-path.patch"
|
||||
"${FILES}/${PN}-data-path.patch"
|
||||
)
|
||||
|
||||
src_install() {
|
||||
@@ -3,14 +3,17 @@ Date: Tue Sep 8 10:10:18 UTC 2015
|
||||
Subject: Fix data path fallback
|
||||
Upstream: no, correct fix pending since 'sys.prefix' is broken in exherbo
|
||||
|
||||
--- blink-1.4.1/blink/resources.py
|
||||
+++ blink-1.4.1/blink/resources.py
|
||||
@@ -71,7 +71,7 @@
|
||||
if os.path.exists(os.path.join(application_directory, 'resources', 'blink.ui')):
|
||||
cls._cached_directory = os.path.join(application_directory, 'resources').decode(sys.getfilesystemencoding())
|
||||
|
||||
diff --git a/blink/resources.py b/blink/resources.py
|
||||
index e981ed8..f1f4f5c 100644
|
||||
--- a/blink/resources.py
|
||||
+++ b/blink/resources.py
|
||||
@@ -81,7 +81,7 @@ class Resources(object):
|
||||
elif os.path.exists(os.path.join(application_directory, 'resources', 'blink.ui')):
|
||||
cls._cached_directory = os.path.join(application_directory, 'resources')
|
||||
else:
|
||||
- cls._cached_directory = os.path.join(application_directory, 'share', 'blink').decode(sys.getfilesystemencoding())
|
||||
+ cls._cached_directory = os.path.join('/usr', 'share', 'blink').decode(sys.getfilesystemencoding())
|
||||
- cls._cached_directory = os.path.join(application_directory, 'share', 'blink')
|
||||
+ cls._cached_directory = os.path.join('/usr', 'share', 'blink')
|
||||
return DirectoryContextManager(cls._cached_directory)
|
||||
|
||||
@classmethod
|
||||
37
packages/x11-misc/xvkbd/xvkbd-4.1.exheres-0
Normal file
37
packages/x11-misc/xvkbd/xvkbd-4.1.exheres-0
Normal file
@@ -0,0 +1,37 @@
|
||||
# Copyright 2020 Julian Ospald <hasufell@posteo.de>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
SUMMARY="Virtual keyboard for X window system"
|
||||
HOMEPAGE="http://t-sato.in.coocan.jp/xvkbd/"
|
||||
DOWNLOADS="http://t-sato.in.coocan.jp/xvkbd/${PNV}.tar.gz"
|
||||
|
||||
LICENCES="GPL-2"
|
||||
SLOT="0"
|
||||
PLATFORMS="~amd64 ~x86"
|
||||
|
||||
DEPENDENCIES="
|
||||
build:
|
||||
virtual/pkg-config
|
||||
x11-proto/xorgproto
|
||||
build+run:
|
||||
x11-libs/libX11
|
||||
x11-libs/libXaw
|
||||
x11-libs/libXmu
|
||||
x11-libs/libXt
|
||||
x11-libs/libXtst
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
edo sed -i -e 's/shell pkg-config/shell ${PKG_CONFIG}/' \
|
||||
Makefile.{am,in}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /usr/share/X11/app-defaults
|
||||
|
||||
default
|
||||
|
||||
dodoc ChangeLog README
|
||||
newman ${PN}.man ${PN}.1
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
Upstream: sent https://github.com/zim-desktop-wiki/zim-desktop-wiki/pull/1261
|
||||
|
||||
From 1e63570eb941b985dc70df31043c7f4279c6a935 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kapshuna <kapsh@kap.sh>
|
||||
Date: Fri, 18 Sep 2020 01:15:16 +0300
|
||||
Subject: [PATCH] Fix reading preformatted text under Python 3.9
|
||||
|
||||
---
|
||||
zim/formats/__init__.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/zim/formats/__init__.py b/zim/formats/__init__.py
|
||||
index e1149f7f..f22b0b0b 100644
|
||||
--- a/zim/formats/__init__.py
|
||||
+++ b/zim/formats/__init__.py
|
||||
@@ -822,7 +822,7 @@ class ParseTreeBuilder(Builder):
|
||||
self._last_char = None
|
||||
|
||||
def append(self, tag, attrib=None, text=None):
|
||||
- attrib = attrib.copy() if attrib is not None else None
|
||||
+ attrib = attrib.copy() if attrib is not None else {}
|
||||
if tag in BLOCK_LEVEL:
|
||||
if text and not text.endswith('\n'):
|
||||
text += '\n'
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -1,239 +0,0 @@
|
||||
Upstream: master
|
||||
|
||||
From 0c7d355a76236b0c687fb7c59cd974c2c7f35657 Mon Sep 17 00:00:00 2001
|
||||
From: Robin Lee <cheeselee@fedoraproject.org>
|
||||
Date: Thu, 10 Sep 2020 21:31:22 +0800
|
||||
Subject: [PATCH] Replace usage of `getchildren` and `getiterator` with `list`
|
||||
or `iter`
|
||||
|
||||
Methods getchildren() and getiterator() of classes ElementTree and Element in
|
||||
the ElementTree module have been deprecated since Python 3.2 and removed since
|
||||
Python 3.9.
|
||||
|
||||
Fixes #1258
|
||||
Closes #1259
|
||||
---
|
||||
tests/__init__.py | 2 +-
|
||||
zim/formats/__init__.py | 44 ++++++++++++++++++++---------------------
|
||||
zim/gui/pageview.py | 2 +-
|
||||
3 files changed, 24 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/tests/__init__.py b/tests/__init__.py
|
||||
index 20e5b8df..88f87f87 100644
|
||||
--- a/tests/__init__.py
|
||||
+++ b/tests/__init__.py
|
||||
@@ -559,7 +559,7 @@ class _TestData(object):
|
||||
tree = etree.ElementTree(file=root + '/tests/data/notebook-wiki.xml')
|
||||
|
||||
test_data = []
|
||||
- for node in tree.getiterator(tag='page'):
|
||||
+ for node in tree.iter(tag='page'):
|
||||
name = node.attrib['name']
|
||||
text = str(node.text.lstrip('\n'))
|
||||
test_data.append((name, text))
|
||||
diff --git a/zim/formats/__init__.py b/zim/formats/__init__.py
|
||||
index 9e00c169..e1149f7f 100644
|
||||
--- a/zim/formats/__init__.py
|
||||
+++ b/zim/formats/__init__.py
|
||||
@@ -262,7 +262,7 @@ class ParseTree(object):
|
||||
'''Returns True if the tree contains any content at all.'''
|
||||
root = self._etree.getroot()
|
||||
return root is not None and (
|
||||
- bool(root.getchildren()) or (root.text and not root.text.isspace())
|
||||
+ bool(list(root)) or (root.text and not root.text.isspace())
|
||||
)
|
||||
|
||||
@property
|
||||
@@ -284,14 +284,14 @@ class ParseTree(object):
|
||||
myroot = self._etree.getroot()
|
||||
otherroot = tree._etree.getroot()
|
||||
if otherroot.text:
|
||||
- children = myroot.getchildren()
|
||||
+ children = list(myroot)
|
||||
if children:
|
||||
last = children[-1]
|
||||
last.tail = (last.tail or '') + otherroot.text
|
||||
else:
|
||||
myroot.text = (myroot.text or '') + otherroot.text
|
||||
|
||||
- for element in otherroot.getchildren():
|
||||
+ for element in iter(otherroot):
|
||||
myroot.append(element)
|
||||
|
||||
return self
|
||||
@@ -312,7 +312,7 @@ class ParseTree(object):
|
||||
|
||||
# HACK: Force sorting of attrib - else change in python3.8 breaks test cases
|
||||
# Ensure all attrib are string, else ElementTree fails
|
||||
- for element in self._etree.getiterator('*'):
|
||||
+ for element in self._etree.iter('*'):
|
||||
myattrib = element.attrib.copy()
|
||||
element.attrib.clear()
|
||||
for key in sorted(myattrib.keys()):
|
||||
@@ -342,8 +342,8 @@ class ParseTree(object):
|
||||
from zim.notebook.page import HRef # XXX
|
||||
seen = set()
|
||||
for elt in itertools.chain(
|
||||
- self._etree.getiterator(LINK),
|
||||
- self._etree.getiterator(IMAGE)
|
||||
+ self._etree.iter(LINK),
|
||||
+ self._etree.iter(IMAGE)
|
||||
):
|
||||
href = elt.attrib.get('href')
|
||||
if href and href not in seen:
|
||||
@@ -359,7 +359,7 @@ class ParseTree(object):
|
||||
@returns: yields an unordered list of tag names
|
||||
'''
|
||||
seen = set()
|
||||
- for elt in self._etree.getiterator(TAG):
|
||||
+ for elt in self._etree.iter(TAG):
|
||||
name = elt.text
|
||||
if not name in seen:
|
||||
seen.add(name)
|
||||
@@ -367,7 +367,7 @@ class ParseTree(object):
|
||||
|
||||
def _get_heading_element(self, level=1):
|
||||
root = self._etree.getroot()
|
||||
- children = root.getchildren()
|
||||
+ children = list(root)
|
||||
if root.text and not root.text.isspace():
|
||||
return None
|
||||
|
||||
@@ -424,7 +424,7 @@ class ParseTree(object):
|
||||
'''
|
||||
root = self._etree.getroot()
|
||||
roottext = root.text and not root.text.isspace()
|
||||
- children = root.getchildren()
|
||||
+ children = list(root)
|
||||
|
||||
if children and not roottext:
|
||||
first = children[0]
|
||||
@@ -442,7 +442,7 @@ class ParseTree(object):
|
||||
and a max depth.
|
||||
'''
|
||||
path = []
|
||||
- for heading in self._etree.getiterator('h'):
|
||||
+ for heading in self._etree.iter('h'):
|
||||
level = int(heading.attrib['level'])
|
||||
# find parent header in path using old level
|
||||
while path and path[-1][0] >= level:
|
||||
@@ -461,11 +461,11 @@ class ParseTree(object):
|
||||
adds a '_src_file' attribute to the elements with the full file path.
|
||||
'''
|
||||
if notebook is None:
|
||||
- for element in self._etree.getiterator('img'):
|
||||
+ for element in self._etree.iter('img'):
|
||||
filepath = element.attrib['src']
|
||||
element.attrib['_src_file'] = File(filepath)
|
||||
else:
|
||||
- for element in self._etree.getiterator('img'):
|
||||
+ for element in self._etree.iter('img'):
|
||||
filepath = element.attrib['src']
|
||||
element.attrib['_src_file'] = notebook.resolve_file(element.attrib['src'], path)
|
||||
|
||||
@@ -473,7 +473,7 @@ class ParseTree(object):
|
||||
'''Undo effect of L{resolve_images()}, mainly intended for
|
||||
testing.
|
||||
'''
|
||||
- for element in self._etree.getiterator('img'):
|
||||
+ for element in self._etree.iter('img'):
|
||||
if '_src_file' in element.attrib:
|
||||
element.attrib.pop('_src_file')
|
||||
|
||||
@@ -481,7 +481,7 @@ class ParseTree(object):
|
||||
'''Calls encode_url() on all links that contain urls.
|
||||
See zim.parsing for details. Modifies the parse tree.
|
||||
'''
|
||||
- for link in self._etree.getiterator('link'):
|
||||
+ for link in self._etree.iter('link'):
|
||||
href = link.attrib['href']
|
||||
if href and is_url_re.match(href):
|
||||
link.attrib['href'] = url_encode(href, mode=mode)
|
||||
@@ -492,7 +492,7 @@ class ParseTree(object):
|
||||
'''Calls decode_url() on all links that contain urls.
|
||||
See zim.parsing for details. Modifies the parse tree.
|
||||
'''
|
||||
- for link in self._etree.getiterator('link'):
|
||||
+ for link in self._etree.iter('link'):
|
||||
href = link.attrib['href']
|
||||
if href and is_url_re.match(href):
|
||||
link.attrib['href'] = url_decode(href, mode=mode)
|
||||
@@ -502,7 +502,7 @@ class ParseTree(object):
|
||||
def count(self, text):
|
||||
'''Returns the number of occurences of 'text' in this tree.'''
|
||||
count = 0
|
||||
- for element in self._etree.getiterator():
|
||||
+ for element in self._etree.iter():
|
||||
if element.text:
|
||||
count += element.text.count(text)
|
||||
if element.tail:
|
||||
@@ -515,7 +515,7 @@ class ParseTree(object):
|
||||
in this tree.
|
||||
'''
|
||||
count = 0
|
||||
- for element in self._etree.getiterator():
|
||||
+ for element in self._etree.iter():
|
||||
if element.text:
|
||||
newstring, n = regex.subn('', element.text)
|
||||
count += n
|
||||
@@ -535,7 +535,7 @@ class ParseTree(object):
|
||||
elif element.tag in ('li', 'h'):
|
||||
return True # implicit newline
|
||||
else:
|
||||
- children = element.getchildren()
|
||||
+ children = list(element)
|
||||
if children:
|
||||
return self._get_element_ends_with_newline(children[-1]) # recurs
|
||||
elif element.text:
|
||||
@@ -586,7 +586,7 @@ class ParseTree(object):
|
||||
@param tag: tag name
|
||||
@returns: yields L{Node} objects
|
||||
'''
|
||||
- for elt in self._etree.getiterator(tag):
|
||||
+ for elt in self._etree.iter(tag):
|
||||
yield Element.new_from_etree(elt)
|
||||
|
||||
def replace(self, tag, func):
|
||||
@@ -932,7 +932,7 @@ class OldParseTreeBuilder(object):
|
||||
if len(self._stack) > 1 and not (
|
||||
tag in (IMAGE, OBJECT, HEADDATA, TABLEDATA)
|
||||
or (self._last.text and not self._last.text.isspace())
|
||||
- or self._last.getchildren()
|
||||
+ or bool(list(self._last))
|
||||
):
|
||||
# purge empty tags
|
||||
if self._last.text and self._last.text.isspace():
|
||||
@@ -940,7 +940,7 @@ class OldParseTreeBuilder(object):
|
||||
|
||||
empty = self._stack.pop()
|
||||
self._stack[-1].remove(empty)
|
||||
- children = self._stack[-1].getchildren()
|
||||
+ children = list(self._stack[-1])
|
||||
if children:
|
||||
self._last = children[-1]
|
||||
if not self._last.tail is None:
|
||||
@@ -1053,7 +1053,7 @@ class OldParseTreeBuilder(object):
|
||||
def _append_to_previous(self, text):
|
||||
'''Add text before current element'''
|
||||
parent = self._stack[-2]
|
||||
- children = parent.getchildren()[:-1]
|
||||
+ children = list(parent)[:-1]
|
||||
if children:
|
||||
if children[-1].tail:
|
||||
children[-1].tail = children[-1].tail + text
|
||||
diff --git a/zim/gui/pageview.py b/zim/gui/pageview.py
|
||||
index 84fe99b4..c2c29cc5 100644
|
||||
--- a/zim/gui/pageview.py
|
||||
+++ b/zim/gui/pageview.py
|
||||
@@ -857,7 +857,7 @@ class TextBuffer(Gtk.TextBuffer):
|
||||
if not iter.starts_line():
|
||||
self.insert_at_cursor('\n')
|
||||
|
||||
- for element in node.getchildren():
|
||||
+ for element in iter(node):
|
||||
if element.tag in ('p', 'div'):
|
||||
# No force line start here on purpose
|
||||
if 'indent' in element.attrib:
|
||||
--
|
||||
2.28.0
|
||||
|
||||
@@ -41,11 +41,6 @@ RESTRICT="test"
|
||||
|
||||
WORK=${WORKBASE}/${PNV/_rc/-rc}
|
||||
|
||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||
"${FILES}"/Fix-reading-preformatted-text-under-Python-3.9.patch
|
||||
"${FILES}"/Replace-usage-of-getchildren-and-getiterator-with-li.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
unset DISPLAY # tries to access X socket
|
||||
}
|
||||
Reference in New Issue
Block a user