From 50d7940454b58d4759e59385eeba7d587fdb98c4 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 2 Oct 2011 20:20:40 +0200 Subject: [PATCH] libffi: split in libffi-host and libffi-target Signed-off-by: Stephan Raue --- packages/devel/libffi-host/build | 44 ++++++++++++++++++++++++++++++++ packages/devel/libffi-host/meta | 36 ++++++++++++++++++++++++++ packages/devel/libffi/build | 19 +++++++++----- packages/devel/libffi/install | 2 +- 4 files changed, 93 insertions(+), 8 deletions(-) create mode 100755 packages/devel/libffi-host/build create mode 100644 packages/devel/libffi-host/meta diff --git a/packages/devel/libffi-host/build b/packages/devel/libffi-host/build new file mode 100755 index 0000000000..6cc66d174c --- /dev/null +++ b/packages/devel/libffi-host/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 + +$SCRIPTS/unpack libffi + +setup_toolchain host + +cd $BUILD/libffi-* +mkdir -p .build-host && cd .build-host +../configure --host=$HOST_NAME \ + --build=$HOST_NAME \ + --prefix=$ROOT/$TOOLCHAIN \ + --sysconfdir=/etc \ + --disable-static \ + --enable-shared \ + --disable-debug \ + --enable-structs \ + --enable-raw-api \ + --disable-purify-safety \ + --with-gnu-ld + +make +make install diff --git a/packages/devel/libffi-host/meta b/packages/devel/libffi-host/meta new file mode 100644 index 0000000000..cad9095434 --- /dev/null +++ b/packages/devel/libffi-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="libffi-host" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://sourceware.org/$PKG_NAME/" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="Foreign Function Interface Library" +PKG_LONGDESC="The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run-time." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/libffi/build b/packages/devel/libffi/build index f7165b19be..08f3b805ef 100755 --- a/packages/devel/libffi/build +++ b/packages/devel/libffi/build @@ -23,13 +23,18 @@ . config/options $1 cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --disable-static \ - --enable-shared \ - --disable-debug \ +mkdir -p .build-target && cd .build-target +../configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --disable-static \ + --enable-shared \ + --disable-debug \ + --enable-structs \ + --enable-raw-api \ + --disable-purify-safety \ + --with-gnu-ld make diff --git a/packages/devel/libffi/install b/packages/devel/libffi/install index 0895911777..a710883507 100755 --- a/packages/devel/libffi/install +++ b/packages/devel/libffi/install @@ -23,4 +23,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/.build-target/.libs/*.so* $INSTALL/usr/lib