taskwarrior: moved to github
[openwrt.org/packages.git] / lang / Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
#
# Copyright (C) 2009-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
 
include $(TOPDIR)/rules.mk
 
PKG_NAME:=erlang
PKG_VERSION:=R16B02
PKG_RELEASE:=1
 
PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= http://www.erlang.org/download/ \
        http://erlang.mirror.su.se/
PKG_MD5SUM:= ca63bcde0e5ae0f2df9457f97b3115a4
 
PKG_BUILD_DEPENDS:=erlang/host openssl
 
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/otp_src_$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/otp_src_$(PKG_VERSION)
 
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
 
define Package/erlang/Default
  SUBMENU:=Erlang
  SECTION:=lang
  CATEGORY:=Languages
  TITLE:=Erlang/OTP programming language
  URL:=http://www.erlang.org/
endef
 
define Package/erlang/Default/description
 Erlang/OTP is a general-purpose programming language and runtime
 environment. Erlang has built-in support for concurrency, distribution
 and fault tolerance.
endef
 
define Package/erlang
$(call Package/erlang/Default)
  DEPENDS+= +libncurses +librt +zlib
  PROVIDES:= erlang-erts=5.10.3 erlang-kernel=2.16.3 erlang-sasl=2.3.3 erlang-stdlib=1.19.3
endef
 
define Package/erlang/description
$(call Package/erlang/Default/description)
 .
 This package contains the runtime implementation and a minimal set of
 modules (erts, kernel, sasl & stdlib).
endef
 
 
define Package/erlang-asn1
$(call Package/erlang/Default)
  TITLE:=Abstract Syntax Notation One (ASN.1) support
  VERSION:=2.0.3
  DEPENDS+= +erlang +erlang-syntax-tools
endef
 
define Package/erlang-asn1/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides Abstract Syntax Notation One (ASN.1)
 support.
endef
 
 
define Package/erlang-compiler
$(call Package/erlang/Default)
  TITLE:=Byte code compiler
  VERSION:=4.9.3
  DEPENDS+= +erlang +erlang-hipe
endef
 
define Package/erlang-compiler/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides a byte code compiler for Erlang which
 produces highly compact code.
endef
 
 
define Package/erlang-crypto
$(call Package/erlang/Default)
  TITLE:=Cryptography support
  VERSION:=3.1
  DEPENDS+= +erlang +libopenssl
endef
 
define Package/erlang-crypto/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides functions for computation of message
 digests, and encryption and decryption functions.
endef
 
 
define Package/erlang-hipe
$(call Package/erlang/Default)
  TITLE:=High Performance Erlang
  VERSION:=3.10.2.1
  DEPENDS+= +erlang
endef
 
define Package/erlang-hipe/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides HiPE (High Performance Erlang)
 support.
endef
 
 
define Package/erlang-inets
$(call Package/erlang/Default)
  TITLE:=Internet clients and servers
  VERSION:=5.9.6
  DEPENDS+= +erlang
endef
 
define Package/erlang-inets/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides a container for Internet clients and
 servers. Currently a FTP client, a HTTP client and server, and a tftp
 client and server have been incorporated in Inets.
endef
 
 
define Package/erlang-mnesia
$(call Package/erlang/Default)
  TITLE:=Distributed database
  VERSION:=4.10
  DEPENDS+= +erlang
endef
 
define Package/erlang-mnesia/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides a distributed DataBase Management
 System (DBMS), appropriate for telecommunications applications and
 other Erlang applications which require continuous operation and
 exhibit soft real-time properties.
endef
 
 
define Package/erlang-runtime-tools
$(call Package/erlang/Default)
  TITLE:=Low-profile debugging/tracing tools
  VERSION:=1.8.12
  DEPENDS+= +erlang
endef
 
define Package/erlang-runtime-tools/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides low footprint tracing/debugging tools
 suitable for inclusion in a production system.
endef
 
 
define Package/erlang-snmp
$(call Package/erlang/Default)
  TITLE:=Simple Network Management Protocol (SNMP) support
  VERSION:=4.24.2
  DEPENDS+= +erlang +erlang-asn1
endef
 
define Package/erlang-snmp/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides Simple Network Management Protocol
 (SNMP) support including a MIB compiler and tools for creating SNMP
 agents.
endef
 
 
define Package/erlang-ssh
$(call Package/erlang/Default)
  TITLE:=Secure Shell (SSH) support
  VERSION:=2.1.8
  DEPENDS+= +erlang +erlang-crypto
endef
 
define Package/erlang-ssh/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides an implementation of the Secure Shell
 protocol, with SSH & SFTP support.
endef
 
 
define Package/erlang-ssl
$(call Package/erlang/Default)
  TITLE:=Secure Sockets Layer (SSL) support
  VERSION:=5.3.1
  DEPENDS+= +erlang +erlang-crypto
endef
 
define Package/erlang-ssl/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides support for secure communication over
 sockets.
endef
 
 
define Package/erlang-syntax-tools
$(call Package/erlang/Default)
  TITLE:=Abstract Erlang syntax trees handling support
  VERSION:=1.6.11
  DEPENDS+= +erlang
endef
 
define Package/erlang-syntax-tools/description
$(call Package/erlang/Default/description)
 .
 This Erlang/OTP package provides support for handling abstract Erlang
 syntax trees.
endef
 
 
# Host
 
HOST_CONFIGURE_ARGS += \
        --disable-hipe \
        --disable-smp-support \
        --without-javac
 
define Host/Compile
        $(MAKE) -C $(HOST_BUILD_DIR) all
endef
 
define Host/Install
        $(MAKE) -C $(HOST_BUILD_DIR) install
endef
 
 
# Target
 
CONFIGURE_ARGS += \
        --disable-hipe \
        --disable-smp-support \
        --without-javac \
        --enable-dynamic-ssl-lib
 
CONFIGURE_VARS += \
        SHLIB_LD="$(TARGET_CC)" \
        TARGET_ARCH="$(TARGET_ARCH)" \
        ac_cv_func_mmap_fixed_mapped=yes \
        ac_cv_path_WX_CONFIG_PATH=no \
        erl_xcomp_getaddrinfo=no \
        erl_xcomp_sysroot="$(STAGING_DIR)"
 
EXTRA_LDFLAGS+=-lz
 
define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                noboot
        $(MAKE) -C $(PKG_BUILD_DIR) \
                INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
                install
endef
 
define Package/erlang/install
        $(INSTALL_DIR) $(1)/usr/bin
        for f in epmd erl erlc escript run_erl; do \
                $(CP) $(PKG_INSTALL_DIR)/usr/bin/$$$$f $(1)/usr/bin/ ; \
        done
        $(INSTALL_DIR) $(1)/usr/lib/erlang/bin
        for f in erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot to_erl; do \
                $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/bin/$$$$f $(1)/usr/lib/erlang/bin/ ; \
        done
        $(INSTALL_DIR) $(1)/usr/lib/erlang/lib
        for m in erts kernel sasl stdlib; do \
                $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$m-* $(1)/usr/lib/erlang/lib/ ; \
                rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/examples ; \
                rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/src ; \
        done
        $(INSTALL_DIR) $(1)/usr/lib/erlang
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/erts-* $(1)/usr/lib/erlang/
        rm -rf $(1)/usr/lib/erlang/erts-*/{doc,include,lib,man,src}
        rm -rf $(1)/usr/lib/erlang/erts-*/bin/*.src
        $(INSTALL_DIR) $(1)/usr/lib/erlang/releases
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/releases/* $(1)/usr/lib/erlang/releases/
        $(SED) 's,%ERL_ROOT%,/usr/lib/erlang,g' \
                $(1)/usr/lib/erlang/releases/RELEASES.src
        mv -f $(1)/usr/lib/erlang/releases/RELEASES.src \
                $(1)/usr/lib/erlang/releases/RELEASES
        for f in bin/erl bin/start erts-*/bin/erl erts-*/bin/start; do \
                $(SED) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \
                        $(1)/usr/lib/erlang/$$$$f ; \
        done
endef
 
define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_BUILD_DIR)/lib/erl_interface/obj/*/*.a $(1)/usr/lib
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_BUILD_DIR)/lib/erl_interface/include/*.h $(1)/usr/include
endef
 
define BuildModule
 
  define Package/erlang-$(1)/install
        $(INSTALL_DIR) $$(1)/usr/lib/erlang/lib
        for m in $(2); do \
                $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$$$$$m-* $$(1)/usr/lib/erlang/lib/ ; \
                rm -rf $$(1)/usr/lib/erlang/lib/$$$$$$$$m-*/{examples,priv/obj,src} ; \
        done
  endef
 
  $$(eval $$(call BuildPackage,erlang-$(1)))
 
endef
 
 
$(eval $(call HostBuild))
$(eval $(call BuildPackage,erlang))
$(eval $(call BuildModule,asn1,asn1))
$(eval $(call BuildModule,compiler,compiler))
$(eval $(call BuildModule,crypto,crypto))
$(eval $(call BuildModule,hipe,hipe))
$(eval $(call BuildModule,inets,inets))
$(eval $(call BuildModule,mnesia,mnesia))
$(eval $(call BuildModule,runtime-tools,runtime_tools))
$(eval $(call BuildModule,snmp,snmp))
$(eval $(call BuildModule,ssh,ssh))
$(eval $(call BuildModule,ssl,ssl))
$(eval $(call BuildModule,syntax-tools,syntax_tools))
 
comments