wok rev 16319

ARM: add mpfr + mpc-library (to cook native ARM gcc) and try to fix glib (gtk crashe are from libgobject-2.0.so.0)
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 09 20:51:15 2014 +0200 (2014-04-09)
parents 03d5ff1ebd83
children 6821d5d3f1b9
files gcc/receipt glib-dev/receipt glib/receipt libgio-dev/receipt libgio/receipt mpc-library/receipt mpfr-dev/receipt mpfr/receipt
line diff
     1.1 --- a/gcc/receipt	Wed Apr 09 15:40:42 2014 +0200
     1.2 +++ b/gcc/receipt	Wed Apr 09 20:51:15 2014 +0200
     1.3 @@ -10,124 +10,28 @@
     1.4  WEB_SITE="http://gcc.gnu.org/"
     1.5  WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
     1.6  TAGS="compiler C"
     1.7 +#HOST_ARCH="i486 arm"
     1.8  
     1.9  # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
    1.10  # for cookutils that are not used by tazwok/cook-toolchain since it install
    1.11  # and use it's own copy.
    1.12  DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
    1.13 -BUILD_DEPENDS="elfutils mpc-library mpfr mpfr-dev gmp gmp-dev \
    1.14 -elfutils-dev"
    1.15 +BUILD_DEPENDS="mpc-library mpfr-dev gmp-dev elfutils-dev"
    1.16  
    1.17 -# Rules to compile & install the temporary toolchain.
    1.18 -precook_tmp_toolchain()
    1.19 -{
    1.20 -	report open-bloc
    1.21 -	cd $src
    1.22 -
    1.23 -	# GCC requires the GMP, MPFR and MPC packages.
    1.24 -	tazwok get-src mpfr --target=$PWD/mpfr || { report close-bloc; return 1; }
    1.25 -	tazwok get-src gmp --target=$PWD/gmp || { report close-bloc; return 1; }
    1.26 -	tazwok get-src mpc-library --target=$PWD/mpc || { report close-bloc; return 1; }
    1.27 -
    1.28 -	report step "Running compilation"
    1.29 -
    1.30 -	# Use libiberty.a from binutils.
    1.31 -	sed -i 's/install_to_$(INSTALL_DEST) //' \
    1.32 -		libiberty/Makefile.in || return 1
    1.33 -
    1.34 -	# Build it in a separate directory.
    1.35 -	mkdir ../gcc-build
    1.36 -	cd ../gcc-build
    1.37 -
    1.38 -	{ $src/configure \
    1.39 -		--target=$HOST_SYSTEM \
    1.40 -		--disable-nls --disable-shared --disable-multilib \
    1.41 -		--disable-decimal-float --disable-threads \
    1.42 -		--disable-libmudflap --disable-libssp \
    1.43 -		--disable-libgomp --enable-languages=c \
    1.44 -		--with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs \
    1.45 -		--without-ppl --without-cloog &&
    1.46 -	make &&
    1.47 -	make install
    1.48 -	} || { report close-bloc; return 1; }
    1.49 -
    1.50 -	# See LFS for more detais about this.
    1.51 -	ln -s libgcc.a `$HOST_SYSTEM-gcc -print-libgcc-file-name | \
    1.52 -    		sed 's/libgcc/&_eh/'`
    1.53 -	report close-bloc
    1.54 -}
    1.55 -
    1.56 -cook_tmp_toolchain()
    1.57 -{
    1.58 -	report open-bloc
    1.59 -	cd $src
    1.60 -	patch -Np1 -i $stuff/gcc-$VERSION-startfiles_fix-1.patch || { report close-bloc; return 1; }
    1.61 -
    1.62 -	# Details about theses lines are in LFS book.
    1.63 -	sed 's@\./fixinc\.sh@-c true@' -i gcc/Makefile.in
    1.64 -	sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' -i gcc/Makefile.in
    1.65 -	for file in \
    1.66 -		$(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
    1.67 -	do
    1.68 -		sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
    1.69 -			-e 's@/usr@/tools@g' -i $file
    1.70 -		echo '
    1.71 -#undef STANDARD_INCLUDE_DIR
    1.72 -#define STANDARD_INCLUDE_DIR 0
    1.73 -#define STANDARD_STARTFILE_PREFIX_1 ""
    1.74 -#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
    1.75 -	done
    1.76 -
    1.77 -	if [ "$ARCH" = x86_64 ]; then
    1.78 -		for file in $(find gcc/config -name t-linux64) ; do
    1.79 -			sed '/MULTILIB_OSDIRNAMES/d' -i $file
    1.80 -		done
    1.81 -	fi
    1.82 -
    1.83 -	# GCC requires the GMP, MPFR and MPC packages.
    1.84 -	tazwok get-src mpfr --target=$PWD/mpfr || { report close-bloc; return 1; }
    1.85 -	tazwok get-src gmp --target=$PWD/gmp || { report close-bloc; return 1; }
    1.86 -	tazwok get-src mpc-library --target=$PWD/mpc || { report close-bloc; return 1; }
    1.87 -
    1.88 -	report step "Running compilation"
    1.89 -
    1.90 -	# Use libiberty.a from binutils.
    1.91 -	sed -i 's/install_to_$(INSTALL_DEST) //' \
    1.92 -		libiberty/Makefile.in || return 1
    1.93 -
    1.94 -	# Build it in a separate directory.
    1.95 -	mkdir ../gcc-build
    1.96 -	cd ../gcc-build
    1.97 -
    1.98 -	{ CC="$HOST_SYSTEM-gcc -B/tools/lib/" \
    1.99 -		AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \
   1.100 -		$src/configure \
   1.101 -		--with-local-prefix=/tools --enable-clocale=gnu \
   1.102 -		--enable-shared --enable-threads=posix \
   1.103 -		--enable-__cxa_atexit --enable-languages=c,c++ \
   1.104 -		--disable-libstdcxx-pch --disable-multilib \
   1.105 -		--disable-bootstrap --disable-libgomp \
   1.106 -		--with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs \
   1.107 -		--without-ppl --without-cloog &&
   1.108 -	make &&
   1.109 -	make install
   1.110 -	} || { report close-bloc; return 1; }
   1.111 -	ln -s gcc /tools/bin/cc
   1.112 -	report close-bloc
   1.113 -}
   1.114 +# Handle cross compilation (native i486/ARM gcc)
   1.115 +case "$ARCH" in
   1.116 +	i?86)
   1.117 +		ARCH_ARGS="--with-tune=$ARCH"
   1.118 +		pkgversion="SliTaz"
   1.119 +		languages="c,c++,objc,fortran" ;;
   1.120 +	arm*)
   1.121 +		pkgversion="SliTaz ARM"
   1.122 +		languages="c,c++" ;;
   1.123 +esac
   1.124  
   1.125  # Rules to configure and make the package.
   1.126  compile_rules()
   1.127  {
   1.128 -	cd $src
   1.129 -
   1.130 -	# SliTaz is a Busybox based OS, why we so small and fast. Using gawk by
   1.131 -	# default to build package will not ensure package work with Busybox awk
   1.132 -	# and so should NOT be use to cook.
   1.133 -	if [ -x /usr/bin/cook ]; then
   1.134 -		[ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk
   1.135 -	fi
   1.136 -
   1.137  	# Package slitaz-toolchain use 'cook --options' when rebuilding
   1.138  	# the full SliTaz toolchain.
   1.139  	[ "$2" == "--first-pass" ] && opt=$2
   1.140 @@ -136,9 +40,8 @@
   1.141  	# Use libiberty.a from binutils.
   1.142  	sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
   1.143  
   1.144 -	case $ARCH in
   1.145 -		i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' \
   1.146 -			gcc/Makefile.in ;;
   1.147 +	case "$ARCH" in
   1.148 +		i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;;
   1.149  	esac
   1.150  
   1.151  	#sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
   1.152 @@ -161,8 +64,7 @@
   1.153  				--enable-clocale=gnu \
   1.154  				--enable-threads=posix \
   1.155  				--disable-bootstrap \
   1.156 -				--build=$HOST_SYSTEM \
   1.157 -				--host=$HOST_SYSTEM &&
   1.158 +				${CONFIGURE_ARGS} &&
   1.159  			make && make install ;;
   1.160  		*)
   1.161  			# Used by default to produce a full featured X86 GCC compiler.
   1.162 @@ -170,7 +72,7 @@
   1.163  			$src/configure \
   1.164  				--libexecdir=/usr/lib \
   1.165  				--enable-nls \
   1.166 -				--enable-languages=c,c++,objc,fortran \
   1.167 +				--enable-languages=${languages} \
   1.168  				--enable-shared \
   1.169  				--with-system-zlib \
   1.170  				--enable-clocale=gnu \
   1.171 @@ -179,10 +81,8 @@
   1.172  				--enable-lto \
   1.173  				--enable-threads=posix \
   1.174  				--disable-bootstrap \
   1.175 -				--with-pkgversion="SliTaz" \
   1.176 -				--with-tune=$ARCH \
   1.177 -				--build=$HOST_SYSTEM \
   1.178 -				--host=$HOST_SYSTEM &&
   1.179 +				--with-pkgversion="$pkgversion" \
   1.180 +				${CONFIGURE_ARGS} ${ARCH_ARGS} &&
   1.181  			make && make install ;;
   1.182  	esac
   1.183  }
     2.1 --- a/glib-dev/receipt	Wed Apr 09 15:40:42 2014 +0200
     2.2 +++ b/glib-dev/receipt	Wed Apr 09 20:51:15 2014 +0200
     2.3 @@ -12,8 +12,12 @@
     2.4  
     2.5  DEPENDS="glib perl python libffi-dev libgio libgio-dev pcre-dev pkg-config"
     2.6  
     2.7 +# Handle SliTaz arch
     2.8 +case "$SLITAZ_ARCH" in
     2.9 +	arm*) VERSION="2.34.3" ;;
    2.10 +esac
    2.11  case "$ARCH" in
    2.12 -	arm) VERSION="2.34.3" ;;
    2.13 +	arm*) VERSION="2.34.3" ;;
    2.14  esac
    2.15  
    2.16  # Rules to gen a SliTaz package suitable for Tazpkg.
     3.1 --- a/glib/receipt	Wed Apr 09 15:40:42 2014 +0200
     3.2 +++ b/glib/receipt	Wed Apr 09 20:51:15 2014 +0200
     3.3 @@ -14,12 +14,17 @@
     3.4  CROSS_BUGS="arm: glib 2.32.4 error: cannot compute alignment of guint32"
     3.5  
     3.6  DEPENDS="pcre libffi libxml2 elfutils"
     3.7 -BUILD_DEPENDS="pcre-dev libffi-dev gettext zlib-dev perl python python-dev \
     3.8 +BUILD_DEPENDS="pcre-dev libffi-dev gettext zlib-dev perl python-dev \
     3.9  elfutils-dev libxml2-dev libxml2-tools automake"
    3.10  
    3.11 +# Handle SliTaz arch
    3.12 +case "$SLITAZ_ARCH" in
    3.13 +	arm*) VERSION="2.34.3" ;;
    3.14 +esac
    3.15 +
    3.16  # Handle cross comilation. Use host Perl, Python, etc
    3.17  case "$ARCH" in
    3.18 -	arm)
    3.19 +	arm*)
    3.20  		VERSION="2.34.3"
    3.21  		TARBALL="$PACKAGE-$VERSION.tar.xz"
    3.22  		WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION:0:4}/$TARBALL"
    3.23 @@ -35,11 +40,10 @@
    3.24  				--sysconfdir=/etc \
    3.25  				--with-pcre=system \
    3.26  				$CONFIGURE_ARGS ;;
    3.27 -		arm)
    3.28 +		arm*)
    3.29  			# Native ARM build --> if ARCH != SLITAZ_ARCH ?
    3.30 -			#export LIBTOOL=arm-slitaz-linux-gnueabi-libtool 
    3.31 -			export LD_LIBRARY_PATH=/cross/arm/sysroot/usr/lib:/usr/lib:/lib
    3.32 -			export PKG_CONFIG_LIBPATH=/cross/arm/sysroot/usr/lib/pkgconfig
    3.33 +			export LD_LIBRARY_PATH=/cross/$ARCH/sysroot/usr/lib:/usr/lib:/lib
    3.34 +			export PKG_CONFIG_LIBPATH=/cross/$ARCH/sysroot/usr/lib/pkgconfig
    3.35  			
    3.36  			# Glib
    3.37  			export glib_cv_stack_grows=${glib_cv_stack_grows=no}
    3.38 @@ -47,7 +51,8 @@
    3.39  			export ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=no}
    3.40  			export ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=no}
    3.41  			export ac_cv_type_long_long=${ac_cv_type_long_long=yes}
    3.42 -			CC="arm-slitaz-linux-gnueabi-gcc" \
    3.43 +			CC="$HOST_SYSTEM-gcc" \
    3.44 +			LIBTOOL="$HOST_SYSTEM-libtool" \
    3.45  			./configure \
    3.46  				--sysconfdir=/etc \
    3.47  				--with-pcre=system \
     4.1 --- a/libgio-dev/receipt	Wed Apr 09 15:40:42 2014 +0200
     4.2 +++ b/libgio-dev/receipt	Wed Apr 09 20:51:15 2014 +0200
     4.3 @@ -12,12 +12,12 @@
     4.4  
     4.5  DEPENDS="libgio pkg-config"
     4.6  
     4.7 +# Handle SliTaz arch
     4.8  case "$SLITAZ_ARCH" in
     4.9  	arm*) VERSION="2.34.3" ;;
    4.10  esac
    4.11 -
    4.12  case "$ARCH" in
    4.13 -	arm) VERSION="2.34.3" ;;
    4.14 +	arm*) VERSION="2.34.3" ;;
    4.15  esac
    4.16  
    4.17  # Rules to gen a SliTaz package suitable for Tazpkg.
     5.1 --- a/libgio/receipt	Wed Apr 09 15:40:42 2014 +0200
     5.2 +++ b/libgio/receipt	Wed Apr 09 20:51:15 2014 +0200
     5.3 @@ -12,10 +12,10 @@
     5.4  
     5.5  DEPENDS="glib"
     5.6  
     5.7 +# Handle SliTaz arch
     5.8  case "$SLITAZ_ARCH" in
     5.9  	arm*) VERSION="2.34.3" ;;
    5.10  esac
    5.11 -
    5.12  case "$ARCH" in
    5.13  	arm*) VERSION="2.34.3" ;;
    5.14  esac
     6.1 --- a/mpc-library/receipt	Wed Apr 09 15:40:42 2014 +0200
     6.2 +++ b/mpc-library/receipt	Wed Apr 09 20:51:15 2014 +0200
     6.3 @@ -10,6 +10,8 @@
     6.4  TARBALL="$SOURCE-$VERSION.tar.gz"
     6.5  WEB_SITE="http://www.multiprecision.org/"
     6.6  WGET_URL="http://www.multiprecision.org/mpc/download/$TARBALL"
     6.7 +HOST_ARCH="i486 arm"
     6.8 +
     6.9  BUGS="Shared libs dont build with 0.9"
    6.10  
    6.11  DEPENDS="mpfr gmp"
    6.12 @@ -17,7 +19,6 @@
    6.13  
    6.14  compile_rules()
    6.15  {
    6.16 -	cd $src
    6.17  	#patch -Np1 -i $stuff/libmpc-0.9-configure_cflags_egrep_issue.patch
    6.18  	./configure $CONFIGURE_ARGS && make && make install
    6.19  }
     7.1 --- a/mpfr-dev/receipt	Wed Apr 09 15:40:42 2014 +0200
     7.2 +++ b/mpfr-dev/receipt	Wed Apr 09 20:51:15 2014 +0200
     7.3 @@ -1,14 +1,14 @@
     7.4  # SliTaz package receipt
     7.5  
     7.6  PACKAGE="mpfr-dev"
     7.7 -VERSION="3.1.0"
     7.8 +VERSION="3.1.2"
     7.9  CATEGORY="development"
    7.10  SHORT_DESC="GNU Multiple Precision Arithmetic devel files."
    7.11  MAINTAINER="pankso@slitaz.org"
    7.12  LICENSE="GPL3"
    7.13  WANTED="mpfr"
    7.14 -WEB_SITE="http://gmplib.org/"
    7.15 -#EXTRAVERSION="p8"
    7.16 +WEB_SITE="http://www.mpfr.org/"
    7.17 +HOST_ARCH="i486 arm"
    7.18  
    7.19  DEPENDS="mpfr"
    7.20  
     8.1 --- a/mpfr/receipt	Wed Apr 09 15:40:42 2014 +0200
     8.2 +++ b/mpfr/receipt	Wed Apr 09 20:51:15 2014 +0200
     8.3 @@ -1,7 +1,7 @@
     8.4  # SliTaz package receipt
     8.5  
     8.6  PACKAGE="mpfr"
     8.7 -VERSION="3.1.0"
     8.8 +VERSION="3.1.2"
     8.9  CATEGORY="development"
    8.10  SHORT_DESC="C library for multiple-precision floating-point computations."
    8.11  MAINTAINER="pankso@slitaz.org"
    8.12 @@ -9,16 +9,19 @@
    8.13  TARBALL="$PACKAGE-$VERSION.tar.bz2"
    8.14  WEB_SITE="http://www.mpfr.org/"
    8.15  WGET_URL="http://www.mpfr.org/mpfr-current/$TARBALL"
    8.16 +HOST_ARCH="i486 arm"
    8.17  
    8.18  DEPENDS="gmp"
    8.19  BUILD_DEPENDS="gmp-dev"
    8.20  
    8.21 +#--with-gmp-lib=/cross/$ARCH/sysroot/usr/lib
    8.22 +#--with-gmp-include=/cross/$ARCH/sysroot/usr/include
    8.23 +
    8.24  # Rules to configure and make the package.
    8.25  compile_rules()
    8.26 -{	
    8.27 -	cd $src
    8.28 -	patch -Np1 -i $stuff/$PACKAGE-$VERSION.patch 
    8.29 -	./configure $CONFIGURE_ARGS &&
    8.30 +{
    8.31 +	./configure \
    8.32 +		$CONFIGURE_ARGS &&
    8.33  	make && make install
    8.34  }
    8.35