summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7ec4ccf3254467bef635f2d109b2dac208ffe627 (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
# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Jörg Schuck <joerg_schuck@web.de>
# Contributor: T. Baumann <arch AT nnamuab DOT de>
# Contributor: Felix Yan <felixonmars@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: dorphell <dorphell@archlinux.org>

pkgname=enchant1.6
_pkgname=enchant
pkgver=1.6.1
pkgrel=8
pkgdesc="A wrapper library for generic spell checking"
arch=('i686' 'x86_64')
url="https://abiword.github.io/enchant/"
license=('LGPL')
depends=('aspell' 'hunspell' 'hspell' 'libvoikko' 'glib2')
makedepends=('git')
_commit=7c0ec265a89808893a692f6205f2555f30198444  # tags/enchant-1-6-1
source=(
	"git+https://github.com/AbiWord/enchant.git#commit=$_commit"
	"makefile_1.6.patch"
	"aclocal.patch"
)
sha256sums=('SKIP'
            'e36a045b347b1540b9612472563c523e24a354764b21e7734c48f6adaf1bda5d'
            'd13f13836b14ba80b6b3ef2f8ed91f78aff41faa34ebf739a8bc90caa4b4e302')

pkgver() {
  cd $_pkgname
  git describe --tags | sed 's/^enchant-//;s/-/\./g'
}

prepare() {
  cd $_pkgname
  patch -p1 < ../makefile_1.6.patch
  patch -p1 < ../aclocal.patch
  sed -i '11s+$+1.6+' enchant.pc.in
}

build() {
  cd $_pkgname
  OCONFIGURE=1 ./autogen.sh
  ./configure --prefix=/usr \
    --disable-static \
    --disable-ispell \
    --with-myspell-dir=/usr/share/myspell
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $_pkgname
  make DESTDIR="$pkgdir" install
  rm "$pkgdir"/usr/share/enchant/enchant.ordering
}