-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0.0: meson fails on Linux with Dependency "gtk-mac-integration" not found
#3649
Comments
This appears as if you explicitly enabled it somehow using What is the last |
It was + /usr/bin/meson setup --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled
. x86_64-redhat-linux-gnu -D api-docs=enabled -D gtkdoc=true -D html-docs=enabled -D pdf-docs=disabled -D plugins=true -D socket=true -D vte=true
The Meson build system
Version: 1.2.3
Source dir: /home/tkloczko/rpmbuild/BUILD/geany-2.0.0
Build dir: /home/tkloczko/rpmbuild/BUILD/geany-2.0.0/x86_64-redhat-linux-gnu
Build type: native build
Project name: geany
Project version: 2.0.0
C compiler for the host machine: /usr/bin/gcc (gcc 13.2.1 "gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4)")
C linker for the host machine: /usr/bin/gcc ld.bfd 2.41-7
C++ compiler for the host machine: /usr/bin/g++ (gcc 13.2.1 "g++ (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4)")
C++ linker for the host machine: /usr/bin/g++ ld.bfd 2.41-7
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (2.0.3)
Run-time dependency glib-2.0 found: YES 2.78.0
Run-time dependency gmodule-2.0 found: YES 2.78.0
Run-time dependency gtk+-3.0 found: YES 3.24.38
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency gtk-mac-integration found: NO (tried pkgconfig) Even with |
Sounds reasonable to me; and Would something like this work? diff --git a/meson.build b/meson.build
index 5c7bc0a04..e5b55aebe 100644
--- a/meson.build
+++ b/meson.build
@@ -23,9 +23,6 @@ foreach dep : deps_in
deps_for_pc += ' ' + dep[0] + ' >= ' + dep[1]
endforeach
-dep_mac_integration = dependency('gtk-mac-integration', version: '>= 3.0.1',
- required: get_option('mac-integration'))
-
glib = deps[0]
# detect libc
@@ -741,6 +738,17 @@ if (host_machine.system() == 'windows')
endforeach
endif
+osx_src = []
+osx_deps = []
+if host_machine.system() == 'darwin'
+ dep_mac_integration = dependency('gtk-mac-integration', version: '>= 3.0.1',
+ required: get_option('mac-integration'))
+ if dep_mac_integration.found()
+ osx_src += ['src/osx.c', 'src/osx.h']
+ osx_deps += [dep_mac_integration]
+ endif
+endif
+
install_headers(
'plugins/geanyfunctions.h',
'plugins/geanyplugin.h',
@@ -857,12 +865,12 @@ libgeany = shared_library('geany',
'src/utils.h',
gen_src,
win_src,
- dep_mac_integration.found() ? ['src/osx.c', 'src/osx.h'] : [],
+ osx_src,
host_machine.system() == 'windows' ? ['src/win32.c', 'src/win32.h'] : [ 'src/vte.c', 'src/vte.h' ],
soversion: '0',
c_args: geany_cflags + [ '-DG_LOG_DOMAIN="Geany"' ],
include_directories: [iscintilla],
- dependencies: [dep_tagmanager, dep_ctags, dep_scintilla, dep_mac_integration] + deps + win_deps,
+ dependencies: [dep_tagmanager, dep_ctags, dep_scintilla] + deps + win_deps + osx_deps,
install: true
)
dep_libgeany = declare_dependency( |
@b4n Thanks! Just tested and it fixes the problem on linux and does the right thing on macOS too. So I think you can just commit the patch to master. |
@techee thanks for the test! Committed, as well as 2 additional small improvements, that nobody else tested, so I have a chance to have introduced a big stupid error 😄 |
I think that by default MAC dependencies should not be checked on non-MAC systems.
The text was updated successfully, but these errors were encountered: