From 2db304dc5a257f60478dd56e71935842c188495b Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 18 May 2015 14:12:31 +0200 Subject: [PATCH] coreutils: fix cross compilation and manpages generation differently. Rather than building a -doc subpkg that is only built in native builds, build all utils in the host to be able to generate the manpages and then install the result to DESTDIR. This avoids and old and stupid issue while cross building base-system. Close #1598 --- srcpkgs/coreutils-doc | 1 - srcpkgs/coreutils/template | 32 +++++++++++++++----------------- 2 files changed, 15 insertions(+), 18 deletions(-) delete mode 120000 srcpkgs/coreutils-doc diff --git a/srcpkgs/coreutils-doc b/srcpkgs/coreutils-doc deleted file mode 120000 index a4b710b1789..00000000000 --- a/srcpkgs/coreutils-doc +++ /dev/null @@ -1 +0,0 @@ -coreutils \ No newline at end of file diff --git a/srcpkgs/coreutils/template b/srcpkgs/coreutils/template index 6a13d91bd4c..6db9486c10b 100644 --- a/srcpkgs/coreutils/template +++ b/srcpkgs/coreutils/template @@ -4,7 +4,7 @@ version=8.23 revision=6 bootstrap=yes makedepends="gmp-devel acl-devel libcap-devel" -replaces="chroot-coreutils>=0" +replaces="chroot-coreutils>=0 coreutils-doc>=0" short_desc="The GNU core utilities" maintainer="Juan RP " homepage="http://www.gnu.org/software/coreutils" @@ -17,6 +17,18 @@ if [ "$CHROOT_READY" ]; then hostmakedepends="perl" fi +pre_configure() { + # Build natively all utils for the host, we need this to generate + # the manpages via help2man. + if [ "$CROSS_BUILD" ]; then + CC=cc LD=ld AR=ar RANLIB=ranlib CFLAGS=-Os CXXFLAGS=-Os LDFLAGS= \ + ./configure --prefix=${wrksrc}/coreutils-${XBPS_MACHINE} + make ${makejobs} + make install + make distclean + fi +} + do_configure() { if [ "$CROSS_BUILD" ]; then configure_args+=" fu_cv_sys_stat_statfs2_bsize=no @@ -51,22 +63,8 @@ do_build() { } do_install() { make DESTDIR=${DESTDIR} install - if [ "$CROSS_BUILD" ]; then - rm -rf ${DESTDIR}/usr/share/info + mv ${wrksrc}/coreutils-${XBPS_MACHINE}/share/man \ + ${DESTDIR}/usr/share fi } - -if [ -z "$CROSS_BUILD" ]; then - -coreutils-doc_package() { - noarch=yes - short_desc+=" - documentation files" - replaces="coreutils<8.20_4" - pkg_install() { - vmove usr/share/info - vmove usr/share/man - } -} - -fi