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.

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