PKGBUILD 1.66 KB
Newer Older
1 2
_pkgbasename=fontconfig
pkgname=lib32-$_pkgbasename
AlmAck's avatar
AlmAck committed
3
pkgver=2.13.1
4
pkgrel=1
AlmAck's avatar
AlmAck committed
5
_ubuntu_diff_version=${pkgver}-2ubuntu2
6
pkgdesc="A library for configuring and customizing font access (32-bit)"
AlmAck's avatar
AlmAck committed
7
arch=('x86_64')
8 9
url="http://www.fontconfig.org/release/"
license=('custom')
AlmAck's avatar
AlmAck committed
10
depends=('lib32-expat' 'lib32-freetype2' 'lib32-bzip2' $_pkgbasename=$pkgver)
11
makedepends=(lib32-gcc-libs gperf)
12 13 14
provides=("${pkgname}-ubuntu")
conflicts=("${pkgname}-ubuntu")
replaces=("${pkgname}-ubuntu")
AlmAck's avatar
AlmAck committed
15
source=("http://www.fontconfig.org/release/$_pkgbasename-$pkgver.tar.bz2"
Xuetian Weng's avatar
Xuetian Weng committed
16
        "http://archive.ubuntu.com/ubuntu/pool/main/f/fontconfig/fontconfig_${_ubuntu_diff_version}.debian.tar.xz")
AlmAck's avatar
AlmAck committed
17 18
md5sums=('36cdea1058ef13cbbfdabe6cb019dc1c'
         '0ea15dcc7eb03f7e3a0c82bd60e92f4a')
19 20 21 22 23 24 25

build() {
  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  cd "${srcdir}/${_pkgbasename}-${pkgver}"
26 27 28 29 30
  
  # apply ubuntu patches
  for _f in $(cat "$srcdir/debian/patches/series" | grep -v '#') ; do    
    patch -Np1 -i "$srcdir/debian/patches/$_f"
  done
Xuetian Weng's avatar
Xuetian Weng committed
31 32

  ./configure --prefix=/usr \
33 34 35 36 37 38 39 40
              --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 \
              --libdir=/usr/lib32
41 42 43 44 45 46 47 48 49 50 51 52
  make
}

package() {
  cd "${srcdir}/${_pkgbasename}-${pkgver}"

  make DESTDIR="${pkgdir}" install
  
  rm -rf "${pkgdir}"/usr/{include,share,bin} "$pkgdir"/{etc,var}
  mkdir -p "$pkgdir/usr/share/licenses"
  ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
}