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.

421 lines
11 KiB

  1. #
  2. # Copyright (C) 2009-2020 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:=erlang
  9. PKG_VERSION:=23.0
  10. PKG_RELEASE:=5
  11. PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:= http://www.erlang.org/download/
  13. PKG_HASH:=42dcf3c721f4de59fe74ae7b65950c2174c46dc8d1dd4e27c0594d86f606a635
  14. PKG_LICENSE:=Apache-2.0
  15. PKG_LICENSE_FILES:=LICENSE.txt
  16. PKG_MAINTAINER:=Arnaud Sautaux <arnaud.sautaux@infoteam.ch>
  17. PKG_CPE_ID:=cpe:/a:erlang:erlang
  18. PKG_BUILD_DEPENDS:=erlang/host openssl
  19. PKG_USE_MIPS16:=0
  20. PKG_ASLR_PIE:=0
  21. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/otp_src_$(PKG_VERSION)
  22. PKG_BUILD_DIR:=$(BUILD_DIR)/otp_src_$(PKG_VERSION)
  23. include $(INCLUDE_DIR)/host-build.mk
  24. include $(INCLUDE_DIR)/package.mk
  25. define Package/erlang/Default
  26. SUBMENU:=Erlang
  27. SECTION:=lang
  28. CATEGORY:=Languages
  29. TITLE:=Erlang/OTP programming language
  30. URL:=http://www.erlang.org/
  31. endef
  32. define Package/erlang/Default/description
  33. Erlang/OTP is a general-purpose programming language and runtime
  34. environment. Erlang has built-in support for concurrency, distribution
  35. and fault tolerance.
  36. endef
  37. define Package/erlang
  38. $(call Package/erlang/Default)
  39. DEPENDS+= +libncurses +librt +zlib
  40. PROVIDES:= erlang-erts=10.0.1 erlang-kernel=6.0 erlang-sasl=3.2 erlang-stdlib=3.5
  41. endef
  42. define Package/erlang/description
  43. $(call Package/erlang/Default/description)
  44. .
  45. This package contains the runtime implementation and a minimal set of
  46. modules (erts, kernel, sasl & stdlib).
  47. endef
  48. define Package/erlang-asn1
  49. $(call Package/erlang/Default)
  50. TITLE:=Abstract Syntax Notation One (ASN.1) support
  51. VERSION:=5.0.6
  52. DEPENDS+= +erlang +erlang-syntax-tools
  53. endef
  54. define Package/erlang-asn1/description
  55. $(call Package/erlang/Default/description)
  56. .
  57. This Erlang/OTP package provides Abstract Syntax Notation One (ASN.1)
  58. support.
  59. endef
  60. define Package/erlang-compiler
  61. $(call Package/erlang/Default)
  62. TITLE:=Byte code compiler
  63. VERSION:=7.2
  64. DEPENDS+= +erlang +erlang-hipe
  65. endef
  66. define Package/erlang-compiler/description
  67. $(call Package/erlang/Default/description)
  68. .
  69. This Erlang/OTP package provides a byte code compiler for Erlang which
  70. produces highly compact code.
  71. endef
  72. define Package/erlang-crypto
  73. $(call Package/erlang/Default)
  74. TITLE:=Cryptography support
  75. VERSION:=4.3
  76. DEPENDS+= +erlang +libopenssl
  77. endef
  78. define Package/erlang-crypto/description
  79. $(call Package/erlang/Default/description)
  80. .
  81. This Erlang/OTP package provides functions for computation of message
  82. digests, and encryption and decryption functions.
  83. endef
  84. define Package/erlang-hipe
  85. $(call Package/erlang/Default)
  86. TITLE:=High Performance Erlang
  87. VERSION:=3.18
  88. DEPENDS+= +erlang
  89. endef
  90. define Package/erlang-hipe/description
  91. $(call Package/erlang/Default/description)
  92. .
  93. This Erlang/OTP package provides HiPE (High Performance Erlang)
  94. support.
  95. endef
  96. define Package/erlang-inets
  97. $(call Package/erlang/Default)
  98. TITLE:=Internet clients and servers
  99. VERSION:=7.0
  100. DEPENDS+= +erlang
  101. endef
  102. define Package/erlang-inets/description
  103. $(call Package/erlang/Default/description)
  104. .
  105. This Erlang/OTP package provides a container for Internet clients and
  106. servers. Currently a FTP client, a HTTP client and server, and a tftp
  107. client and server have been incorporated in Inets.
  108. endef
  109. define Package/erlang-mnesia
  110. $(call Package/erlang/Default)
  111. TITLE:=Distributed database
  112. VERSION:=4.15.4
  113. DEPENDS+= +erlang
  114. endef
  115. define Package/erlang-mnesia/description
  116. $(call Package/erlang/Default/description)
  117. .
  118. This Erlang/OTP package provides a distributed DataBase Management
  119. System (DBMS), appropriate for telecommunications applications and
  120. other Erlang applications which require continuous operation and
  121. exhibit soft real-time properties.
  122. endef
  123. define Package/erlang-runtime-tools
  124. $(call Package/erlang/Default)
  125. TITLE:=Low-profile debugging/tracing tools
  126. VERSION:=1.13
  127. DEPENDS+= +erlang
  128. endef
  129. define Package/erlang-runtime-tools/description
  130. $(call Package/erlang/Default/description)
  131. .
  132. This Erlang/OTP package provides low footprint tracing/debugging tools
  133. suitable for inclusion in a production system.
  134. endef
  135. define Package/erlang-snmp
  136. $(call Package/erlang/Default)
  137. TITLE:=Simple Network Management Protocol (SNMP) support
  138. VERSION:=5.2.11
  139. DEPENDS+= +erlang +erlang-asn1
  140. endef
  141. define Package/erlang-snmp/description
  142. $(call Package/erlang/Default/description)
  143. .
  144. This Erlang/OTP package provides Simple Network Management Protocol
  145. (SNMP) support including a MIB compiler and tools for creating SNMP
  146. agents.
  147. endef
  148. define Package/erlang-public-key
  149. $(call Package/erlang/Default)
  150. TITLE:=Public Key support
  151. VERSION:=1.6
  152. DEPENDS+= +erlang +erlang-crypto +erlang-asn1
  153. endef
  154. define Package/erlang-public-key/description
  155. $(call Package/erlang/Default/description)
  156. .
  157. This Erlang/OTP package provides functions to handle public-key infrastructure.
  158. endef
  159. define Package/erlang-ssh
  160. $(call Package/erlang/Default)
  161. TITLE:=Secure Shell (SSH) support
  162. VERSION:=4.7
  163. DEPENDS+= +erlang +erlang-crypto
  164. endef
  165. define Package/erlang-ssh/description
  166. $(call Package/erlang/Default/description)
  167. .
  168. This Erlang/OTP package provides an implementation of the Secure Shell
  169. protocol, with SSH & SFTP support.
  170. endef
  171. define Package/erlang-ssl
  172. $(call Package/erlang/Default)
  173. TITLE:=Secure Sockets Layer (SSL) support
  174. VERSION:=9.0
  175. DEPENDS+= +erlang +erlang-crypto
  176. endef
  177. define Package/erlang-ssl/description
  178. $(call Package/erlang/Default/description)
  179. .
  180. This Erlang/OTP package provides support for secure communication over
  181. sockets.
  182. endef
  183. define Package/erlang-syntax-tools
  184. $(call Package/erlang/Default)
  185. TITLE:=Abstract Erlang syntax trees handling support
  186. VERSION:=2.1.5
  187. DEPENDS+= +erlang
  188. endef
  189. define Package/erlang-syntax-tools/description
  190. $(call Package/erlang/Default/description)
  191. .
  192. This Erlang/OTP package provides support for handling abstract Erlang
  193. syntax trees.
  194. endef
  195. define Package/erlang-tools
  196. $(call Package/erlang/Default)
  197. TITLE:=Erlang tools support
  198. VERSION:=3.0
  199. DEPENDS+= +erlang
  200. endef
  201. define Package/erlang-tools/description
  202. $(call Package/erlang/Default/description)
  203. .
  204. This Erlang/OTP package provides support for misc tools.
  205. endef
  206. define Package/erlang-reltool
  207. $(call Package/erlang/Default)
  208. TITLE:=Erlang reltool support
  209. VERSION:=0.7.6
  210. DEPENDS+= +erlang
  211. endef
  212. define Package/erlang-reltool/description
  213. $(call Package/erlang/Default/description)
  214. .
  215. This Erlang/OTP package provides support for release management.
  216. endef
  217. define Package/erlang-erl-interface
  218. $(call Package/erlang/Default)
  219. TITLE:=Erlang erl_interface support
  220. VERSION:=3.9.3
  221. DEPENDS+= +erlang
  222. endef
  223. define Package/erlang-erl-interface/description
  224. $(call Package/erlang/Default/description)
  225. .
  226. This Erlang/OTP package provides support for erlang interoperability with other languages.
  227. endef
  228. define Package/erlang-os_mon
  229. $(call Package/erlang/Default)
  230. TITLE:=Erlang OS Monitoring Application
  231. VERSION:=2.4.5
  232. DEPENDS+= +erlang
  233. endef
  234. define Package/erlang-os_mon/description
  235. $(call Package/erlang/Default/description)
  236. .
  237. This Erlang/OTP package provides the following services:
  238. cpu_sup CPU load and utilization supervision
  239. disksup Disk supervision
  240. memsup Memory supervision
  241. endef
  242. define Package/erlang-xmerl
  243. $(call Package/erlang/Default)
  244. TITLE:=Erlang XML export
  245. VERSION:=1.3.17
  246. DEPENDS+= +erlang
  247. endef
  248. define Package/erlang-xmerl/description
  249. $(call Package/erlang/Default/description)
  250. .
  251. This Erlang/OTP package provides functions for exporting XML data to an external format
  252. endef
  253. # Host
  254. HOST_CONFIGURE_ARGS += \
  255. --disable-hipe \
  256. --disable-pgo \
  257. --disable-smp-support \
  258. --without-javac
  259. # Target
  260. CONFIGURE_ARGS += \
  261. --disable-hipe \
  262. --disable-smp-support \
  263. --without-javac \
  264. --enable-dynamic-ssl-lib
  265. CONFIGURE_VARS += \
  266. SHLIB_LD="$(TARGET_CC)" \
  267. TARGET_ARCH="$(TARGET_ARCH)" \
  268. ac_cv_func_mmap_fixed_mapped=yes \
  269. ac_cv_path_WX_CONFIG_PATH=no \
  270. erl_xcomp_getaddrinfo=no \
  271. erl_xcomp_sysroot="$(STAGING_DIR)"
  272. EXTRA_CFLAGS+=-D_GNU_SOURCE
  273. EXTRA_LDFLAGS+=-lz
  274. define Build/Compile
  275. $(MAKE) -C $(PKG_BUILD_DIR) \
  276. noboot
  277. $(MAKE) -C $(PKG_BUILD_DIR) \
  278. INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
  279. install
  280. endef
  281. define Package/erlang/install
  282. $(INSTALL_DIR) $(1)/usr/bin
  283. for f in epmd erl erlc escript run_erl; do \
  284. $(CP) $(PKG_INSTALL_DIR)/usr/bin/$$$$f $(1)/usr/bin/ ; \
  285. done
  286. $(INSTALL_DIR) $(1)/usr/lib/erlang/bin
  287. for f in erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot to_erl; do \
  288. $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/bin/$$$$f $(1)/usr/lib/erlang/bin/ ; \
  289. done
  290. $(INSTALL_DIR) $(1)/usr/lib/erlang/lib
  291. for m in erts kernel sasl stdlib; do \
  292. $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$m-* $(1)/usr/lib/erlang/lib/ ; \
  293. rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/examples ; \
  294. rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/src ; \
  295. done
  296. $(INSTALL_DIR) $(1)/usr/lib/erlang
  297. $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/erts-* $(1)/usr/lib/erlang/
  298. rm -rf $(1)/usr/lib/erlang/erts-*/{doc,include,lib,man,src}
  299. rm -rf $(1)/usr/lib/erlang/erts-*/bin/*.src
  300. $(INSTALL_DIR) $(1)/usr/lib/erlang/releases
  301. $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/releases/* $(1)/usr/lib/erlang/releases/
  302. $(SED) 's,%ERL_ROOT%,/usr/lib/erlang,g' \
  303. $(1)/usr/lib/erlang/releases/RELEASES.src
  304. mv -f $(1)/usr/lib/erlang/releases/RELEASES.src \
  305. $(1)/usr/lib/erlang/releases/RELEASES
  306. for f in bin/erl bin/start erts-*/bin/erl erts-*/bin/start; do \
  307. $(SED) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \
  308. $(1)/usr/lib/erlang/$$$$f ; \
  309. done
  310. endef
  311. define Build/InstallDev
  312. $(INSTALL_DIR) $(1)/usr/lib
  313. $(CP) $(PKG_BUILD_DIR)/lib/erl_interface/obj/*/*.a $(1)/usr/lib/
  314. $(INSTALL_DIR) $(1)/usr/include
  315. $(CP) $(PKG_BUILD_DIR)/lib/erl_interface/include/*.h $(1)/usr/include/
  316. endef
  317. define BuildModule
  318. define Package/erlang-$(1)/install
  319. $(INSTALL_DIR) $$(1)/usr/lib/erlang/lib
  320. for m in $(2); do \
  321. $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$$$$$m-* $$(1)/usr/lib/erlang/lib/ ; \
  322. rm -rf $$(1)/usr/lib/erlang/lib/$$$$$$$$m-*/{examples,priv/obj,src} ; \
  323. done
  324. endef
  325. $$(eval $$(call BuildPackage,erlang-$(1)))
  326. endef
  327. $(eval $(call HostBuild))
  328. $(eval $(call BuildPackage,erlang))
  329. $(eval $(call BuildModule,asn1,asn1))
  330. $(eval $(call BuildModule,compiler,compiler))
  331. $(eval $(call BuildModule,crypto,crypto))
  332. $(eval $(call BuildModule,hipe,hipe))
  333. $(eval $(call BuildModule,inets,inets))
  334. $(eval $(call BuildModule,mnesia,mnesia))
  335. $(eval $(call BuildModule,runtime-tools,runtime_tools))
  336. $(eval $(call BuildModule,snmp,snmp))
  337. $(eval $(call BuildModule,public-key,public_key))
  338. $(eval $(call BuildModule,ssh,ssh))
  339. $(eval $(call BuildModule,ssl,ssl))
  340. $(eval $(call BuildModule,syntax-tools,syntax_tools))
  341. $(eval $(call BuildModule,tools,tools))
  342. $(eval $(call BuildModule,reltool,reltool))
  343. $(eval $(call BuildModule,erl-interface,erl_interface))
  344. $(eval $(call BuildModule,os_mon,os_mon))
  345. $(eval $(call BuildModule,xmerl,xmerl))