Skip to contentSkip to conversation

tcllib: new package

PATCH New Davide Viti 3 participants 5 messages Dec 5, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcllib: new package

Hi,
the attached patch adds the tcllib package.
This is my first experience with packaging for buildroot, so please review it. Do not esitate to ask for fixes if you find any issues.

Note that I've packaged version 1.13 and a newer version has been
released: I've used this in a project and feel safer to release this.

regards,
Davide

#1 lore raw

PATCH 1/1 tcllib: new package

---
 package/Config.in        |    5 +++++
 package/tcllib/Config.in |   12 ++++++++++++
 package/tcllib/tcllib.mk |   23 +++++++++++++++++++++++
 3 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100644 package/tcllib/Config.in
 create mode 100644 package/tcllib/tcllib.mk
package/Config.in +5 -0
index e759620..6d3f4fb 100644
@@ -311,6 +311,11 @@ endmenu
 endif
 source "package/ruby/Config.in"
 source "package/tcl/Config.in"
+if BR2_PACKAGE_TCL
+menu "tcl libraries/modules"
+source "package/tcllib/Config.in"
+endmenu
+endif
 endmenu
 
 menu "Libraries"
package/tcllib/Config.in new file +12 -0
new file mode 100644
index 0000000..cf65a9e
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_TCLLIB
+	bool "tcllib"
+	depends on BR2_PACKAGE_TCL
+	help
+	  Tcllib is a collection of utility modules for Tcl. These
+	  modules provide a wide variety of functionality, from
+	  implementations of standard data structures to
+	  implementations of common networking protocols. The intent
+	  is to collect commonly used function into a single library,
+	  which users can rely on to be available and stable
+
+	  http://tcl.activestate.com/software/tcllib/
package/tcllib/tcllib.mk new file +23 -0
new file mode 100644
index 0000000..2e85dc2
@@ -0,0 +1,23 @@
+#############################################################
+#
+# tcllib
+#
+#############################################################
+TCLLIB_VERSION       = 1.13
+TCLLIB_SOURCE        = tcllib-$(TCLLIB_VERSION).tar.gz
+TCLLIB_SITE          = http://sourceforge.net/projects/tcllib/files/tcllib/$(TCLLIB_VERSION)/
+TCLLIB_LICENSE       = BSD-2c
+TCLLIB_LICENSE_FILES = license.terms
+TCLLIB_DEPENDENCIES  = tcl
+
+define TCLLIB_INSTALL_TARGET_CMDS
+	(cd $(@D); \
+	    tclsh installer.tcl \
+	    -no-examples -no-html -no-pkgs -no-wait \
+	    -no-gui -no-apps -no-nroff \
+	    -pkg-path $(TARGET_DIR)/usr/lib/tcl8.4 \
+	)
+endef
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
1.7.2.5
#2 lore raw

PATCH 1/1 tcllib: new package

Davide, All,

Quoted 31 lines · On Wednesday 05 December 2012 Davide Viti wrote:
---
 package/Config.in        |    5 +++++
 package/tcllib/Config.in |   12 ++++++++++++
 package/tcllib/tcllib.mk |   23 +++++++++++++++++++++++
 3 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100644 package/tcllib/Config.in
 create mode 100644 package/tcllib/tcllib.mk
package/Config.in +5 -0
index e759620..6d3f4fb 100644
@@ -311,6 +311,11 @@ endmenu
 endif
 source "package/ruby/Config.in"
 source "package/tcl/Config.in"
+if BR2_PACKAGE_TCL
+menu "tcl libraries/modules"
+source "package/tcllib/Config.in"
+endmenu
+endif
 endmenu
 
 menu "Libraries"
package/tcllib/Config.in new file +0 -0
new file mode 100644
index 0000000..cf65a9e

package/tcllib/Config.in line 3

Quoted 3 lines
package/tcllib/Config.in new file +3 -0
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_TCLLIB
+	bool "tcllib"
+	depends on BR2_PACKAGE_TCL

Technically, this is not needed, because you already have a 'if TCL' in package/Config.in (see above)

Quoted 15 lines
package/tcllib/Config.in new file +9 -0
+	help
+	  Tcllib is a collection of utility modules for Tcl. These
+	  modules provide a wide variety of functionality, from
+	  implementations of standard data structures to
+	  implementations of common networking protocols. The intent
+	  is to collect commonly used function into a single library,
+	  which users can rely on to be available and stable
+
+	  http://tcl.activestate.com/software/tcllib/
package/tcllib/tcllib.mk new file +0 -0
new file mode 100644
index 0000000..2e85dc2

package/tcllib/tcllib.mk line 8

Quoted 8 lines
package/tcllib/tcllib.mk new file +8 -0
@@ -0,0 +1,23 @@
+#############################################################
+#
+# tcllib
+#
+#############################################################
+TCLLIB_VERSION       = 1.13
+TCLLIB_SOURCE        = tcllib-$(TCLLIB_VERSION).tar.gz
+TCLLIB_SITE          = http://sourceforge.net/projects/tcllib/files/tcllib/$(TCLLIB_VERSION)/

Should be:

    http://downloads.sourceforge.net/project/tcllib/tcllib/$(TCLLIB_VERSION)/

Also, there is a .tar.bz2, which is ~25% smaller than the .tar.gz, it will be (a bit) faster to download.

package/tcllib/tcllib.mk line 10

Quoted 2 lines
package/tcllib/tcllib.mk new file +2 -0
+TCLLIB_LICENSE       = BSD-2c
+TCLLIB_LICENSE_FILES = license.terms

This does not really look like the BSD-2c I know of, and that are listed there: https://spdx.org/licenses/

package/tcllib/tcllib.mk line 23

Quoted 13 lines
package/tcllib/tcllib.mk new file +13 -0
+TCLLIB_DEPENDENCIES  = tcl
+
+define TCLLIB_INSTALL_TARGET_CMDS
+	(cd $(@D); \
+	    tclsh installer.tcl \
+	    -no-examples -no-html -no-pkgs -no-wait \
+	    -no-gui -no-apps -no-nroff \
+	    -pkg-path $(TARGET_DIR)/usr/lib/tcl8.4 \
+	)
+endef
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))

Why the host one? Is it used by any other package at build-time?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 tcllib: new package

In reply to Davide Viti

Davide, All,

Quoted 21 lines · On Wednesday 05 December 2012 Davide Viti wrote:
---
 package/Config.in        |    5 +++++
 package/tcllib/Config.in |   12 ++++++++++++
 package/tcllib/tcllib.mk |   23 +++++++++++++++++++++++
 3 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100644 package/tcllib/Config.in
 create mode 100644 package/tcllib/tcllib.mk
package/tcllib/tcllib.mk new file +5 -0
new file mode 100644
index 0000000..2e85dc2
@@ -0,0 +1,23 @@
+#############################################################
+#
+# tcllib
+#
+#############################################################

package/tcllib/tcllib.mk line 15

Quoted 10 lines
package/tcllib/tcllib.mk new file +10 -0
+TCLLIB_VERSION       = 1.13
+TCLLIB_SOURCE        = tcllib-$(TCLLIB_VERSION).tar.gz
+TCLLIB_SITE          = http://sourceforge.net/projects/tcllib/files/tcllib/$(TCLLIB_VERSION)/
+TCLLIB_LICENSE       = BSD-2c
+TCLLIB_LICENSE_FILES = license.terms
+TCLLIB_DEPENDENCIES  = tcl
+
+define TCLLIB_INSTALL_TARGET_CMDS
+	(cd $(@D); \
+	    tclsh installer.tcl \

Since you're using tclsh, you may also need to depend on host-tcl.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 1/1 tcllib: new package

Dear Yann E. MORIN,

Quoted 5 lines · Yann E. MORIN

package/tcllib/tcllib.mk line 15

Quoted 3 lines
package/tcllib/tcllib.mk new file +3 -0
+define TCLLIB_INSTALL_TARGET_CMDS
+	(cd $(@D); \
+	    tclsh installer.tcl \

Since you're using tclsh, you may also need to depend on host-tcl.

And therefore use $(HOST_DIR)/usr/bin/tclsh.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com