aboutsummaryrefslogtreecommitdiff
path: root/imv
diff options
context:
space:
mode:
Diffstat (limited to 'imv')
-rw-r--r--imv/abuild28
-rw-r--r--imv/muon.patch39
2 files changed, 67 insertions, 0 deletions
diff --git a/imv/abuild b/imv/abuild
index ae335c52..40543783 100644
--- a/imv/abuild
+++ b/imv/abuild
@@ -3,3 +3,31 @@ version=5.0.1
release=1
source="imv-${version}.tar.gz::https://git.sr.ht/~exec64/${name}/archive/v${version}.tar.gz"
build_opt="-Dwindows=wayland"
+
+prebuild() {
+ sed -i '/^ wl_mod = import/,/^ ]/c\
+ # muon compatibility: generate protocol files without external module\
+ wayland_protocols_dep = dependency('\''wayland-protocols'\'')\
+ wayland_protocols_datadir = wayland_protocols_dep.get_pkgconfig_variable('\''pkgdatadir'\'')\
+ wayland_scanner = find_program('\''wayland-scanner'\'')\
+\
+ gen_client_header = generator(wayland_scanner,\
+ output: '\''@BASENAME@-client-protocol.h'\'',\
+ arguments: ['\''client-header'\'', '\''@INPUT@'\'', '\''@OUTPUT@'\''])\
+ gen_private_code = generator(wayland_scanner,\
+ output: '\''@BASENAME@-protocol.c'\'',\
+ arguments: ['\''private-code'\'', '\''@INPUT@'\'', '\''@OUTPUT@'\''])\
+\
+ xdg_shell_xml = join_paths(wayland_protocols_datadir, '\''stable/xdg-shell/xdg-shell.xml'\'')\
+ xdg_shell_client_h = gen_client_header.process(xdg_shell_xml)\
+ xdg_shell_code = gen_private_code.process(xdg_shell_xml)\
+\
+ pointer_gestures_xml = join_paths(wayland_protocols_datadir, '\''unstable/pointer-gestures/pointer-gestures-unstable-v1.xml'\'')\
+ pointer_gestures_client_h = gen_client_header.process(pointer_gestures_xml)\
+ pointer_gestures_code = gen_private_code.process(pointer_gestures_xml)\
+\
+ targets_wayland = [\
+ xdg_shell_client_h, xdg_shell_code,\
+ pointer_gestures_client_h, pointer_gestures_code,\
+ ]' meson.build
+}
diff --git a/imv/muon.patch b/imv/muon.patch
new file mode 100644
index 00000000..8ee2f35d
--- /dev/null
+++ b/imv/muon.patch
@@ -0,0 +1,39 @@
+--- a/meson.build
++++ b/meson.build
+@@ -98,11 +98,28 @@ if build_wayland
+ cc.find_library('rt'),
+ ]
+
+- wl_mod = import('unstable-wayland')
+- targets_wayland = [
+- wl_mod.scan_xml(wl_mod.find_protocol('xdg-shell')),
+- wl_mod.scan_xml(wl_mod.find_protocol(
+- 'pointer-gestures',
+- state: 'unstable',
+- version: 1,
+- )),
+- ]
++ # muon compatibility: generate protocol files without external module
++ wayland_protocols_dep = dependency('wayland-protocols')
++ wayland_protocols_datadir = wayland_protocols_dep.get_pkgconfig_variable('pkgdatadir')
++ wayland_scanner = find_program('wayland-scanner')
++
++ gen_client_header = generator(wayland_scanner,
++ output: '@BASENAME@-client-protocol.h',
++ arguments: ['client-header', '@INPUT@', '@OUTPUT@'])
++ gen_private_code = generator(wayland_scanner,
++ output: '@BASENAME@-protocol.c',
++ arguments: ['private-code', '@INPUT@', '@OUTPUT@'])
++
++ xdg_shell_xml = join_paths(wayland_protocols_datadir, 'stable/xdg-shell/xdg-shell.xml')
++ xdg_shell_client_h = gen_client_header.process(xdg_shell_xml)
++ xdg_shell_code = gen_private_code.process(xdg_shell_xml)
++
++ pointer_gestures_xml = join_paths(wayland_protocols_datadir, 'unstable/pointer-gestures/pointer-gestures-unstable-v1.xml')
++ pointer_gestures_client_h = gen_client_header.process(pointer_gestures_xml)
++ pointer_gestures_code = gen_private_code.process(pointer_gestures_xml)
++
++ targets_wayland = [
++ xdg_shell_client_h, xdg_shell_code,
++ pointer_gestures_client_h, pointer_gestures_code,
++ ]