media-libs/harfbuzz: fux current stable against gcc-9
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 9 Nov 2019 15:49:20 +0000 (15:49 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 9 Nov 2019 15:49:43 +0000 (15:49 +0000)
Fix build failure on gcc-9. It's a slightly less invasive
version of upstream's commit 2dce85ed06a8cc7ca
("[icu] Remove HB_ICU_STMT (#1993)")

Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
media-libs/harfbuzz/files/harfbuzz-2.6.1-gcc-9.patch [new file with mode: 0644]
media-libs/harfbuzz/harfbuzz-2.6.1.ebuild

diff --git a/media-libs/harfbuzz/files/harfbuzz-2.6.1-gcc-9.patch b/media-libs/harfbuzz/files/harfbuzz-2.6.1-gcc-9.patch
new file mode 100644 (file)
index 0000000..c16fedd
--- /dev/null
@@ -0,0 +1,14 @@
+Fix build failure on gcc-9. It's a slightly less invasive
+version of upstream's commit 2dce85ed06a8cc7ca
+("[icu] Remove HB_ICU_STMT (#1993)")
+--- a/src/hb-icu.cc
++++ b/src/hb-icu.cc
+@@ -53,7 +53,7 @@
+ /* ICU doesn't do-while(0) around their statements.  Ugh!
+  * https://unicode-org.atlassian.net/browse/CLDR-13027 */
+-#define HB_ICU_STMT(S) do { S } while (0)
++#define HB_ICU_STMT(S) do { S; } while (0)
+ hb_script_t
+ hb_icu_script_to_script (UScriptCode script)
index d8eb3a9c8943e231e283fcc5033745b90f770227..87e7095493c9f20bf84bdca1d93b378088ddc294 100644 (file)
@@ -48,6 +48,10 @@ if [[ ${PV} = 9999 ]] ; then
        "
 fi
 
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc-9.patch
+)
+
 pkg_setup() {
        use test && python-any-r1_pkg_setup
        if ! use debug ; then