build_fceux(){ HERE=`pwd` BUILDDEPS="compiletc.tcz scons.tcz Xorg-7.6-lib.tcz Xorg-7.6-dev.tcz" . ./gd-sc.inc || exit 1 . ./desktop-file-utils-sc.inc || exit 1 . ./sdl-sc.inc || exit 1 for I in `echo "$BUILDDEPS"`; do su tc -c "tce-load -i "$I"" || su tc -c "tce-load -iw "$I"" done PKGPATH=$1 export LDFLAGS="-L$PKGPATH/lib -L/apps/gtk2/lib" export CPPFLAGS="-I$PKGPATH/include -I/apps/gtk2/include" export PATH="$PKGPATH/bin:/apps/gtk2/localbin:$PATH" export PKG_CONFIG_PATH="/apps/gtk2/lib/pkgconfig:$PKGPATH/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$PKGPATH/lib:/apps/gtk2/lib" if [ ! -f "$TMPDIR"/gd ]; then build_gd "$PKGPATH" || exit 1 fi if [ ! -f "$TMPDIR"/desktop-file-utils ]; then build_desktop-file-utils "$PKGPATH" || exit 1 fi if [ ! -f "$TMPDIR"/sdl ]; then build_sdl "$PKGPATH" || exit 1 fi # Make sure /apps/fceux/lib and /apps/gtk2/lib are primary in /etc/ld.so.conf, then ldconfig tar xvf fceux-2.1.5.src.tar.bz2 || exit 1 cd fceu2.1.5 || exit 1 patch -p0 -i ../fceux-path.patch || exit 1 export PKG_CONFIG_PATH=/apps/gtk2/lib/pkgconfig scons CREATE_AVI=0 OPENGL=0 mkdir -p "$PKGPATH"/bin cp ../fceux-wrapper "$PKGPATH"/bin/fceux || exit 1 chmod 775 "$PKGPATH"/bin/fceux mkdir -p "$PKGPATH"/localbin install -m 0755 bin/fceux "$PKGPATH"/localbin/ || exit 1 mkdir -p "$PKGPATH"/share/applications cp -a ../fceux.desktop "$PKGPATH"/share/applications || exit 1 mkdir -p "$PKGPATH"/share/pixmaps cp -a ../fceux.png "$PKGPATH"/share/pixmaps/ || exit 1 cd "$HERE" touch "$TMPDIR"/fceux }