diff options
author | Hunter Sezen <ovariegata@yahoo.com> | 2016-08-03 20:52:07 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-08-03 20:52:18 +0700 |
commit | 407f5592bcbedc16f351de9130bda5fd3d4bb8b7 (patch) | |
tree | cd02f8fe52c97ec7d44bc032330221b54ed0b822 /games/pcsx2 | |
parent | 77459e8b75110aa689d1f47936b0ec07c61bcc13 (diff) |
games/pcsx2: Added (Playstation 2 Emulator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/pcsx2')
-rw-r--r-- | games/pcsx2/README | 11 | ||||
-rw-r--r-- | games/pcsx2/doinst.sh | 9 | ||||
-rw-r--r-- | games/pcsx2/pcsx2.SlackBuild | 125 | ||||
-rw-r--r-- | games/pcsx2/pcsx2.info | 10 | ||||
-rw-r--r-- | games/pcsx2/slack-desc | 19 |
5 files changed, 174 insertions, 0 deletions
diff --git a/games/pcsx2/README b/games/pcsx2/README new file mode 100644 index 000000000000..b14877cee068 --- /dev/null +++ b/games/pcsx2/README @@ -0,0 +1,11 @@ +PCSX2 is an open source Playstation 2 emulator. Its purpose is to mimic +the PS2 hardware, using a combination of MIPS CPU Interpreters, Recompilers +and a Virtual Machine which manages hardware states and PS2 system memory. + +NOTE: This is buildable only on x86 32bit platform and will require a PS2 bios dump +to play games. For x86_64 64bit platforms multilib support will be needed including +compat32 versions of SDL2, wxGTK3, portaudio, soundtouch, libnotify and xz. + +To build a legacy GSdx plugin compatible with GL3.3 use: + + GL3="yes" ./pcsx2.SlackBuild diff --git a/games/pcsx2/doinst.sh b/games/pcsx2/doinst.sh new file mode 100644 index 000000000000..e5c312a460c1 --- /dev/null +++ b/games/pcsx2/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/gdk-pixbuf-query-loaders ]; then + if [ -d /usr/lib/gdk-pixbuf-2.0/2.10.0 ]; then + /usr/bin/gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache + fi +fi diff --git a/games/pcsx2/pcsx2.SlackBuild b/games/pcsx2/pcsx2.SlackBuild new file mode 100644 index 000000000000..173a71345358 --- /dev/null +++ b/games/pcsx2/pcsx2.SlackBuild @@ -0,0 +1,125 @@ +#!/bin/sh + +# Slackware build script for pcsx2 + +# Copyright 2016 Hunter Sezen California, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=pcsx2 +VERSION=${VERSION:-2016.07.31_e329b6f} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# pcsx2 does not support x86_64 yet and does +# not plan to for the foreseeable future. +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + MULTILIB="" + BINDIR="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=core2" + MULTILIB="" + BINDIR="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2" + MULTILIB="-DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake" + BINDIR="/32" +else + SLKCFLAGS="-O2" + MULTILIB="" + BINDIR="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Build a GSdx legacy plugin compatible with GL3.3 +GL3=${GL3:-no} +if [ "$GL3:-yes" = "yes" ]; then GSDX="-DGSDX_LEGACY=ON"; else GSDX=""; fi + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DDOC_DIR=/usr/doc/$PRGNAM-$VERSION \ + -DMAN_DIR=/usr/man \ + -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin${BINDIR}/wx-config \ + -DwxWidgets_wxrc_EXECUTABLE=/usr/bin${BINDIR}/wxrc-3.0 \ + -DGLSL_API=ON \ + -DPACKAGE_MODE=ON \ + -DREBUILD_SHADER=ON \ + -DXDG_STD=ON \ + $GSDX $MULTILIB \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +DOCS="pcsx2/Docs/* bin/docs/*.html bin/docs/*.txt CONTRIBUTING.md COPYING* README.md" +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +# Fix doinst.sh for x86_64 +if [ "$ARCH" = "x86_64" ]; then + if ! grep -q 32 $PKG/install/doinst.sh; then + sed -i 's|-loaders >|-loaders-32 >|' $PKG/install/doinst.sh + fi +fi + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/pcsx2/pcsx2.info b/games/pcsx2/pcsx2.info new file mode 100644 index 000000000000..9a59175d71a7 --- /dev/null +++ b/games/pcsx2/pcsx2.info @@ -0,0 +1,10 @@ +PRGNAM="pcsx2" +VERSION="2016.07.31_e329b6f" +HOMEPAGE="http://pcsx2.net" +DOWNLOAD="http://ks392457.kimsufi.com/orbea/stuff/slackbuilds/src/pcsx2-2016.07.31_e329b6f.tar.xz" +MD5SUM="1618600ce9a155ebc3f762aae8ca325d" +DOWNLOAD_x86_64="UNSUPPORTED" +MD5SUM_x86_64="" +REQUIRES="SDL2 wxGTK3 portaudio soundtouch" +MAINTAINER="Hunter Sezen" +EMAIL="ovariegata@yahoo.com" diff --git a/games/pcsx2/slack-desc b/games/pcsx2/slack-desc new file mode 100644 index 000000000000..7511c9bbd24b --- /dev/null +++ b/games/pcsx2/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +pcsx2: pcsx2 (Playstation 2 emulator) +pcsx2: +pcsx2: PCSX2 is a PlayStation 2 emulator for Windows and Linux, started by +pcsx2: the same team that brought you PCSX (a Sony PlayStation 1 emulator). +pcsx2: +pcsx2: homepage: http://pcsx2.net +pcsx2: +pcsx2: +pcsx2: +pcsx2: +pcsx2: |