summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/epsxe')
-rw-r--r--app-emulation/epsxe/ChangeLog7
-rw-r--r--app-emulation/epsxe/epsxe-1.6.0-r3.ebuild (renamed from app-emulation/epsxe/epsxe-1.6.0-r2.ebuild)2
-rw-r--r--app-emulation/epsxe/files/digest-epsxe-1.6.0-r3 (renamed from app-emulation/epsxe/files/digest-epsxe-1.6.0-r2)0
-rw-r--r--app-emulation/epsxe/files/epsxe95
4 files changed, 75 insertions, 29 deletions
diff --git a/app-emulation/epsxe/ChangeLog b/app-emulation/epsxe/ChangeLog
index 8d5d744e5d25..3a180b82a91a 100644
--- a/app-emulation/epsxe/ChangeLog
+++ b/app-emulation/epsxe/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-emulation/epsxe
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/epsxe/ChangeLog,v 1.12 2003/08/17 19:48:07 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/epsxe/ChangeLog,v 1.13 2003/08/24 22:25:06 vapier Exp $
+
+*epsxe-1.6.0-r3 (24 Aug 2003)
+
+ 24 Aug 2003; Mike Frysinger <vapier@gentoo.org> :
+ Added a better wrapper script, thanks to Benjamin Hamilton.
*epsxe-1.6.0-r2 (17 Aug 2003)
diff --git a/app-emulation/epsxe/epsxe-1.6.0-r2.ebuild b/app-emulation/epsxe/epsxe-1.6.0-r3.ebuild
index f0c616eab58e..1942e325ead0 100644
--- a/app-emulation/epsxe/epsxe-1.6.0-r2.ebuild
+++ b/app-emulation/epsxe/epsxe-1.6.0-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/epsxe/epsxe-1.6.0-r2.ebuild,v 1.2 2003/08/17 19:47:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/epsxe/epsxe-1.6.0-r3.ebuild,v 1.1 2003/08/24 22:25:06 vapier Exp $
inherit games
diff --git a/app-emulation/epsxe/files/digest-epsxe-1.6.0-r2 b/app-emulation/epsxe/files/digest-epsxe-1.6.0-r3
index a429bbfa02fe..a429bbfa02fe 100644
--- a/app-emulation/epsxe/files/digest-epsxe-1.6.0-r2
+++ b/app-emulation/epsxe/files/digest-epsxe-1.6.0-r3
diff --git a/app-emulation/epsxe/files/epsxe b/app-emulation/epsxe/files/epsxe
index 13f6a680b318..186c75683357 100644
--- a/app-emulation/epsxe/files/epsxe
+++ b/app-emulation/epsxe/files/epsxe
@@ -1,36 +1,77 @@
+#
+# Script for launching epsxe
+# $Header: /usr/games/bin/epsxe, v ?.?? 2003/08/17 21:22:07
#!/bin/sh
source /sbin/functions.sh
-if [ ! -d ~/.epsxe ] ; then
- einfo You are running ePSXe for the first time.
- einfo Setting up your ePSXe environment... Please wait...
-
- mkdir -p ~/.epsxe
- cd ~/.epsxe
- mkdir memcards bios cfg cheats snap sstates patches plugins
- cp /opt/epsxe/keycodes.lst keycodes.lst
-
- ln -s /opt/epsxe/epsxe epsxe >& /dev/null
-
- cd bios
- if [ -f /usr/games/lib/psemu/bios/scph1001.bin ]; then
- ln -s /usr/games/lib/psemu/bios/scph1001.bin .
- else
- echo
- ewarn "*** Put your BIOS file into ~/.epsxe/bios,"
- ewarn " or ePSXe may not work!"
- echo
+PSEMUDIR=/usr/games/lib/psemu
+EPSXEDIR=/opt/epsxe
+
+mkdir -p ~/.epsxe
+cd ~/.epsxe
+cleanlinks
+mkdir -p memcards bios cfg cheats snap sstates patches plugins
+
+shopt -s nullglob
+
+for f in `find "${EPSXEDIR}" -maxdepth 1 -type f -printf '%f '` ; do
+ [ -e "${f}" ] && continue
+ ln -s "${EPSXEDIR}/${f}" "${f}" >& /dev/null
+done
+
+if [ -d "${PSEMUDIR}" ] ; then
+ if [ -d "${PSEMUDIR}/plugins" ]; then
+ for plugin in `find "${PSEMUDIR}/plugins" -maxdepth 1 -type f -printf '%f '` ; do
+ if [ ! -e "plugins/${plugin}" ]; then
+ einfo "Loading new plugin: ${plugin}"
+ ln -s "${PSEMUDIR}/plugins/${plugin}" "plugins/${plugin}"
+ fi
+ done
+ fi
+
+ if [ -d "${PSEMUDIR}/cfg" ]; then
+ for configlib in `find "${PSEMUDIR}/cfg" -maxdepth 1 -iname '*.cfg' -prune -o -type f -printf '%f '`; do
+ if [ ! -e "cfg/${configlib}" ]; then
+ einfo "Loading config utility: ${configlib}"
+ ln -s "${PSEMUDIR}/cfg/${configlib}" "cfg/${configlib}"
+ fi
+ done
+
+ for config in `find "${PSEMUDIR}/cfg" -maxdepth 1 -iname '*.cfg' -type f -printf '%f '`; do
+ if [ ! -e "cfg/${config}" ]; then
+ einfo "Loading default config: ${config}"
+ cp "${PSEMUDIR}/cfg/${config}" "cfg/${config}"
+ fi
+ done
+ fi
+
+ if [ -d "${PSEMUDIR}/cheats" ]; then
+ for cheat in `find "${PSEMUDIR}/cheats" -maxdepth 1 -type f -printf '%f '`; do
+ if [ ! -e "cheats/${cheat}" ]; then
+ ln -s "${PSEMUDIR}/cheats/${cheat}" "cheats/${cheat}"
+ fi
+ done
+ fi
+
+ if [ -d "${PSEMUDIR}/bios" ]; then
+ for bios in `find "${PSEMUDIR}/bios" -maxdepth 1 -type f -printf '%f '`; do
+ if [ ! -e "bios/${bios}" ] ; then
+ ln -s "${PSEMUDIR}/bios/${bios}" "bios/${bios}"
+ fi
+ done
fi
fi
-cd ~/.epsxe
+# check for bios
+if [ -z "`cd bios && ls`" ] ; then
+ # if the bios directory is empty, then ... well ...
+ echo
+ ewarn "*** Put your BIOS file into ~/.epsxe/bios/"
+ ewarn " or ePSXe may not work!"
+ echo
+fi
-(
-rm plugins/*
-ln -s /usr/games/lib/psemu/plugins/* plugins/
-ln -s /usr/games/lib/psemu/cfg/* cfg/
-ln -s /usr/games/lib/psemu/cheats/* cheats/
-) >& /dev/null
-export LD_PRELOAD="libpthread.so.0:${LD_PRELOAD}"
+# execute program (with args)
+export LD_PRELOAD="libpthread.so.0:${LD_PRELOAD}" # fix for Bug #26121
exec ./epsxe "$@"