~martijnbraam/almobootstrap

6276b2dc68ed49f4b84160b5e3c4697db72a8fa2 — Oliver Smith 1 year, 4 months ago 84c1460
aportgen/binutils: add more makedepends_host

Adjust to Alpine's APKBUILD where jansson-dev and zstd-dev are only set
if $BOOTSTRAP is empty. The APKBUILD parser in pmbootstrap doesn't
recognize this, and therefore doesn't install the depends unless we
replace makedepends_host= outside of the condition.

Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/fe73f3a28c101cfbe0a41e55c8497520a6cfbdca
Reviewed-by: Luca Weiss <luca@z3ntu.xyz>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230522065220.2841-3-ollieparanoid@postmarketos.org%3E
M pmb/aportgen/binutils.py => pmb/aportgen/binutils.py +1 -0
@@ 14,6 14,7 @@ def generate(args, pkgname):
    # Rewrite APKBUILD
    fields = {
        "arch": pmb.config.arch_native,
        "makedepends_host": "zlib-dev jansson-dev zstd-dev",
        "pkgdesc": f"Tools necessary to build programs for {arch} targets",
        "pkgname": pkgname,
    }

M test/testdata/aportgen/pmaports/cross/binutils-armhf/APKBUILD => test/testdata/aportgen/pmaports/cross/binutils-armhf/APKBUILD +1 -1
@@ 12,7 12,7 @@ pkgrel=1
pkgdesc="Tools necessary to build programs for armhf targets"
url="https://www.gnu.org/software/binutils/"
makedepends_build="bison flex texinfo"
makedepends_host="zlib-dev"
makedepends_host="zlib-dev jansson-dev zstd-dev"
makedepends="$makedepends_build $makedepends_host"
arch="x86_64"
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"