All of lore.kernel.org
 help / color / mirror / Atom feed
From: yegorslists at googlemail.com <yegorslists@googlemail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/3] libffi: fix headers location for host-libffi
Date: Tue,  5 Jan 2016 08:17:22 +0100	[thread overview]
Message-ID: <1451978244-15878-2-git-send-email-yegorslists@googlemail.com> (raw)
In-Reply-To: <1451978244-15878-1-git-send-email-yegorslists@googlemail.com>

From: Yegor Yefremov <yegorslists@googlemail.com>

There is a special hook for target-libffi, that moves headers
from /usr/lib/libffi-version/include to /usr/include. This patch
adds the same procedure for host-libffi.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 package/libffi/libffi.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/package/libffi/libffi.mk b/package/libffi/libffi.mk
index 8f0f72d..47de8cd 100644
--- a/package/libffi/libffi.mk
+++ b/package/libffi/libffi.mk
@@ -22,6 +22,17 @@ endef
 
 LIBFFI_POST_INSTALL_STAGING_HOOKS += LIBFFI_MOVE_STAGING_HEADERS
 
+# Move the headers to the usual location, and adjust the .pc file
+# accordingly.
+define HOST_LIBFFI_MOVE_HOST_HEADERS
+	mv $(HOST_DIR)/usr/lib/libffi-$(LIBFFI_VERSION)/include/*.h $(HOST_DIR)/usr/include/
+	$(SED) '/^includedir.*/d' -e '/^Cflags:.*/d' \
+		$(HOST_DIR)/usr/lib/pkgconfig/libffi.pc
+	rm -rf $(HOST_DIR)/usr/lib/libffi-*
+endef
+
+HOST_LIBFFI_POST_INSTALL_HOOKS += HOST_LIBFFI_MOVE_HOST_HEADERS
+
 # Remove headers that are not at the usual location from the target
 define LIBFFI_REMOVE_TARGET_HEADERS
 	$(RM) -rf $(TARGET_DIR)/usr/lib/libffi-$(LIBFFI_VERSION)
-- 
2.1.4

  reply	other threads:[~2016-01-05  7:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05  7:17 [Buildroot] [PATCH v2 0/3] CFFI backend yegorslists at googlemail.com
2016-01-05  7:17 ` yegorslists at googlemail.com [this message]
2016-02-03 21:54   ` [Buildroot] [PATCH v2 1/3] libffi: fix headers location for host-libffi Thomas Petazzoni
2016-01-05  7:17 ` [Buildroot] [PATCH v2 2/3] python-pycparser: new package yegorslists at googlemail.com
2016-02-03 21:54   ` Thomas Petazzoni
2016-01-05  7:17 ` [Buildroot] [PATCH v2 3/3] python-cffi: add host variant yegorslists at googlemail.com
2016-01-05 15:40   ` Yegor Yefremov
2016-01-05 15:45     ` Yegor Yefremov
2016-02-03 22:00   ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1451978244-15878-2-git-send-email-yegorslists@googlemail.com \
    --to=yegorslists@googlemail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.