From patchwork Thu Oct 15 06:29:38 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: 530524 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 48EE31401F0 for ; Thu, 15 Oct 2015 17:30:04 +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=oVniPtw/; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5C76131B0F; Thu, 15 Oct 2015 06:30:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xPugUD7nO4fU; Thu, 15 Oct 2015 06:29:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id B0F8B31491; Thu, 15 Oct 2015 06:29:58 +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 5C3161C1519 for ; Thu, 15 Oct 2015 06:29:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 57A3789BF0 for ; Thu, 15 Oct 2015 06:29:57 +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 KjVjXQ3AvP58 for ; Thu, 15 Oct 2015 06:29:56 +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 D64B189663 for ; Thu, 15 Oct 2015 06:29:55 +0000 (UTC) Received: from dovecot03.posteo.de (dovecot03.posteo.de [172.16.0.13]) by mout01.posteo.de (Postfix) with ESMTPS id 75F5120A11 for ; Thu, 15 Oct 2015 08:29:53 +0200 (CEST) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3nc11Y0DpNz5vMw; Thu, 15 Oct 2015 08:29:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.embedded.rocks (Postfix) with ESMTP id 3EF8BEE0C72; Thu, 15 Oct 2015 08:29:52 +0200 (CEST) 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:references:in-reply-to:x-mailer:message-id:date :date:subject:subject:from:from:received:received; s=default; t= 1444890581; x=1445495382; bh=b0/40GNpZYmowYKpJLdag8BbABCy02zXAQ5 iUKLECdM=; b=oVniPtw/vrMJhx9WO81YsvyG6YUGrl0KtbqsBhUxVMjb3PBB4o2 uwpSg8iWWC7/j8VaTDfIAeA+zaCdJ4uXXRC/0oYXnOIlUedm22Tb8ye0scztO4SY rvH8s77Rb5MWt92QHw4Mvt/THObSuI1GkCen4brfM6saa3sM8kpnjSGptktI+8SA j7Yv2YFKTOfh6jQwBhnG2MBfWfSOLjGnSNqASi7CT5DB9QcT7dQZDsZTOF34AG/6 dZJmtjA9VvqFqnPm9PRLilYqexbbmDWYqo3Rk9v2O8DX6lwcL09bLjt2esZGe2Sy 9vMaaNBOGjS2dZjZb3884sPcG5C0VHoYy0g== 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 4x522XCUOxbX; Thu, 15 Oct 2015 08:29:41 +0200 (CEST) Received: from nzxt.fritz.box (x4d0cd0c3.dyn.telefonica.de [77.12.208.195]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Thu, 15 Oct 2015 08:29:41 +0200 (CEST) From: =?UTF-8?q?J=C3=B6rg=20Krause?= To: buildroot@buildroot.org Date: Thu, 15 Oct 2015 08:29:38 +0200 Message-Id: <1444890578-19914-1-git-send-email-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1444854939-6557-1-git-send-email-joerg.krause@embedded.rocks> References: <1444854939-6557-1-git-send-email-joerg.krause@embedded.rocks> MIME-Version: 1.0 Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH v3 1/1] 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.4. 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 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 | 3 +++ package/luvi/luvi.mk | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 95 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 5158371..3eed94f 100644 --- a/package/Config.in +++ b/package/Config.in @@ -503,6 +503,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..99cf60e --- /dev/null +++ b/package/luvi/luvi.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 7a99add9e2afdeeb833f8d948b5078c326b492debf50716ca47c7669c1dc9d8b luvi-src-v2.3.4.tar.gz +sha256 4f84ec56d9bb92fd02380c12e73b0cfdb05fcd8100104e82349e488f249e85ad 0be7acc82ddffd8012e458dbb1d09a50e151116d.patch diff --git a/package/luvi/luvi.mk b/package/luvi/luvi.mk new file mode 100644 index 0000000..ec3fba8 --- /dev/null +++ b/package/luvi/luvi.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# luvi +# +################################################################################ + +LUVI_VERSION = v2.3.4 +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 +LUVI_PATCH = https://github.com/luvit/luvi/commit/0be7acc82ddffd8012e458dbb1d09a50e151116d.patch + +# 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))