summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-01-13 23:40:42 -0500
committerIonen Wolkens <ionen@gentoo.org>2022-01-13 23:47:53 -0500
commit5bdb78c3f0f4d0513b9aa448b0466d347ef39ef0 (patch)
treeb2688000da31f1afec7dbc71205d615cb462f93e /app-office/scribus
parentx11-terms/alacritty: drop 0.10.0_rc3 (diff)
downloadgentoo-5bdb78c3f0f4d0513b9aa448b0466d347ef39ef0.tar.gz
gentoo-5bdb78c3f0f4d0513b9aa448b0466d347ef39ef0.tar.bz2
gentoo-5bdb78c3f0f4d0513b9aa448b0466d347ef39ef0.zip
app-office/scribus: backport upstream fix for USE=osg with CPP17
Fixes: 40fd326c118a7eb8ed87a62559dfa9b1266aba97 Closes: https://bugs.gentoo.org/831161 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'app-office/scribus')
-rw-r--r--app-office/scribus/files/scribus-1.5.7-osg-cpp17.patch219
-rw-r--r--app-office/scribus/scribus-1.5.7.ebuild1
2 files changed, 220 insertions, 0 deletions
diff --git a/app-office/scribus/files/scribus-1.5.7-osg-cpp17.patch b/app-office/scribus/files/scribus-1.5.7-osg-cpp17.patch
new file mode 100644
index 000000000000..21f0c00554d2
--- /dev/null
+++ b/app-office/scribus/files/scribus-1.5.7-osg-cpp17.patch
@@ -0,0 +1,219 @@
+https://bugs.gentoo.org/831161
+Backport of https://github.com/scribusproject/scribus/commit/80405ce
+
+From: Jean Ghali <jghali@libertysurf.fr>
+Date: Mon, 10 Jan 2022 20:38:51 +0000
+Subject: [PATCH] Rename byte() to to_byte() in order to avoid potential
+ conflict with std::byte in c++17 mode
+--- a/scribus/third_party/prc/oPRCFile.cc
++++ b/scribus/third_party/prc/oPRCFile.cc
+@@ -76,3 +76,3 @@
+ // Map [0,1] to [0,255]
+-inline uint8_t byte(double r)
++inline uint8_t to_byte(double r)
+ {
+@@ -451,5 +451,5 @@
+ {
+- tess->rgba_vertices.push_back(byte(lit->color.red));
+- tess->rgba_vertices.push_back(byte(lit->color.green));
+- tess->rgba_vertices.push_back(byte(lit->color.blue));
++ tess->rgba_vertices.push_back(to_byte(lit->color.red));
++ tess->rgba_vertices.push_back(to_byte(lit->color.green));
++ tess->rgba_vertices.push_back(to_byte(lit->color.blue));
+ }
+@@ -595,19 +595,19 @@
+ {
+- tessFace->rgba_vertices.push_back(byte(C[1].R));
+- tessFace->rgba_vertices.push_back(byte(C[1].G));
+- tessFace->rgba_vertices.push_back(byte(C[1].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[1].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[1].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[1].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[1].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[1].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[2].R));
+- tessFace->rgba_vertices.push_back(byte(C[2].G));
+- tessFace->rgba_vertices.push_back(byte(C[2].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[2].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[2].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[2].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[2].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[2].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[3].R));
+- tessFace->rgba_vertices.push_back(byte(C[3].G));
+- tessFace->rgba_vertices.push_back(byte(C[3].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[3].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].A));
+ }
+@@ -622,19 +622,19 @@
+ {
+- tessFace->rgba_vertices.push_back(byte(C[0].R));
+- tessFace->rgba_vertices.push_back(byte(C[0].G));
+- tessFace->rgba_vertices.push_back(byte(C[0].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[0].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[0].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[0].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[0].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[0].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[2].R));
+- tessFace->rgba_vertices.push_back(byte(C[2].G));
+- tessFace->rgba_vertices.push_back(byte(C[2].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[2].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[2].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[2].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[2].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[2].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[3].R));
+- tessFace->rgba_vertices.push_back(byte(C[3].G));
+- tessFace->rgba_vertices.push_back(byte(C[3].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[3].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].A));
+ }
+@@ -646,19 +646,19 @@
+ {
+- tessFace->rgba_vertices.push_back(byte(C[3].R));
+- tessFace->rgba_vertices.push_back(byte(C[3].G));
+- tessFace->rgba_vertices.push_back(byte(C[3].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[3].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[3].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[1].R));
+- tessFace->rgba_vertices.push_back(byte(C[1].G));
+- tessFace->rgba_vertices.push_back(byte(C[1].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[1].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[1].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[1].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[1].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[1].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[0].R));
+- tessFace->rgba_vertices.push_back(byte(C[0].G));
+- tessFace->rgba_vertices.push_back(byte(C[0].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[0].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[0].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[0].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[0].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[0].A));
+ }
+@@ -1650,17 +1650,17 @@
+ {
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][0]].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][0]].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][0]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][0]].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][2]].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][2]].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][2]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][2]].A));
+ }
+@@ -1794,33 +1794,33 @@
+ // first triangle
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][0]].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][0]].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][0]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][0]].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][3]].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][3]].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][3]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][3]].A));
+ // second triangle
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][1]].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][2]].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][2]].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][2]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].B));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][2]].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][3]].R));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][3]].G));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][3]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].A));
++ tessFace->rgba_vertices.push_back(to_byte(C[CI[i][3]].A));
+ }
+@@ -1912,7 +1912,7 @@
+ {
+- tess->rgba_vertices.push_back(byte(C[CI[i]].R));
+- tess->rgba_vertices.push_back(byte(C[CI[i]].G));
+- tess->rgba_vertices.push_back(byte(C[CI[i]].B));
++ tess->rgba_vertices.push_back(to_byte(C[CI[i]].R));
++ tess->rgba_vertices.push_back(to_byte(C[CI[i]].G));
++ tess->rgba_vertices.push_back(to_byte(C[CI[i]].B));
+ if(tess->is_rgba)
+- tess->rgba_vertices.push_back(byte(C[CI[i]].A));
++ tess->rgba_vertices.push_back(to_byte(C[CI[i]].A));
+ }
diff --git a/app-office/scribus/scribus-1.5.7.ebuild b/app-office/scribus/scribus-1.5.7.ebuild
index 5f63eeb1aa19..2d3e677154da 100644
--- a/app-office/scribus/scribus-1.5.7.ebuild
+++ b/app-office/scribus/scribus-1.5.7.ebuild
@@ -78,6 +78,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.5.6-findhyphen.patch
# upstream
"${FILESDIR}"/${PN}-1.5.8-harfbuzz-3.patch
+ "${FILESDIR}"/${PN}-1.5.7-osg-cpp17.patch
)
CMAKE_BUILD_TYPE="Release"