$NetBSD: patch-meson.build,v 1.25 2025/06/03 11:05:06 jperkin Exp $ - On Darwin, optionally use Cocoa (needed for X11 users). - Don't insist that Python binary is called "python3". (Requires meson >= 0.50.0) - Don't install bash completion scripts. - Tolerate getxattr not existing (smartOS) https://gitlab.gnome.org/GNOME/glib/merge_requests/888 - Check also for sys/ptrace.h header file. - Explicitly avoid epoll on SunOS. --- meson.build.orig 2025-05-20 16:22:25.000000000 +0000 +++ meson.build @@ -438,6 +438,7 @@ headers = [ 'sys/mount.h', 'sys/param.h', 'sys/prctl.h', + 'sys/ptrace.h', 'sys/resource.h', 'sys/select.h', 'sys/statfs.h', @@ -700,7 +701,6 @@ functions = [ 'copy_file_range', 'endmntent', 'endservent', - 'epoll_create1', 'faccessat', 'fallocate', 'fchmod', @@ -764,6 +764,10 @@ functions = [ 'sysctlbyname', ] +if host_system != 'sunos' + functions += ['epoll_create1'] +endif + # _NSGetEnviron is available on iOS too, but its usage gets apps rejected from # the app store since it's considered 'private API' if host_system == 'darwin' @@ -1010,7 +1014,7 @@ if host_system == 'darwin' #error "Detected GNUstep, not Cocoa" #endif''', name : 'Mac OS X Cocoa support') - + glib_have_cocoa = glib_have_cocoa and get_option('use_cocoa') if glib_have_cocoa glib_conf.set('HAVE_COCOA', true) osx_ldflags += ['-Wl,-framework,Foundation', '-Wl,-framework,AppKit'] @@ -2379,18 +2383,17 @@ if host_system != 'windows' and get_opti # try glibc if cc.has_function('getxattr') and cc.has_header('sys/xattr.h') + glib_conf.set('HAVE_XATTR', 1) glib_conf.set('HAVE_SYS_XATTR_H', 1) glib_conf_prefix = glib_conf_prefix + '#define @0@ 1\n'.format('HAVE_SYS_XATTR_H') #failure. try libattr elif cc.has_header_symbol('attr/xattr.h', 'getxattr') + glib_conf.set('HAVE_XATTR', 1) glib_conf.set('HAVE_ATTR_XATTR_H', 1) glib_conf_prefix = glib_conf_prefix + '#define @0@ 1\n'.format('HAVE_ATTR_XATTR_H') xattr_dep = [cc.find_library('xattr')] - else - error('No getxattr implementation found in C library or libxattr') endif - glib_conf.set('HAVE_XATTR', 1) if cc.compiles(glib_conf_prefix + ''' #include #ifdef HAVE_SYS_TYPES_H @@ -2491,7 +2494,7 @@ endif glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline) -python = import('python').find_installation() +python = import('python').find_installation('@PYTHONBIN@') # Sets the shebang on script files. This has been changed many times including # using env, the absolute path to the Python executable, and using both python @@ -2510,7 +2513,7 @@ python_test_libraries_built = meson.proj # Determine which user environment-dependent files that we want to install bash = find_program('bash', required : false) -have_bash = bash.found() # For completion scripts +have_bash = false bash_comp_dep = dependency('bash-completion', version: '>=2.0', required: false) have_sh = find_program('sh', required : false).found() # For glib-gettextize have_pkg_config = find_program('pkg-config', required: false).found()