Skip to contentSkip to conversation

jimsh: new package

PATCH New Gustavo Zacarias 2 participants 3 messages Sep 4, 2012 – Sep 6, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jimsh: new package

Add new jimsh package - a lightweight tclsh alternative. Useful for a lighter footprint usb_modeswitch installation. tclsh size is ~700kB for ARM compared to ~200kB for jimsh.

---
 package/Config.in       |    1 +
 package/jimsh/Config.in |    6 ++++++
 package/jimsh/jimsh.mk  |   33 +++++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100644 package/jimsh/Config.in
 create mode 100644 package/jimsh/jimsh.mk
package/Config.in +1 -0
index e129522..01e29e9 100644
@@ -249,6 +249,7 @@ endmenu
 menu "Interpreter languages and scripting"
 source "package/erlang/Config.in"
 source "package/haserl/Config.in"
+source "package/jimsh/Config.in"
 source "package/lua/Config.in"
 source "package/luajit/Config.in"
 if BR2_PACKAGE_LUA || BR2_PACKAGE_LUAJIT
package/jimsh/Config.in new file +6 -0
new file mode 100644
index 0000000..edae414
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_JIMSH
+	bool "jimsh"
+	help
+	  A small footprint implementation of the Tcl programming language.
+
+	  http://jim.tcl.tk
package/jimsh/jimsh.mk new file +33 -0
new file mode 100644
index 0000000..7193036
@@ -0,0 +1,33 @@
+#############################################################
+#
+# jimsh
+#
+#############################################################
+
+JIMSH_VERSION = 0.73
+JIMSH_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/j/jimtcl
+JIMSH_SOURCE = jimtcl_$(JIMSH_VERSION).orig.tar.bz2
+
+ifneq ($(BR2_PACKAGE_TCL),y)
+define JIMSH_LINK_TCLSH
+	ln -sf jimsh $(TARGET_DIR)/usr/bin/tclsh
+endef
+endif
+
+define JIMSH_CONFIGURE_CMDS
+	(cd $(@D); \
+		$(TARGET_CONFIGURE_OPTS) \
+		./configure --prefix=/usr \
+	)
+endef
+
+define JIMSH_BUILD_CMDS
+	$(MAKE) -C $(@D)
+endef
+
+define JIMSH_INSTALL_TARGET_CMDS
+	$(INSTALL) -D $(@D)/jimsh $(TARGET_DIR)/usr/bin/jimsh
+	$(JIMSH_LINK_TCLSH)
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.8.6
#1 lore raw

PATCH 1/1 jimsh: new package

Quoted 2 lines · Gustavo Zacarias

Add new jimsh package - a lightweight tclsh alternative. Useful for a lighter footprint usb_modeswitch installation.

I guess a patch that installs usb_modeswitch's tcl script will follow
then?

You'll probably want to add a hidden BR2_NEEDS_TCLSH which selects
JIMSH if TCL is not defined. And/or a HAS_TCLSH that is selected by jimsh and tcl. Or should those symbols only be introduced when a package actually selects or depends on them?

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#2 lore raw

PATCH 1/1 jimsh: new package

Quoted 7 lines · Arnout Vandecappelle

I guess a patch that installs usb_modeswitch's tcl script will follow
then?

You'll probably want to add a hidden BR2_NEEDS_TCLSH which selects
JIMSH if TCL is not defined. And/or a HAS_TCLSH that is selected by jimsh and tcl. Or should those symbols only be introduced when a package actually selects or depends on them?

I'm on the HAS_TCLSH side since there aren't many tclsh-using packages at the moment, and there may be some (sick) valid reason for both with jimsh not being as complete as full Tcl.
But that's for another patch when (if) jimsh gets in, it's not the first iteration, there was one last year that went by silently :) Regards.