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