aboutsummaryrefslogtreecommitdiffstats
path: root/testing/erlang/APKBUILD
blob: 87de3b79455a67ef8ec4cc52cd3c3b57ada2c012 (plain) (blame)
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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Marlus Saraiva <marlus.saraiva@gmail.com>

pkgname=erlang
pkgver=17.5
pkgrel=1
pkgdesc="General-purpose programming language and runtime environment"
url="http://www.erlang.org/"
license="ERPL"
arch="all"
depends="$pkgname-kernel $pkgname-stdlib $pkgname-compiler"
makedepends="perl-dev zlib-dev ncurses-dev openssl-dev openjdk7 unixodbc-dev"
install=""
subpackages="$pkgname-dev
             $pkgname-asn1:asn
	     $pkgname-common-test:common_test
	     $pkgname-compiler:compiler
	     $pkgname-cosevent:cos_event
	     $pkgname-coseventdomain:cos_event_domain
	     $pkgname-cosfiletransfer:cos_file_transfer
	     $pkgname-cosnotification:cos_notification
	     $pkgname-cosproperty:cos_property
	     $pkgname-costime:cos_time
	     $pkgname-costransaction:cos_transactions
	     $pkgname-crypto:crypto
	     $pkgname-debugger:debugger
	     $pkgname-dialyzer:dialyzer
	     $pkgname-diameter:diameter
	     $pkgname-edoc:edoc
	     $pkgname-eldap:eldap
	     $pkgname-erl-docgen:erl_docgen
	     $pkgname-erl-interface:erl_interface
	     $pkgname-erts:erts
	     $pkgname-et:et
	     $pkgname-eunit:eunit
	     $pkgname-gs:gs
	     $pkgname-hipe:hipe
	     $pkgname-ic:ic
	     $pkgname-inets:inets
	     $pkgname-jinterface:jinterface
	     $pkgname-kernel:kernel
	     $pkgname-megaco:megaco
	     $pkgname-mnesia:mnesia
	     $pkgname-observer:observer
	     $pkgname-odbc:odbc
	     $pkgname-orber:orber
	     $pkgname-os-mon:os_mon
	     $pkgname-ose:ose
	     $pkgname-otp-mibs:otp_mibs
	     $pkgname-parsetools:parsetools
	     $pkgname-percept:percept
	     $pkgname-public-key:public_key
	     $pkgname-reltool:reltool
	     $pkgname-runtime-tools:runtime_tools
	     $pkgname-sasl:sasl
	     $pkgname-snmp:snmp
	     $pkgname-ssh:ssh
	     $pkgname-ssl:ssl
	     $pkgname-stdlib:stdlib
	     $pkgname-syntax-tools:syntax_tools
	     $pkgname-test-server:test_server
	     $pkgname-tools:tools
	     $pkgname-typer:typer
	     $pkgname-webtool:webtool
	     $pkgname-xmerl:xmerl"
# Patches 0001-0009 found: http://pkgs.fedoraproject.org/gitweb/?p=erlang.git;a=tree
source="http://www.erlang.org/download/otp_src_$pkgver.tar.gz
        otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
        otp-0002-Remove-rpath.patch
        otp-0003-Do-not-install-C-sources.patch
        otp-0004-Do-not-install-Java-sources.patch
        otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
        otp-0006-Do-not-install-erlang-sources.patch
        otp-0007-Split-off-webtool-dependency-from-tools.patch
        otp-0008-Introduce-os-getenv-2.patch
        otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
        remove-private-unit32.patch
	replace_glibc_check.patch"

_builddir="$srcdir"/otp_src_$pkgver

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	export CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
	export PATH="/usr/lib/jvm/java-1.7-openjdk/bin:$PATH"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--host="$CHOST" \
		--build="$CBUILD" \
		--enable-threads \
		--enable-shared-zlib \
		--enable-ssl=dynamic-ssl-lib \
		|| return 1
	make -j1 || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1
	rm -rf "$pkgdir"/usr/lib/erlang/lib/wx-*
}

_mv_erlang_lib() {
	local lib=$1
	depends="$pkgname"

	mkdir -p "$subpkgdir"/usr/lib/erlang/lib
	mv "$pkgdir"/usr/lib/erlang/lib/$lib-* "$subpkgdir"/usr/lib/erlang/lib/
}

asn() { _mv_erlang_lib asn1; }
common_test() { _mv_erlang_lib common_test; }
compiler() { _mv_erlang_lib compiler; }
cos_event() { _mv_erlang_lib cosEvent; }
cos_event_domain() { _mv_erlang_lib cosEventDomain; }
cos_file_transfer() { _mv_erlang_lib cosFileTransfer; }
cos_notification() { _mv_erlang_lib cosNotification; }
cos_property() { _mv_erlang_lib cosProperty; }
cos_time() { _mv_erlang_lib cosTime; }
cos_transactions() { _mv_erlang_lib cosTransactions; }
crypto() { _mv_erlang_lib crypto; }
debugger() { _mv_erlang_lib debugger; }
dialyzer() { _mv_erlang_lib dialyzer; }
diameter() { _mv_erlang_lib diameter; }
edoc() { _mv_erlang_lib edoc; }
eldap() { _mv_erlang_lib eldap; }
erl_docgen() { _mv_erlang_lib erl_docgen; }
erl_interface() { _mv_erlang_lib erl_interface; }
erts() { _mv_erlang_lib erts; }
et() { _mv_erlang_lib et; }
eunit() { _mv_erlang_lib eunit; }
gs() { _mv_erlang_lib gs; }
hipe() { _mv_erlang_lib hipe; }
ic() { _mv_erlang_lib ic; }
inets() { _mv_erlang_lib inets; }
jinterface() { _mv_erlang_lib jinterface; }
kernel() { _mv_erlang_lib kernel; }
megaco() { _mv_erlang_lib megaco; }
mnesia() { _mv_erlang_lib mnesia; }
observer() { _mv_erlang_lib observer; }
odbc() { _mv_erlang_lib odbc; }
orber() { _mv_erlang_lib orber; }
os_mon() { _mv_erlang_lib os_mon; }
ose() { _mv_erlang_lib ose; }
otp_mibs() { _mv_erlang_lib otp_mibs; }
parsetools() { _mv_erlang_lib parsetools; }
percept() { _mv_erlang_lib percept; }
public_key() { _mv_erlang_lib public_key; }
reltool() { _mv_erlang_lib reltool; }
runtime_tools() { _mv_erlang_lib runtime_tools; }
sasl() { _mv_erlang_lib sasl; }
snmp() { _mv_erlang_lib snmp; }
ssh() { _mv_erlang_lib ssh; }
ssl() { _mv_erlang_lib ssl; }
stdlib() { _mv_erlang_lib stdlib; }
syntax_tools() { _mv_erlang_lib syntax_tools; }
test_server() { _mv_erlang_lib test_server; }
tools() { _mv_erlang_lib tools; }
typer() { _mv_erlang_lib typer; }
webtool() { _mv_erlang_lib webtool; }
xmerl() { _mv_erlang_lib xmerl; }

dev() {
	local i= j=
	depends="$pkgname=$pkgver-r$pkgrel $depends_dev"
	pkgdesc="$pkgdesc (development files)"

	cd "$pkgdir" || return 0
	local libdirs=usr/
	[ -d lib/ ] && libdirs="lib/ $libdirs"
	for i in usr/include usr/lib/pkgconfig usr/share/aclocal\
			usr/share/gettext usr/bin/*-config	\
			usr/share/vala/vapi usr/share/gir-[0-9]*\
			usr/share/qt*/mkspecs			\
			usr/lib/qt*/mkspecs			\
			usr/lib/cmake				\
			$(find . -name include -type d) 	\
			$(find $libdirs -name '*.[acho]' \
				-o -name '*.prl' 2>/dev/null); do
		if [ -e "$pkgdir/$i" ] || [ -L "$pkgdir/$i" ]; then
			d="$subpkgdir/${i%/*}"	# dirname $i
			mkdir -p "$d"
			mv "$pkgdir/$i" "$d"
			rmdir "$pkgdir/${i%/*}" 2>/dev/null
		fi
	done
	# move *.so links needed when linking the apps to -dev packages
	for i in lib/*.so usr/lib/*.so; do
		if [ -L "$i" ]; then
			mkdir -p "$subpkgdir"/"${i%/*}"
			mv "$i" "$subpkgdir/$i" || return 1
		fi
	done
	return 0
}
	

md5sums="346dd0136bf1cc28cebc140e505206bb  otp_src_17.5.tar.gz
5eb1ff3dd4ccf1a2a9e038ca599d535c  otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
6202359c7326ad45da303dea5b865ed7  otp-0002-Remove-rpath.patch
49e76b9d1356c432141cc9e472ece48f  otp-0003-Do-not-install-C-sources.patch
b16edcf58468e7f33da182ba622d9372  otp-0004-Do-not-install-Java-sources.patch
7e28da985292a2eec4ca24ae582afe89  otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
df2f5d70293bce953d94cb4ae76bb3a8  otp-0006-Do-not-install-erlang-sources.patch
df323f3ed63e1112826ddc8012cae9d8  otp-0007-Split-off-webtool-dependency-from-tools.patch
4689e0e5fd9040a86433d36e23020a6e  otp-0008-Introduce-os-getenv-2.patch
316027d711101e06258d0d85de30e3b0  otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
20b48b781961fbff5dfc81df383c12e0  remove-private-unit32.patch
06b7d939d3a18839d1c696998085c9c0  replace_glibc_check.patch"
sha256sums="3c28820c981b30c50df8ac2a4a238e5813454fa3ed2ad530bc7948a282846474  otp_src_17.5.tar.gz
18b235111ab59e89f6257ffa2b6a0c48933fda3107c9a4e6f15b718d080c5f37  otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
f431800227050a8665c958ed9f21738adb7bbab5cbadb863eeb282f3da193a33  otp-0002-Remove-rpath.patch
b4b2cfd436b9e75ea998784cce40492aa41512417321332e5b315361e80383d8  otp-0003-Do-not-install-C-sources.patch
94380dab56a7687f6646b8e0b9e6433086ba36efd568ca41a7059312c3b9b5b1  otp-0004-Do-not-install-Java-sources.patch
a091577926bd30204e43b5e1350b9c4dfd8adc6728075d62a1b888a3b7dac196  otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
ff3600d52418ac5d70161955d6cebd2d6ce0fd93700afdc1834df29fc437a705  otp-0006-Do-not-install-erlang-sources.patch
b15610e9cc879467e2387db1eef450827bc58bf4cbc9ffd5d40272ba6b76c8d2  otp-0007-Split-off-webtool-dependency-from-tools.patch
0dca75b3fc682b03d3ed736100ef4589bd7fcc28af53325a1d36c46a2a56330e  otp-0008-Introduce-os-getenv-2.patch
450b48773c767b01ce78e91d4d54a74f9fa2d093729c82278c0defb14723529d  otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
c593c4715a31054031174fcc1a52d562440534e22762f7c19a76e0abedeef9c7  remove-private-unit32.patch
37c762d495d252b69266b6ef59ae83d52ae9544c3a93845ca1f8225507f48249  replace_glibc_check.patch"
sha512sums="cfd082c8baee7ded370a34f15a1ba3b846b7d81e06edc36c62308c9220697925f1feda91eeecb70fc658f8987087256f51a2ebd0c526d16eeb09c72889d2390d  otp_src_17.5.tar.gz
2fa0a9259432df4af3e10aacdbc8a782d11f86f4f06f6ff3299c698177744a26caaab248b8b00d89c99eb9a41ba9530037c5852dde73add58cb253e64de60258  otp-0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
2111ce99ecc59e44d707b92d3f10b109e326f2e5f68d342c2b0e20089dcd43c45bae1eeda48f9a2d7e655696dd707fb99a6ca3936302813a0dfbdad098edc48d  otp-0002-Remove-rpath.patch
076cf7e08cfdf015170abfe936f62c98bbb9a743235eabfd29362b79c95f1bcdde7ddfb1c4a46503765e53a13b1aeaaa433ea4f51ca1721057bb90a8977a873b  otp-0003-Do-not-install-C-sources.patch
5a89290eaaf622192f7ef32e70f8a1301581afa5541902aa961c0c4431183d9822668daa1d48bfc2dee010ab747b0c1f4511525a243be42c8cff252bdd7906f7  otp-0004-Do-not-install-Java-sources.patch
dbc1f484060056609811aec51d611ffed89bbb234949088aadf94ec017f3d1dce95144ab6d38b6da709d14615825f6d3ec63e61b3b00cb95086d7d23070b3c0c  otp-0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
ec0c06c8e219458f9fc624a98360a302d3facbb3f0ae4eaefabac04789d0019a493287956682d70f99d64134a7fe2dbaf86f74a28afdf2264d36893085260d88  otp-0006-Do-not-install-erlang-sources.patch
de19924f6aa652a93481a16f89f6eff4181f76a776f8a3ebd0c9a5b2f6344b8d3d4c2bb6192a5ef542d2dd02095d9bb9a2f094c248c01446daeb5abed2d471fe  otp-0007-Split-off-webtool-dependency-from-tools.patch
52c3cadd0ee294c209dc031623c415334a1946b9f77ed1acfb7c9e9e1b1d2a0186b7996098ea53d0cdfb4fc3d0c4a53587af0df1887040c4aafa9aad4cb74488  otp-0008-Introduce-os-getenv-2.patch
c4465ee5369d066a258e4cd06267a57150e8701f23530ce246bc8bb91d1a141f613f97a2a438a19b3e39aaab815f3e78eb64cf7f31d0404fb03b288db826a6d9  otp-0009-Patch-removes-support-for-SSLv3-protocol-because-it-.patch
0f5b2899de78c5481b38250583a1ef8825aec2ac74eaecf35a6ad3d1165ba6422dca6206d349d5a6f61d7fdb26dac688c2dbe13632cf23b671913af674593764  remove-private-unit32.patch
8dc50e4d89173142b6b795bf802c991a1442648f934f623c2a6ddd1ebd075d8dc30d0ec584584cd8f36e8d22e947b9a1062c70e79c14090530c7a1ad678b9eca  replace_glibc_check.patch"