PKGBUILD 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # $Id: PKGBUILD 186214 2016-08-09 14:33:03Z arojas $
  2. # Maintainer (arch): Maxime Gauduin <alucryd@archlinux.org>
  3. # Contributor: josephgbr <rafael.f.f1@gmail.com>
  4. # Contributor: vEX <vex@niechift.com>
  5. # Contributor: Márcio Silva <coadde@hyperbola.info>
  6. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  7. # NOTE: This package is not in ArchLinux32, maybe
  8. # the i686 support could be dropped. Ohterwise,
  9. # when building for 32-bits then upload it to [pcr],
  10. # not [libre], the x86_64 version is the only one
  11. # that goes to [libre-multilib]
  12. pkgname=pcsx2
  13. pkgver=1.4.0
  14. pkgrel=8.parabola1
  15. pkgdesc='A Sony PlayStation 2 emulator, without nonfree nvidia-cg-toolkit support'
  16. arch=('i686' 'x86_64')
  17. url='http://www.pcsx2.net'
  18. license=('GPL2' 'GPL3' 'LGPL2.1' 'LGPL3')
  19. depends_i686=('glew' 'libaio' 'libcanberra' 'libjpeg-turbo' 'libpulse'
  20. 'portaudio' 'sdl2' 'soundtouch' 'wxgtk2')
  21. depends_x86_64=('lib32-glew' 'lib32-libaio' 'lib32-libcanberra'
  22. 'lib32-libjpeg-turbo' 'lib32-libpulse'
  23. 'lib32-portaudio' 'lib32-sdl2' 'lib32-soundtouch'
  24. 'lib32-wxgtk2')
  25. makedepends=('cmake' 'png++')
  26. makedepends_x86_64=('gcc-multilib')
  27. conflicts=("${pkgname}-libre")
  28. replaces=("${pkgname}-libre")
  29. options=('!emptydirs')
  30. source=("pcsx2-${pkgver}.tar.gz::https://github.com/PCSX2/${pkgname}/archive/v${pkgver}.tar.gz"
  31. pcsx2-gcc6.patch)
  32. sha256sums=('2c8a986e2b6514d7018f6cfd39c4f2a72229b9b4ab06ca6b1d3466dfd9c33005'
  33. 'd78c63808a609a249ec7e8330eeabee306a55ee08d2c9ce9c383b46b334bf7d0')
  34. prepare() {
  35. cd ${pkgname}-${pkgver}
  36. patch -Np1 -i ../pcsx2-gcc6.patch
  37. # Remove zzogl and zerogs plugins (depends nonfree nvidia-cg-toolkit)
  38. rm -vr plugins/{zerogs,zzogl-pg}
  39. sed -i '\|zz_res =|,+4 d' linux_various/glsl2h.pl
  40. }
  41. build() {
  42. cd ${pkgname}-${pkgver}
  43. if [[ -d build ]]; then
  44. rm -rf build
  45. fi
  46. mkdir build && cd build
  47. if [[ $CARCH == i686 ]]; then
  48. cmake .. \
  49. -DCMAKE_BUILD_TYPE='Release' \
  50. -DCMAKE_INSTALL_PREFIX='/usr' \
  51. -DCMAKE_LIBRARY_PATH='/usr/lib' \
  52. -DPLUGIN_DIR='/usr/lib/pcsx2' \
  53. -DGAMEINDEX_DIR='/usr/share/pcsx2' \
  54. -DDISABLE_ADVANCE_SIMD='TRUE' \
  55. -DEXTRA_PLUGINS='TRUE' \
  56. -DREBUILD_SHADER='TRUE' \
  57. -DGLSL_API='TRUE' \
  58. -DPACKAGE_MODE='TRUE' \
  59. -DXDG_STD='TRUE'
  60. elif [[ $CARCH == x86_64 ]]; then
  61. # TODO: Drop wxWidgets_CONFIG_EXECUTABLE once the upstream fix is released
  62. # https://github.com/PCSX2/pcsx2/issues/1933
  63. cmake .. \
  64. -DCMAKE_BUILD_TYPE='Release' \
  65. -DwxWidgets_CONFIG_EXECUTABLE='/usr/bin/wx-config32' \
  66. -DCMAKE_TOOLCHAIN_FILE='cmake/linux-compiler-i386-multilib.cmake' \
  67. -DCMAKE_INSTALL_PREFIX='/usr' \
  68. -DCMAKE_LIBRARY_PATH='/usr/lib32' \
  69. -DPLUGIN_DIR='/usr/lib32/pcsx2' \
  70. -DGAMEINDEX_DIR='/usr/share/pcsx2' \
  71. -DDISABLE_ADVANCE_SIMD='TRUE' \
  72. -DEXTRA_PLUGINS='TRUE' \
  73. -DREBUILD_SHADER='TRUE' \
  74. -DGLSL_API='TRUE' \
  75. -DPACKAGE_MODE='TRUE' \
  76. -DXDG_STD='TRUE'
  77. fi
  78. make
  79. }
  80. package() {
  81. cd ${pkgname}-${pkgver}/build
  82. make DESTDIR="${pkgdir}" install
  83. }
  84. # vim: ts=2 sw=2 et: