aboutsummaryrefslogblamecommitdiffstats
path: root/testing/erlang/APKBUILD
blob: 2d4f2bd784905a5878340b40784edf20b2e4e844 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                               
                                                       

              


             

                                                                      
                 










                                                                             
                                                      











































                                                     












                                                                                    
 
                                    
 


































                                                                        
                          

                                                
                                                                               

 





                                                       
                                                      











































                                                      



































                                                                       



































                                                                                                                                                                                                 
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Marlus Saraiva <marlus.saraiva@gmail.com>

pkgname=erlang
pkgver=18.0.1
_srcver=18.0
pkgrel=0
pkgdesc="General-purpose programming language and runtime environment"
url="http://www.erlang.org/"
license="ASL 2.0"
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-0007 found: http://pkgs.fedoraproject.org/gitweb/?p=erlang.git;a=tree
source="http://www.erlang.org/download/otp_src_$_srcver.tar.gz
        0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
        0002-Remove-rpath.patch
        0003-Do-not-install-C-sources.patch
        0004-Do-not-install-Java-sources.patch
        0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
        0006-Do-not-install-erlang-sources.patch
        0007-Split-off-webtool-dependency-from-tools.patch
        0010-fix-nteventlog-remove.patch
        0020-remove-private-unit32.patch
        0030-replace_glibc_check.patch
        0040-otp-update-version-18.0.1.patch"

_builddir="$srcdir"/otp_src_$_srcver

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="232acb0c278ee05c8d787cbaf6399be5  otp_src_18.0.tar.gz
11d2bfea3dd3138409337d62f2348ff2  0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
ef4b726309a749010553259080960753  0002-Remove-rpath.patch
458118f96fb0c973a30630c070bd94aa  0003-Do-not-install-C-sources.patch
1c3b158ac8408fced9a0f3630f4498f1  0004-Do-not-install-Java-sources.patch
f4aa0cc27dc57ea4dcd57191b1948a4d  0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
37861f7e1e02993018d6751d0d7bb83c  0006-Do-not-install-erlang-sources.patch
b438c37818b5c82443682c3693dd7e53  0007-Split-off-webtool-dependency-from-tools.patch
fcb02f2cc2050789aa85f6f0084836c3  0010-fix-nteventlog-remove.patch
062605d7f01f4685f1897ba2decc23a8  0020-remove-private-unit32.patch
7a5c956b7bf79e34a0f980d1e2a65bee  0030-replace_glibc_check.patch
e621bd76d8e19af2d60e4d1a11ddbca3  0040-otp-update-version-18.0.1.patch"
sha256sums="a0b69da34b4f218eb7d63d9e96fc120aa7257bb6c37a0f40fb388e188b4111aa  otp_src_18.0.tar.gz
536e78192f915733cbbb264883af6d9b11c9e70c2c4d3d825b58c4dbec36db86  0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
b2e5844215d7f5f5026a77342dd698d16103cc726d23f8265bcc8399d1a82bb9  0002-Remove-rpath.patch
81062f0eb9a72cbfac600fab56823161f92e1e5107b359f27f9f0ec511b8aec5  0003-Do-not-install-C-sources.patch
2ed61274decb534ab4142bd0a2116a75e3fe82d33a8ff145524173ce5773b0e2  0004-Do-not-install-Java-sources.patch
71c8a55fe036d5a04ba2c008b51d8950c3f18d83edaffb9bef2a9d19dd2f79f3  0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
b810ef25504fbce3f9a0d4ae1e02fc4225b01fd68daa88566f6f8de37e26b351  0006-Do-not-install-erlang-sources.patch
9704a53bc4bd6f5624f9ce3f201128204011f4579f19b547df74d92ae22777cf  0007-Split-off-webtool-dependency-from-tools.patch
70dd9d1c4914ccecdbb3623ee23eb9ae3c8df8a5e40e2e0177c754440afe55f9  0010-fix-nteventlog-remove.patch
0b63ff5ce4e642d4225d5cc4d52d88dd5daf83ce5a2549ba0e5a14ce05e17ac2  0020-remove-private-unit32.patch
e3158dbb4bcb4677ceda39a374326c069de78a52e598ef8169a288b86a040a62  0030-replace_glibc_check.patch
a014ad5c5da2512672af7a98ca072d6aa2615af2d1cc8e67a6cc611096cc922a  0040-otp-update-version-18.0.1.patch"
sha512sums="84ec2a3834270c1babe153572d6187faa36c12128e604037d55be01719788c0dd79d46769ea7090d530b746206a25fe02346b02849abee10ee41ed4ac7567c02  otp_src_18.0.tar.gz
172f9b0f61748bf2f04737df0451bcc9c0812db0f365f0ef7c7c244fceb991987f79a5274eea578a89cc7d077f84645d1395d9dbcbf14010268b896a080c2ccf  0001-Do-not-format-man-pages-and-do-not-install-miscellan.patch
97c40c185b71b23ffcb924639af390b9a0be897070e396a9413e193e6d43048dfe3b86bcd0c5598b81a66ce1349de9e09f5228a452b51b6612cd947bbafb6377  0002-Remove-rpath.patch
1cae89d1e8f9d375ae08c7de2b8f7a5143bcded90eef878e97c408542a50e9a880166311820013301e46364be0ae090d3fc515b6f915ead14e787b98290beec1  0003-Do-not-install-C-sources.patch
b174e3c9103aa26e3b4993ae77b849a55f733e6f8e5dd7bb641a8548aea7fcc91b99d772c91ff8864fff5c30b388438f8cb41d7ac941a86fc7bb1891f9838068  0004-Do-not-install-Java-sources.patch
923addcb1f6472829ba13ccc91ad3cef161f269478404f0a19bc4997118e06edd7459011a60769eb393eac930f30d4bd6c5526301382a5f9815862237f4664d3  0005-Do-not-install-nteventlog-and-related-doc-files-on-n.patch
20a7200fe811b5256ef89bcbf19dd6ebb29c7c9109311f6d3adca2ade42c13ca63a28ff8f3e49308feaeda1e30a4e3a7e1083edf57b42219d0794dddc0f4a464  0006-Do-not-install-erlang-sources.patch
d65fcfc3a9441941c6292c33d354964a82da11cc7a411dd0440719e490075ed588c1e70690e80650561749010d737394567f12ff73bd460f0d00c792c77cfae3  0007-Split-off-webtool-dependency-from-tools.patch
ccd876c5e3e370a3cd85907240546be6be124f8b38e19fae1b152f6858ebd3f4f7421931a8e314dddf019ed9c75cc453c08633b20fa08c05810f66c92725a3ed  0010-fix-nteventlog-remove.patch
18f70c3a99ac8c44bc9d90dc3f0c072ad4df4ffe57a8d0677087c9e940ba138d7a7698d5cdbbe14875a6012d353a679fdb33d40fca3a3211f712af8c4b0cb0b4  0020-remove-private-unit32.patch
b554882bee1a70322cc8c5b973986047deaf4528fe1371df39cf72b27b2497a859463bdf8847ea6ea96cb0caaa6bd143c96a5dee28839164a547a66a30fcffd0  0030-replace_glibc_check.patch
5f6f5856fc60f7bc333fb2736bcf0d8dd475658621bb8ded8a9f664bb045ba5b0768ec990a05e5c35c5dfaa284f10567ff61b7a3c521a907553561c50c068ad1  0040-otp-update-version-18.0.1.patch"