From 5704c8e5608ad53a3538b0691794c3170f27a298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 12 Jul 2024 09:07:47 +0700 Subject: [PATCH] binutils: fix bootstrap on host without zstd and makeinfo --- srcpkgs/binutils/template | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template index a2350151037..a79fd71bea0 100644 --- a/srcpkgs/binutils/template +++ b/srcpkgs/binutils/template @@ -15,14 +15,16 @@ checksum=ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450 build_options="all_targets" desc_option_all_targets="Enable all supported targets" -subpackages="binutils-doc" - if [ "$CHROOT_READY" ]; then hostmakedepends+=" flex perl texinfo" makedepends+=" elfutils-devel" checkdepends="bc" depends="binutils-doc binutils-libs" - subpackages+=" libiberty-devel binutils-libs binutils-devel" + unset subpackages _makeinfo +else + _makeinfo=MAKEINFO=/bin/true + # Set to space force no subpackages + subpackages=" " fi _get_triplet() { @@ -43,6 +45,10 @@ do_configure() { conf+=" --with-debuginfod --enable-shared --enable-install-libiberty" else conf+=" --without-debuginfod --disable-shared --disable-install-libbfd" + sed -i " + s;zlibinc=\$;&-I${XBPS_MASTERDIR}/usr/include; + s;zlibdir=\$;&-L${XBPS_MASTERDIR}/usr/lib; + " */configure fi if [ "$CROSS_BUILD" ]; then # we don't want --with-sysroot=${XBPS_CROSS_BASE} like gnu-configure @@ -114,7 +120,7 @@ do_configure() { } do_build() { - cd ${wrksrc}/build && make ${makejobs} + cd ${wrksrc}/build && make ${makejobs} ${_makeinfo} } # there is a testsuite now, but e.g. ifunc tests all fail on musl and @@ -129,7 +135,7 @@ do_install() { cd ${wrksrc}/build local _triplet=$(_get_triplet) - make DESTDIR=${DESTDIR} tooldir=/usr install + make DESTDIR=${DESTDIR} tooldir=/usr install ${_makeinfo} cd ..