summaryrefslogtreecommitdiff
path: root/src/haiku
diff options
context:
space:
mode:
authorFrançois Revol <revol@free.fr>2019-03-26 23:13:54 +0100
committerMax Kellermann <max@musicpd.org>2019-03-29 14:32:59 +0100
commitcde93480099454b46cc5398c4f1cd4bd4b44062a (patch)
treeaf62707a2fbce0d46751d8568fa6061e50ad1669 /src/haiku
parent095e6e6ad4808650a5bc6fe0a969de3c491353bc (diff)
Haiku: fix adding resources
The custom_command was run in src/haiku/ and created a file with only resources inside. Since xres edits the file in-place and meson doesn't like it, we have to run a shell script for now. Maybe later I'll add proper support in meson.
Diffstat (limited to 'src/haiku')
-rwxr-xr-xsrc/haiku/add_resources.sh3
-rw-r--r--src/haiku/meson.build9
2 files changed, 4 insertions, 8 deletions
diff --git a/src/haiku/add_resources.sh b/src/haiku/add_resources.sh
new file mode 100755
index 000000000..3303233f2
--- /dev/null
+++ b/src/haiku/add_resources.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+cp "$2" "$1" && xres -o "$1" -- "$3" && mimeset -f "$1" || (rm -f "$1"; exit 1)
diff --git a/src/haiku/meson.build b/src/haiku/meson.build
index 7fa0fc108..ff321d60e 100644
--- a/src/haiku/meson.build
+++ b/src/haiku/meson.build
@@ -8,11 +8,4 @@ rsrc = custom_target(
command: [rc, '-o', '@OUTPUT@', '@INPUT@'],
)
-custom_target(
- 'mpd.xres',
- output: 'mpd',
- input: [mpd, rsrc],
- command: [xres, '-o', '@OUTPUT@', '--', '@INPUT@'],
- install: true,
- install_dir: get_option('bindir'),
-)
+addres = files('add_resources.sh')