mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-04 06:10:16 +03:00
lua: refactor with a common template lua.pc.in
lua.pc is generated from a common template in the build step. install steps are restored like in BR 2017.05 Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
08aa81768e
commit
a4b8299df3
@@ -73,6 +73,8 @@ define LUA_BUILD_CMDS
|
||||
MYLDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
BUILDMODE=$(LUA_BUILDMODE) \
|
||||
PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all
|
||||
sed -e "s/@VERSION@/$(LUA_VERSION)/;s/@ABI@/$(LUAINTERPRETER_ABIVER)/;s/@MYLIBS@/$(LUA_MYLIBS)/" \
|
||||
package/lua/lua.pc.in > $(@D)/lua.pc
|
||||
endef
|
||||
|
||||
define HOST_LUA_BUILD_CMDS
|
||||
@@ -82,13 +84,14 @@ define HOST_LUA_BUILD_CMDS
|
||||
MYLIBS="$(HOST_LUA_MYLIBS)" \
|
||||
BUILDMODE=static \
|
||||
PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all
|
||||
sed -e "s/@VERSION@/$(LUA_VERSION)/;s/@ABI@/$(LUAINTERPRETER_ABIVER)/;s/@MYLIBS@/$(HOST_LUA_MYLIBS)/" \
|
||||
package/lua/lua.pc.in > $(@D)/lua.pc
|
||||
endef
|
||||
|
||||
define LUA_INSTALL_STAGING_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) INSTALL_TOP="$(STAGING_DIR)/usr" -C $(@D) install
|
||||
mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig/
|
||||
sed -e "s/@MYLIBS@/$(LUA_MYLIBS)/g" $(@D)/etc/lua.pc \
|
||||
> $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc
|
||||
$(INSTALL) -m 0644 -D $(@D)/lua.pc \
|
||||
$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc
|
||||
endef
|
||||
|
||||
define LUA_INSTALL_TARGET_CMDS
|
||||
@@ -97,9 +100,8 @@ endef
|
||||
|
||||
define HOST_LUA_INSTALL_CMDS
|
||||
$(HOST_MAKE_ENV) $(MAKE) INSTALL_TOP="$(HOST_DIR)" -C $(@D) install
|
||||
mkdir -p $(HOST_DIR)/lib/pkgconfig/
|
||||
sed -e "s/@MYLIBS@/$(HOST_LUA_MYLIBS)/g" $(@D)/etc/lua.pc \
|
||||
> $(HOST_DIR)/lib/pkgconfig/lua.pc
|
||||
$(INSTALL) -m 0644 -D $(@D)/lua.pc \
|
||||
$(HOST_DIR)/lib/pkgconfig/lua.pc
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
||||
Reference in New Issue
Block a user