* [Buildroot] [PATCH] package/luajit: luajit.pc: return the path to host-luajit from the Buildroot package
@ 2016-05-01 20:50 Romain Naour
2016-05-01 20:59 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Romain Naour @ 2016-05-01 20:50 UTC (permalink / raw)
To: buildroot
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>
---
package/luajit/luajit.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk
index 623bfcc..0aab04d 100644
--- a/package/luajit/luajit.mk
+++ b/package/luajit/luajit.mk
@@ -75,5 +75,11 @@ define HOST_LUAJIT_INSTALL_CMDS
$(MAKE) PREFIX="/usr" DESTDIR="$(HOST_DIR)" LDCONFIG=true -C $(@D) install
endef
+define HOST_LUAJIT_FIX_PC_FILE
+ sed -i -e "s|^prefix=.*|prefix=$(HOST_DIR)/usr|" $(HOST_DIR)/usr/lib/pkgconfig/luajit.pc
+endef
+
+HOST_LUAJIT_POST_INSTALL_HOOKS = HOST_LUAJIT_FIX_PC_FILE
+
$(eval $(generic-package))
$(eval $(host-generic-package))
--
2.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] package/luajit: luajit.pc: return the path to host-luajit from the Buildroot package
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
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-05-01 20:59 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-01 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox