erlang: turn x11 option into erlang-wx subpackage.

Cross-compiling with wx is not supported.

Closes #15918.
This commit is contained in:
Leah Neukirchen 2019-11-14 20:25:32 +01:00
parent 95fd26f198
commit dd832dbc98
2 changed files with 18 additions and 6 deletions

1
srcpkgs/erlang-wx Symbolic link
View File

@ -0,0 +1 @@
erlang

View File

@ -1,23 +1,26 @@
# Template file for 'erlang'
pkgname=erlang
version=22.1.7
revision=1
revision=2
create_wrksrc=yes
build_wrksrc="otp-OTP-${version}"
build_style=gnu-configure
configure_args="$(vopt_if x11 --with-wx-config=wx-config-3.0)"
make_install_target="install install-docs"
hostmakedepends="perl libxslt autoconf"
makedepends="ncurses-devel unixodbc-devel libressl-devel zlib-devel
$(vopt_if x11 'wxWidgets-devel glu-devel')"
hostmakedepends="autoconf libxslt perl"
makedepends="libressl-devel ncurses-devel unixodbc-devel zlib-devel"
short_desc="Concurrent functional programming language developed by Ericsson"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Apache-2.0"
homepage="http://www.erlang.org/"
distfiles="https://github.com/erlang/otp/archive/OTP-${version}.tar.gz"
checksum=f0f8ad265121e4170598d0339ebba4e77f04d31db894d5e70c5a953544f62a47
subpackages="erlang-doc"
build_options="x11"
if [ -z "$CROSS_BUILD" ]; then
configure_args+=" --with-wx-config=wx-config-3.0"
makedepends+=" wxWidgets-devel glu-devel"
subpackages+=" erlang-wx"
fi
case "$XBPS_TARGET_MACHINE" in
*-musl) configure_args+=" --disable-hipe" ;;
@ -64,3 +67,11 @@ erlang-doc_package() {
done
}
}
erlang-wx_package() {
short_desc+=" - wxWidgets binding"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/erlang/lib/wx*
}
}