summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7ce372bc221f9c6c259bca1f5dcb90899e28cc2a (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
76
77
# Maintainer:  Vincent Grande <shoober420@gmail.com>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

_pkgbasename=fontconfig
pkgname=lib32-$_pkgbasename-git
pkgver=2.13.91+18+g01e4f08
pkgrel=1
epoch=2
pkgdesc="A library for configuring and customizing font access (32-bit)"
arch=(x86_64)
url="https://www.freedesktop.org/wiki/Software/fontconfig/"
license=(custom)
provides=(lib32-fontconfig)
conflicts=(lib32-fontconfig)
depends=(lib32-expat lib32-freetype2 $_pkgbasename)
makedepends=(git autoconf-archive gperf python-lxml python-six lib32-json-c)
install=lib32-fontconfig.install
source=("git+https://gitlab.freedesktop.org/fontconfig/fontconfig"
	"https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/172.patch"
	"https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/138.patch"
        fontconfig-32.hook)
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

# a nice page to test font matching:
# http://zipcon.net/~swhite/docs/computers/browsers/fonttest.html
# http://getemoji.com/

pkgver() {
  cd $_pkgbasename
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $_pkgbasename
  
   patch -Np1 -i ../138.patch
   patch -Np1 -i ../172.patch
}

build() {
  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG="i686-pc-linux-gnu-pkg-config"

  arch-meson fontconfig build \
    --libdir=/usr/lib32 \
    -D doc=disabled \
    -D doc-txt=disabled \
    -D doc-man=disabled \
    -D doc-pdf=disabled \
    -D doc-html=disabled \
    -D tests=disabled
    ninja $NINJAFLAGS -C build
}

#check() {
#  cd $_pkgbasename
#  meson test -C build
#}

package() {
  DESTDIR="$pkgdir" ninja $NINJAFLAGS -C build install

  rm -r "$pkgdir"/{etc,usr/{include,share}}
  find "$pkgdir/usr/bin" -not -type d -not -name fc-cache -delete
  mv "$pkgdir"/usr/bin/fc-cache{,-32}

  install -Dm644 ../fontconfig-32.hook "$pkgdir/usr/share/libalpm/hooks/fontconfig-32.hook"

  # Install license
  mkdir -p "$pkgdir/usr/share/licenses"
  ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
}