summaryrefslogtreecommitdiff
path: root/extra/libwmf/PKGBUILD
blob: 3f78dbae90a3430c68b5214bb0444e46eb1c4837 (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
# $Id: PKGBUILD 197279 2013-10-25 00:22:10Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=libwmf
pkgver=0.2.8.4
pkgrel=12
pkgdesc="A library for reading vector images in Microsoft's native Windows Metafile Format (WMF)"
arch=('i686' 'x86_64' 'mips64el')
url="http://wvware.sourceforge.net/libwmf.html"
license=('LGPL')
depends=('libx11' 'libjpeg' 'gsfonts')
makedepends=('gtk2' 'libxt')
optdepends=('gdk-pixbuf2: for pixbuf loader')
options=('!docs' '!emptydirs')
install=libwmf.install
source=(http://downloads.sourceforge.net/sourceforge/wvware/${pkgname}-${pkgver}.tar.gz
	libwmf-0.2.8.4-libpng-1.5.patch libwmf-0.2.8.4-useafterfree.patch)
sha1sums=('822ab3bd0f5e8f39ad732f2774a8e9f18fc91e89'
          '42aa4c2a82e4e14044c875a7f439baea732a355a'
          'ea6d28880840e86c96f9079bfd591da54dcffa5c')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -p1 -i "${srcdir}/libwmf-0.2.8.4-libpng-1.5.patch"
  patch -p1 -i "${srcdir}/libwmf-0.2.8.4-useafterfree.patch"
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
              --with-gsfontdir=/usr/share/fonts/Type1 \
	      --with-fontdir=/usr/share/fonts/Type1 \
	      --with-gsfontmap=/usr/share/ghostscript/9.10/Resource/Init/Fontmap.GS
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  #Remove fonts, these are in gsfonts
  rm -rf "${pkgdir}/usr/share/fonts"
}