2015-05-08 09:24:55 +00:00
|
|
|
# Template file for 'coreutils'
|
2008-10-22 14:11:22 +00:00
|
|
|
pkgname=coreutils
|
2014-07-20 09:53:30 +00:00
|
|
|
version=8.23
|
2015-05-18 12:16:02 +00:00
|
|
|
revision=7
|
2014-11-10 13:46:00 +00:00
|
|
|
bootstrap=yes
|
2013-04-11 08:33:01 +00:00
|
|
|
makedepends="gmp-devel acl-devel libcap-devel"
|
2015-05-18 12:12:31 +00:00
|
|
|
replaces="chroot-coreutils>=0 coreutils-doc>=0"
|
2008-10-22 14:11:22 +00:00
|
|
|
short_desc="The GNU core utilities"
|
2015-04-10 07:16:30 +00:00
|
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
2011-09-19 14:57:33 +00:00
|
|
|
homepage="http://www.gnu.org/software/coreutils"
|
|
|
|
license="GPL-3"
|
2013-01-13 19:59:00 +00:00
|
|
|
distfiles="http://ftp.gnu.org/gnu/coreutils/${pkgname}-${version}.tar.xz"
|
2014-07-20 09:53:30 +00:00
|
|
|
checksum=ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d
|
2015-03-07 20:07:08 +00:00
|
|
|
build_pie=yes
|
2013-02-08 14:30:01 +00:00
|
|
|
|
2014-11-10 13:46:00 +00:00
|
|
|
if [ "$CHROOT_READY" ]; then
|
|
|
|
hostmakedepends="perl"
|
|
|
|
fi
|
|
|
|
|
2015-05-18 12:12:31 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2013-02-08 14:30:01 +00:00
|
|
|
do_configure() {
|
2013-04-08 23:49:27 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
2014-12-30 08:59:37 +00:00
|
|
|
configure_args+=" fu_cv_sys_stat_statfs2_bsize=no
|
2013-02-08 14:30:01 +00:00
|
|
|
gl_cv_func_working_mkstemp=yes
|
2013-05-26 08:41:55 +00:00
|
|
|
gl_cv_func_working_acl_get_file=yes "
|
2013-02-08 14:30:01 +00:00
|
|
|
fi
|
2013-02-20 10:44:39 +00:00
|
|
|
#
|
|
|
|
# Do not install kill: provided by util-linux.
|
|
|
|
# Do not install uptime: provided by procps-ng.
|
|
|
|
#
|
2013-05-26 08:41:55 +00:00
|
|
|
./configure ${configure_args} \
|
2013-02-08 14:30:01 +00:00
|
|
|
--enable-install-program=hostname \
|
2013-02-20 10:44:39 +00:00
|
|
|
--enable-no-install-program=kill,uptime \
|
2013-05-26 08:41:55 +00:00
|
|
|
--disable-rpath
|
2013-02-08 14:30:01 +00:00
|
|
|
}
|
|
|
|
do_build() {
|
2013-04-08 23:49:27 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
2013-02-08 14:30:01 +00:00
|
|
|
cp Makefile Makefile.orig
|
|
|
|
sed '/src_make_prime_list/d' Makefile.orig > Makefile
|
|
|
|
depbase=`echo src/make-prime-list.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
|
2013-05-26 08:41:55 +00:00
|
|
|
cc -std=gnu99 -I. -I./lib -Ilib -I./lib -Isrc -I./src \
|
2013-02-08 14:30:01 +00:00
|
|
|
-fdiagnostics-show-option -funit-at-a-time -g -O2 -MT \
|
|
|
|
src/make-prime-list.o -MD -MP -MF $depbase.Tpo -c -o src/make-prime-list.o \
|
|
|
|
src/make-prime-list.c &&
|
|
|
|
mv -f $depbase.Tpo $depbase.Po
|
2013-05-26 08:41:55 +00:00
|
|
|
cc -std=gnu99 -fdiagnostics-show-option -funit-at-a-time -g -O2 \
|
2013-02-08 14:30:01 +00:00
|
|
|
-Wl,--as-needed -o src/make-prime-list src/make-prime-list.o
|
|
|
|
cp Makefile Makefile.bak
|
|
|
|
sed -e '/hostname.1/d' Makefile.bak > Makefile
|
|
|
|
fi
|
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
do_install() {
|
|
|
|
make DESTDIR=${DESTDIR} install
|
2013-04-08 23:49:27 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
2015-05-18 12:12:31 +00:00
|
|
|
mv ${wrksrc}/coreutils-${XBPS_MACHINE}/share/man \
|
|
|
|
${DESTDIR}/usr/share
|
2013-02-08 14:30:01 +00:00
|
|
|
fi
|
|
|
|
}
|