Skip to content

Commit

Permalink
gtk4: fix older systems
Browse files Browse the repository at this point in the history
gtk4 can't Werror on missing declarations, because GLIB defines
macros to nothing based on compiler support, etc.

legacysupport is needed for missing defines, at least
  • Loading branch information
kencu committed Nov 3, 2022
1 parent c587ced commit d8f5d9e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gnome/gtk4/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
PortSystem 1.0
PortGroup meson 1.0
PortGroup active_variants 1.1
#PortGroup legacysupport 1.1
PortGroup legacysupport 1.1

# O_CLOEXEC
legacysupport.newest_darwin_requires_legacy 10

name gtk4
#conflicts gtk4-devel
Expand Down Expand Up @@ -67,6 +69,8 @@ patchfiles-append patch-docs-rst2man.diff

patchfiles-append patch-testsuite-python.diff

patchfiles-append patch-meson-dont-werror-on-missing-declarations.diff

post-patch {
reinplace "s|@@PYTHON_VERSION@@|${python_branch}|" \
${worksrcpath}/docs/reference/gtk/meson.build \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
GLIB uses the technique of defining the macro to nothing
if it can't be used on a given compiler. But having this
defined to nothing generates a Werror, so that can't work.

--- meson.build.orig 2022-11-02 00:37:51.000000000 -0700
+++ meson.build 2022-11-02 00:38:13.000000000 -0700
@@ -306,7 +306,6 @@
'int-to-pointer-cast',
'main',
'missing-braces',
- 'missing-declarations',
'missing-prototypes',
'nonnull',
'pointer-to-int-cast',

0 comments on commit d8f5d9e

Please sign in to comment.