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.

108 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_CPE_ID:=cpe:/a:tcl_tk:tcl_tk
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(PKG_VERSION)
  20. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)$(PKG_VERSION)
  21. PKG_FIXUP:=autoreconf
  22. PKG_INSTALL:=1
  23. include $(INCLUDE_DIR)/host-build.mk
  24. include $(INCLUDE_DIR)/package.mk
  25. define Package/tcl
  26. SUBMENU:=Tcl
  27. SECTION:=lang
  28. CATEGORY:=Languages
  29. DEPENDS:=+libpthread +zlib
  30. TITLE:=The Tcl language
  31. URL:=https://www.tcl.tk/
  32. endef
  33. define Package/tcl/description
  34. Tcl, or Tool Command Language, is a an elegant, versatile, feature-rich,
  35. simple-to-learn yet very powerful industrial-strength open-source
  36. programming language and development platform. It is renowned for its
  37. stability and utility, and its emphasis on providing a cross-platform
  38. programming API makes it an ideal choice for an enormous variety of
  39. programming jobs.
  40. endef
  41. CONFIGURE_PATH := unix
  42. CONFIGURE_VARS += \
  43. tcl_cv_strtod_unbroken=ok
  44. CONFIGURE_ARGS += \
  45. --enable-threads
  46. MAKE_PATH := unix
  47. define Build/Prepare
  48. $(call Build/Prepare/Default)
  49. rm -rf $(PKG_BUILD_DIR)/pkgs/*
  50. endef
  51. define Build/InstallDev
  52. $(INSTALL_DIR) $(1)/usr/include
  53. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtcl*.{a,so*} $(1)/usr/lib/
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/tclConfig.sh $(1)/usr/lib/
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/tclooConfig.sh $(1)/usr/lib/
  58. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/tcl.pc \
  60. $(1)/usr/lib/pkgconfig
  61. endef
  62. define Package/tcl/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib
  65. $(INSTALL_DIR) $(1)/usr/bin
  66. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
  67. $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/tcl8 $(1)/usr/lib/
  68. $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/tcl$(TCL_MAJOR_VERSION) $(1)/usr/lib/
  69. $(LN) tclsh$(TCL_MAJOR_VERSION) $(1)/usr/bin/tclsh
  70. endef
  71. define Host/Configure
  72. $(call Host/Configure/Default,$(1),$(2),$(CONFIGURE_PATH)/$(3))
  73. endef
  74. define Host/Compile
  75. +$(HOST_MAKE_VARS) \
  76. $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/$(MAKE_PATH) \
  77. $(HOST_MAKE_FLAGS) \
  78. $(1)
  79. endef
  80. define Host/Install
  81. $(call Host/Compile,install)
  82. (cd $(HOST_BUILD_PREFIX)/bin; test -f tclsh || ln -s tclsh$(TCL_MAJOR_VERSION) tclsh)
  83. endef
  84. $(eval $(call HostBuild))
  85. $(eval $(call BuildPackage,tcl))