From 0a529b6bc56a3c0b0633949773ea0d3bbe8d5d40 Mon Sep 17 00:00:00 2001 From: barracuda156 Date: Sun, 12 May 2024 13:14:55 +0800 Subject: [PATCH] totem-pl-parser: fix build on older systems --- gnome/totem-pl-parser/Portfile | 11 ++++++++++- gnome/totem-pl-parser/files/patch-fix-gcc-build.diff | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 gnome/totem-pl-parser/files/patch-fix-gcc-build.diff diff --git a/gnome/totem-pl-parser/Portfile b/gnome/totem-pl-parser/Portfile index b4fe5940c2d83..319cf31b0167c 100644 --- a/gnome/totem-pl-parser/Portfile +++ b/gnome/totem-pl-parser/Portfile @@ -15,7 +15,6 @@ long_description totem-pl-parser is a simple GObject-based library to parse \ a host of playlist formats, as well as save those homepage https://gitlab.gnome.org/GNOME/${name} -platforms darwin master_sites gnome:sources/${name}/${branch}/ use_xz yes @@ -41,6 +40,16 @@ configure.args -Denable-libarchive=yes \ -Denable-uchardet=yes \ -Denable-gtk-doc=true +# /usr/include/unistd.h: error: redundant redeclaration of ‘_Exit’ etc. +compiler.blacklist-append \ + *gcc-4.0 *gcc-4.2 + +# error: 'ret' may be used uninitialized [-Werror=maybe-uninitialized] +if {[string match *gcc* ${configure.compiler}]} { + patchfiles-append \ + patch-fix-gcc-build.diff +} + # uses g-ir-scanner, which uses $CC from env if {${universal_possible} && [variant_isset universal]} { foreach arch ${configure.universal_archs} { diff --git a/gnome/totem-pl-parser/files/patch-fix-gcc-build.diff b/gnome/totem-pl-parser/files/patch-fix-gcc-build.diff new file mode 100644 index 0000000000000..a8ffe0626c3aa --- /dev/null +++ b/gnome/totem-pl-parser/files/patch-fix-gcc-build.diff @@ -0,0 +1,10 @@ +--- meson.build 2021-06-25 20:17:41.000000000 +0800 ++++ meson.build 2024-05-12 13:11:07.000000000 +0800 +@@ -123,7 +123,6 @@ + '-Werror=pointer-to-int-cast', + '-Werror=empty-body', + '-Werror=write-strings', +- '-Werror=maybe-uninitialized', + ] + else + test_cflags = []