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.

429 lines
11 KiB

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