xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 8 10:41:42 UTC 2024


 hw/xfree86/drivers/modesetting/meson.build |    2 +-
 hw/xwayland/meson.build                    |   21 +++++++++------------
 hw/xwin/glx/meson.build                    |    4 ++--
 include/meson.build                        |    2 +-
 meson.build                                |   29 +++++++++++++++--------------
 test/meson.build                           |    8 ++++----
 6 files changed, 32 insertions(+), 34 deletions(-)

New commits:
commit 7fdef970c441f4dc65c0c3a84c953d405a6413d3
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Mon Oct 23 17:39:33 2023 +0200

    build: Switch to meson 0.56
    
    And replace the deprecated meson API accordingly.
    
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>

diff --git a/hw/xfree86/drivers/modesetting/meson.build b/hw/xfree86/drivers/modesetting/meson.build
index 02852a716..acb37b48d 100644
--- a/hw/xfree86/drivers/modesetting/meson.build
+++ b/hw/xfree86/drivers/modesetting/meson.build
@@ -27,7 +27,7 @@ shared_module(
 )
 
 # Test that we don't have any unresolved symbols from our module to Xorg.
-xorg_build_root = join_paths(meson.build_root(), 'hw', 'xfree86')
+xorg_build_root = join_paths(meson.project_build_root(), 'hw', 'xfree86')
 symbol_test_args = []
 symbol_test_args += join_paths(xorg_build_root, 'libxorgserver.so')
 symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libshadow.so')
diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build
index 1106627a9..748c40c15 100644
--- a/hw/xwayland/meson.build
+++ b/hw/xwayland/meson.build
@@ -30,10 +30,10 @@ srcs = [
 ]
 
 scanner_dep = dependency('wayland-scanner', native: true)
-scanner = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
+scanner = find_program(scanner_dep.get_variable(pkgconfig : 'wayland_scanner'))
 
 protocols_dep = dependency('wayland-protocols', version: wayland_protocols_req)
-protodir = protocols_dep.get_pkgconfig_variable('pkgdatadir')
+protodir = protocols_dep.get_variable(pkgconfig : 'pkgdatadir')
 
 pointer_xml = join_paths(protodir, 'unstable', 'pointer-constraints', 'pointer-constraints-unstable-v1.xml')
 relative_xml = join_paths(protodir, 'unstable', 'relative-pointer', 'relative-pointer-unstable-v1.xml')
@@ -111,7 +111,7 @@ if build_glamor
                 ]
     endif
     if build_eglstream
-        eglstream_protodir = eglstream_dep.get_pkgconfig_variable('pkgdatadir')
+        eglstream_protodir = eglstream_dep.get_variable(pkgconfig : 'pkgdatadir')
         eglstream_xml = join_paths(eglstream_protodir, 'wayland-eglstream.xml')
         eglstream_controller_xml = join_paths(eglstream_protodir, 'wayland-eglstream-controller.xml')
 
@@ -210,12 +210,9 @@ datadir = join_paths(get_option('prefix'), get_option('datadir'))
 desktopdir = join_paths(datadir, 'applications')
 install_data('desktop/org.freedesktop.Xwayland.desktop', install_dir : desktopdir)
 
-if meson.version().version_compare('>= 0.56.0')
-    meson.override_find_program('Xwayland', xwayland_server)
-
-    meson.override_dependency('xwayland', declare_dependency(
-        variables: [
-            'xwayland=' + xwayland_server.full_path(),
-        ] + xwayland_vars,
-    ))
-endif
+meson.override_find_program('Xwayland', xwayland_server)
+meson.override_dependency('xwayland', declare_dependency(
+    variables: [
+        'xwayland=' + xwayland_server.full_path(),
+    ] + xwayland_vars,
+))
diff --git a/hw/xwin/glx/meson.build b/hw/xwin/glx/meson.build
index 95f248953..70f426ff1 100644
--- a/hw/xwin/glx/meson.build
+++ b/hw/xwin/glx/meson.build
@@ -2,11 +2,11 @@ python3 = import('python3')
 
 # XWin requires OpenGL spec files in order to generate wrapper code for native GL functions
 py3 = python3.find_python()
-if run_command(py3, '-c', 'import lxml;').returncode() != 0
+if run_command(py3, '-c', 'import lxml;', check: false).returncode() != 0
     error('python3 lxml module not found')
 endif
 
-khronos_spec_dir = dependency('khronos-opengl-registry').get_pkgconfig_variable('specdir')
+khronos_spec_dir = dependency('khronos-opengl-registry').get_variable(pkgconfig : 'specdir')
 
 gen_gl_wrappers_opts= ['-nodebug']
 gen_gl_wrappers_cmd = ['env', 'PYTHONPATH=' + khronos_spec_dir, py3, files('./gen_gl_wrappers.py'), gen_gl_wrappers_opts]
diff --git a/include/meson.build b/include/meson.build
index 58107a79e..236b95363 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -212,7 +212,7 @@ conf_data.set('DPMSExtension', build_dpms ? '1' : false)
 conf_data.set('DRI2', build_dri2 ? '1' : false)
 conf_data.set('DRI3', build_dri3 ? '1' : false)
 if build_glx
-    conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir'))
+    conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_variable(pkgconfig : 'dridriverdir'))
 endif
 conf_data.set('HAS_SHM', build_mitshm ? '1' : false)
 conf_data.set('MITSHM', build_mitshm ? '1' : false)
diff --git a/meson.build b/meson.build
index 5f8136cae..1de3e2a4f 100644
--- a/meson.build
+++ b/meson.build
@@ -4,7 +4,7 @@ project('xserver', 'c',
             'c_std=gnu99',
         ],
         version: '21.1.99.1',
-        meson_version: '>= 0.52.0',
+        meson_version: '>= 0.56.0',
 )
 release_date = '2021-07-05'
 
@@ -120,7 +120,7 @@ build_hashtable = false
 xkb_dir = get_option('xkb_dir')
 if xkb_dir == ''
     if xkbcomp_dep.found() and xkbcomp_dep.type_name() == 'pkgconfig'
-        xkb_dir = xkbcomp_dep.get_pkgconfig_variable('xkbconfigdir')
+        xkb_dir = xkbcomp_dep.get_variable(pkgconfig : 'xkbconfigdir')
     endif
     if xkb_dir == ''
         xkb_dir = join_paths(get_option('prefix'), 'share/X11/xkb')
@@ -135,7 +135,7 @@ endif
 xkb_bin_dir = get_option('xkb_bin_dir')
 if xkb_bin_dir == ''
     if xkbcomp_dep.found() and xkbcomp_dep.type_name() == 'pkgconfig'
-        xkb_bin_dir = xkbcomp_dep.get_pkgconfig_variable('bindir')
+        xkb_bin_dir = xkbcomp_dep.get_variable(pkgconfig : 'bindir')
     endif
     if xkb_bin_dir == ''
         xkb_bin_dir = join_paths(get_option('prefix'), get_option('bindir'))
@@ -148,7 +148,7 @@ if dfp == ''
     if fontrootdir == ''
         fontutil_dep = dependency('fontutil', required: false)
         if fontutil_dep.found()
-            fontrootdir = fontutil_dep.get_pkgconfig_variable('fontrootdir')
+            fontrootdir = fontutil_dep.get_variable(pkgconfig : 'fontrootdir')
         else
             fontrootdir = join_paths(get_option('prefix'), get_option('datadir'), 'fonts', 'X11')
         endif
@@ -753,24 +753,21 @@ build_docs_pdf = (get_option('docs-pdf') != 'false' and
     fop.found())
 
 if build_docs or build_docs_devel
-    doc_sgml_path = sgml_doctools_dep.get_pkgconfig_variable('sgmlrootdir')
+    doc_sgml_path = sgml_doctools_dep.get_variable(pkgconfig : 'sgmlrootdir')
     doc_stylesheet_srcdir = join_paths(doc_sgml_path, 'X11')
 
-    # once we bump meson dependency to 0.56.0 we can use
-    # meson.project_build_root() instead of meson.build_root()
-
     # Meson does not and will not support functions so we are copy-pasting
     # documentation build code around which is unfortunate
     # See https://mesonbuild.com/FAQ.html#why-doesnt-meson-have-user-defined-functionsmacros
 
     docs_xmlto_search_flags = [
         '--searchpath', doc_stylesheet_srcdir,
-        '--searchpath', meson.build_root(),
+        '--searchpath', meson.project_build_root(),
     ]
 
     docs_xslt_search_flags = [
         '--path', doc_stylesheet_srcdir,
-        '--path', meson.build_root(),
+        '--path', meson.project_build_root(),
     ]
 endif
 
@@ -867,25 +864,29 @@ if build_xorg
     sdkconfig.set('abi_ansic',
         run_command(awk, '-F', '[(,)]',
                     '/^#define ABI_ANSIC.*SET/ { printf "%d.%d", $2, $3 }',
-                    files('hw/xfree86/common/xf86Module.h')
+                    files('hw/xfree86/common/xf86Module.h'),
+                    check: false
         ).stdout()
     )
     sdkconfig.set('abi_videodrv',
         run_command(awk, '-F', '[(,)]',
                     '/^#define ABI_VIDEODRV.*SET/ { printf "%d.%d", $2, $3 }',
-                    files('hw/xfree86/common/xf86Module.h')
+                    files('hw/xfree86/common/xf86Module.h'),
+                    check: false
         ).stdout()
     )
     sdkconfig.set('abi_xinput',
         run_command(awk, '-F', '[(,)]',
                     '/^#define ABI_XINPUT.*SET/ { printf "%d.%d", $2, $3 }',
-                    files('hw/xfree86/common/xf86Module.h')
+                    files('hw/xfree86/common/xf86Module.h'),
+                    check: false
         ).stdout()
     )
     sdkconfig.set('abi_extension',
         run_command(awk, '-F', '[(,)]',
                     '/^#define ABI_EXTENSION.*SET/ { printf "%d.%d", $2, $3 }',
-                    files('hw/xfree86/common/xf86Module.h')
+                    files('hw/xfree86/common/xf86Module.h'),
+                    check: false
         ).stdout()
     )
 
diff --git a/test/meson.build b/test/meson.build
index 4d36f5778..7f4befa88 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -5,12 +5,12 @@ simple_xinit = executable(
 )
 
 piglit_env = environment()
-piglit_env.set('XSERVER_DIR', meson.source_root())
-piglit_env.set('XSERVER_BUILDDIR', meson.build_root())
+piglit_env.set('XSERVER_DIR', meson.project_source_root())
+piglit_env.set('XSERVER_BUILDDIR', meson.project_build_root())
 
 gles20_env = environment()
-gles20_env.set('XSERVER_DIR', meson.source_root())
-gles20_env.set('XSERVER_BUILDDIR', meson.build_root())
+gles20_env.set('XSERVER_DIR', meson.project_source_root())
+gles20_env.set('XSERVER_BUILDDIR', meson.project_build_root())
 gles20_env.set('MESA_GLES_VERSION_OVERRIDE', '2.0')
 
 some_ops = ' -o clear,src,dst,over,xor,disjointover'


More information about the xorg-commit mailing list