Guest User

Untitled

a guest
Apr 30th, 2018
247
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Maintainer : Tikilou
  2. # Contributor: twa022 <twa022 at gmail dot com>
  3.  
  4. _pkgname=gimp
  5. pkgname=${_pkgname}-devel
  6. epoch=1
  7. pkgver=2.10.0
  8. pkgrel=1
  9. pkgdesc="GNU Image Manipulation Program (Development version)"
  10. arch=('i686' 'x86_64')
  11. url="http://www.gimp.org/"
  12. license=('GPL' 'LGPL')
  13. depends=('pygtk' 'lcms' 'libxpm' 'libwmf' 'libxmu' 'librsvg' 'libmng' 'dbus-glib'
  14.          'libexif' 'gegl-git' 'jasper' 'desktop-file-utils' 'hicolor-icon-theme' 'babl>=0.1.46'
  15.          'openexr' 'libgudev' 'libgexiv2' 'libmypaint>=1.3.0' 'libwebp' 'aalib' 'mypaint-brushes')
  16. makedepends=('intltool' 'poppler-glib' 'poppler-data' 'alsa-lib' 'iso-codes' 'curl' 'ghostscript' 'gtk-doc' 'glib-networking')
  17. optdepends=('gutenprint: for sophisticated printing only as gimp has built-in cups print support'
  18.             'poppler-glib: for pdf support'
  19.             'alsa-lib: for MIDI event controller module'
  20.             'curl: for URI support'
  21.             'ghostscript: for postscript support')
  22. options=('!makeflags')
  23. conflicts=("${_pkgname}")
  24. provides=("${_pkgname}=${pkgver}")
  25. source=(https://download.gimp.org/pub/gimp/v${pkgver%.*}/${_pkgname}-${pkgver}.tar.bz2 linux.gpl)
  26. sha256sums=('SKIP'
  27.             'SKIP')
  28.  
  29. prepare() {
  30.   export PYTHON=/usr/bin/python2
  31.   cd "${srcdir}/${_pkgname}-${pkgver}"
  32.   _mypaintver=$( ls /usr/lib/libmypaint-*.so | grep -o -E '\-[0-9]+(\.[0-9]+)*' | head -1 )
  33.   sed -i "s:\(libmypaint\)\( >= libmypaint_required_version\):\1${_mypaintver}\2:g" configure.ac
  34.  
  35.   autoreconf -vi
  36.   # python2 fixes
  37.   sed -i 's:PYTHON=python$:&2:' plug-ins/pygimp/py-compile
  38.   find ./plug-ins -type f -name *py -exec \
  39.     sed -i 's|#!.*python$|#!/usr/bin/python2|' '{}' \;
  40. }
  41.  
  42. build() {
  43.   export PYTHON=/usr/bin/python2
  44.   cd "${srcdir}/${_pkgname}-${pkgver}"
  45.   ./configure \
  46.     --prefix=/usr \
  47.     --sysconfdir=/etc \
  48.     --enable-mp \
  49.     --enable-gimp-console \
  50.     --enable-gimp-remote \
  51.     --enable-python \
  52.     --enable-gtk-doc \
  53.     --without-webkit
  54.   make -j$(nproc)
  55. }
  56.  
  57. package() {
  58.   export PYTHON=/usr/bin/python2
  59.   cd "${srcdir}/${_pkgname}-${pkgver}"
  60.   make DESTDIR="${pkgdir}" install
  61.   install -D -m644 "${srcdir}/linux.gpl" "${pkgdir}/usr/share/gimp/2.0/palettes/Linux.gpl"
  62.  
  63.   #rm "${pkgdir}/usr/share/man/man1/gimp-console-${pkgver%.*}.1"
  64.   ln -s gimp-console-${pkgver%.*}.1.gz "${pkgdir}/usr/share/man/man1/gimp-console.1.gz"
  65.   ln -sf gimptool-2.0.1.gz "${pkgdir}/usr/share/man/man1/gimptool.1.gz"
  66.   ln -s gimp-${pkgver%.*}.1.gz "${pkgdir}/usr/share/man/man1/gimp.1.gz"
  67.  
  68.   ln -s gimptool-2.0 "${pkgdir}/usr/bin/gimptool"
  69. #  ln -s gimp-${pkgver%.*} ${pkgdir}/usr/bin/gimp
  70. #  ln -s gimp-console-${pkgver%.*} ${pkgdir}/usr/bin/gimp-console
  71. }
RAW Paste Data