mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
sigil: update to 2.3.1.
This commit is contained in:
parent
c7cffa4240
commit
11f5c06ef6
4 changed files with 112 additions and 28 deletions
|
@ -1,11 +0,0 @@
|
||||||
--- a/src/EmbedPython/EmbeddedPython.cpp
|
|
||||||
+++ b/src/EmbedPython/EmbeddedPython.cpp
|
|
||||||
@@ -480,7 +480,7 @@ QVariant EmbeddedPython::PyObjectToQVari
|
|
||||||
|
|
||||||
if (kind == PyUnicode_1BYTE_KIND) {
|
|
||||||
// latin 1 according to PEP 393
|
|
||||||
- res = QVariant(QString::fromLatin1(reinterpret_cast<const char *>PyUnicode_1BYTE_DATA(po), -1));
|
|
||||||
+ res = QVariant(QString::fromLatin1(reinterpret_cast<const char *>(PyUnicode_1BYTE_DATA(po)), -1));
|
|
||||||
|
|
||||||
} else if (kind == PyUnicode_2BYTE_KIND) {
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
26
srcpkgs/sigil/patches/python_ver.patch
Normal file
26
srcpkgs/sigil/patches/python_ver.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/cmake_extras/FindPythonInterp.cmake b/cmake_extras/FindPythonInterp.cmake
|
||||||
|
index 72af58404..b80321618 100644
|
||||||
|
--- a/cmake_extras/FindPythonInterp.cmake
|
||||||
|
+++ b/cmake_extras/FindPythonInterp.cmake
|
||||||
|
@@ -52,7 +52,7 @@ unset(_Python_NAMES)
|
||||||
|
|
||||||
|
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||||
|
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||||
|
-set(_PYTHON3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||||
|
+set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||||
|
|
||||||
|
if(PythonInterp_FIND_VERSION)
|
||||||
|
if(PythonInterp_FIND_VERSION_COUNT GREATER 1)
|
||||||
|
diff --git a/cmake_extras/FindPythonLibs.cmake b/cmake_extras/FindPythonLibs.cmake
|
||||||
|
index 1cb4307c6..32740efc4 100644
|
||||||
|
--- a/cmake_extras/FindPythonLibs.cmake
|
||||||
|
+++ b/cmake_extras/FindPythonLibs.cmake
|
||||||
|
@@ -84,7 +84,7 @@ set(CMAKE_FIND_FRAMEWORK LAST)
|
||||||
|
|
||||||
|
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||||
|
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||||
|
-set(_PYTHON3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||||
|
+set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||||
|
|
||||||
|
if(PythonLibs_FIND_VERSION)
|
||||||
|
if(PythonLibs_FIND_VERSION_COUNT GREATER 1)
|
73
srcpkgs/sigil/patches/qt_macro.patch
Normal file
73
srcpkgs/sigil/patches/qt_macro.patch
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
From 9b2773e08ba68f3d35c9f58696d8d1b78dd42e26 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Echo J <tcg96nougat@gmail.com>
|
||||||
|
Date: Sat, 19 Oct 2024 19:39:09 +0300
|
||||||
|
Subject: [PATCH 1/2] cmake: Don't set the QT_IMPLICIT_QCHAR_CONSTRUCTION macro
|
||||||
|
|
||||||
|
Qt 6.8 removed it: https://github.com/qt/qtbase/commit/54f2229714358e742fdc30fc1f1cec8acacb1f29
|
||||||
|
(which causes build errors on Arch Linux)
|
||||||
|
---
|
||||||
|
src/qt6sigil.cmake | 4 ----
|
||||||
|
1 file changed, 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qt6sigil.cmake b/src/qt6sigil.cmake
|
||||||
|
index 763b0fff14..dada3378a9 100644
|
||||||
|
--- a/src/qt6sigil.cmake
|
||||||
|
+++ b/src/qt6sigil.cmake
|
||||||
|
@@ -2,10 +2,6 @@
|
||||||
|
# Build Sigil against Qt6 - requires cmake 3.16+ and a C++17 compiler
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
-# quiet Qt 6 deprecat4ed warnings
|
||||||
|
-# add_definitions(-DQT_NO_DEPRECATED_WARNINGS)
|
||||||
|
-add_definitions(-DQT_IMPLICIT_QCHAR_CONSTRUCTION)
|
||||||
|
-
|
||||||
|
if (CMAKE_VERSION VERSION_GREATER "3.27.9")
|
||||||
|
cmake_policy(SET CMP0153 OLD)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
From 08ed327cf220eca9c814ea2a65adace24a4cf3d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Echo J <tcg96nougat@gmail.com>
|
||||||
|
Date: Sat, 19 Oct 2024 19:43:17 +0300
|
||||||
|
Subject: [PATCH 2/2] Parsers: Make QChar conversions explicit
|
||||||
|
|
||||||
|
This is required without the QT_IMPLICIT_QCHAR_CONSTRUCTION macro
|
||||||
|
---
|
||||||
|
src/Parsers/qCSSParser.cpp | 2 +-
|
||||||
|
src/Parsers/qCSSUtils.cpp | 4 ++--
|
||||||
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/Parsers/qCSSParser.cpp b/src/Parsers/qCSSParser.cpp
|
||||||
|
index e54c1b1e22..88b42bedb3 100644
|
||||||
|
--- a/src/Parsers/qCSSParser.cpp
|
||||||
|
+++ b/src/Parsers/qCSSParser.cpp
|
||||||
|
@@ -250,7 +250,7 @@ QString CSSParser::unicode(QString& istring, int& i)
|
||||||
|
(CSSUtils::hexdec(add) > 96 && CSSUtils::hexdec(add) < 123))
|
||||||
|
{
|
||||||
|
QString msg = "Replaced unicode notation: Changed \\" + CSSUtils::rtrim(add) + " to ";
|
||||||
|
- add = static_cast<int>(CSSUtils::hexdec(add));
|
||||||
|
+ add = QChar(static_cast<int>(CSSUtils::hexdec(add)));
|
||||||
|
msg += add;
|
||||||
|
log(msg,Information);
|
||||||
|
replaced = true;
|
||||||
|
diff --git a/src/Parsers/qCSSUtils.cpp b/src/Parsers/qCSSUtils.cpp
|
||||||
|
index d982510e23..b6c6b49579 100644
|
||||||
|
--- a/src/Parsers/qCSSUtils.cpp
|
||||||
|
+++ b/src/Parsers/qCSSUtils.cpp
|
||||||
|
@@ -98,7 +98,7 @@ QChar CSSUtils::s_at(const QString &istring, const int pos)
|
||||||
|
{
|
||||||
|
if(pos > (istring.length()-1) || pos < 0)
|
||||||
|
{
|
||||||
|
- return 0;
|
||||||
|
+ return QChar(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -168,7 +168,7 @@ QString CSSUtils::build_value(const QVector<QString> subvalues)
|
||||||
|
|
||||||
|
bool CSSUtils::ctype_space(const QChar c)
|
||||||
|
{
|
||||||
|
- return (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == 11);
|
||||||
|
+ return (c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == QChar(11));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,26 @@
|
||||||
# Template file for 'sigil'
|
# Template file for 'sigil'
|
||||||
pkgname=sigil
|
pkgname=sigil
|
||||||
version=1.9.10
|
version=2.3.1
|
||||||
revision=4
|
revision=1
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
pycompile_dirs="usr/share/sigil/python3lib"
|
|
||||||
# Can use system zlib, minizip and hunspell; can't use system pcre
|
|
||||||
configure_args="-DUSE_SYSTEM_LIBS=ON"
|
configure_args="-DUSE_SYSTEM_LIBS=ON"
|
||||||
hostmakedepends="pkg-config unzip qt5-qmake"
|
hostmakedepends="pkg-config qt6-tools"
|
||||||
makedepends="zlib-devel qt5-tools-devel qt5-svg-devel
|
makedepends="qt6-base-devel qt6-webengine-devel qt6-svg-devel
|
||||||
qt5-webengine-devel qt5-xmlpatterns-devel qt5-multimedia-devel qt5-sensors-devel
|
python3-devel hunspell-devel pcre2-devel qt6-declarative-devel
|
||||||
qt5-declarative-devel qt5-location-devel qt5-webchannel-devel
|
qt6-base-private-devel minizip-devel"
|
||||||
qt5-plugin-odbc qt5-plugin-mysql qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds
|
|
||||||
boost-devel hunspell-devel python3-devel minizip-devel"
|
|
||||||
depends="desktop-file-utils python3-lxml python3-css-parser python3-PyQt5-webengine"
|
|
||||||
short_desc="Multi-platform EPUB ebook editor"
|
short_desc="Multi-platform EPUB ebook editor"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Emil Tomczyk <emru@emru.xyz>"
|
||||||
license="GPL-3.0-or-later"
|
license="GPL-3.0-or-later"
|
||||||
homepage="https://github.com/Sigil-Ebook/Sigil"
|
homepage="https://github.com/Sigil-Ebook/Sigil"
|
||||||
changelog="https://raw.githubusercontent.com/Sigil-Ebook/Sigil/master/ChangeLog.txt"
|
changelog="https://raw.githubusercontent.com/Sigil-Ebook/Sigil/master/ChangeLog.txt"
|
||||||
distfiles="${homepage}/archive/${version}.tar.gz"
|
distfiles="${homepage}/archive/${version}.tar.gz"
|
||||||
checksum=35b6051d966c2848a8a031ebe691449229b3c95a56145647dc71857acc18fad5
|
checksum=12e84d9a1fc41e60903557ea03801cd0004d8b75dfcebeb44c3a9b1fd8fa97ea
|
||||||
python_version=3
|
python_version=3
|
||||||
|
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
armv5* | armv6* | armv7* | ppc* | riscv64* | i686*) broken="qt6-webengine missing" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
hostmakedepends+=" qt5-host-tools qt5-tools-devel qt5-svg-devel
|
hostmakedepends+=" qt6-base python3-devel"
|
||||||
qt5-webengine-devel qt5-xmlpatterns-devel qt5-multimedia-devel
|
|
||||||
qt5-sensors-devel qt5-declarative-devel qt5-location-devel
|
|
||||||
qt5-webchannel-devel python3-devel"
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue