summaryrefslogtreecommitdiff
path: root/m17n-lib/PKGBUILD
blob: 7533b46dbdc8047d32ea7ac52624af9e8550297f (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
# Maintainer (Arch): Gaetan Bisson <bisson@archlinux.org>
# Contributor (Arch): Camille Moncelier <pix@devlife.org>
# Maintainer: Tobias Dausend <throgh@hyperbola.info>
# Contributor: Jesús E. <heckyel@hyperbola.info>

pkgname=m17n-lib
pkgver=1.8.0
_debver=$pkgver
_debrel=6
pkgrel=2
pkgdesc="Multilingual text processing library (runtimes)"
url='https://www.nongnu.org/m17n/'
arch=('i686' 'x86_64')
license=('LGPL-2.1')
depends=('libxft' 'm17n-db' 'fribidi' 'libxml2' 'gd' 'libotf')
makedepends=('quilt')
optdepends=('anthy: to use the anthy input method')
options=('!makeflags' '!emptydirs')
source=("https://download.savannah.gnu.org/releases/m17n/${pkgname}-${pkgver}.tar.gz"
        "https://deb.debian.org/debian/pool/main/m/m17n-lib/m17n-lib_${_debver}-${_debrel}.debian.tar.xz")
sha512sums=('8aba862888393232172c03cdf52531e29ea969c4327e6f69879ecf7438eafee32782f509ec292b3e1b7cd3202e2764984d7a59e85cdb87a7c8bfcbac5b0ee6fd'
            '9dd0f38e2492d7723b12d1db73bc10ec42ad731ef67317ecde7c173df031a34ab30efba577ff5dbdbf90b223d5a93ef87c946326180106f9f707b523af268b67')

prepare() {
  cd ${pkgname}-${pkgver}
  if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
    # Debian patches
    export QUILT_PATCHES=debian/patches
    export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
    export QUILT_DIFF_ARGS='--no-timestamps'

    mv "$srcdir"/debian .

    # Doesn't apply
    rm -v debian/patches/0001-m17n-config-remove-libtool-user-switches.patch || true
    rm -v debian/patches/0002-m17n-config-modify-to-support-multi-arch.patch || true

    quilt push -av
  fi
  sed -i 's/freetype-config/pkg-config freetype2/' configure
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
}