spacepaste

  1.  
  2. # Maintainer: Maks Verver <maksverver@geocities.com>
  3. # Contributor: p2k <Patrick.Schneider@uni-ulm.de>
  4. pkgname=golly
  5. pkgver=2.8
  6. pkgrel=1
  7. _wxver=3.0.2
  8. pkgdesc="A simulator for Conway's Game of Life and other cellular automata"
  9. arch=('i686' 'x86_64')
  10. url="http://golly.sourceforge.net/"
  11. license=('GPL')
  12. #depends=('wxgtk>=2.8')
  13. makedepends=('gendesk' 'perl' 'python2')
  14. optdepends=('perl: for Perl scripting support'
  15. 'python2: for Python scripting support')
  16. source=("https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}-src.tar.gz"
  17. "https://downloads.sourceforge.net/wxwindows/wxWidgets-${_wxver}.tar.bz2"
  18. 'make-abicheck-non-fatal.patch'
  19. 'wxgtk-gcc6.patch'
  20. 'gst1.0.patch')
  21. #sha256sums=('0488724715bae228e88d0a819d8ed311f964c70f37f228f6218bc053a1b09b28')
  22. sha1sums=('6c41ae2bfd762bb39d556eb7c342412cbb7f9787'
  23. '6461eab4428c0a8b9e41781b8787510484dea800'
  24. 'dfe38650c655395b90bf082b5734c4093508bfa3'
  25. '498202334c69d49c1ebbc9d36ad382cfa237f3f8'
  26. '07d47f2fb2efd400ab54302b3bb55da141d76d61')
  27. prepare() {
  28. # We need a static wxgtk build; with the archlinux package Golly fails to
  29. # build (at least for me). If you still have wxgtk2.8 installed, remove it -
  30. # it will break the wxgtk compilation.
  31. cd ${srcdir}
  32. tar jxf ../wxWidgets-${_wxver}.tar.bz2
  33. cd ${srcdir}/wxWidgets-${_wxver}
  34. # The patches are taken from Eric BĂ©langer's wxgtk PKGBUILD:
  35. # C++ ABI check is too strict and breaks with GCC 5.1
  36. # https://bugzilla.redhat.com/show_bug.cgi?id=1200611
  37. patch -Np1 -i ../make-abicheck-non-fatal.patch
  38. # Fix build with GCC 6
  39. patch -p1 -i ../wxgtk-gcc6.patch
  40. # Gstreamer 0.10 -> 1.0 patch
  41. patch -Np1 -i ../gst1.0.patch
  42. }
  43. build() {
  44. # This is taken from golly-2.8-src/docs/Build.html (except you don't have to
  45. # install):
  46. mkdir -p ${srcdir}/wxWidgets-${_wxver}/build-gtk
  47. cd ${srcdir}/wxWidgets-${_wxver}/build-gtk
  48. ../configure --with-gtk --disable-shared --enable-unicode --with-opengl
  49. make
  50. cd "${srcdir}/${pkgname}-${pkgver}-src"
  51. gui-wx/configure/configure \
  52. --with-perl-shlib=/usr/lib/perl5/core_perl/CORE/libperl.so \
  53. --with-python-shlib=libpython2.7.so \
  54. --prefix=/usr --with-wxdir=${srcdir}/wxWidgets-${_wxver}/build-gtk
  55. make
  56. gendesk -n "$startdir"/PKGBUILD
  57. }
  58. package() {
  59. cd "${srcdir}/${pkgname}-${pkgver}-src"
  60. make DESTDIR="$pkgdir" install
  61. install -D -m644 "${pkgname}.desktop" \
  62. "$pkgdir"/usr/share/applications/"${pkgname}.desktop"
  63. install -D -m644 gui-wx/icons/appicon.xpm \
  64. "$pkgdir"/usr/share/pixmaps/"${pkgname}.xpm"
  65. }
  66.