Permalink
Browse files

backport tcl patch

update config
  • Loading branch information...
1 parent fef0214 commit 34d4f1ddb5aaf0ea405d163fca83a712b1bb653d @jcwoltz committed Feb 20, 2012
Showing with 33 additions and 22 deletions.
  1. +3 −3 br1111-main/.config
  2. +10 −10 br1111-main/package/tcl/Config.in
  3. +20 −9 br1111-main/package/tcl/tcl.mk
View
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Buildroot 2011.11-gd42a674-dirty Configuration
-# Sun Feb 19 13:05:11 2012
+# Buildroot 2011.11-gfef0214-dirty Configuration
+# Mon Feb 20 11:32:12 2012
#
BR2_HAVE_DOT_CONFIG=y
BR2_arm=y
@@ -544,8 +544,8 @@ BR2_PACKAGE_PYTHON_SQLITE=y
BR2_PACKAGE_PYTHON_ZLIB=y
# BR2_PACKAGE_RUBY is not set
BR2_PACKAGE_TCL=y
+BR2_PACKAGE_TCL_TCLSH=y
# BR2_PACKAGE_TCL_DEL_ENCODINGS is not set
-# BR2_PACKAGE_TCL_SHLIB_ONLY is not set
#
# Libraries
@@ -5,23 +5,23 @@ config BR2_PACKAGE_TCL
http://www.tcl.tk
+if BR2_PACKAGE_TCL
+
+config BR2_PACKAGE_TCL_TCLSH
+ bool "install tclsh"
+ help
+ Install tclsh, the TCL interpreter.
+
+ Takes ~14kb on top of the libraries.
+
config BR2_PACKAGE_TCL_DEL_ENCODINGS
bool "delete encodings (saves 1.4Mb)"
default y
- depends on BR2_PACKAGE_TCL
help
Delete encoding files for TCL. If your programs do not use
various tcl character recoding functions, you may safely
choose Y here.
It saves approx. 1.4 Mb of space.
-config BR2_PACKAGE_TCL_SHLIB_ONLY
- bool "install only shared library"
- default y
- depends on BR2_PACKAGE_TCL
- help
- Install only TCL shared library and not binary tcl
- interpreter(tclsh8.4).
-
- Saves ~14kb.
+endif
@@ -19,17 +19,28 @@ HOST_TCL_CONF_OPT = \
--disable-langinfo \
--disable-framework
-define TCL_POST_INSTALL_CLEANUP
- -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtcl8.4.so
- -if [ "$(BR2_PACKAGE_TCL_DEL_ENCODINGS)" = "y" ]; then \
- rm -Rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/*; \
- fi
- -if [ "$(BR2_PACKAGE_TCL_SHLIB_ONLY)" = "y" ]; then \
- rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR); \
- fi
+# libtcl is installed with mode 444, so correct that first.
+define TCL_POST_INSTALL_STRIP
+ chmod +w $(TARGET_DIR)/usr/lib/libtcl$(TCL_VERSION_MAJOR).so
+ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtcl$(TCL_VERSION_MAJOR).so
endef
+TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_STRIP
+
+define TCL_POST_INSTALL_RM_ENCODINGS-y
+ rm -Rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/*
+endef
+TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_RM_ENCODINGS-$(BR2_PACKAGE_TCL_DEL_ENCODINGS)
+
+define TCL_POST_INSTALL_RM_TCLSH-
+ rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR)
+endef
+TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_RM_TCLSH-$(BR2_PACKAGE_TCL_TCLSH)
+
+define TCL_POST_INSTALL_LN_TCLSH-y
+ ln -snf tclsh$(TCL_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/tclsh
+endef
+TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_LN_TCLSH-$(BR2_PACKAGE_TCL_TCLSH)
-TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_CLEANUP
$(eval $(call AUTOTARGETS))
$(eval $(call AUTOTARGETS,host))

0 comments on commit 34d4f1d

Please sign in to comment.