Add tcl package from #3980
authorFlorian Fainelli <florian@openwrt.org>
Tue, 28 Oct 2008 23:07:38 +0000 (23:07 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 28 Oct 2008 23:07:38 +0000 (23:07 +0000)
SVN-Revision: 13070

lang/tcl/Makefile [new file with mode: 0644]
lang/tcl/patches/001-configure_in.patch [new file with mode: 0644]
lang/tcl/patches/002-strstr.patch [new file with mode: 0644]

diff --git a/lang/tcl/Makefile b/lang/tcl/Makefile
new file mode 100644 (file)
index 0000000..8304036
--- /dev/null
@@ -0,0 +1,70 @@
+# 
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tcl
+PKG_VERSION:=8.4.19
+PKG_RELEASE:=1
+
+PKG_SOURCE:=tcl8.4.19.tar.gz
+PKG_SOURCE_URL:=http://heanet.dl.sourceforge.net/sourceforge/tcl/tcl8.4.19-src.tar.gz
+PKG_MD5SUM:=ade2c033a7b545ee108f3fdfeb629fcf
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/tcl
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=TCL Lang
+  URL:=http://www.tcl.tk
+endef
+
+define Package/tcl/description
+       TCL Scripting Language
+endef
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR)/unix; \
+       autoconf configure.in > configure; \
+       sed -i.bak "s/relid'/relid/" configure; \
+       $(TARGET_CONFIGURE_OPTS) \
+       ./configure \
+               --build=$(GNU_HOST_NAME) \
+               --host=$(GNU_TARGET_NAME) \
+               --prefix=/usr \
+               --enable-gcc \
+               --enable-threads \
+               --disable-nls \
+       )
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR)/unix \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install
+endef
+
+define Build/InstallDev
+       mkdir -p $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
+       mkdir -p $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcl*.{a,so*} $(1)/usr/lib/
+endef
+
+
+define Package/tcl/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,tcl))
diff --git a/lang/tcl/patches/001-configure_in.patch b/lang/tcl/patches/001-configure_in.patch
new file mode 100644 (file)
index 0000000..d268d23
--- /dev/null
@@ -0,0 +1,11 @@
+--- tcl8.4.16/unix/configure.in.orig   2007-09-21 17:07:02.000000000 +0000
++++ tcl8.4.16/unix/configure.in        2008-03-19 05:48:57.000000000 +0000
+@@ -308,7 +308,7 @@
+     fi
+ fi
+ if test $tcl_ok = 0; then
+-    LIBOBJS="$LIBOBJS strtod.o"
++   :; # LIBOBJS="$LIBOBJS strtod.o"
+ fi
+ #--------------------------------------------------------------------
diff --git a/lang/tcl/patches/002-strstr.patch b/lang/tcl/patches/002-strstr.patch
new file mode 100644 (file)
index 0000000..8464de1
--- /dev/null
@@ -0,0 +1,13 @@
+--- tcl8.4.12/compat/strstr.c  2005-04-12 20:28:56.000000000 +0200
++++ tcl/compat/strstr.c        2005-12-19 13:35:52.087181048 +0100
+@@ -37,7 +37,9 @@
+  *
+  *----------------------------------------------------------------------
+  */
+-
++#ifndef NULL
++#define NULL
++#endif
+ char *
+ strstr(string, substring)
+     register char *string;    /* String to search. */