Browse Source

Merge pull request #1948 from mistachkin/master

Bring back the Tcl language (lang/tcl package)...
Ted Hess 9 years ago
parent
commit
a6d7666c4c

+ 73
- 0
lang/tcl/Makefile View File

@@ -0,0 +1,73 @@
1
+#
2
+# Copyright (C) 2006-2015 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=tcl
11
+PKG_VERSION:=8.6.4
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION)-src.tar.gz
15
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
16
+PKG_MD5SUM:=d7cbb91f1ded1919370a30edd1534304
17
+
18
+PKG_LICENSE:=TCL
19
+PKG_LICENSE_FILES:=license.terms
20
+PKG_MAINTAINER:=Joe Mistachkin <joe@mistachkin.com>
21
+
22
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION)
23
+
24
+PKG_FIXUP:=autoreconf
25
+PKG_INSTALL:=1
26
+
27
+include $(INCLUDE_DIR)/package.mk
28
+
29
+define Package/tcl
30
+  SUBMENU:=Tcl
31
+  SECTION:=lang
32
+  CATEGORY:=Languages
33
+  DEPENDS:=+libpthread
34
+  TITLE:=The Tcl language
35
+  URL:=http://www.tcl.tk/
36
+endef
37
+
38
+define Package/tcl/description
39
+  Tcl, or Tool Command Language, is a an elegant, versatile, feature-rich,
40
+  simple-to-learn yet very powerful industrial-strength open-source
41
+  programming language and development platform. It is renowned for its
42
+  stability and utility, and its emphasis on providing a cross-platform
43
+  programming API makes it an ideal choice for an enormous variety of
44
+  programming jobs.
45
+endef
46
+
47
+CONFIGURE_PATH := unix
48
+
49
+CONFIGURE_VARS += \
50
+	tcl_cv_strtod_unbroken=ok
51
+
52
+CONFIGURE_ARGS += \
53
+	--enable-threads
54
+
55
+MAKE_PATH := unix
56
+
57
+define Build/InstallDev
58
+	$(INSTALL_DIR) $(1)/usr/include
59
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
60
+
61
+	$(INSTALL_DIR) $(1)/usr/lib
62
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcl*.{a,so*} $(1)/usr/lib/
63
+endef
64
+
65
+define Package/tcl/install
66
+	$(INSTALL_DIR) $(1)/usr/lib
67
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib
68
+
69
+	$(INSTALL_DIR) $(1)/usr/bin
70
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
71
+endef
72
+
73
+$(eval $(call BuildPackage,tcl))

+ 22
- 0
lang/tcl/patches/100-disable_tzdata_and_msgs_install.patch View File

@@ -0,0 +1,22 @@
1
+--- a/unix/Makefile.in
2
++++ b/unix/Makefile.in
3
+@@ -817,15 +817,15 @@ install-tzdata: tclsh
4
+ 	@echo "Installing time zone data"
5
+ 	@@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
6
+ 	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
7
+-	./tclsh $(TOOL_DIR)/installData.tcl \
8
+-	    $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata
9
++	#./tclsh $(TOOL_DIR)/installData.tcl \
10
++	#    $(TOP_DIR)/library/tzdata "$(SCRIPT_INSTALL_DIR)"/tzdata
11
+ 
12
+ install-msgs: tclsh
13
+ 	@echo "Installing message catalogs"
14
+ 	@@LD_LIBRARY_PATH_VAR@="`pwd`:$${@LD_LIBRARY_PATH_VAR@}"; export @LD_LIBRARY_PATH_VAR@; \
15
+ 	TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"; export TCL_LIBRARY; \
16
+-	./tclsh $(TOOL_DIR)/installData.tcl \
17
+-	    $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs
18
++	#./tclsh $(TOOL_DIR)/installData.tcl \
19
++	#    $(TOP_DIR)/library/msgs "$(SCRIPT_INSTALL_DIR)"/msgs
20
+ 
21
+ install-doc: doc
22
+ 	@for i in "$(MAN_INSTALL_DIR)" "$(MAN1_INSTALL_DIR)" "$(MAN3_INSTALL_DIR)" "$(MANN_INSTALL_DIR)" ; \

+ 20
- 0
lang/tcl/patches/200-fix_mips_build.patch View File

@@ -0,0 +1,20 @@
1
+--- a/generic/tclStrToD.c
2
++++ b/generic/tclStrToD.c
3
+@@ -73,7 +73,7 @@ typedef unsigned int fpu_control_t __att
4
+  * MIPS floating-point units need special settings in control registers
5
+  * to use gradual underflow as we expect.
6
+  */
7
+-#if defined(__mips)
8
++#if defined(__sgi) && defined(_COMPILER_VERSION)
9
+ #include <sys/fpu.h>
10
+ #endif
11
+ /*
12
+@@ -2166,7 +2166,7 @@ TclInitDoubleConversion(void)
13
+     } bitwhack;
14
+ #endif
15
+ 
16
+-#if defined(__mips)
17
++#if defined(__sgi) && defined(_COMPILER_VERSION)
18
+     union fpc_csr mipsCR;
19
+ 
20
+     mipsCR.fc_word = get_fpc_csr();