Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/luajit: luajit.pc: return the path to host-luajit from the Buildroot package
Date: Sun, 1 May 2016 22:59:50 +0200	[thread overview]
Message-ID: <20160501225950.7bdfbbd4@free-electrons.com> (raw)
In-Reply-To: <1462135800-10581-1-git-send-email-romain.naour@gmail.com>

Hello,

On Sun,  1 May 2016 22:50:00 +0200, Romain Naour wrote:
> The luajit.pc file is manually generated in the luajit Makefile, so it give a wrong
> path for host-luajit.
> 
> $ host/usr/bin/pkgconf --cflags luajit
> /usr/include/luajit-2.0
> 
> It should be:
> $ host/usr/bin/pkgconf --cflags luajit
> [...]output/host/usr/include/luajit-2.0
> 
> Add a port install hook to fix luajit.pc for host-luajit.
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>

That's the wrong solution. The proper solution is:

diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
index 623bfcc..81a2660 100644
--- a/package/luajit/luajit.mk
+++ b/package/luajit/luajit.mk
@@ -66,13 +66,13 @@ LUAJIT_POST_INSTALL_TARGET_HOOKS += LUAJIT_INSTALL_SYMLINK
 
 # host-efl package needs host-luajit to be linked dynamically.
 define HOST_LUAJIT_BUILD_CMDS
-       $(MAKE) PREFIX="/usr" BUILDMODE=dynamic \
+       $(MAKE) PREFIX="$(HOST_DIR)/usr" BUILDMODE=dynamic \
                TARGET_LDFLAGS="$(HOST_LDFLAGS)" \
                -C $(@D) amalg
 endef
 
 define HOST_LUAJIT_INSTALL_CMDS
-       $(MAKE) PREFIX="/usr" DESTDIR="$(HOST_DIR)" LDCONFIG=true -C $(@D) install
+       $(MAKE) PREFIX="$(HOST_DIR)/usr" LDCONFIG=true -C $(@D) install
 endef
 
 $(eval $(generic-package))

Indeed, for host packages, the prefix should be $(HOST_DIR)/usr.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

      reply	other threads:[~2016-05-01 20:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-01 20:50 [Buildroot] [PATCH] package/luajit: luajit.pc: return the path to host-luajit from the Buildroot package Romain Naour
2016-05-01 20:59 ` Thomas Petazzoni [this message]

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=20160501225950.7bdfbbd4@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox