You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.8 KiB

  1. #
  2. # Copyright (C) 2006-2018 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=tcl
  9. TCL_MAJOR_VERSION:=8.6
  10. PKG_VERSION:=${TCL_MAJOR_VERSION}.9
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)$(PKG_VERSION)-src.tar.gz
  13. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  14. PKG_HASH:=ad0cd2de2c87b9ba8086b43957a0de3eb2eb565c7159d5f53ccbba3feb915f4e
  15. PKG_LICENSE:=TCL
  16. PKG_LICENSE_FILES:=license.terms
  17. PKG_MAINTAINER:=Joe Mistachkin <joe@mistachkin.com>
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION)
  19. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(PKG_VERSION)
  20. PKG_FIXUP:=autoreconf
  21. PKG_INSTALL:=1
  22. include $(INCLUDE_DIR)/host-build.mk
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/tcl
  25. SUBMENU:=Tcl
  26. SECTION:=lang
  27. CATEGORY:=Languages
  28. DEPENDS:=+libpthread +zlib
  29. TITLE:=The Tcl language
  30. URL:=https://www.tcl.tk/
  31. endef
  32. define Package/tcl/description
  33. Tcl, or Tool Command Language, is a an elegant, versatile, feature-rich,
  34. simple-to-learn yet very powerful industrial-strength open-source
  35. programming language and development platform. It is renowned for its
  36. stability and utility, and its emphasis on providing a cross-platform
  37. programming API makes it an ideal choice for an enormous variety of
  38. programming jobs.
  39. endef
  40. CONFIGURE_PATH := unix
  41. CONFIGURE_VARS += \
  42. tcl_cv_strtod_unbroken=ok
  43. CONFIGURE_ARGS += \
  44. --enable-threads
  45. MAKE_PATH := unix
  46. define Build/Prepare
  47. $(call Build/Prepare/Default)
  48. rm -rf $(PKG_BUILD_DIR)/pkgs/*
  49. endef
  50. define Build/InstallDev
  51. $(INSTALL_DIR) $(1)/usr/include
  52. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcl*.{a,so*} $(1)/usr/lib/
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/tclConfig.sh $(1)/usr/lib/
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/tclooConfig.sh $(1)/usr/lib/
  57. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/tcl.pc \
  59. $(1)/usr/lib/pkgconfig
  60. endef
  61. define Package/tcl/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib
  64. $(INSTALL_DIR) $(1)/usr/bin
  65. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
  66. $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/tcl8 $(1)/usr/lib/
  67. $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/tcl$(TCL_MAJOR_VERSION) $(1)/usr/lib/
  68. $(LN) tclsh$(TCL_MAJOR_VERSION) $(1)/usr/bin/tclsh
  69. endef
  70. define Host/Configure
  71. $(call Host/Configure/Default,$(1),$(2),$(CONFIGURE_PATH)/$(3))
  72. endef
  73. define Host/Compile
  74. +$(HOST_MAKE_VARS) \
  75. $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/$(MAKE_PATH) \
  76. $(HOST_MAKE_FLAGS) \
  77. $(1)
  78. endef
  79. define Host/Install
  80. $(call Host/Compile,install)
  81. (cd $(HOST_BUILD_PREFIX)/bin; test -f tclsh || ln -s tclsh$(TCL_MAJOR_VERSION) tclsh)
  82. endef
  83. $(eval $(call HostBuild))
  84. $(eval $(call BuildPackage,tcl))