summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 78778ef38c435fd6a29e8708e59e9bedf72adc20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix

pkgname=glimpse-editor
pkgver=0.2.0
pkgrel=2
pkgdesc="Fork of the GNU Image Manipulation Program"
arch=(i686 x86_64)
url="https://glimpse-editor.org/"
license=(GPL3 LGPL)
depends=(gegl libmypaint gtk2 openexr
         poppler-glib poppler-data mypaint-brushes1
         )
makedepends=(intltool libxslt gtk-doc libxslt
             ghostscript libxpm libheif libwebp libmng libwmf iso-codes aalib
             appstream-glib xdg-utils xorg-server-xvfb
             )
optdepends=('gutenprint: for sophisticated printing only as glimpse has built-in cups print support'
            'alsa-lib: for MIDI event controller module'
            'ghostscript: for postscript support'
            'libxpm: XPM support'
            'libheif: HEIF support'
            'libwebp: WebP support'
            'libmng: MNG support'
            'iso-codes: Language support'
            'xdg-utils: email plugin'
            'aalib: ASCII art support'
            )
provides=(glimpse-editor gimp)
conflicts=(glimpse-editor gimp)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/glimpse-editor/Glimpse/archive/v${pkgver}.tar.gz"
        "https://github.com/tastytea/Glimpse/commit/de1f34c9441e90b24ba7dd2a7642d0c67fff1e06.patch")
sha512sums=('0511a42cf315dbd60a01de8f2101755179020f9b1ecc4812c85c890f60515685e08d02d97ffb48ccdc5908998f1c015f76af9f214293abeeea75bf8e8aa7570d'
            'e5f14fdb45540d85a35b702381849c3ca97b9249f924168dcf2537f0dae40da37d5e9dae49fb3987ffb43a5dbeb88bae90de58ca22fea1df4ce62278fbd3e90a')

prepare() {
  cd "Glimpse-${pkgver}"

  patch -Np1 < ../de1f34c9441e90b24ba7dd2a7642d0c67fff1e06.patch

  _mypaintver=$(echo /usr/lib/libmypaint-*.so | grep -o -E '\-[0-9]+(\.[0-9]+)*' | head -1)
  sed -i "s|\\(libmypaint\\)\\( >= libmypaint_required_version\\)|\\1${_mypaintver}\\2|g" configure.ac

  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "Glimpse-${pkgver}"

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --libexecdir=/usr/bin \
    --enable-mp \
    --enable-gimp-console \
    --disable-check-update \
    --enable-gtk-doc \
    --disable-python \
    --without-webkit \
    --with-xmc \
    --with-bug-report-url=https://aur.archlinux.org/packages/glimpse-editor/ \
    --with-openexr

  make
}

package() {
  cd "Glimpse-${pkgver}"

  make DESTDIR="${pkgdir}" install
  ln -s gimptool-2.0 "${pkgdir}"/usr/bin/gimptool

  install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}"/COPYING
  install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}"/LICENSE
}