xserver: Branch 'master' - 6 commits
Adam Jackson
ajax at kemper.freedesktop.org
Wed May 10 18:57:35 UTC 2017
dri3/meson.build | 15 ++++--
hw/xfree86/dri/meson.build | 2
hw/xfree86/dri2/meson.build | 2
hw/xfree86/drivers/modesetting/meson.build | 2
hw/xfree86/meson.build | 6 +-
hw/xfree86/os-support/meson.build | 2
include/meson.build | 6 +-
meson.build | 63 ++++++++++++++++++++++-------
meson_options.txt | 4 +
9 files changed, 72 insertions(+), 30 deletions(-)
New commits:
commit e67ca940473e249c7b9712ce6d515310ed1e4cf9
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Mon May 8 11:40:22 2017 +0100
meson: An empty array is not a dependency object
Using the meson idiom of initializing a variaible to an empty array to
represent a null value does not work well for a variable expected to hold a
dependency object, as trying to apply found() to it will fail (currently).
I think this can be demonstrated by configuing with Dglamor=no, then gbm_dep
is set to [] in meson.build, and then tested with found() in
include/meson.build.
Use dependency('') to create an empty dependency.
Future work: In the autotools build GBM is required if build_xorg &
build_glamor. I suspect that it was also required for build_xwayland &
build_glamor, but that was never checked. That test seems to have gone
missing in meson.build, the required:false when checking for gbm should
possibly be dropped?
Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
Reviewed-by: Eric Anholt <eric at anholt.net>
diff --git a/meson.build b/meson.build
index 0a14de4dd..dab3d4423 100644
--- a/meson.build
+++ b/meson.build
@@ -177,7 +177,7 @@ endif
build_dbus = build_hal or build_systemd_logind
-udev_dep = []
+udev_dep = dependency('', required:false)
if build_udev
udev_dep = dependency('libudev', version: '>= 143')
endif
@@ -198,7 +198,7 @@ else
build_glamor = get_option('glamor') == 'yes'
endif
-gbm_dep = []
+gbm_dep = dependency('', required:false)
if build_glamor
gbm_dep = dependency('gbm', version: '>= 10.2', required: false)
if gbm_dep.found()
commit 16054647abfc9fe5f71d0098e17415e45fa28199
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Mon May 8 11:40:21 2017 +0100
meson: Refine build_dbus
As in autotools build, only turn on build_dbus (build dbus-core.c) if it's
needed by build_hal or build_systemd_logind, not just because dbus is
available.
Building dbus-core.c without NEED_DBUS defined fails, as the contents of
dbus-core.h are turned off.
Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
Acked-by: Eric Anholt <eric at anholt.net>
diff --git a/meson.build b/meson.build
index 4baf96365..0a14de4dd 100644
--- a/meson.build
+++ b/meson.build
@@ -72,10 +72,8 @@ if host_machine.system() == 'windows'
hal_option = 'no'
endif
-build_dbus = dbus_dep.found()
-
if get_option('systemd_logind') == 'auto'
- build_systemd_logind = build_udev and build_dbus
+ build_systemd_logind = build_udev and dbus_dep.found()
else
build_systemd_logind = get_option('systemd_logind') == 'yes'
endif
@@ -177,6 +175,8 @@ if build_udev and build_hal
error('Hotplugging through both libudev and hal not allowed')
endif
+build_dbus = build_hal or build_systemd_logind
+
udev_dep = []
if build_udev
udev_dep = dependency('libudev', version: '>= 143')
commit 820a4cbe9fef36bc97a7107ccc74a785180e227a
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Tue May 9 12:23:48 2017 +0100
meson: Make driprotos and libdrm optional
Add options for DRI{1,2,3}
shmfence is required for DRI3
libdrm is required for any DRI{1,2,3}
Consolidate calls to dependency('libdrm')
Set WITH_LIBDRM when building with libdrm
v2:
Initialize libxserver_dri3 to []
Manually flatten libxserver, since meson doesn't (currently)
Use version_compare rather than circumloctions with dependency()
Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
Reviewed-by: Eric Anholt <eric at anholt.net>
diff --git a/dri3/meson.build b/dri3/meson.build
index abb13c63a..3d05020e6 100644
--- a/dri3/meson.build
+++ b/dri3/meson.build
@@ -4,9 +4,12 @@ srcs_dri3 = [
'dri3_screen.c',
]
-libxserver_dri3 = static_library('libxserver_dri3',
- srcs_dri3,
- include_directories: inc,
- dependencies: common_dep,
- c_args: '-DHAVE_XORG_CONFIG_H'
-)
+libxserver_dri3 = []
+if build_dri3
+ libxserver_dri3 = static_library('libxserver_dri3',
+ srcs_dri3,
+ include_directories: inc,
+ dependencies: common_dep,
+ c_args: '-DHAVE_XORG_CONFIG_H'
+ )
+endif
diff --git a/hw/xfree86/dri/meson.build b/hw/xfree86/dri/meson.build
index 9baae100c..53d1e4f26 100644
--- a/hw/xfree86/dri/meson.build
+++ b/hw/xfree86/dri/meson.build
@@ -8,7 +8,7 @@ xorg_dri = static_library('xorg_dri',
include_directories: [inc, xorg_inc],
dependencies: [
common_dep,
- dependency('libdrm'),
+ libdrm_dep,
],
c_args: xorg_c_args,
)
diff --git a/hw/xfree86/dri2/meson.build b/hw/xfree86/dri2/meson.build
index 9e997d2f7..087a21131 100644
--- a/hw/xfree86/dri2/meson.build
+++ b/hw/xfree86/dri2/meson.build
@@ -8,7 +8,7 @@ xorg_dri2 = static_library('xorg_dri2',
include_directories: [inc, xorg_inc],
dependencies: [
common_dep,
- dependency('libdrm'),
+ libdrm_dep,
],
c_args: xorg_c_args,
)
diff --git a/hw/xfree86/drivers/modesetting/meson.build b/hw/xfree86/drivers/modesetting/meson.build
index 518d6c19e..e97dac36d 100644
--- a/hw/xfree86/drivers/modesetting/meson.build
+++ b/hw/xfree86/drivers/modesetting/meson.build
@@ -18,7 +18,7 @@ shared_module(
dependencies: [
common_dep,
udev_dep,
- dependency('libdrm', version: '>= 2.4.46'),
+ libdrm_dep,
],
install: true,
diff --git a/hw/xfree86/meson.build b/hw/xfree86/meson.build
index 22de2fdd6..5360c22b9 100644
--- a/hw/xfree86/meson.build
+++ b/hw/xfree86/meson.build
@@ -57,7 +57,9 @@ endif
if build_vgahw
subdir('vgahw')
endif
-subdir('drivers/modesetting')
+if build_modesetting
+ subdir('drivers/modesetting')
+endif
srcs_xorg = [
'../../mi/miinitext.c'
@@ -106,7 +108,7 @@ executable(
xfont2_dep,
xshmfence_dep,
config_dep,
- dependency('libdrm'),
+ libdrm_dep,
],
link_args: '-Wl,--export-dynamic',
c_args: xorg_c_args,
diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build
index a3c3b5688..e48944761 100644
--- a/hw/xfree86/os-support/meson.build
+++ b/hw/xfree86/os-support/meson.build
@@ -117,7 +117,7 @@ xorg_os_support = static_library('xorg_os_support',
dependencies: [
common_dep,
dbus_dep,
- dependency('libdrm'),
+ libdrm_dep,
],
c_args: xorg_c_args,
)
diff --git a/include/meson.build b/include/meson.build
index b7414bd67..a95cd7a19 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -61,8 +61,8 @@ conf_data.set_quoted('SHMDIR', '/tmp')
conf_data.set('HAVE_SIGACTION', '1') # XXX
conf_data.set('BUSFAULT', '1') # XXX
-conf_data.set('XSHMFENCE', '1') # XXX
-conf_data.set('WITH_LIBDRM', '1') # XXX
+conf_data.set('XSHMFENCE', xshmfence_dep.found())
+conf_data.set('WITH_LIBDRM', libdrm_dep.found())
conf_data.set('GLAMOR_HAS_DRM_NAME_FROM_FD_2',
dependency('libdrm', version: '>= 2.4.74', required: false).found())
conf_data.set('GLXEXT', build_glx)
diff --git a/meson.build b/meson.build
index df0d3aefa..4baf96365 100644
--- a/meson.build
+++ b/meson.build
@@ -32,16 +32,16 @@ compositeproto_dep = dependency('compositeproto', version: '>= 0.4')
recordproto_dep = dependency('recordproto', version: '>= 1.13.99.1')
scrnsaverproto_dep = dependency('scrnsaverproto', version: '>= 1.1')
resourceproto_dep = dependency('resourceproto', version: '>= 1.2.0')
-xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0')
-dri2proto_dep = dependency('dri2proto', version: '>= 2.8')
-dri3proto_dep = dependency('dri3proto', version: '>= 1.0')
+xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0', required: get_option('dri1') == 'yes')
+dri2proto_dep = dependency('dri2proto', version: '>= 2.8', required: get_option('dri2') == 'yes')
+dri3proto_dep = dependency('dri3proto', version: '>= 1.0', required: get_option('dri3') == 'yes')
xineramaproto_dep = dependency('xineramaproto')
xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0')
xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: false)
xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1', required: false)
windowswmproto_dep = dependency('windowswmproto', required: false)
applewmproto_dep = dependency('applewmproto', version: '>= 1.4', required: false)
-xshmfence_dep = dependency('xshmfence', version: '>= 1.1')
+xshmfence_dep = dependency('xshmfence', version: '>= 1.1', required: false)
pixman_dep = dependency('pixman-1')
libbsd_dep = dependency('libbsd', required: false)
@@ -216,12 +216,44 @@ endif
build_glx = get_option('glx')
+if get_option('dri1') == 'auto'
+ build_dri1 = xf86driproto_dep.found()
+else
+ build_dri1 = get_option('dri1') == 'yes'
+endif
+
+if get_option('dri2') == 'auto'
+ build_dri2 = dri2proto_dep.found()
+else
+ build_dri2 = get_option('dri2') == 'yes'
+endif
+
+if get_option('dri3') == 'auto'
+ build_dri3 = dri3proto_dep.found() and xshmfence_dep.found()
+else
+ build_dri3 = get_option('dri3') == 'yes'
+ if build_dri3
+ if not xshmfence_dep.found()
+ error('DRI3 requested, but xshmfence not found')
+ endif
+ endif
+endif
+
+libdrm_required = (get_option('dri1') == 'yes') or (get_option('dri2') == 'yes') or (get_option('dri3') == 'yes')
+libdrm_dep = dependency('libdrm', version: '>= 2.3.1', required: libdrm_required)
+build_modesetting = false
+if libdrm_dep.found()
+ if build_dri2
+ # 2.4.65 is required for drmGetDevice
+ dependency('libdrm', version: '>= 2.4.65')
+ endif
+ # 2.4.46 is required for cursor hotspot support.
+ build_modesetting = libdrm_dep.version().version_compare('>= 2.4.46')
+endif
+
# XXX: Allow configuration of these.
build_apm = false
build_acpi = false
-build_dri1 = true
-build_dri2 = true
-build_dri3 = true
build_dpms = true
build_mitshm = true
build_res = true
@@ -346,7 +378,6 @@ libxserver = [
libxserver_composite,
libxserver_damageext,
libxserver_dbe,
- libxserver_dri3,
libxserver_randr,
libxserver_miext_damage,
libxserver_render,
@@ -361,4 +392,6 @@ libxserver = [
libxserver_os,
]
+libxserver += libxserver_dri3
+
subdir('hw')
diff --git a/meson_options.txt b/meson_options.txt
index a5d7de6f4..88423e25e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -44,3 +44,7 @@ option('hal', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
description: 'Enable HAL integration')
option('systemd_logind', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
description: 'Enable systemd-logind integration')
+
+option('dri1', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)')
+option('dri2', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)')
+option('dri3', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Build DRI3 extension (default: auto)')
commit fdb11e2274f1d1069cdc9ff7b3655288c1b42cf4
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Mon May 8 11:40:18 2017 +0100
meson: Don't require xf86dgaproto
This dependency is never used, and build_dga is hardwired to false later on,
anyhow.
Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
diff --git a/meson.build b/meson.build
index 401b4064d..df0d3aefa 100644
--- a/meson.build
+++ b/meson.build
@@ -37,7 +37,7 @@ dri2proto_dep = dependency('dri2proto', version: '>= 2.8')
dri3proto_dep = dependency('dri3proto', version: '>= 1.0')
xineramaproto_dep = dependency('xineramaproto')
xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0')
-xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1')
+xf86dgaproto_dep = dependency('xf86dgaproto', version: '>= 2.0.99.1', required: false)
xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1', required: false)
windowswmproto_dep = dependency('windowswmproto', required: false)
applewmproto_dep = dependency('applewmproto', version: '>= 1.4', required: false)
commit 5bff2a68560837fc402905fef6244ce794c47843
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Mon May 8 11:40:17 2017 +0100
meson: Nettle is required if it's the only SHA1 choice
Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
diff --git a/meson.build b/meson.build
index 0a57ad24b..401b4064d 100644
--- a/meson.build
+++ b/meson.build
@@ -47,7 +47,7 @@ pixman_dep = dependency('pixman-1')
libbsd_dep = dependency('libbsd', required: false)
xkbfile_dep = dependency('xkbfile')
xfont2_dep = dependency('xfont2', version: '>= 2.0')
-nettle_dep = dependency('nettle', required: false)
+nettle_dep = dependency('nettle')
dbus_required = get_option('systemd_logind') == 'yes'
dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required)
commit 95e5fa04762fa0f04ac1349708d9e33c30205a96
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date: Mon May 8 11:40:16 2017 +0100
meson: Remove stray whitespace
Reviewed-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
diff --git a/include/meson.build b/include/meson.build
index 761f158d7..b7414bd67 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -163,7 +163,7 @@ conf_data.set('XDMCP', get_option('xdmcp'))
conf_data.set('XF86BIGFONT', build_xf86bigfont)
conf_data.set('XF86DRI', build_dri1)
conf_data.set('XF86VIDMODE', build_xf86vidmode)
-conf_data.set('XFIXES ', '1')
+conf_data.set('XFIXES', '1')
conf_data.set('XINERAMA', build_xinerama)
conf_data.set('XINPUT', '1')
conf_data.set('XRECORD', '1')
More information about the xorg-commit
mailing list