forked from pool/scribus
Accepting request 921259 from home:Vogtinator:branches:KDE:Extra
- Add patches to fix build with harfbuzz 3.0.0: * 0001-Use-new-hb-subset-api-with-harfbuzz-2.9.0-in-order-t.patch * 0002-16635-Replace-hb_subset-removed-in-harfbuzz-3.0-by-h.patch - Run dos2unix after applying patches OBS-URL: https://build.opensuse.org/request/show/921259 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/scribus?expand=0&rev=71
This commit is contained in:
parent
42e2ac9561
commit
4d2674d86d
@ -0,0 +1,40 @@
|
||||
From ddf6093991621141a803c33ff7b8d7b8f695b74f Mon Sep 17 00:00:00 2001
|
||||
From: Jean Ghali <jghali@libertysurf.fr>
|
||||
Date: Sat, 21 Aug 2021 20:05:43 +0000
|
||||
Subject: [PATCH 1/2] Use new hb-subset api with harfbuzz >= 2.9.0 in order to
|
||||
prepeare for removal of legacy API in 3.0
|
||||
|
||||
git-svn-id: svn://scribus.net/trunk/Scribus@24696 11d20701-8431-0410-a711-e3c959e3b870
|
||||
(cherry picked from commit 1b546978bc4ea0b2a73fbe4d7cf947887e865162)
|
||||
---
|
||||
scribus/fonts/sfnt.cpp | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scribus/fonts/sfnt.cpp b/scribus/fonts/sfnt.cpp
|
||||
index 50777f66e..fca8b3915 100644
|
||||
--- a/scribus/fonts/sfnt.cpp
|
||||
+++ b/scribus/fonts/sfnt.cpp
|
||||
@@ -1256,11 +1256,19 @@ namespace sfnt {
|
||||
|
||||
for (int i = 0; i < cids.count(); ++i)
|
||||
hb_set_add(glyphSet, cids.at(i));
|
||||
-
|
||||
+
|
||||
+#if HB_VERSION_ATLEAST(2, 9, 0)
|
||||
+ uint32_t subsetFlags = (uint32_t) hb_subset_input_get_flags(hbSubsetInput.get());
|
||||
+ subsetFlags |= HB_SUBSET_FLAGS_RETAIN_GIDS;
|
||||
+ subsetFlags &= ~HB_SUBSET_FLAGS_NO_HINTING;
|
||||
+ subsetFlags |= HB_SUBSET_FLAGS_NAME_LEGACY;
|
||||
+ hb_subset_input_set_flags(hbSubsetInput.get(), subsetFlags);
|
||||
+#else
|
||||
hb_subset_input_set_retain_gids(hbSubsetInput.get(), true);
|
||||
hb_subset_input_set_drop_hints(hbSubsetInput.get(), false);
|
||||
#if HB_VERSION_ATLEAST(2, 6, 5)
|
||||
hb_subset_input_set_name_legacy(hbSubsetInput.get(), true);
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
QScopedPointer<hb_face_t, HbFaceDeleter> hbSubsetFace(hb_subset(hbFullFace.get(), hbSubsetInput.get()));
|
||||
--
|
||||
2.33.0
|
||||
|
@ -0,0 +1,35 @@
|
||||
From df934c5149577bc0ef68657644045115bd9d4995 Mon Sep 17 00:00:00 2001
|
||||
From: Jean Ghali <jghali@libertysurf.fr>
|
||||
Date: Sun, 19 Sep 2021 11:59:50 +0000
|
||||
Subject: [PATCH 2/2] #16635: Replace hb_subset, removed in harfbuzz 3.0, by
|
||||
hb_subset_or_fail
|
||||
|
||||
git-svn-id: svn://scribus.net/trunk/Scribus@24707 11d20701-8431-0410-a711-e3c959e3b870
|
||||
(cherry picked from commit 68ec41169eaceea4a6e1d6f359762a191c7e61d5)
|
||||
---
|
||||
scribus/fonts/sfnt.cpp | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/scribus/fonts/sfnt.cpp b/scribus/fonts/sfnt.cpp
|
||||
index fca8b3915..b3dfa50dc 100644
|
||||
--- a/scribus/fonts/sfnt.cpp
|
||||
+++ b/scribus/fonts/sfnt.cpp
|
||||
@@ -1271,9 +1271,15 @@ namespace sfnt {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#if HB_VERSION_ATLEAST(2, 9, 0)
|
||||
+ QScopedPointer<hb_face_t, HbFaceDeleter> hbSubsetFace(hb_subset_or_fail(hbFullFace.get(), hbSubsetInput.get()));
|
||||
+ if (hbSubsetFace.isNull())
|
||||
+ return QByteArray();
|
||||
+#else
|
||||
QScopedPointer<hb_face_t, HbFaceDeleter> hbSubsetFace(hb_subset(hbFullFace.get(), hbSubsetInput.get()));
|
||||
if (hbSubsetFace.isNull())
|
||||
return QByteArray();
|
||||
+#endif
|
||||
|
||||
QScopedPointer<hb_blob_t, HbBlobDeleter> hbSubsetBlob(hb_face_reference_blob(hbSubsetFace.get()));
|
||||
if (hbSubsetBlob.isNull())
|
||||
--
|
||||
2.33.0
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 24 09:13:39 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Add patches to fix build with harfbuzz 3.0.0:
|
||||
* 0001-Use-new-hb-subset-api-with-harfbuzz-2.9.0-in-order-t.patch
|
||||
* 0002-16635-Replace-hb_subset-removed-in-harfbuzz-3.0-by-h.patch
|
||||
- Run dos2unix after applying patches
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 26 09:23:12 UTC 2021 - Wolfgang Bauer <wbauer@tmo.at>
|
||||
|
||||
|
@ -28,6 +28,9 @@ URL: https://www.scribus.net/
|
||||
Source: %{name}-%{version}.tar.xz
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch0: 0001-Make-sure-information-displayed-on-the-about-window-.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: 0001-Use-new-hb-subset-api-with-harfbuzz-2.9.0-in-order-t.patch
|
||||
Patch2: 0002-16635-Replace-hb_subset-removed-in-harfbuzz-3.0-by-h.patch
|
||||
BuildRequires: cmake >= 3.14.0
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: dos2unix
|
||||
@ -98,13 +101,10 @@ Group: Documentation/HTML
|
||||
This package provides the documentation for Scribus.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
# W: wrong-script-end-of-line-encoding
|
||||
# also required for cherry-picked patches
|
||||
find . -type f \( -iname \*.py -o -iname \*.cpp -o -iname \*.h \) -exec dos2unix {} \;
|
||||
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
# Don't use the %%cmake macro, it causes crashes when starting scribus
|
||||
mkdir build
|
||||
|
Loading…
Reference in New Issue
Block a user