summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2006-06-27 15:36:55 +0000
committerLuca Barbato <lu_zero@gentoo.org>2006-06-27 15:36:55 +0000
commitd33e199b21dfa39f92a48a0334b0775098e9df7a (patch)
tree8e6caabd297b1a60b1e1239a48b576bcb066ec52 /sys-libs
parenthalf backed ebuild for libspe (diff)
downloadlu_zero-d33e199b21dfa39f92a48a0334b0775098e9df7a.tar.gz
lu_zero-d33e199b21dfa39f92a48a0334b0775098e9df7a.tar.bz2
lu_zero-d33e199b21dfa39f92a48a0334b0775098e9df7a.zip
interim update, yet to be tested
svn path=/; revision=11
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libspe/files/spe.rc634
-rw-r--r--sys-libs/libspe/libspe-20060627.ebuild54
2 files changed, 88 insertions, 0 deletions
diff --git a/sys-libs/libspe/files/spe.rc6 b/sys-libs/libspe/files/spe.rc6
new file mode 100644
index 0000000..fd8086f
--- /dev/null
+++ b/sys-libs/libspe/files/spe.rc6
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ # you need the elfspe bin
+ need localmount
+}
+
+start() {
+ ebegin "Registering elfspe to binfmt"
+
+ if test -f /proc/sys/fs/binfmt_misc/spe
+ then
+ eerror "elfspe already registered"
+ return 1
+ else
+ echo ':spe:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x17::/usr/bin/elfspe:' \
+ >/proc/sys/fs/binfmt_misc/register
+ eend $?
+ fi
+}
+
+stop() {
+ if ! test -f /proc/sys/fs/binfmt_misc/spe
+ then
+ eerror "elfspe not present"
+ return 1
+ else
+ echo -1 > /proc/sys/fs/binfmt_misc/spe
+ eend $?
+ fi
+}
diff --git a/sys-libs/libspe/libspe-20060627.ebuild b/sys-libs/libspe/libspe-20060627.ebuild
new file mode 100644
index 0000000..16bf16e
--- /dev/null
+++ b/sys-libs/libspe/libspe-20060627.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+DESCRIPTION="A wrapper library to adapt the JSRE SPU usage model to SPUFS"
+HOMEPAGE="http://kernel.org/pub/linux/libs/powerpc/libspe/"
+SRC_URI="http://www.kernel.org/pub/linux/kernel/people/arnd/libspe/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~ppc"
+IUSE="debug"
+
+DEPEND=""
+RDEPEND=""
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ SYSROOT=""
+else
+ SYSROOT="${CTARGET}"
+fi
+
+src_unpack () {
+ unpack ${A}
+ #just in case something is missing
+}
+
+src_compile() {
+ myconf=""
+ use debug && myconf="${myconf} DEBUG=1"
+ make CROSS=${CTARGET} prefix=/usr SYSROOT="$SYSROOT" ${myconf}
+}
+
+src_install() {
+ make CROSS=${CTARGET} prefix=/usr SYSROOT="$SYSROOT" DESTDIR="$D"
+ insinto /etc/init.d
+ dobin ${FILESDIR}/spe.rc6 elfspe
+}
+
+
+pkg_postinst() {
+ einfo "You may want to register elfspe to binfmt using the"
+ einfo "provided initscript"
+ einfo "# rcupdate add elfspe boot"
+}