tcl.mk 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ################################################################################
  2. #
  3. # tcl
  4. #
  5. ################################################################################
  6. TCL_VERSION_MAJOR = 8.6
  7. TCL_VERSION = $(TCL_VERSION_MAJOR).13
  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
  11. TCL_LICENSE_FILES = license.terms
  12. TCL_CPE_ID_VENDOR = tcl
  13. TCL_SUBDIR = unix
  14. TCL_INSTALL_STAGING = YES
  15. TCL_AUTORECONF = YES
  16. TCL_CONF_OPTS = \
  17. --disable-symbols \
  18. --disable-langinfo \
  19. --disable-framework
  20. HOST_TCL_CONF_OPTS = \
  21. --disable-symbols \
  22. --disable-langinfo \
  23. --disable-framework
  24. # I haven't found a good way to force pkgs to not build
  25. # or configure without just removing the entire pkg directory.
  26. define HOST_TCL_REMOVE_PACKAGES
  27. rm -fr $(@D)/pkgs/sqlite3* $(@D)/pkgs/tdbc*
  28. endef
  29. HOST_TCL_PRE_CONFIGURE_HOOKS += HOST_TCL_REMOVE_PACKAGES
  30. # We remove the bundled sqlite as we prefer to not use bundled stuff at all.
  31. define TCL_REMOVE_PACKAGES
  32. rm -fr $(@D)/pkgs/sqlite3* \
  33. $(if $(BR2_PACKAGE_MARIADB),,$(@D)/pkgs/tdbcmysql*) \
  34. $(@D)/pkgs/tdbcodbc* \
  35. $(if $(BR2_PACKAGE_POSTGRESQL),,$(@D)/pkgs/tdbcpostgres*) \
  36. $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbcsqlite3*)
  37. endef
  38. TCL_PRE_CONFIGURE_HOOKS += TCL_REMOVE_PACKAGES
  39. ifeq ($(BR2_PACKAGE_TCL_DEL_ENCODINGS),y)
  40. define TCL_REMOVE_ENCODINGS
  41. rm -rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/*
  42. endef
  43. TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_ENCODINGS
  44. endif
  45. ifeq ($(BR2_PACKAGE_TCL_SHLIB_ONLY),y)
  46. define TCL_REMOVE_TCLSH
  47. rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR)
  48. endef
  49. TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_TCLSH
  50. else
  51. define TCL_SYMLINK_TCLSH
  52. ln -sf tclsh$(TCL_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/tclsh
  53. endef
  54. TCL_POST_INSTALL_TARGET_HOOKS += TCL_SYMLINK_TCLSH
  55. endif
  56. # Until someone needs it, we don't handle locale installation. tcl has
  57. # a complicated method of translating LANG-style locale names into its internal
  58. # .msg name which makes it difficult to save the correct locales per the
  59. # configured whitelist.
  60. define TCL_REMOVE_EXTRA
  61. rm -fr $(TARGET_DIR)/usr/lib/tclConfig.sh \
  62. $(TARGET_DIR)/usr/lib/tclooConfig.sh \
  63. $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/tclAppInit.c \
  64. $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/msgs
  65. endef
  66. TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_EXTRA
  67. TCL_DEPENDENCIES = $(if $(BR2_PACKAGE_SQLITE),sqlite) \
  68. $(if $(BR2_PACKAGE_MARIADB),mariadb) \
  69. $(if $(BR2_PACKAGE_POSTGRESQL),postgresql) \
  70. zlib
  71. $(eval $(autotools-package))
  72. $(eval $(host-autotools-package))