From patchwork Thu Oct 29 07:45:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 537696 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 54C9C140B0F for ; Thu, 29 Oct 2015 18:45:27 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b=OcWVwiot; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 40F028E090; Thu, 29 Oct 2015 07:45:26 +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 PGO3PE+Cu4cQ; Thu, 29 Oct 2015 07:45:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 6F3E48A496; Thu, 29 Oct 2015 07:45:23 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 307881C1F49 for ; Thu, 29 Oct 2015 07:45:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2B78994959 for ; Thu, 29 Oct 2015 07:45:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fj9ZPBoRNMP1 for ; Thu, 29 Oct 2015 07:45:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id 9043387B62 for ; Thu, 29 Oct 2015 07:45:20 +0000 (UTC) Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id 52DCB20A33 for ; Thu, 29 Oct 2015 08:45:18 +0100 (CET) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3nmf2618x8z5vMs for ; Thu, 29 Oct 2015 08:45:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.embedded.rocks (Postfix) with ESMTP id 78F12EE0C20; Thu, 29 Oct 2015 08:45:17 +0100 (CET) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:from :from:received:received; s=default; t=1446104706; x=1446709507; bh=S4ee0zIaNb3DG0oX/fn1OU/z80TePkH4qWBcKQjSZ3k=; b=OcWVwioteY1A aDSjg1xebvEbBOIzNUoRuYEC172zUZBLATR0eWhEI2EtukJ3e9C0NN9JjZ/OQp1u mKBzpjiKe7ykeOxDZhzzzXMnF+XZgimhLv2Fk07m6TD2jxvx0APhvQdtZ5jZEvMj OniSiv3ME1HGwqfFuq7UdLTyRO1x+m/+ZPpoHCpFAnz7P/yoVmZoXHPL2IOotxtJ /aPHYKIapSkpkCzpKrfS7i55duEuG1b/6CxjIeSpot3VYmAmATbPhpp32GCOlE/C CxziMMGrPqbjI+pHRpv/kbfwQSfuxBdIWhGIXNDZmhcI3255vB00h8aw71ImlIDH yT357G7jrQ== X-Virus-Scanned: Debian amavisd-new at mail.embedded.rocks Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id f9G9o5afRejw; Thu, 29 Oct 2015 08:45:06 +0100 (CET) Received: from nzxt.fritz.box (x4d0ce89f.dyn.telefonica.de [77.12.232.159]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Thu, 29 Oct 2015 08:45:06 +0100 (CET) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Thu, 29 Oct 2015 08:45:03 +0100 Message-Id: <1446104703-21295-1-git-send-email-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v5] luvi: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" Add package luvi version v2.3.5. luvi extends LuaJIT with asynchronous I/O and several optional modules to run Lua applications and build self-contained binaries. Signed-off-by: Jörg Krause --- Changes v3 -> v5: (v4 is same as v3, forgot commit --amend) - bump to v2.3.5 - remove patch from upstream Changes v2 -> v3: - Adapt version string to v2.3.4 (Jerzy Grzegorek) - Add else clauses to explicitly disable PCRE, OpenSSL and zlib support (Thomas Petazzoni) Changes v1 -> v2: - replace too generic TARGET_ARCH variable by LUVI_TARGET_ARCH (Baruch Siach) --- package/Config.in | 1 + package/luvi/Config.in | 30 +++++++++++++++++++++++++ package/luvi/luvi.hash | 2 ++ package/luvi/luvi.mk | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+) create mode 100644 package/luvi/Config.in create mode 100644 package/luvi/luvi.hash create mode 100644 package/luvi/luvi.mk diff --git a/package/Config.in b/package/Config.in index 10ff94e..bc19405 100644 --- a/package/Config.in +++ b/package/Config.in @@ -505,6 +505,7 @@ menu "Lua libraries/modules" source "package/luasql-sqlite3/Config.in" source "package/lunit/Config.in" source "package/luv/Config.in" + source "package/luvi/Config.in" source "package/lzlib/Config.in" source "package/orbit/Config.in" source "package/rings/Config.in" diff --git a/package/luvi/Config.in b/package/luvi/Config.in new file mode 100644 index 0000000..2f01f5c --- /dev/null +++ b/package/luvi/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_LUVI + bool "luvi" + depends on BR2_TOOLCHAIN_HAS_THREADS # libuv + depends on BR2_USE_MMU # libuv + depends on !BR2_STATIC_LIBS # libuv + depends on BR2_PACKAGE_LUAJIT + select BR2_PACKAGE_LIBUV + select BR2_PACKAGE_LUV + help + A project in-between luv and luvit. The goal of this is to make + building luvit and derivatives much easier. + + luvi extends LuaJIT with asynchronous I/O and several optional + modules to run Lua applications and build self-contained binaries + on systems that don't have a compiler. + + The luvi core can be extended with several Lua modules by adding its + bundled Lua binding libraries. To get the Lua module... + * 'rex' select PCRE (BR2_PACKAGE_PCRE) + * 'ssl' select OpenSSL (BR2_PACKAGE_OPENSSL) + * 'zlib' select zlib (BR2_PACKAGE_ZLIB) + + https://github.com/luvit/luvi + +comment "luvi needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_USE_MMU + +comment "luvi needs LuaJIT" + depends on !BR2_PACKAGE_LUAJIT diff --git a/package/luvi/luvi.hash b/package/luvi/luvi.hash new file mode 100644 index 0000000..c967558 --- /dev/null +++ b/package/luvi/luvi.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9d13baba7870160bd0f9be9d52f8ef1dafe282490d5f83a8e14765aa43387765 luvi-src-v2.3.5.tar.gz diff --git a/package/luvi/luvi.mk b/package/luvi/luvi.mk new file mode 100644 index 0000000..7611c11 --- /dev/null +++ b/package/luvi/luvi.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# luvi +# +################################################################################ + +LUVI_VERSION = v2.3.5 +LUVI_SOURCE = luvi-src-$(LUVI_VERSION).tar.gz +LUVI_SITE = https://github.com/luvit/luvi/releases/download/$(LUVI_VERSION) +LUVI_LICENSE = Apache-2.0 +LUVI_LICENSE_FILES = LICENSE.txt +LUVI_DEPENDENCIES = libuv luajit luv host-luajit + +# Dispatch all architectures of LuaJIT +ifeq ($(BR2_i386),y) +LUVI_TARGET_ARCH = x86 +else ifeq ($(BR2_x86_64),y) +LUVI_TARGET_ARCH = x64 +else ifeq ($(BR2_powerpc),y) +LUVI_TARGET_ARCH = ppc +else ifeq ($(BR2_arm)$(BR2_armeb),y) +LUVI_TARGET_ARCH = arm +else ifeq ($(BR2_mips)$(BR2_mipsel),y) +LUVI_TARGET_ARCH = mips +else +LUVI_TARGET_ARCH = $(BR2_ARCH) +endif + +# Bundled lua bindings have to be linked statically into the luvi executable +LUVI_CONF_OPTS = \ + -DBUILD_SHARED_LIBS=OFF \ + -DWithSharedLibluv=ON \ + -DTARGET_ARCH=$(LUVI_TARGET_ARCH) \ + -DLUA_PATH=$(HOST_DIR)/usr/share/luajit-2.0.4/?.lua + +# Add "rex" module (PCRE via bundled lrexlib) +ifeq ($(BR2_PACKAGE_PCRE),y) +LUVI_DEPENDENCIES += pcre +LUVI_CONF_OPTS += -DWithPCRE=ON -DWithSharedPCRE=ON +else +LUVI_CONF_OPTS += -DWithPCRE=OFF -DWithSharedPCRE=OFF +endif + +# Add "ssl" module (via bundled lua-openssl) +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LUVI_DEPENDENCIES += openssl +LUVI_CONF_OPTS += -DWithOpenSSL=ON -DWithOpenSSLASM=ON -DWithSharedOpenSSL=ON +else +LUVI_CONF_OPTS += -DWithOpenSSL=OFF -DWithOpenSSLASM=OFF -DWithSharedOpenSSL=OFF +endif + +# Add "zlib" module (via bundled lua-zlib) +ifeq ($(BR2_PACKAGE_ZLIB),y) +LUVI_DEPENDENCIES += zlib +LUVI_CONF_OPTS += -DWithZLIB=ON -DWithSharedZLIB=ON +else +LUVI_CONF_OPTS += -DWithZLIB=OFF -DWithSharedZLIB=OFF +endif + +$(eval $(cmake-package))