Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage doesn't like embedspu? (Cell supporting SDL ebuilds)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
antonlacon
Apprentice
Apprentice


Joined: 27 Jun 2004
Posts: 255

PostPosted: Mon Jun 08, 2009 8:30 am    Post subject: Portage doesn't like embedspu? (Cell supporting SDL ebuilds) Reply with quote

This pair of ebuilds (if they worked!) will add Cell support to SDL, which currently exists in subversion. It should help with scaling and color conversion. The developer worked on it as part of an internship with IBM and now as part of a GSoC project.

However, the first fails to build due to an "unrecognized commandline option of "-m32"" from embedspu. I also have some other ebuilds that will fail with this same problem.

If I grab the source and simply "make && make install", it works. When I try to do this with portage, it fails. It's compiling, but failing at the embedspu stage.

The incomplete ebuild:
Code:
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2
inherit subversion eutils

DESCRIPTION="Simple Direct Media Layer SPU Helper Libraries"
HOMEPAGE="http://www.libsdl.org/"
ESVN_REPO_URI="http://svn.libsdl.org/branches/SDL-1.2"
#ESVN_PROJECT=""

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~ppc ~ppc64"
RDEPEND="cross-spu-elf/gcc"
DEPEND="${RDEPEND}"

S=${WORKDIR}/SDL-${PV}

src_unpack() {
   subversion_src_unpack
}

src_prepare() {
   # Package expects a CellSDK environment
   sed -i 's/spu-gcc/spu-elf-gcc/' ${S}/src/video/ps3/spulibs/Makefile || die
   sed -i 's/\/usr\/spu\/include/\/usr\/spu-elf\/include/' ${S}/src/video/ps3/spulibs/Makefile || die
   sed -i 's/\-m32//g' ${S}/src/video/ps3/spulibs/Makefile || die
}

src_compile() {
   cd ${S}/src/video/ps3/spulibs
   emake || die
}

src_install() {
   emake DESTDIR="${D}" install || die "emake install failed"
}


Fails with:
Code:
make -j2
/usr/bin/spu-elf-gcc -W -Wall -Winline -Wno-main -I. -I /usr/spu-elf/include -I /opt/cell/sdk/usr/spu/include -finline-limit=10000 -Winline -ftree-vectorize -funroll-loops -fmodulo-sched -ffast-math -fPIC -O2 -o fb_writer_spu fb_writer.c -lm
/usr/bin/spu-elf-gcc -W -Wall -Winline -Wno-main -I. -I /usr/spu-elf/include -I /opt/cell/sdk/usr/spu/include -finline-limit=10000 -Winline -ftree-vectorize -funroll-loops -fmodulo-sched -ffast-math -fPIC -O2 -o yuv2rgb_spu yuv2rgb_converter.c -lm
cc1: error: unrecognized command line option "-m32"
make: *** [fb_writer_spu-embed.o] Error 1
make: *** Waiting for unfinished jobs....
cc1: error: unrecognized command line option "-m32"
make: *** [yuv2rgb_spu-embed.o] Error 1


The Makefile is here: http://www.libsdl.org/cgi/viewvc.cgi/branches/SDL-1.2/src/video/ps3/spulibs/Makefile?revision=4476&view=markup

Removing the "-m32" included with the embedspu command line options makes no difference.

Any other ideas?

Edit:

The matching libsdl subversion ebuild, which works as is for me:

Code:
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2
inherit subversion flag-o-matic toolchain-funcs eutils libtool

DESCRIPTION="Simple Direct Media Layer"
HOMEPAGE="http://www.libsdl.org/"
ESVN_REPO_URI="http://svn.libsdl.org/branches/SDL-1.2"
#ESVN_PROJECT=""

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~ppc ~ppc64"
# WARNING:
# if you disable the audio, video, joystick use flags or turn on the custom-cflags use flag
# in USE and something breaks, you pick up the pieces.  Be prepared for
# bug reports to be marked INVALID.
IUSE="oss alsa esd arts nas X dga xv xinerama fbcon directfb ggi svga aalib opengl ps3 libcaca +audio +video +joystick custom-cflags pulseaudio"

RDEPEND="audio? ( >=media-libs/audiofile-0.1.9 )
   alsa? ( media-libs/alsa-lib )
   esd? ( >=media-sound/esound-0.2.19 )
   arts? ( kde-base/arts )
   nas? (
      media-libs/nas
      x11-libs/libXt
      x11-libs/libXext
      x11-libs/libX11
   )
   X? (
      x11-libs/libXt
      x11-libs/libXext
      x11-libs/libX11
      x11-libs/libXrandr
   )
   directfb? ( >=dev-libs/DirectFB-0.9.19 )
   ggi? ( >=media-libs/libggi-2.0_beta3 )
   svga? ( >=media-libs/svgalib-1.4.2 )
   aalib? ( media-libs/aalib )
   libcaca? ( >=media-libs/libcaca-0.9-r1 )
   opengl? ( virtual/opengl virtual/glu )
   pulseaudio? ( media-sound/pulseaudio )"
#   ps3? ( media-libs/libsdl-spulibs )"
DEPEND="${RDEPEND}
   nas? (
      x11-proto/xextproto
      x11-proto/xproto
   )
   X? (
      x11-proto/xextproto
      x11-proto/xproto
   )
   x86? ( || ( >=dev-lang/yasm-0.6.0 >=dev-lang/nasm-0.98.39-r3 ) )"

S=${WORKDIR}/SDL-${PV}

pkg_setup() {
   if use !audio || use !video || use !joystick ; then
      ewarn "Since you've chosen to turn off some of libsdl's functionality,"
      ewarn "don't bother filing libsdl-related bugs until trying to remerge"
      ewarn "libsdl with the audio, video, and joystick flags in USE."
      ewarn "You need to know what you're doing to selectively turn off parts of libsdl."
      epause 30
   fi
   if use custom-cflags ; then
      ewarn "Since you've chosen to use possibly unsafe CFLAGS,"
      ewarn "don't bother filing libsdl-related bugs until trying to remerge"
      ewarn "libsdl without the custom-cflags use flag in USE."
      epause 10
   fi
}

src_unpack() {
   subversion_src_unpack
}

src_prepare() {
   # patches for bugs #40224 #145917 #198147 #217097
   epatch \
      "${FILESDIR}"/${PN}-1.2.13-libcaca-new-api.patch \
      "${FILESDIR}"/${PN}-1.2.13-sdl-config.patch \
      "${FILESDIR}"/${PN}-1.2.13-xinerama-head-0.patch \
      "${FILESDIR}"/${PN}-1.2.13-pulseaudio.patch \

   ./autogen.sh
   elibtoolize
}

src_configure() {
   local myconf=
   if [[ $(tc-arch) != "x86" ]] ; then
      myconf="${myconf} --disable-nasm"
   else
      myconf="${myconf} --enable-nasm"
   fi
   use custom-cflags || strip-flags
   use audio || myconf="${myconf} --disable-audio"
   use video \
      && myconf="${myconf} --enable-video-dummy" \
      || myconf="${myconf} --disable-video"
   use joystick || myconf="${myconf} --disable-joystick"

   local directfbconf="--disable-video-directfb"
   if use directfb ; then
      # since DirectFB can link against SDL and trigger a
      # dependency loop, only link against DirectFB if it
      # isn't broken #61592
      echo 'int main(){}' > directfb-test.c
      $(tc-getCC) directfb-test.c -ldirectfb 2>/dev/null \
         && directfbconf="--enable-video-directfb" \
         || ewarn "Disabling DirectFB since libdirectfb.so is broken"
   fi

   myconf="${myconf} ${directfbconf}"

   econf \
      --disable-rpath \
      --enable-events \
      --enable-cdrom \
      --enable-threads \
      --enable-timers \
      --enable-file \
      --enable-cpuinfo \
      $(use_enable oss) \
      $(use_enable alsa) \
      $(use_enable esd) \
      $(use_enable pulseaudio) \
      $(use_enable arts) \
      $(use_enable nas) \
      $(use_enable X video-x11) \
      $(use_enable dga) \
      $(use_enable xv video-x11-xv) \
      $(use_enable xinerama video-x11-xinerama) \
      $(use_enable X video-x11-xrandr) \
      $(use_enable dga video-dga) \
      $(use_enable fbcon video-fbcon) \
      $(use_enable ggi video-ggi) \
      $(use_enable svga video-svga) \
      $(use_enable aalib video-aalib) \
      $(use_enable libcaca video-caca) \
      $(use_enable opengl video-opengl) \
      $(use_enable ps3 video-ps3) \
      $(use_with X x) \
      --disable-video-x11-xme \
      ${myconf}
}

src_install() {
   emake DESTDIR="${D}" install || die "emake install failed"
   dodoc BUGS CREDITS README README-SDL.txt README.CVS TODO WhatsNew
   dohtml -r ./
}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum