summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/pi-blaster/files/0001-handle-install-data-hook-when-cross-compile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/pi-blaster/files/0001-handle-install-data-hook-when-cross-compile.patch')
-rw-r--r--recipes-devtools/pi-blaster/files/0001-handle-install-data-hook-when-cross-compile.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/recipes-devtools/pi-blaster/files/0001-handle-install-data-hook-when-cross-compile.patch b/recipes-devtools/pi-blaster/files/0001-handle-install-data-hook-when-cross-compile.patch
new file mode 100644
index 0000000..2f2a7f4
--- /dev/null
+++ b/recipes-devtools/pi-blaster/files/0001-handle-install-data-hook-when-cross-compile.patch
@@ -0,0 +1,54 @@
1From 28e4bc3216f8845cf278f0fbc6b2c30eebcc35aa Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
3Date: Sun, 7 Jun 2015 17:17:01 +0200
4Subject: [PATCH] handle install-data-hook when cross compile
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Avoid doing 'install-data-hook' when cross compiling since it isn't
10suitable to update rc.d or run the service when cross
11compiling.
12
13Upstream-Status: Pending
14
15Signed-off-by: Petter Mabäcker <petter@technux.se>
16---
17 Makefile.am | 4 +++-
18 configure.ac | 1 +
19 2 files changed, 4 insertions(+), 1 deletion(-)
20
21diff --git a/Makefile.am b/Makefile.am
22index 6693d46..935288f 100644
23--- a/Makefile.am
24+++ b/Makefile.am
25@@ -13,6 +13,7 @@ else
26 init_ddir = $(sysconfdir)/init.d
27 init_d_SCRIPTS = pi-blaster.boot.sh
28
29+if !CROSS_COMPILING
30 install-data-hook:
31 update-rc.d pi-blaster.boot.sh defaults
32 $(init_ddir)/pi-blaster.boot.sh start
33@@ -20,4 +21,5 @@ install-data-hook:
34 uninstall-hook:
35 update-rc.d pi-blaster.boot.sh remove
36 killall pi-blaster
37-endif
38+endif # !CROSS_COMPILING
39+endif # !HAVE_SYSTEMD
40diff --git a/configure.ac b/configure.ac
41index 5d0c1fa..aaf4465 100644
42--- a/configure.ac
43+++ b/configure.ac
44@@ -23,6 +23,7 @@ if test "x$with_systemdsystemunitdir" != xno; then
45 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
46 fi
47 AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
48+AM_CONDITIONAL(CROSS_COMPILING, [test x"$cross_compiling" = x"yes" ])
49
50 # Checks for programs.
51 AC_PROG_CC
52--
531.9.1
54