From dd832dbc98362bd78254af1f5f66708ea81f7313 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 14 Nov 2019 20:25:32 +0100 Subject: [PATCH] erlang: turn x11 option into erlang-wx subpackage. Cross-compiling with wx is not supported. Closes #15918. --- srcpkgs/erlang-wx | 1 + srcpkgs/erlang/template | 23 +++++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 120000 srcpkgs/erlang-wx diff --git a/srcpkgs/erlang-wx b/srcpkgs/erlang-wx new file mode 120000 index 0000000000..8d91700f27 --- /dev/null +++ b/srcpkgs/erlang-wx @@ -0,0 +1 @@ +erlang \ No newline at end of file diff --git a/srcpkgs/erlang/template b/srcpkgs/erlang/template index 3010393c76..62975c12eb 100644 --- a/srcpkgs/erlang/template +++ b/srcpkgs/erlang/template @@ -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 " 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* + } +}