From patchwork Fri Jun 28 14:32:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 255400 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 55C8C2C00A1 for ; Sat, 29 Jun 2013 00:32:54 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 69FC9A0131; Fri, 28 Jun 2013 14:32:48 +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 5XXB6XN9OG-y; Fri, 28 Jun 2013 14:32:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 0BCBCA01D4; Fri, 28 Jun 2013 14:32:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7698D8F79F for ; Fri, 28 Jun 2013 14:32:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1F31B8CB2F for ; Fri, 28 Jun 2013 14:32:39 +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 JdKGaH2Wrou6 for ; Fri, 28 Jun 2013 14:32:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by whitealder.osuosl.org (Postfix) with ESMTPS id 300DA8CBD3 for ; Fri, 28 Jun 2013 14:32:32 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id hq4so879120wib.0 for ; Fri, 28 Jun 2013 07:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=QH1u6li6FzSbomikDqDuyRiDhx2/72k8t7D8KwqlYeo=; b=z6iJ4X87eERUSe63AvF2wn2CANXMzlZu4pLkDPqkRlkOMXcA/iAYKU/OsTLnoXZsZw eWT+3urKaMyXJuNbnv1oau+fSWBQGaJ+1pOLjO4UtQ9lVV59UBqbBcgFhJ0juh1l08Z5 JSVL8VKpB49SFhFLjxYUJN15mkxuGgIUVXfc9RNYr5bBT4yNwj4AG/pvmxM1jCngFpnk mQMg/HFPasRAR9FFmybA9bZ3Po9p9f0OPAKrVpoe16fo7ciBeUXCI0gvGlx34PEeFTwI q8OJTcyISSsuyd6WLnRtOMG6XSswkBgHpfJTUQ9SPvaVVbwVMOjKhSt+8bhchgRD1NAl ZN5g== X-Received: by 10.180.39.136 with SMTP id p8mr2668823wik.11.1372429950437; Fri, 28 Jun 2013 07:32:30 -0700 (PDT) Received: from localhost.localdomain ([190.2.109.95]) by mx.google.com with ESMTPSA id fo10sm10538508wib.8.2013.06.28.07.32.27 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Jun 2013 07:32:29 -0700 (PDT) From: Ezequiel Garcia To: Date: Fri, 28 Jun 2013 11:32:24 -0300 Message-Id: <1372429944-2732-1-git-send-email-elezegarcia@gmail.com> X-Mailer: git-send-email 1.8.1.5 Subject: [Buildroot] [PATCH v2] jimtcl: New package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Add new jimtcl package - a lightweight tclsh alternative. Useful for a lighter footprint usb_modeswitch installation. tclsh size is ~700kB for ARM compared to ~200kB for jimtcl. Signed-off-by: Gustavo Zacarias Signed-off-by: Ezequiel Garcia --- Changes from v1: * Use selected Debian mirror to get the package sources, instead of Jim Tcl's Git repository. Suggested by Gustavo. * Use positive logic in ifeq's. Suggested by Gustavo. * Build a shared library by default, and make this depend on BR_PREFER_STATIC_LIB option. package/Config.in | 1 + package/jimtcl/Config.in | 9 +++++++ package/jimtcl/jimtcl.mk | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 package/jimtcl/Config.in create mode 100644 package/jimtcl/jimtcl.mk diff --git a/package/Config.in b/package/Config.in index 0eb6a9c..b62f90a 100644 --- a/package/Config.in +++ b/package/Config.in @@ -307,6 +307,7 @@ source "package/erlang/Config.in" source "package/enscript/Config.in" source "package/haserl/Config.in" source "package/jamvm/Config.in" +source "package/jimtcl/Config.in" source "package/lua/Config.in" source "package/luajit/Config.in" if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT diff --git a/package/jimtcl/Config.in b/package/jimtcl/Config.in new file mode 100644 index 0000000..c7a12f2 --- /dev/null +++ b/package/jimtcl/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_JIMTCL + bool "jimtcl" + help + Jim Tcl is a small footprint reimplementation of the Tcl scripting language. + The core language engine is compatible with Tcl 8.5+, while implementing + a significant subset of the Tcl 8.6 command set, plus additional features + available only in Jim Tcl. + + http://jim.tcl.tk diff --git a/package/jimtcl/jimtcl.mk b/package/jimtcl/jimtcl.mk new file mode 100644 index 0000000..97c8a42 --- /dev/null +++ b/package/jimtcl/jimtcl.mk @@ -0,0 +1,62 @@ +############################################################# +# +# jimtcl +# +############################################################# + +JIMTCL_VERSION = 0.73 +JIMTCL_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/j/jimtcl +JIMTCL_SOURCE = jimtcl_$(JIMTCL_VERSION).orig.tar.bz2 +JIMTCL_INSTALL_STAGING = YES + +JIMTCL_HEADERS_TO_INSTALL = \ + jim.h \ + jim-eventloop.h \ + jim-signal.h \ + jim-subcmd.h \ + jim-win32compat.h \ + jim-config.h \ + +ifeq ($(BR2_PACKAGE_TCL),) +define JIMTCL_LINK_TCLSH + ln -sf jimsh $(TARGET_DIR)/usr/bin/tclsh +endef +endif + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +JIMTCL_SHARED = +JIMTCL_LIB = a +JIMTCL_INSTALL_LIB = +else +JIMTCL_SHARED = --shared +JIMTCL_LIB = so +JIMTCL_INSTALL_LIB = $(INSTALL) -D $(@D)/libjim.$(JIMTCL_LIB) \ + $(TARGET_DIR)/usr/lib/libjim.$(JIMTCL_LIB) +endif + +define JIMTCL_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure --prefix=/usr \ + $(JIMTCL_SHARED) \ + ) +endef + +define JIMTCL_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define JIMTCL_INSTALL_STAGING_CMDS + for i in $(JIMTCL_HEADERS_TO_INSTALL); do \ + cp -a $(@D)/$$i $(STAGING_DIR)/usr/include/ ; \ + done; \ + $(INSTALL) -D $(@D)/libjim.$(JIMTCL_LIB) $(STAGING_DIR)/usr/lib/libjim.$(JIMTCL_LIB) +endef + +define JIMTCL_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/jimsh $(TARGET_DIR)/usr/bin/jimsh + $(JIMTCL_INSTALL_LIB) + $(JIMTCL_LINK_TCLSH) +endef + +$(eval $(generic-package))