summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f8b7c192b9a0a8b370036eefa67c0d1dc7f0774 (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
78
79
80
81
82
83
# Maintainer : Daniel Bermond < gmail-com: danielbermond >
# Contributor: Det
# Contributor: Joris Steyn, Florian Dejonckheere, Tevin Zhang, Andrea Fagiani, Biru Ionut, Paul Bredbury
# Installation order:  freetype2 → fontconfig-ubuntu → cairo-ubuntu

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

_srcname=fontconfig
_ubuver=5ubuntu3

pkgname=fontconfig-ubuntu
pkgver=2.13.0
pkgrel=2
pkgdesc='A library for configuring and customizing font access (with Ubuntu patches)'
arch=('i686' 'x86_64')
url='https://launchpad.net/ubuntu/+source/fontconfig'
license=('custom')
depends=('expat' 'freetype2')
makedepends=('autoconf-archive' 'gperf' 'python-lxml' 'python-six' 'docbook-utils' 'docbook-sgml'
             'perl-sgmls' 'texlive-formatsextra>=2017' 'lynx')
provides=("fontconfig=${pkgver}")
conflicts=('fontconfig')
install="${pkgname}.install"
source=("https://launchpad.net/ubuntu/+archive/primary/+files/fontconfig_${pkgver}.orig.tar.bz2"
        "https://launchpad.net/ubuntu/+archive/primary/+files/fontconfig_${pkgver}-${_ubuver}.debian.tar.xz"
        '53-monospace-lcd-filter.patch'
        'fontconfig-ubuntu.hook')
sha256sums=('91dde8492155b7f34bb95079e79be92f1df353fcc682c19be90762fd3e12eeb9'
            'ff3bed047dc345a5925be6bf7c4739d4d416ad8ab89dd9c4261f23da1f45f6a6'
            'c759702ba66fe88768aa93035637401085bb5c02d898c960b68291aea10daa8d'
            '672f6a1c5e164671955ce807e670306194142a1794ce88df653aa717a972e274')

prepare() {
    cd "${_srcname}-${pkgver}"
    
    local _patch
    
    # apply Debian patches
    while read _patch
    do
        if printf '%s' "$_patch" | grep -q '\.patch$\|\.diff$'
        then
            printf '%s\n' "  -> Applying Debian patch: ${_patch}"
            patch -Np1 -i "${srcdir}/debian/patches/${_patch}"
        fi
    done < "${srcdir}/debian/patches/series"
    
    ## patch
    #patch -p1 -i conf.d/53-monospace-lcd-filter.conf ../53-monospace-lcd-filter.patch
}

build() {
    cd "${_srcname}-${pkgver}"
    
    ./configure \
        --prefix='/usr' \
        --sysconfdir='/etc' \
        --with-templatedir='/etc/fonts/conf.avail' \
        --with-xmldir='/etc/fonts' \
        --localstatedir='/var' \
        --disable-static \
        --with-default-fonts='/usr/share/fonts' \
        --with-add-fonts='/usr/share/fonts'
        
    make
}

package() {
    cd "${_srcname}-${pkgver}"
    
    make DESTDIR="$pkgdir" install
    
    # pacman hook
    install -D -m644 "${srcdir}/${pkgname}.hook" -t "${pkgdir}/usr/share/libalpm/hooks"
    
    # license
    install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    
    # Debian changelog
    install -D -m644 "${srcdir}/debian/changelog" -t "${pkgdir}/usr/share/doc/${pkgname}"
}