diff mbox

[i-g-t] meson: Add fallback for xmlrpc discovery

Message ID 20171017121331.15720-1-arkadiusz.hiler@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arkadiusz Hiler Oct. 17, 2017, 12:13 p.m. UTC
Since Debian-likes (including Ubuntu) ship xmlrpc packages predating the
pkg-config era, we need to use xmlrpc-c-config to do the discovery.

Also this patch adds HAVE_CHAMELIUM flag to config.h to get rid of
"implicit declaration of function" warnings in case of meson build.

Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 meson.build | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Arkadiusz Hiler Oct. 17, 2017, 1:15 p.m. UTC | #1
On Tue, Oct 17, 2017 at 12:42:18PM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: meson: Add fallback for xmlrpc discovery
> URL   : https://patchwork.freedesktop.org/series/32128/
> State : failure
> 
> == Summary ==
> 
> IGT patchset tested on top of latest successful build
> 6853f8bad8ce5770d28a621a7e15449930d56d9f lib/i915: Extract context priority setparam to a helper
> 
> with latest DRM-Tip kernel build CI_DRM_3253
> 920fa3252916 drm-tip: 2017y-10m-17d-09h-45m-06s UTC integration manifest
> 
> No testlist changes.
> 
> Test gem_exec_reloc:
>         Subgroup basic-cpu-active:
>                 pass       -> FAIL       (fi-gdg-551) fdo#102582 +1
>         Subgroup basic-write-cpu-active:
>                 pass       -> FAIL       (fi-gdg-551)
> Test kms_cursor_legacy:
>         Subgroup basic-flip-after-cursor-varying-size:
>                 skip       -> PASS       (fi-hsw-4770r)

This means that change in the meson build, which we don't use for CI
yet, haven't broken autotools compilation. Everything went as expected.

This random flakiness of tests also proved beneficial, as it saved us
from an unnecessary sharded run being scheduled :-)
diff mbox

Patch

diff --git a/meson.build b/meson.build
index 310174a5..ac991c2f 100644
--- a/meson.build
+++ b/meson.build
@@ -69,9 +69,22 @@  xmlrpc = dependency('xmlrpc', required : false)
 xmlrpc_util = dependency('xmlrpc_util', required : false)
 xmlrpc_client = dependency('xmlrpc_client', required : false)
 
+if not xmlrpc.found()
+	libs_cmd = run_command('xmlrpc-c-config', 'client', '--libs')
+	cflags_cmd = run_command('xmlrpc-c-config', 'client', '--cflags')
+
+	if libs_cmd.returncode() == 0 and cflags_cmd.returncode() == 0
+		xmlrpc = declare_dependency(compile_args: cflags_cmd.stdout().strip().split(),
+					   link_args : libs_cmd.stdout().strip().split())
+		xmlrpc_util = declare_dependency()
+		xmlrpc_client = declare_dependency()
+	endif
+endif
+
 if pixman.found() and xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found()
 	chamelium = declare_dependency(dependencies : [ pixman, xmlrpc,
 	  xmlrpc_util, xmlrpc_client])
+	config.set('HAVE_CHAMELIUM', 1)
 else
 	chamelium = dependency('', required: false)
 endif