7673a6c136ab66e3670919460a87f8887f0ba9b7.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 7673a6c136ab66e3670919460a87f8887f0ba9b7 Mon Sep 17 00:00:00 2001
  2. From: Michael Webster <miketwebster@gmail.com>
  3. Date: Sat, 16 Jul 2022 13:50:21 -0400
  4. Subject: [PATCH] build: Try to find libxdo with pkgconfig, and use
  5. find_library() only if that fails.
  6. Ubuntu/Mint doesn't have a .pc file, so we rely on find_library(),
  7. but this isn't necessarily the case everywhere else.
  8. Bug report to add the pc file to Ubuntu's packaging:
  9. https://bugs.launchpad.net/ubuntu/+source/xdotool/+bug/1981895
  10. ---
  11. meson.build | 10 +++++++++-
  12. 1 file changed, 9 insertions(+), 1 deletion(-)
  13. diff --git a/meson.build b/meson.build
  14. index 02b34ba..3ef0fd0 100644
  15. --- a/meson.build
  16. +++ b/meson.build
  17. @@ -44,7 +44,15 @@ x11 = dependency('x11')
  18. xext = dependency('xext')
  19. xrandr = dependency('xrandr', required: false)
  20. m = cc.find_library('m')
  21. -xdo = cc.find_library('xdo')
  22. +
  23. +xdo = dependency('libxdo', required: false)
  24. +if not xdo.found()
  25. + xdo = cc.find_library('xdo')
  26. + if not xdo.found()
  27. + error('could not find usable xdo library (libxdo')
  28. + endif
  29. +endif
  30. +
  31. dbus_services_dir = dependency('dbus-1').get_pkgconfig_variable('session_bus_services_dir', define_variable: ['datadir', datadir])
  32. # check for symbols and headers