PKGBUILD 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # Maintainer: André Silva <emulatorman@hyperbola.info>
  2. # Maintainer: Márcio Silva <coadde@hyperbola.info>
  3. # Based on pcsx2 (parabola) package
  4. _pkgname=pcsx2
  5. pkgname=pcsx2-git
  6. pkgver=r9498.a18d624bc
  7. pkgrel=1.parabola1
  8. pkgdesc='A Sony PlayStation 2 emulator, without nonfree nvidia-cg-toolkit support'
  9. arch=('i686' 'x86_64')
  10. url='http://www.pcsx2.net'
  11. license=('GPL2' 'GPL3' 'LGPL2.1' 'LGPL3')
  12. depends_i686=('glew' 'libaio' 'libcanberra' 'libjpeg-turbo'
  13. 'portaudio' 'sdl2' 'soundtouch' 'wxgtk' 'opengl-driver')
  14. depends_x86_64=('lib32-glew' 'lib32-libaio' 'lib32-libcanberra'
  15. 'lib32-libjpeg-turbo'
  16. 'lib32-portaudio' 'lib32-sdl2' 'lib32-soundtouch'
  17. 'lib32-wxgtk')
  18. makedepends=('cmake' 'png++' 'git')
  19. makedepends_x86_64=('gcc-multilib')
  20. optdepends_x86_64=('lib32-gtk-engines: GTK2 engines support'
  21. 'lib32-gtk-engine-unico: Unico GTK2 engine support')
  22. provides=("${_pkgname}")
  23. conflicts=("${_pkgname}" "${_pkgname}-libre")
  24. replaces=("${_pkgname}-libre")
  25. options=('!emptydirs')
  26. source=(${_pkgname}-${pkgver}::git+https://github.com/PCSX2/${_pkgname}.git)
  27. sha256sums=('SKIP')
  28. pkgver() {
  29. cd ${_pkgname}-${pkgver}
  30. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  31. }
  32. prepare() {
  33. cd ${_pkgname}-${pkgver}
  34. # Remove zzogl and zerogs plugins (depends nonfree nvidia-cg-toolkit)
  35. rm -vr plugins/{zerogs,zzogl-pg}
  36. sed -i '\|zz_res =|,+4 d' linux_various/glsl2h.pl
  37. }
  38. build() {
  39. cd ${_pkgname}-${pkgver}
  40. if [[ -d build ]]; then
  41. rm -rf build
  42. fi
  43. mkdir build && cd build
  44. if [[ $CARCH == i686 ]]; then
  45. cmake .. \
  46. -DCMAKE_BUILD_TYPE='Release' \
  47. -DCMAKE_INSTALL_PREFIX='/usr' \
  48. -DCMAKE_LIBRARY_PATH='/usr/lib' \
  49. -DPLUGIN_DIR='/usr/lib/pcsx2' \
  50. -DGAMEINDEX_DIR='/usr/share/pcsx2' \
  51. -DDISABLE_ADVANCE_SIMD='TRUE' \
  52. -DEXTRA_PLUGINS='TRUE' \
  53. -DREBUILD_SHADER='TRUE' \
  54. -DGLSL_API='TRUE' \
  55. -DPACKAGE_MODE='TRUE' \
  56. -DXDG_STD='TRUE'
  57. elif [[ $CARCH == x86_64 ]]; then
  58. cmake .. \
  59. -DCMAKE_BUILD_TYPE='Release' \
  60. -DCMAKE_TOOLCHAIN_FILE='cmake/linux-compiler-i386-multilib.cmake' \
  61. -DCMAKE_INSTALL_PREFIX='/usr' \
  62. -DCMAKE_LIBRARY_PATH='/usr/lib32' \
  63. -DPLUGIN_DIR='/usr/lib32/pcsx2' \
  64. -DGAMEINDEX_DIR='/usr/share/pcsx2' \
  65. -DDISABLE_ADVANCE_SIMD='TRUE' \
  66. -DEXTRA_PLUGINS='TRUE' \
  67. -DREBUILD_SHADER='TRUE' \
  68. -DGLSL_API='TRUE' \
  69. -DPACKAGE_MODE='TRUE' \
  70. -DXDG_STD='TRUE'
  71. fi
  72. make
  73. }
  74. package() {
  75. cd ${_pkgname}-${pkgver}/build
  76. make DESTDIR="${pkgdir}" install
  77. }
  78. # vim: ts=2 sw=2 et: