CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
coreutils: updated to 8.20 (fixes FS#50)
[crossrootfs.git] / coreutils / Pkgfile
index 64ef2100239ec2cac42f4b964158c4901319f0c0..2a519e0739452701d9c7d701be1847800b19deea 100644 (file)
@@ -1,22 +1,19 @@
 # Description: A collection of core GNU utilities
 # URL: http://www.gnu.org/software/coreutils/
 # Maintainer: CRUX System Team, core-ports at crux dot nu
-# Arch Maintainer: CRUX-ARM System Team, crux-arm at mikeux dot dyndns dot org
-# Depends on: libgmp
+# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
+# Depends on: libgmp acl libcap
 
 name=coreutils
-version=8.4
-release=2
-source=(http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.gz 
-        coreutils-uname.patch)
+version=8.20
+release=1
+source=(http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.xz \
+        $name-uname.patch)
 
 build() {
   cd $name-$version
-  patch -p1 -i $SRC/coreutils-uname.patch
 
-  for f in $(find man/ -type f -name '*.x' -exec basename {} .x \;); do
-    touch $f
-  done
+  patch -p1 -i $SRC/$name-uname.patch
 
   cat > config.cache <<EOF
 ac_cv_search_clock_gettime=no
@@ -31,19 +28,32 @@ gl_cv_func_wcrtomb_retval=yes
 gl_cv_func_wctob_works=yes
 EOF
 
-  DEFAULT_POSIX2_VERSION=199209 \
-  GPERF=false \
+  export FORCE_UNSAFE_CONFIGURE=1
+
   ./configure --build=$CHOST \
               --host=$CTARGET \
               --prefix=/usr \
+              --libexecdir=/usr/lib \
               --mandir=/usr/man \
               --disable-nls \
               --disable-assert \
-              --disable-libcap \
-              --disable-xattr \
               --enable-no-install-program=uptime,kill,chcon,runcon,groups \
               --cache-file=config.cache
 
+  # fix to avoid crosscompile make-prime-list
+  sed '/src_make_prime_list/d' -i Makefile
+  depbase=`echo src/make-prime-list.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`
+  gcc -std=gnu99  -I. -I./lib  -Ilib -I./lib -Isrc -I./src \
+      -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
+  gcc -std=gnu99 -fdiagnostics-show-option -funit-at-a-time \
+      -g -O2 -Wl,--as-needed  -o src/make-prime-list src/make-prime-list.o
+
+  # fix to avoid rebuild manpages
+  sed 's|SUFFIXES: .1|SUFFIXES: |' -i Makefile
+
   make
   make DESTDIR=$PKG install