CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
e2fsprogs: updated to 1.42.13 and updated mandir
[crossrootfs.git] / coreutils / Pkgfile
1 # Description: A collection of core GNU utilities
2 # URL: http://www.gnu.org/software/coreutils/
3 # Maintainer: CRUX System Team, core-ports at crux dot nu
4 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5 # Depends on: libgmp acl libcap
6
7 name=coreutils
8 version=8.22
9 release=1
10 source=(http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.xz \
11 $name-uname.patch)
12
13 build() {
14 cd $name-$version
15
16 patch -p1 -i $SRC/$name-uname.patch
17
18 cat > config.cache <<EOF
19 ac_cv_search_clock_gettime=no
20 fu_cv_sys_stat_statfs2_bsize=yes
21 gl_cv_func_rename_trailing_slash_bug=no
22 gl_cv_func_mbrtowc_incomplete_state=yes
23 gl_cv_func_mbrtowc_null_retval=yes
24 gl_cv_func_mbrtowc_null_arg=yes
25 gl_cv_func_mbrtowc_retval=yes
26 gl_cv_func_btowc_eof=yes
27 gl_cv_func_wcrtomb_retval=yes
28 gl_cv_func_wctob_works=yes
29 EOF
30
31 export FORCE_UNSAFE_CONFIGURE=1
32
33 ./configure --build=$CHOST \
34 --host=$CTARGET \
35 --prefix=/usr \
36 --libexecdir=/usr/lib \
37 --mandir=/usr/man \
38 --disable-nls \
39 --disable-assert \
40 --enable-no-install-program=uptime,kill,chcon,runcon,groups \
41 --cache-file=config.cache
42
43 # fix to avoid crosscompile make-prime-list
44 sed '/src_make_prime_list/d' -i Makefile
45 depbase=`echo src/make-prime-list.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`
46 gcc -std=gnu99 -I. -I./lib -Ilib -I./lib -Isrc -I./src \
47 -fdiagnostics-show-option -funit-at-a-time \
48 -g -O2 -MT src/make-prime-list.o -MD -MP -MF $depbase.Tpo \
49 -c -o src/make-prime-list.o src/make-prime-list.c
50 mv -f $depbase.Tpo $depbase.Po
51 gcc -std=gnu99 -fdiagnostics-show-option -funit-at-a-time \
52 -g -O2 -Wl,--as-needed -o src/make-prime-list src/make-prime-list.o
53
54 # fix to avoid rebuild manpages
55 sed 's|SUFFIXES: .1|SUFFIXES: |' -i Makefile
56 sed 's|man1_MANS =.*|man1_MANS =|g' -i Makefile
57
58 make
59 make DESTDIR=$PKG install
60
61 install -d $PKG/bin
62 mv $PKG/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo,false,ln,ls,mkdir,sleep} $PKG/bin
63 mv $PKG/usr/bin/{mknod,mv,pwd,readlink,rm,rmdir,stty,sync,touch,true,uname} $PKG/bin
64 rm -r $PKG/usr/share
65 }