From: André Draszik <adras...@tycoint.com> Backport a patch that fixes out-of-tree builds, and at the same time switch to using autotools.bbclass rather than autotools-brokensep.bbclass
Signed-off-by: André Draszik <adras...@tycoint.com> --- .../0001-build-allow-out-of-tree-builds.patch | 57 ++++++++++++++++++++++ recipes-core/swupd-client/swupd-client_git.bb | 5 +- 2 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 recipes-core/swupd-client/swupd-client/0001-build-allow-out-of-tree-builds.patch diff --git a/recipes-core/swupd-client/swupd-client/0001-build-allow-out-of-tree-builds.patch b/recipes-core/swupd-client/swupd-client/0001-build-allow-out-of-tree-builds.patch new file mode 100644 index 0000000..ae7b8e0 --- /dev/null +++ b/recipes-core/swupd-client/swupd-client/0001-build-allow-out-of-tree-builds.patch @@ -0,0 +1,57 @@ +From aab90416caac1c581f0de6814b5e43491407bce4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <g...@andred.net> +Date: Wed, 16 Nov 2016 10:55:23 +0000 +Subject: [PATCH] build: allow out of tree builds +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When doing out-of-tree builds, the distributed +scripts are in different directory than where +the build is happening. This doesn't work: + + make install-exec-hook + make[2]: Entering directory '<builddir>' + perl scripts/findstatic.pl */*.o | grep -v Checking ||: + Can't open perl script "scripts/findstatic.pl": No such file or directory + make[2]: Leaving directory '<builddir>' + +We therefore need to give perl the full path +of the perl-script to run using the standard +automake variable top_srcdir: + + make install-exec-hook + make[2]: Entering directory '<builddir>' + perl ../../../../../../../../tmp/swupd-client.git/scripts/findstatic.pl */*.o | grep -v Checking ||: + 'bin_paths' is unique to src/search.o, should be static? (initialised variable) + 'do_search' is unique to src/search.o, should be static? (function) + 'download_manifests' is unique to src/search.o, should be static? (function) + 'file_search' is unique to src/search.o, should be static? (function) + 'lib_paths' is unique to src/search.o, should be static? (initialised variable) + 'report_find' is unique to src/search.o, should be static? (function) + 'scope' is unique to src/search.o, should be static? (initialised variable) + 'search_type' is unique to src/search.o, should be static? (initialised variable) + make[2]: Leaving directory '<builddir>' + +Signed-off-by: André Draszik <g...@andred.net> +--- +Upstream-Status: Backport [https://github.com/clearlinux/swupd-client/commit/b89d002a7d0f168354d9138207943b62138aa70a] + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index d485e00..f1a5b72 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -126,7 +126,7 @@ distclean-local: + rm -rf aclocal.m4 ar-lib autom4te.cache config.guess config.h.in config.h.in~ config.sub configure depcomp install-sh ltmain.sh m4 Makefile.in missing compile + + install-exec-hook: +- perl scripts/findstatic.pl */*.o | grep -v Checking ||: ++ perl $(top_srcdir)/scripts/findstatic.pl */*.o | grep -v Checking ||: + + + TEST_EXTENSIONS = .bats +-- +2.10.2 + diff --git a/recipes-core/swupd-client/swupd-client_git.bb b/recipes-core/swupd-client/swupd-client_git.bb index 8df89a1..fd4716f 100644 --- a/recipes-core/swupd-client/swupd-client_git.bb +++ b/recipes-core/swupd-client/swupd-client_git.bb @@ -11,6 +11,7 @@ SRC_URI = "\ file://Change-systemctl-path-to-OE-systemctl-path.patch \ file://0001-Add-configure-option-to-re-enable-updating-of-config.patch \ file://Make-pinned-pubkey-configurable.patch \ + file://0001-build-allow-out-of-tree-builds.patch \ " SRCREV = "f4000c5b22be47ec1af2f8748fd71a36148b5dc4" @@ -20,9 +21,7 @@ RDEPENDS_${PN}_append_class-target = " oe-swupd-helpers bsdtar" # We check /etc/os-release for the current OS version number RRECOMMENDS_${PN}_class-target = "os-release" -# TODO: we inherit autotools-brokensep because the Makefile calls a perl script -# in ${S} during one of its steps. -inherit pkgconfig autotools-brokensep systemd +inherit pkgconfig autotools systemd EXTRA_OECONF = "\ --with-systemdsystemunitdir=${systemd_system_unitdir} \ -- 2.10.2 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto