From a6fdf65446e5c8c571c1e500aebc64ba3dd81df1 Mon Sep 17 00:00:00 2001 From: zhuowei Date: Mon, 2 Oct 2017 16:47:26 -0400 Subject: [PATCH] aports: clean up APKBUILD for unicsy-demo, sdl_net, and chocolate-doom (#664) * aports: unicsy-demo: pure Python program should have noarch set Per https://wiki.alpinelinux.org/wiki/APKBUILD_examples:Python#arch, pure Python programs should be marked as noarch in the APKBUILD instead of all. * aports: sdl_net: fix build on aarch64 The version of config.guess and config.sub predate aarch64, so ./configure errors out with instructions to update them. Add a prepare section in APKBUILD to do this. * aports: sdl_net+chocolate-doom: pass CHOST and CBUILD to configure Other Alpine packages pass these options in to aid cross compling; for example, the template APKBUILD from https://github.com/alpinelinux/abuild/blob/master/newapkbuild.in#L43 uses them. Add them to chocolate-doom and sdl_net. --- main/chocolate-doom/APKBUILD | 5 ++++- main/sdl_net/APKBUILD | 11 ++++++++++- main/unicsy-demo/APKBUILD | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/main/chocolate-doom/APKBUILD b/main/chocolate-doom/APKBUILD index 29c424d26..21cdfc57b 100644 --- a/main/chocolate-doom/APKBUILD +++ b/main/chocolate-doom/APKBUILD @@ -13,7 +13,10 @@ builddir="$srcdir/${pkgname}-${pkgver}" build(){ cd "$builddir" - ./configure --prefix=/usr + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr make } diff --git a/main/sdl_net/APKBUILD b/main/sdl_net/APKBUILD index b343a4433..4b40d841e 100644 --- a/main/sdl_net/APKBUILD +++ b/main/sdl_net/APKBUILD @@ -10,9 +10,18 @@ makedepends="sdl-dev" source="https://www.libsdl.org/projects/SDL_net/release/SDL_net-$pkgver.tar.gz" builddir="$srcdir/SDL_net-$pkgver" +prepare() { + default_prepare + update_config_sub + update_config_guess +} + build() { cd $builddir - ./configure --prefix=/usr --disable-static + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr --disable-static make } diff --git a/main/unicsy-demo/APKBUILD b/main/unicsy-demo/APKBUILD index a6c446182..5b874f1ab 100644 --- a/main/unicsy-demo/APKBUILD +++ b/main/unicsy-demo/APKBUILD @@ -3,7 +3,7 @@ pkgver=0.2 pkgrel=1 pkgdesc="Phone hardware demo (battery status, light sensors, accelerometer, LEDs, backlights)" url="https://github.com/pavelmachek/unicsy_demo" -arch="all" +arch="noarch" license="GPL3" depends="py-gtk-dev" makedepends=""