tcl.mk 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ################################################################################
  2. #
  3. # tcl
  4. #
  5. ################################################################################
  6. TCL_VERSION_MAJOR = 8.6
  7. TCL_VERSION = $(TCL_VERSION_MAJOR).2
  8. TCL_SOURCE = tcl$(TCL_VERSION)-src.tar.gz
  9. TCL_SITE = http://downloads.sourceforge.net/project/tcl/Tcl/$(TCL_VERSION)
  10. TCL_LICENSE = tcl license
  11. TCL_LICENSE_FILES = license.terms
  12. TCL_SUBDIR = unix
  13. TCL_INSTALL_STAGING = YES
  14. TCL_AUTORECONF = YES
  15. # Note that --with-system-sqlite will only make a difference
  16. # in the sqlite package (which gets removed if sqlite not
  17. # configured). Don't need to worry about conditionally including
  18. # it in the configure options
  19. TCL_CONF_OPT = \
  20. --disable-symbols \
  21. --disable-langinfo \
  22. --disable-framework \
  23. --with-system-sqlite
  24. HOST_TCL_CONF_OPT = \
  25. --disable-symbols \
  26. --disable-langinfo \
  27. --disable-framework
  28. # I haven't found a good way to force pkgs to not build
  29. # or configure without just removing the entire pkg directory.
  30. define HOST_TCL_REMOVE_PACKAGES
  31. rm -fr $(@D)/pkgs/sqlite3.8.0 \
  32. $(@D)/pkgs/tdbc1.0.0 \
  33. $(@D)/pkgs/tdbcmysql1.0.0 \
  34. $(@D)/pkgs/tdbcodbc1.0.0 \
  35. $(@D)/pkgs/tdbcpostgres1.0.0 \
  36. $(@D)/pkgs/tdbcsqlite3-1.0.0
  37. endef
  38. HOST_TCL_PRE_CONFIGURE_HOOKS += HOST_TCL_REMOVE_PACKAGES
  39. define TCL_REMOVE_PACKAGES
  40. rm -fr $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/sqlite3.8.0) \
  41. $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbc1.0.0) \
  42. $(@D)/pkgs/tdbcmysql1.0.0 \
  43. $(@D)/pkgs/tdbcodbc1.0.0 \
  44. $(@D)/pkgs/tdbcpostgres1.0.0 \
  45. $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbcsqlite3-1.0.0)
  46. endef
  47. TCL_PRE_CONFIGURE_HOOKS += TCL_REMOVE_PACKAGES
  48. ifeq ($(BR2_PACKAGE_TCL_DEL_ENCODINGS),y)
  49. define TCL_REMOVE_ENCODINGS
  50. rm -rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/*
  51. endef
  52. TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_ENCODINGS
  53. endif
  54. ifeq ($(BR2_PACKAGE_TCL_SHLIB_ONLY),y)
  55. define TCL_REMOVE_TCLSH
  56. rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR)
  57. endef
  58. TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_TCLSH
  59. else
  60. define TCL_SYMLINK_TCLSH
  61. ln -sf tclsh$(TCL_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/tclsh
  62. endef
  63. TCL_POST_INSTALL_TARGET_HOOKS += TCL_SYMLINK_TCLSH
  64. endif
  65. # Until someone needs it, we don't handle locale installation. tcl has
  66. # a complicated method of translating LANG-style locale names into its internal
  67. # .msg name which makes it difficult to save the correct locales per the
  68. # configured whitelist.
  69. define TCL_REMOVE_EXTRA
  70. rm -fr $(TARGET_DIR)/usr/lib/tclConfig.sh \
  71. $(TARGET_DIR)/usr/lib/tclooConfig.sh \
  72. $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/tclAppInit.c \
  73. $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/msgs
  74. endef
  75. TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_EXTRA
  76. TCL_DEPENDENCIES = $(if $(BR2_PACKAGE_SQLITE),sqlite)
  77. HOST_TCL_DEPENDENCIES =
  78. $(eval $(autotools-package))
  79. $(eval $(host-autotools-package))