wok rev 3435

coreutils: Fix (hack) build
author Christophe Lincoln <pankso@slitaz.org>
date Sat Jun 13 16:20:43 2009 +0200 (2009-06-13)
parents b1b4f5518c4e
children 8316f5a7c11d
files coreutils/receipt coreutils/stuff/sigcontext.h
line diff
     1.1 --- a/coreutils/receipt	Sat Jun 13 15:01:25 2009 +0200
     1.2 +++ b/coreutils/receipt	Sat Jun 13 16:20:43 2009 +0200
     1.3 @@ -8,15 +8,35 @@
     1.4  TARBALL="$PACKAGE-$VERSION.tar.gz"
     1.5  WEB_SITE="http://www.gnu.org/software/coreutils/"
     1.6  WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
     1.7 +DEPENDS="libcap"
     1.8 +BUILD_DEPENDS="libcap-dev gmp-dev"
     1.9  
    1.10  # Rules to configure and make the package.
    1.11  compile_rules()
    1.12  {
    1.13  	cd $src
    1.14 -	./configure --prefix=/usr --infodir=/usr/share/info \
    1.15 -	--mandir=/usr/share/man $CONFIGURE_ARGS
    1.16 -	make
    1.17 -	make DESTDIR=$PWD/_pkg install
    1.18 +	
    1.19 +	# Hack to fix ls: expected specifier-qualifier-list before '__u64'
    1.20 +	# We are not patching the original file, just fake to compile
    1.21 +	# coreutils.
    1.22 +	rm -f /usr/include/asm/sigcontext.h.bak
    1.23 +	mv /usr/include/asm/sigcontext.h /usr/include/asm/sigcontext.h.bak || exit 1
    1.24 +	cp ../stuff/sigcontext.h /usr/include/asm
    1.25 +	
    1.26 +	sed -i 's/1.10a/1.10.2/' configure.ac || exit 1
    1.27 +	sed -i 's/dist-xz/dist-lzma/' configure.ac || exit 1
    1.28 +	
    1.29 +	./configure \
    1.30 +		--prefix=/usr \
    1.31 +		--infodir=/usr/share/info \
    1.32 +		--mandir=/usr/share/man \
    1.33 +		--enable-no-install-program=kill,uptime,ls \
    1.34 +		$CONFIGURE_ARGS &&
    1.35 +	make &&
    1.36 +	make DESTDIR=$PWD/_pkg install &&
    1.37 +	
    1.38 +	# Restore original sigcontext.h
    1.39 +	mv -f /usr/include/asm/sigcontext.h.bak /usr/include/asm/sigcontext.h
    1.40  }
    1.41  
    1.42  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.43 @@ -27,7 +47,7 @@
    1.44  #
    1.45  genpkg_rules()
    1.46  {
    1.47 -	mkdir -p $fs/usr/bin $fs/usr/share/locale
    1.48 +	mkdir -p $fs/usr/bin
    1.49  	# Utils...
    1.50  	cp -a $_pkg/usr/bin/base64 $fs/usr/bin
    1.51  	cp -a $_pkg/usr/bin/csplit $fs/usr/bin
    1.52 @@ -42,9 +62,6 @@
    1.53  	cp -a $_pkg/usr/bin/split $fs/usr/bin
    1.54  	cp -a $_pkg/usr/bin/users $fs/usr/bin
    1.55  	cp -a $_pkg/usr/bin/groups $fs/usr/bin
    1.56 -	strip -s $fs/usr/bin/* 2>/dev/null
    1.57 -	# Locale
    1.58 -	cp -a $_pkg/usr/share/locale/fr $fs/usr/share/locale
    1.59  }
    1.60  
    1.61  # Pre and post install commands for Tazpkg.
    1.62 @@ -55,7 +72,13 @@
    1.63  	local root
    1.64  	root=$1
    1.65  	echo "Processing pre-install commands..."
    1.66 -	echo -n "Removing all Busybox reploaced utils... "
    1.67 +	echo -n "Removing all Busybox replaced utils... "
    1.68  	rm -f $root/usr/bin/od $root/usr/bin/split
    1.69  	status
    1.70  }
    1.71 +
    1.72 +post_remove()
    1.73 +{
    1.74 +	ln -s /bin/busybox /usr/bin/od
    1.75 +	ln -s /bin/busybox /usr/bin/split
    1.76 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/coreutils/stuff/sigcontext.h	Sat Jun 13 16:20:43 2009 +0200
     2.3 @@ -0,0 +1,143 @@
     2.4 +#ifndef _ASM_X86_SIGCONTEXT_H
     2.5 +#define _ASM_X86_SIGCONTEXT_H
     2.6 +
     2.7 +#include <asm/types.h>
     2.8 +
     2.9 +#ifdef __i386__
    2.10 +/*
    2.11 + * As documented in the iBCS2 standard..
    2.12 + *
    2.13 + * The first part of "struct _fpstate" is just the normal i387
    2.14 + * hardware setup, the extra "status" word is used to save the
    2.15 + * coprocessor status word before entering the handler.
    2.16 + *
    2.17 + * Pentium III FXSR, SSE support
    2.18 + *	Gareth Hughes <gareth@valinux.com>, May 2000
    2.19 + *
    2.20 + * The FPU state data structure has had to grow to accommodate the
    2.21 + * extended FPU state required by the Streaming SIMD Extensions.
    2.22 + * There is no documented standard to accomplish this at the moment.
    2.23 + */
    2.24 +struct _fpreg {
    2.25 +	unsigned short significand[4];
    2.26 +	unsigned short exponent;
    2.27 +};
    2.28 +
    2.29 +struct _fpxreg {
    2.30 +	unsigned short significand[4];
    2.31 +	unsigned short exponent;
    2.32 +	unsigned short padding[3];
    2.33 +};
    2.34 +
    2.35 +struct _xmmreg {
    2.36 +	unsigned long element[4];
    2.37 +};
    2.38 +
    2.39 +struct _fpstate {
    2.40 +	/* Regular FPU environment */
    2.41 +	unsigned long	cw;
    2.42 +	unsigned long	sw;
    2.43 +	unsigned long	tag;
    2.44 +	unsigned long	ipoff;
    2.45 +	unsigned long	cssel;
    2.46 +	unsigned long	dataoff;
    2.47 +	unsigned long	datasel;
    2.48 +	struct _fpreg	_st[8];
    2.49 +	unsigned short	status;
    2.50 +	unsigned short	magic;		/* 0xffff = regular FPU data only */
    2.51 +
    2.52 +	/* FXSR FPU environment */
    2.53 +	unsigned long	_fxsr_env[6];	/* FXSR FPU env is ignored */
    2.54 +	unsigned long	mxcsr;
    2.55 +	unsigned long	reserved;
    2.56 +	struct _fpxreg	_fxsr_st[8];	/* FXSR FPU reg data is ignored */
    2.57 +	struct _xmmreg	_xmm[8];
    2.58 +	unsigned long	padding[56];
    2.59 +};
    2.60 +
    2.61 +#define X86_FXSR_MAGIC		0x0000
    2.62 +
    2.63 +/*
    2.64 + * User-space might still rely on the old definition:
    2.65 + */
    2.66 +struct sigcontext {
    2.67 +	unsigned short gs, __gsh;
    2.68 +	unsigned short fs, __fsh;
    2.69 +	unsigned short es, __esh;
    2.70 +	unsigned short ds, __dsh;
    2.71 +	unsigned long edi;
    2.72 +	unsigned long esi;
    2.73 +	unsigned long ebp;
    2.74 +	unsigned long esp;
    2.75 +	unsigned long ebx;
    2.76 +	unsigned long edx;
    2.77 +	unsigned long ecx;
    2.78 +	unsigned long eax;
    2.79 +	unsigned long trapno;
    2.80 +	unsigned long err;
    2.81 +	unsigned long eip;
    2.82 +	unsigned short cs, __csh;
    2.83 +	unsigned long eflags;
    2.84 +	unsigned long esp_at_signal;
    2.85 +	unsigned short ss, __ssh;
    2.86 +	struct _fpstate * fpstate;
    2.87 +	unsigned long oldmask;
    2.88 +	unsigned long cr2;
    2.89 +};
    2.90 +
    2.91 +#else /* __i386__ */
    2.92 +
    2.93 +/* FXSAVE frame */
    2.94 +/* Note: reserved1/2 may someday contain valuable data. Always save/restore
    2.95 +   them when you change signal frames. */
    2.96 +struct _fpstate {
    2.97 +	__u16	cwd;
    2.98 +	__u16	swd;
    2.99 +	__u16	twd;	/* Note this is not the same as the 32bit/x87/FSAVE twd */
   2.100 +	__u16	fop;
   2.101 +	__u64	rip;
   2.102 +	__u64	rdp;
   2.103 +	__u32	mxcsr;
   2.104 +	__u32	mxcsr_mask;
   2.105 +	__u32	st_space[32];	/* 8*16 bytes for each FP-reg */
   2.106 +	__u32	xmm_space[64];	/* 16*16 bytes for each XMM-reg  */
   2.107 +	__u32	reserved2[24];
   2.108 +};
   2.109 +
   2.110 +/*
   2.111 + * User-space might still rely on the old definition:
   2.112 + */
   2.113 +struct sigcontext {
   2.114 +	unsigned long r8;
   2.115 +	unsigned long r9;
   2.116 +	unsigned long r10;
   2.117 +	unsigned long r11;
   2.118 +	unsigned long r12;
   2.119 +	unsigned long r13;
   2.120 +	unsigned long r14;
   2.121 +	unsigned long r15;
   2.122 +	unsigned long rdi;
   2.123 +	unsigned long rsi;
   2.124 +	unsigned long rbp;
   2.125 +	unsigned long rbx;
   2.126 +	unsigned long rdx;
   2.127 +	unsigned long rax;
   2.128 +	unsigned long rcx;
   2.129 +	unsigned long rsp;
   2.130 +	unsigned long rip;
   2.131 +	unsigned long eflags;		/* RFLAGS */
   2.132 +	unsigned short cs;
   2.133 +	unsigned short gs;
   2.134 +	unsigned short fs;
   2.135 +	unsigned short __pad0;
   2.136 +	unsigned long err;
   2.137 +	unsigned long trapno;
   2.138 +	unsigned long oldmask;
   2.139 +	unsigned long cr2;
   2.140 +	struct _fpstate *fpstate;	/* zero when no FPU context */
   2.141 +	unsigned long reserved1[8];
   2.142 +};
   2.143 +
   2.144 +#endif /* !__i386__ */
   2.145 +
   2.146 +#endif