Christoph Reiter e40c90814f Makedepend on gcc/make where needed
This means we no longer need msys2-devel
2021-12-13 22:19:56 +01:00

70 lines
2.2 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=coreutils
pkgver=8.32
pkgrel=2
pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system"
arch=('i686' 'x86_64')
license=('GPL3')
url="https://www.gnu.org/software/coreutils"
depends=('gmp' 'libiconv' 'libintl')
makedepends=('gmp-devel' 'libiconv-devel' 'gettext-devel' 'help2man' 'autotools' 'gcc')
install=${pkgname}.install
source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz{,.sig}
001-coreutils-8.30.patch
002-coreutils-8.32-enable-stdbuf.patch
003-coreutils-8.32-fix-test-cases.patch)
sha256sums=('4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa'
'SKIP'
'467bde24da0ccea48260f58d3c94a84de4e027ab598a926003642f791da47ca2'
'e3be62b9aceb3231f09f05bc3bd8b18f6aaa495f5063781cdd261d560a7e80d0'
'ad9e0582373500c0668e38483401169f48d6a2f8ad8d28ef8e7b06e4a3e08a74')
validpgpkeys=('6C37DC12121A5006BC1DB804DF6FD971306037D9')
prepare() {
cd ${srcdir}/${pkgname}-${pkgver}
patch -p1 -i ${srcdir}/001-coreutils-8.30.patch
patch -p1 -i ${srcdir}/002-coreutils-8.32-enable-stdbuf.patch
patch -p1 -i ${srcdir}/003-coreutils-8.32-fix-test-cases.patch
autoreconf -fi
}
build() {
[[ -d ${srcdir}/build-${CHOST} ]] && rm -rf ${srcdir}/build-${CHOST}
mkdir -p ${srcdir}/build-${CHOST} && cd ${srcdir}/build-${CHOST}
../${pkgname}-${pkgver}/configure \
--build=${CHOST} \
--prefix=/usr \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--localstatedir=/var \
--program-transform-name=s/kill/gkill/ \
--without-libintl-prefix \
--without-libiconv-prefix \
--enable-install-program=arch,hostname \
--enable-no-install-program=uptime \
gl_cv_func_strtod_works=yes \
gl_cv_func_strtold_works=yes
make
}
check() {
cd ${srcdir}/build-${CHOST}
make check
}
package() {
cd ${srcdir}/build-${CHOST}
make DESTDIR=${pkgdir} install
test ! -f ${pkgdir}/usr/lib/coreutils/libstdbuf.so.exe ||
mv ${pkgdir}/usr/lib/coreutils/libstdbuf.so.exe \
${pkgdir}/usr/lib/coreutils/libstdbuf.dll
install -Dm644 ${srcdir}/${pkgname}-${pkgver}/src/dircolors.hin ${pkgdir}/etc/DIR_COLORS
}