From patchwork Wed Sep 18 18:19:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francois Perrad X-Patchwork-Id: 1164181 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="M2VYWwVq"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46YSvL4f46z9s00 for ; Thu, 19 Sep 2019 04:20:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C0EA8866A7; Wed, 18 Sep 2019 18:20:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3GfMdsui0dXP; Wed, 18 Sep 2019 18:20:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 8B95E867A8; Wed, 18 Sep 2019 18:20:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 793131BF2BC for ; Wed, 18 Sep 2019 18:20:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7618C867A8 for ; Wed, 18 Sep 2019 18:20:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5YEbyKm-VvBN for ; Wed, 18 Sep 2019 18:20:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5C999866A7 for ; Wed, 18 Sep 2019 18:20:08 +0000 (UTC) Received: by mail-wr1-f42.google.com with SMTP id l3so409291wru.7 for ; Wed, 18 Sep 2019 11:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XUSRyXPdOYHl8rwbX5tHbNP+zhhCjdSBXKsxRZF0kYA=; b=M2VYWwVq2V1AIPMtICxHjvT9/P7b4f1oU/yhyKBz3rk8F3d8Fw0VRk6XTdBNth2s+Z 14I26MStYIa4jeQDPTIPDrnCto11OBEJy5/3XIhJmYwv8DJ9SJUjUwt2RFmmcxtq82pW hUBB4cw9lgu3peuXCHeOTJn5AaCSvjvM3K0e50m4maWNXTZ2flZ/6ILH260iQTz5A+By cq5bULfvUzNCzKDxh8fX012bJuf6Empy0tu/0JQATHbtSYTdhkDVY4O6vHhaKuOlRF3x ulamJ4orSmlr8gR1KhypnyIKKwlcIy7aT1ciMRgjPyHsWesHPCj+WUsbqT1uwcGDlkVj PzIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XUSRyXPdOYHl8rwbX5tHbNP+zhhCjdSBXKsxRZF0kYA=; b=pGnaf4rrAOQCoeztEJFIJz8lTiWM2wzyTXm7Zl+tp3IVUhBaXlMstI2FByzOqxosJC 6jhIrQM/GOmu8hLJYTRe1qzx1b1t7+Jk3tKlIVE6pMmP5vcUOghC7HcwJy63/o8pbMAI EeOCvS4QmBSnfwuRuKWmUQ3cry3G5dYqW5b1FuDuoNnWrioB18aaVcgdou51CluXMsXy OYceFtxQULT+3SbUszvB2FV+usZdsdywlSjarQPnv1ATBx1/CPwkfTkPSZgKl5Fb/roJ MyueNg/+vfzjOX0woSTYhU7FYivc3eO1f8PUOOCs9RukT1NJyPZewNjY/pexo1IrD/5i 2OXQ== X-Gm-Message-State: APjAAAX8dfxQVnYJOm6ihBf/KnNspcQ3hQhRlLg4bcLEcvWtHotBL7pu vMZLC1vEc/ccxfPj55GLoLIWmm9w X-Google-Smtp-Source: APXvYqyPMK/ZYxoYAdLS2DWWM4XUCDMDM4eCSfV3IrPEHxg7hPpomnMfTsnuWTJoKXiRAK0bzCZmUQ== X-Received: by 2002:a5d:4745:: with SMTP id o5mr3980092wrs.125.1568830806655; Wed, 18 Sep 2019 11:20:06 -0700 (PDT) Received: from localhost.localdomain (254.7.19.109.rev.sfr.net. [109.19.7.254]) by smtp.gmail.com with ESMTPSA id q19sm12072674wra.89.2019.09.18.11.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2019 11:20:06 -0700 (PDT) From: Francois Perrad X-Google-Original-From: Francois Perrad To: buildroot@busybox.net Date: Wed, 18 Sep 2019 20:19:55 +0200 Message-Id: <20190918181955.2299-1-francois.perrad@gadz.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] lua-lyaml: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Francois Perrad --- .gitlab-ci.yml | 2 ++ package/Config.in | 1 + package/lua-lyaml/Config.in | 9 +++++ package/lua-lyaml/lua-lyaml.hash | 3 ++ package/lua-lyaml/lua-lyaml.mk | 33 +++++++++++++++++++ .../testing/tests/package/test_lua_lyaml.py | 27 +++++++++++++++ 6 files changed, 75 insertions(+) create mode 100644 package/lua-lyaml/Config.in create mode 100644 package/lua-lyaml/lua-lyaml.hash create mode 100644 package/lua-lyaml/lua-lyaml.mk create mode 100644 support/testing/tests/package/test_lua_lyaml.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d42d2a60..2abb1a3b9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -381,6 +381,8 @@ tests.package.test_lua_curl.TestLuaLuacURL: { extends: .runtime_test } tests.package.test_lua_curl.TestLuajitLuacURL: { extends: .runtime_test } tests.package.test_lua_http.TestLuaHttp: { extends: .runtime_test } tests.package.test_lua_http.TestLuajitHttp: { extends: .runtime_test } +tests.package.test_lua_lyaml.TestLuaLuaLyaml: { extends: .runtime_test } +tests.package.test_lua_lyaml.TestLuajitLuaLyaml: { extends: .runtime_test } tests.package.test_lua_utf8.TestLuaUtf8: { extends: .runtime_test } tests.package.test_lua_utf8.TestLuajitUtf8: { extends: .runtime_test } tests.package.test_luaexpat.TestLuaLuaExpat: { extends: .runtime_test } diff --git a/package/Config.in b/package/Config.in index 710ed12be..d9ed0b601 100644 --- a/package/Config.in +++ b/package/Config.in @@ -630,6 +630,7 @@ menu "Lua libraries/modules" source "package/lua-iconv/Config.in" source "package/lua-lpeg-patterns/Config.in" source "package/lua-lunitx/Config.in" + source "package/lua-lyaml/Config.in" source "package/lua-markdown/Config.in" source "package/lua-messagepack/Config.in" source "package/lua-msgpack-native/Config.in" diff --git a/package/lua-lyaml/Config.in b/package/lua-lyaml/Config.in new file mode 100644 index 000000000..ef2d3823d --- /dev/null +++ b/package/lua-lyaml/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LUA_LYAML + bool "lua-lyaml" + select BR2_PACKAGE_LIBYAML + help + This is a Lua binding for the fast libYAML C library for + converting between `%YAML 1.1` and Lua tables, with a + flexible Lua language API to load and save YAML documents. + + http://github.com/gvvaughan/lyaml diff --git a/package/lua-lyaml/lua-lyaml.hash b/package/lua-lyaml/lua-lyaml.hash new file mode 100644 index 000000000..dd1978385 --- /dev/null +++ b/package/lua-lyaml/lua-lyaml.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 f4015ba47a389fc4fe0656cbcb8a216239275ec53309a0df79b0733c843e7bba lua-lyaml-6.2.4.tar.gz +sha256 c7ec2f52d258088437cddeeee38cfc97d60d464c8801aa77decefb993400ec6e LICENSE diff --git a/package/lua-lyaml/lua-lyaml.mk b/package/lua-lyaml/lua-lyaml.mk new file mode 100644 index 000000000..c88a438d5 --- /dev/null +++ b/package/lua-lyaml/lua-lyaml.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# lua-lyaml +# +################################################################################ + +LUA_LYAML_VERSION = 6.2.4 +LUA_LYAML_NAME_UPSTREAM = lyaml +LUA_LYAML_SITE = $(call github,gvvaughan,$(LUA_LYAML_NAME_UPSTREAM),v$(LUA_LYAML_VERSION)) +LUA_LYAML_LICENSE = MIT +LUA_LYAML_LICENSE_FILES = LICENSE +LUA_LYAML_DEPENDENCIES = libyaml luainterpreter host-lua + +define LUA_LYAML_BUILD_CMDS + (cd $(@D); \ + $(LUA_RUN) build-aux/luke \ + version="'$(LUA_LYAML_VERSION)'" \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LUA_INCDIR=$(STAGING_DIR)/usr/include \ + YAML_DIR=$(STAGING_DIR)/usr \ + ) +endef + +define LUA_LYAML_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(LUA_RUN) build-aux/luke install \ + INST_LIBDIR="$(TARGET_DIR)/usr/lib/lua/$(LUAINTERPRETER_ABIVER)" \ + INST_LUADIR="$(TARGET_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)" \ + ) +endef + +$(eval $(generic-package)) diff --git a/support/testing/tests/package/test_lua_lyaml.py b/support/testing/tests/package/test_lua_lyaml.py new file mode 100644 index 000000000..ece3c675a --- /dev/null +++ b/support/testing/tests/package/test_lua_lyaml.py @@ -0,0 +1,27 @@ +from tests.package.test_lua import TestLuaBase + + +class TestLuaLuaLyaml(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUA=y + BR2_PACKAGE_LUA_LYAML=y + """ + + def test_run(self): + self.login() + self.module_test("yaml") + self.module_test("lyaml") + + +class TestLuajitLuaLyaml(TestLuaBase): + config = TestLuaBase.config + \ + """ + BR2_PACKAGE_LUAJIT=y + BR2_PACKAGE_LUA_LYAML=y + """ + + def test_run(self): + self.login() + self.module_test("yaml") + self.module_test("lyaml")