From 211c31ad170a4c1f32ade3ee244c727ed291ce44 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 8 Nov 2011 12:15:22 +0100 Subject: [PATCH] gmp: build gmp target libs, split to gmp and gmp-host Signed-off-by: Stephan Raue --- packages/devel/gmp/build | 44 +++++++++++++++++++ packages/devel/gmp/install | 26 +++++++++++ packages/{toolchain/math => devel}/gmp/meta | 6 +-- packages/toolchain/devel/binutils/meta | 2 +- packages/toolchain/lang/gcc-core/meta | 2 +- packages/toolchain/lang/gcc-final/meta | 2 +- packages/toolchain/math/cloog-ppl/meta | 2 +- .../toolchain/math/{gmp => gmp-host}/build | 7 +-- packages/toolchain/math/gmp-host/meta | 36 +++++++++++++++ packages/toolchain/math/mpc/build | 3 -- packages/toolchain/math/mpc/meta | 2 +- packages/toolchain/math/mpfr/meta | 2 +- packages/toolchain/math/ppl/meta | 2 +- 13 files changed, 120 insertions(+), 16 deletions(-) create mode 100755 packages/devel/gmp/build create mode 100755 packages/devel/gmp/install rename packages/{toolchain/math => devel}/gmp/meta (96%) rename packages/toolchain/math/{gmp => gmp-host}/build (94%) create mode 100644 packages/toolchain/math/gmp-host/meta diff --git a/packages/devel/gmp/build b/packages/devel/gmp/build new file mode 100755 index 0000000000..f984060784 --- /dev/null +++ b/packages/devel/gmp/build @@ -0,0 +1,44 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +export CFLAGS="$CFLAGS -fPIC" +export CPPFLAGS="$CPPFLAGS -fexceptions" + +cd $PKG_BUILD + +mkdir -p .objdir-target && cd .objdir-target + +../configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --disable-static \ + --enable-shared \ + --disable-mpbsd \ + --disable-cxx \ + +make +$MAKEINSTALL \ No newline at end of file diff --git a/packages/devel/gmp/install b/packages/devel/gmp/install new file mode 100755 index 0000000000..4ea4daa37e --- /dev/null +++ b/packages/devel/gmp/install @@ -0,0 +1,26 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/lib + cp -P $PKG_BUILD/.objdir-target/.libs/libgmp.so* $INSTALL/usr/lib diff --git a/packages/toolchain/math/gmp/meta b/packages/devel/gmp/meta similarity index 96% rename from packages/toolchain/math/gmp/meta rename to packages/devel/gmp/meta index 9486cd1bf8..4eec81da7f 100644 --- a/packages/toolchain/math/gmp/meta +++ b/packages/devel/gmp/meta @@ -26,11 +26,11 @@ PKG_LICENSE="LGPL" PKG_SITE="http://gmplib.org/" PKG_URL="http://ftp.sunet.se/pub/gnu/gmp/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache" +PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" -PKG_SECTION="toolchain/math" +PKG_SECTION="devel" PKG_SHORTDESC="gmp: The GNU MP (multiple precision arithmetic) library" PKG_LONGDESC="GNU MP is a library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. It has a rich set of functions, and the functions have a regular interface. GNU MP is designed to be as fast as possible, both for small operands and for huge operands. The speed is achieved by using fullwords as the basic arithmetic type, by using fast algorithms, by carefully optimized assembly code for the most common inner loops for a lots of CPUs, and by a general emphasis on speed (instead of simplicity or elegance). The speed of GNU MP is believed to be faster than any other similar library. The advantage for GNU MP increases with the operand sizes for certain operations, since GNU MP in many cases has asymptotically faster algorithms." PKG_IS_ADDON="no" -PKG_AUTORECONF="no" +PKG_AUTORECONF="yes" diff --git a/packages/toolchain/devel/binutils/meta b/packages/toolchain/devel/binutils/meta index 32c7de3622..83ca639309 100644 --- a/packages/toolchain/devel/binutils/meta +++ b/packages/toolchain/devel/binutils/meta @@ -29,7 +29,7 @@ PKG_URL="http://www.mirrorservice.org/sites/ftp.kernel.org/pub/linux/devel/binut #PKG_URL="http://ftp.gnu.org/gnu/binutils/$PKG_NAME-$PKG_VERSION.tar.bz2" #PKG_URL="ftp://ftp.kernel.org/pub/linux/devel/binutils/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache bison flex linux-headers gmp mpfr ppl cloog-ppl libelf" +PKG_BUILD_DEPENDS="ccache bison flex linux-headers gmp-host mpfr ppl cloog-ppl libelf" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="binutils: A GNU collection of binary utilities" diff --git a/packages/toolchain/lang/gcc-core/meta b/packages/toolchain/lang/gcc-core/meta index 1aed495658..90e8b78507 100644 --- a/packages/toolchain/lang/gcc-core/meta +++ b/packages/toolchain/lang/gcc-core/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://gcc.gnu.org/" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache autoconf-2.64 binutils gmp mpfr mpc ppl cloog-ppl libelf" +PKG_BUILD_DEPENDS="ccache autoconf-2.64 binutils gmp-host mpfr mpc ppl cloog-ppl libelf" PKG_PRIORITY="optional" PKG_SECTION="toolchain/lang" PKG_SHORTDESC="gcc: The GNU Compiler Collection Version 4 (aka GNU C Compiler)" diff --git a/packages/toolchain/lang/gcc-final/meta b/packages/toolchain/lang/gcc-final/meta index 3e378ac96c..46a3fff01b 100644 --- a/packages/toolchain/lang/gcc-final/meta +++ b/packages/toolchain/lang/gcc-final/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://gcc.gnu.org/" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache autoconf-2.64 binutils gmp mpfr mpc ppl cloog-ppl libelf eglibc" +PKG_BUILD_DEPENDS="ccache autoconf-2.64 binutils gmp-host mpfr mpc ppl cloog-ppl libelf eglibc" PKG_PRIORITY="optional" PKG_SECTION="toolchain/lang" PKG_SHORTDESC="gcc: The GNU Compiler Collection Version 4 (aka GNU C Compiler)" diff --git a/packages/toolchain/math/cloog-ppl/meta b/packages/toolchain/math/cloog-ppl/meta index 07685bf0de..d740e280f8 100644 --- a/packages/toolchain/math/cloog-ppl/meta +++ b/packages/toolchain/math/cloog-ppl/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.cloog.org/" PKG_URL="ftp://gcc.gnu.org/pub/gcc/infrastructure/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache gmp ppl" +PKG_BUILD_DEPENDS="ccache gmp-host ppl" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="cloog-ppl: Code Generator in the Polyhedral Model's Home" diff --git a/packages/toolchain/math/gmp/build b/packages/toolchain/math/gmp-host/build similarity index 94% rename from packages/toolchain/math/gmp/build rename to packages/toolchain/math/gmp-host/build index 8c82bc67f9..b26d3c0621 100755 --- a/packages/toolchain/math/gmp/build +++ b/packages/toolchain/math/gmp-host/build @@ -22,15 +22,16 @@ . config/options $1 +$SCRIPTS/unpack gmp + setup_toolchain host export CFLAGS="$CFLAGS -fPIC" export CPPFLAGS="$CPPFLAGS -fexceptions" -cd $PKG_BUILD +cd $BUILD/gmp-* -mkdir -p objdir -cd objdir +mkdir -p .objdir-host && cd .objdir-host ../configure --host=$HOST_NAME \ --build=$HOST_NAME \ diff --git a/packages/toolchain/math/gmp-host/meta b/packages/toolchain/math/gmp-host/meta new file mode 100644 index 0000000000..f99ea13388 --- /dev/null +++ b/packages/toolchain/math/gmp-host/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="gmp" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://gmplib.org/" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/math" +PKG_SHORTDESC="gmp: The GNU MP (multiple precision arithmetic) library" +PKG_LONGDESC="GNU MP is a library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. It has a rich set of functions, and the functions have a regular interface. GNU MP is designed to be as fast as possible, both for small operands and for huge operands. The speed is achieved by using fullwords as the basic arithmetic type, by using fast algorithms, by carefully optimized assembly code for the most common inner loops for a lots of CPUs, and by a general emphasis on speed (instead of simplicity or elegance). The speed of GNU MP is believed to be faster than any other similar library. The advantage for GNU MP increases with the operand sizes for certain operations, since GNU MP in many cases has asymptotically faster algorithms." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/math/mpc/build b/packages/toolchain/math/mpc/build index 52776b66c8..76f268a356 100755 --- a/packages/toolchain/math/mpc/build +++ b/packages/toolchain/math/mpc/build @@ -22,9 +22,6 @@ . config/options $1 -$SCRIPTS/build gmp -$SCRIPTS/build mpfr - setup_toolchain host cd $PKG_BUILD diff --git a/packages/toolchain/math/mpc/meta b/packages/toolchain/math/mpc/meta index 94b79f2bbe..6ea3da4b8d 100644 --- a/packages/toolchain/math/mpc/meta +++ b/packages/toolchain/math/mpc/meta @@ -26,7 +26,7 @@ PKG_LICENSE="LGPL" PKG_SITE="http://www.multiprecision.org" PKG_URL="http://www.multiprecision.org/mpc/download/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache gmp mpfr" +PKG_BUILD_DEPENDS="ccache gmp-host mpfr" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="mpc: A C library for the arithmetic of high precision complex numbers" diff --git a/packages/toolchain/math/mpfr/meta b/packages/toolchain/math/mpfr/meta index 50bfa5c47a..43c437e6cb 100644 --- a/packages/toolchain/math/mpfr/meta +++ b/packages/toolchain/math/mpfr/meta @@ -26,7 +26,7 @@ PKG_LICENSE="LGPL" PKG_SITE="http://www.mpfr.org/" PKG_URL="http://ftp.gnu.org/gnu/mpfr/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache gmp" +PKG_BUILD_DEPENDS="ccache gmp-host" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="mpfr: A C library for multiple-precision floating-point computations with exact roundi" diff --git a/packages/toolchain/math/ppl/meta b/packages/toolchain/math/ppl/meta index 6aec57b2f1..cc8b0aa281 100644 --- a/packages/toolchain/math/ppl/meta +++ b/packages/toolchain/math/ppl/meta @@ -27,7 +27,7 @@ PKG_SITE="http://www.cs.unipr.it/ppl" PKG_URL="http://www.cs.unipr.it/ppl/Download/ftp/releases/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_URL="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/ppl-0.11.2.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache gmp" +PKG_BUILD_DEPENDS="ccache gmp-host" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="ppl: Parma Polyhedra Library"