From: Rafał Miłecki <ra...@milecki.pl> This will allow adding packages for new Lua releases cleanly. At the same time it doesn't break existing packages thanks to the PROVIDES.
Signed-off-by: Rafał Miłecki <ra...@milecki.pl> --- V2: Update /install sections to make packages work actually --- package/utils/{lua => lua5.1}/Makefile | 62 ++++++++++--------- .../001-include-version-number.patch | 0 .../010-lua-5.1.3-lnum-full-260308.patch | 0 .../patches-host/011-lnum-use-double.patch | 0 ...2-lnum-fix-ltle-relational-operators.patch | 0 .../013-lnum-strtoul-parsing-fixes.patch | 0 .../patches-host/015-lnum-ppc-compat.patch | 0 .../030-archindependent-bytecode.patch | 0 .../patches-host/100-no_readline.patch | 0 .../patches/001-include-version-number.patch | 0 .../010-lua-5.1.3-lnum-full-260308.patch | 0 .../patches/011-lnum-use-double.patch | 0 ...2-lnum-fix-ltle-relational-operators.patch | 0 .../013-lnum-strtoul-parsing-fixes.patch | 0 .../patches/015-lnum-ppc-compat.patch | 0 .../patches/020-shared_liblua.patch | 0 .../030-archindependent-bytecode.patch | 0 .../patches/040-use-symbolic-functions.patch | 0 .../patches/050-honor-cflags.patch | 0 .../patches/100-no_readline.patch | 0 .../patches/200-lua-path.patch | 0 .../patches/300-opcode_performance.patch | 0 22 files changed, 32 insertions(+), 30 deletions(-) rename package/utils/{lua => lua5.1}/Makefile (77%) rename package/utils/{lua => lua5.1}/patches-host/001-include-version-number.patch (100%) rename package/utils/{lua => lua5.1}/patches-host/010-lua-5.1.3-lnum-full-260308.patch (100%) rename package/utils/{lua => lua5.1}/patches-host/011-lnum-use-double.patch (100%) rename package/utils/{lua => lua5.1}/patches-host/012-lnum-fix-ltle-relational-operators.patch (100%) rename package/utils/{lua => lua5.1}/patches-host/013-lnum-strtoul-parsing-fixes.patch (100%) rename package/utils/{lua => lua5.1}/patches-host/015-lnum-ppc-compat.patch (100%) rename package/utils/{lua => lua5.1}/patches-host/030-archindependent-bytecode.patch (100%) rename package/utils/{lua => lua5.1}/patches-host/100-no_readline.patch (100%) rename package/utils/{lua => lua5.1}/patches/001-include-version-number.patch (100%) rename package/utils/{lua => lua5.1}/patches/010-lua-5.1.3-lnum-full-260308.patch (100%) rename package/utils/{lua => lua5.1}/patches/011-lnum-use-double.patch (100%) rename package/utils/{lua => lua5.1}/patches/012-lnum-fix-ltle-relational-operators.patch (100%) rename package/utils/{lua => lua5.1}/patches/013-lnum-strtoul-parsing-fixes.patch (100%) rename package/utils/{lua => lua5.1}/patches/015-lnum-ppc-compat.patch (100%) rename package/utils/{lua => lua5.1}/patches/020-shared_liblua.patch (100%) rename package/utils/{lua => lua5.1}/patches/030-archindependent-bytecode.patch (100%) rename package/utils/{lua => lua5.1}/patches/040-use-symbolic-functions.patch (100%) rename package/utils/{lua => lua5.1}/patches/050-honor-cflags.patch (100%) rename package/utils/{lua => lua5.1}/patches/100-no_readline.patch (100%) rename package/utils/{lua => lua5.1}/patches/200-lua-path.patch (100%) rename package/utils/{lua => lua5.1}/patches/300-opcode_performance.patch (100%) diff --git a/package/utils/lua/Makefile b/package/utils/lua5.1/Makefile similarity index 77% rename from package/utils/lua/Makefile rename to package/utils/lua5.1/Makefile index c911c6a913..4fb93a9c8f 100644 --- a/package/utils/lua/Makefile +++ b/package/utils/lua5.1/Makefile @@ -25,7 +25,7 @@ HOST_PATCH_DIR := ./patches-host include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk -define Package/lua/Default +define Package/lua5.1/Default SUBMENU:=Lua SECTION:=lang CATEGORY:=Languages @@ -34,56 +34,59 @@ define Package/lua/Default MAINTAINER:=Jo-Philipp Wich <j...@mein.io> endef -define Package/lua/Default/description +define Package/lua5.1/Default/description Lua is a powerful light-weight programming language designed for extending applications. Lua is also frequently used as a general-purpose, stand-alone language. Lua is free software. endef -define Package/liblua -$(call Package/lua/Default) +define Package/liblua5.1 +$(call Package/lua5.1/Default) SUBMENU:= SECTION:=libs CATEGORY:=Libraries TITLE+= (libraries) + PROVIDES:=liblua ABI_VERSION:=5.1.5 endef -define Package/liblua/description -$(call Package/lua/Default/description) +define Package/liblua5.1/description +$(call Package/lua5.1/Default/description) This package contains the Lua shared libraries, needed by other programs. endef -define Package/lua -$(call Package/lua/Default) - DEPENDS:=+liblua +define Package/lua5.1 +$(call Package/lua5.1/Default) + DEPENDS:=+liblua5.1 TITLE+= (interpreter) + PROVIDES:=lua endef -define Package/lua/description -$(call Package/lua/Default/description) +define Package/lua.1/description +$(call Package/lua5.1/Default/description) This package contains the Lua language interpreter. endef -define Package/luac -$(call Package/lua/Default) - DEPENDS:=+liblua +define Package/luac5.1 +$(call Package/lua5.1/Default) + DEPENDS:=+liblua5.1 TITLE+= (compiler) + PROVIDES:=luac endef -define Package/luac/description -$(call Package/lua/Default/description) +define Package/luac5.1/description +$(call Package/lua5.1/Default/description) This package contains the Lua language compiler. endef -define Package/lua-examples -$(call Package/lua/Default) - DEPENDS:=lua +define Package/lua5.1-examples +$(call Package/lua5.1/Default) + DEPENDS:=lua5.1 TITLE+= (examples) endef -define Package/lua-examples/description -$(call Package/lua/Default/description) +define Package/lua5.1-examples/description +$(call Package/lua5.1/Default/description) This package contains Lua language examples. endef @@ -147,32 +150,31 @@ define Build/InstallDev $(CP) $(PKG_BUILD_DIR)/etc/lua.pc $(1)/usr/lib/pkgconfig/ endef -define Package/liblua/install +define Package/liblua5.1/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua.so.* $(1)/usr/lib/ endef -define Package/lua/install +define Package/lua5.1/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lua5.1 $(1)/usr/bin/ $(LN) lua5.1 $(1)/usr/bin/lua endef -define Package/luac/install +define Package/luac5.1/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luac5.1 $(1)/usr/bin/ $(LN) luac5.1 $(1)/usr/bin/luac endef -define Package/lua-examples/install +define Package/lua5.1-examples/install $(INSTALL_DIR) $(1)/usr/share/lua/examples $(INSTALL_DATA) $(PKG_BUILD_DIR)/test/*.lua \ $(1)/usr/share/lua/examples/ endef -$(eval $(call BuildPackage,liblua)) -$(eval $(call BuildPackage,lua)) -$(eval $(call BuildPackage,luac)) -$(eval $(call BuildPackage,lua-examples)) +$(eval $(call BuildPackage,liblua5.1)) +$(eval $(call BuildPackage,lua5.1)) +$(eval $(call BuildPackage,luac5.1)) +$(eval $(call BuildPackage,lua5.1-examples)) $(eval $(call HostBuild)) - diff --git a/package/utils/lua/patches-host/001-include-version-number.patch b/package/utils/lua5.1/patches-host/001-include-version-number.patch similarity index 100% rename from package/utils/lua/patches-host/001-include-version-number.patch rename to package/utils/lua5.1/patches-host/001-include-version-number.patch diff --git a/package/utils/lua/patches-host/010-lua-5.1.3-lnum-full-260308.patch b/package/utils/lua5.1/patches-host/010-lua-5.1.3-lnum-full-260308.patch similarity index 100% rename from package/utils/lua/patches-host/010-lua-5.1.3-lnum-full-260308.patch rename to package/utils/lua5.1/patches-host/010-lua-5.1.3-lnum-full-260308.patch diff --git a/package/utils/lua/patches-host/011-lnum-use-double.patch b/package/utils/lua5.1/patches-host/011-lnum-use-double.patch similarity index 100% rename from package/utils/lua/patches-host/011-lnum-use-double.patch rename to package/utils/lua5.1/patches-host/011-lnum-use-double.patch diff --git a/package/utils/lua/patches-host/012-lnum-fix-ltle-relational-operators.patch b/package/utils/lua5.1/patches-host/012-lnum-fix-ltle-relational-operators.patch similarity index 100% rename from package/utils/lua/patches-host/012-lnum-fix-ltle-relational-operators.patch rename to package/utils/lua5.1/patches-host/012-lnum-fix-ltle-relational-operators.patch diff --git a/package/utils/lua/patches-host/013-lnum-strtoul-parsing-fixes.patch b/package/utils/lua5.1/patches-host/013-lnum-strtoul-parsing-fixes.patch similarity index 100% rename from package/utils/lua/patches-host/013-lnum-strtoul-parsing-fixes.patch rename to package/utils/lua5.1/patches-host/013-lnum-strtoul-parsing-fixes.patch diff --git a/package/utils/lua/patches-host/015-lnum-ppc-compat.patch b/package/utils/lua5.1/patches-host/015-lnum-ppc-compat.patch similarity index 100% rename from package/utils/lua/patches-host/015-lnum-ppc-compat.patch rename to package/utils/lua5.1/patches-host/015-lnum-ppc-compat.patch diff --git a/package/utils/lua/patches-host/030-archindependent-bytecode.patch b/package/utils/lua5.1/patches-host/030-archindependent-bytecode.patch similarity index 100% rename from package/utils/lua/patches-host/030-archindependent-bytecode.patch rename to package/utils/lua5.1/patches-host/030-archindependent-bytecode.patch diff --git a/package/utils/lua/patches-host/100-no_readline.patch b/package/utils/lua5.1/patches-host/100-no_readline.patch similarity index 100% rename from package/utils/lua/patches-host/100-no_readline.patch rename to package/utils/lua5.1/patches-host/100-no_readline.patch diff --git a/package/utils/lua/patches/001-include-version-number.patch b/package/utils/lua5.1/patches/001-include-version-number.patch similarity index 100% rename from package/utils/lua/patches/001-include-version-number.patch rename to package/utils/lua5.1/patches/001-include-version-number.patch diff --git a/package/utils/lua/patches/010-lua-5.1.3-lnum-full-260308.patch b/package/utils/lua5.1/patches/010-lua-5.1.3-lnum-full-260308.patch similarity index 100% rename from package/utils/lua/patches/010-lua-5.1.3-lnum-full-260308.patch rename to package/utils/lua5.1/patches/010-lua-5.1.3-lnum-full-260308.patch diff --git a/package/utils/lua/patches/011-lnum-use-double.patch b/package/utils/lua5.1/patches/011-lnum-use-double.patch similarity index 100% rename from package/utils/lua/patches/011-lnum-use-double.patch rename to package/utils/lua5.1/patches/011-lnum-use-double.patch diff --git a/package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch b/package/utils/lua5.1/patches/012-lnum-fix-ltle-relational-operators.patch similarity index 100% rename from package/utils/lua/patches/012-lnum-fix-ltle-relational-operators.patch rename to package/utils/lua5.1/patches/012-lnum-fix-ltle-relational-operators.patch diff --git a/package/utils/lua/patches/013-lnum-strtoul-parsing-fixes.patch b/package/utils/lua5.1/patches/013-lnum-strtoul-parsing-fixes.patch similarity index 100% rename from package/utils/lua/patches/013-lnum-strtoul-parsing-fixes.patch rename to package/utils/lua5.1/patches/013-lnum-strtoul-parsing-fixes.patch diff --git a/package/utils/lua/patches/015-lnum-ppc-compat.patch b/package/utils/lua5.1/patches/015-lnum-ppc-compat.patch similarity index 100% rename from package/utils/lua/patches/015-lnum-ppc-compat.patch rename to package/utils/lua5.1/patches/015-lnum-ppc-compat.patch diff --git a/package/utils/lua/patches/020-shared_liblua.patch b/package/utils/lua5.1/patches/020-shared_liblua.patch similarity index 100% rename from package/utils/lua/patches/020-shared_liblua.patch rename to package/utils/lua5.1/patches/020-shared_liblua.patch diff --git a/package/utils/lua/patches/030-archindependent-bytecode.patch b/package/utils/lua5.1/patches/030-archindependent-bytecode.patch similarity index 100% rename from package/utils/lua/patches/030-archindependent-bytecode.patch rename to package/utils/lua5.1/patches/030-archindependent-bytecode.patch diff --git a/package/utils/lua/patches/040-use-symbolic-functions.patch b/package/utils/lua5.1/patches/040-use-symbolic-functions.patch similarity index 100% rename from package/utils/lua/patches/040-use-symbolic-functions.patch rename to package/utils/lua5.1/patches/040-use-symbolic-functions.patch diff --git a/package/utils/lua/patches/050-honor-cflags.patch b/package/utils/lua5.1/patches/050-honor-cflags.patch similarity index 100% rename from package/utils/lua/patches/050-honor-cflags.patch rename to package/utils/lua5.1/patches/050-honor-cflags.patch diff --git a/package/utils/lua/patches/100-no_readline.patch b/package/utils/lua5.1/patches/100-no_readline.patch similarity index 100% rename from package/utils/lua/patches/100-no_readline.patch rename to package/utils/lua5.1/patches/100-no_readline.patch diff --git a/package/utils/lua/patches/200-lua-path.patch b/package/utils/lua5.1/patches/200-lua-path.patch similarity index 100% rename from package/utils/lua/patches/200-lua-path.patch rename to package/utils/lua5.1/patches/200-lua-path.patch diff --git a/package/utils/lua/patches/300-opcode_performance.patch b/package/utils/lua5.1/patches/300-opcode_performance.patch similarity index 100% rename from package/utils/lua/patches/300-opcode_performance.patch rename to package/utils/lua5.1/patches/300-opcode_performance.patch -- 2.21.0 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel