1 # Maintainer: josephgbr <rafael.f.f1 at gmail.com>
2 # Contributor: Themaister <maister at archlinux.us>
4 # Hint: for a cleaner but less informative usage, replace "Debug"
5 # with "Release" in the line '-DCMAKE_BUILD_TYPE=' below
10 pkgdesc="A PlayStation 2 emulator."
11 arch=('i686' 'x86_64')
12 url="http://www.pcsx2.net"
14 if [ ${CARCH} == "x86_64" ]; then
15 depends=('lib32-bzip2' 'lib32-wxgtk' 'lib32-nvidia-cg-toolkit'
16 'lib32-glew' 'lib32-libjpeg-turbo' 'lib32-portaudio'
17 'lib32-alsa-lib' 'lib32-soundtouch' 'lib32-gtk-engines')
18 makedepends=('cmake' 'subversion' 'google-sparsehash' 'gcc-multilib')
20 depends=('bzip2' 'wxgtk' 'nvidia-cg-toolkit' 'glew' 'portaudio'
21 'alsa-lib' 'libjpeg-turbo' 'soundtouch' 'gtk-engines')
22 makedepends=('cmake' 'subversion' 'google-sparsehash')
25 conflicts=('pcsx2' 'pcsx2-bin')
26 options=('!emptydirs')
27 install="${pkgname}.install"
28 changelog="${pkgname}.changelog"
32 _svntrunk=http://pcsx2.googlecode.com/svn/trunk
38 msg "Connecting to SVN server...."
39 if [[ -d "${_svnmod}/.svn" ]]; then
40 (cd "${_svnmod}" && svn up -r "${pkgver}")
42 svn co "${_svntrunk}" --config-dir ./ -r "${pkgver}" "${_svnmod}"
44 rm -rf "${srcdir}/${_svnmod}-build"
45 msg "SVN checkout done or server timeout"
47 # For ArchLinux 64-bit, install plugins in lib32 folder
48 _plugindir=/usr/lib/pcsx2
49 [ $CARCH == x86_64 ] && _plugindir=/usr/lib32/pcsx2
51 msg "Starting cmake and build..."
52 svn export "${srcdir}/${_svnmod}" "${srcdir}/${_svnmod}-build"
54 cd "${srcdir}/${_svnmod}-build"
55 cmake CMakeLists.txt \
56 -DCMAKE_BUILD_TYPE="Debug" \
58 -DFORCE_INTERNAL_SDL=TRUE \
59 -DFORCE_INTERNAL_SOUNDTOUCH=FALSE \
60 -DCMAKE_INSTALL_PREFIX="/usr" \
61 -DPLUGIN_DIR=${_plugindir} \
62 -DGAMEINDEX_DIR="/usr/share/pcsx2" \
69 cd "${srcdir}/${_svnmod}-build"
70 make DESTDIR="${pkgdir}" install
72 # Workaround. "pcsx2.1" is the correct file name to result
73 # in a correct man page in a archlinux package: "pcsx2.1.gz"
74 [ -f "${pkgdir}/usr/share/man/man1/pcsx2.man" ] && \
75 mv "${pkgdir}/usr/share/man/man1/pcsx2".{man,1}