updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / alfont / PKGBUILD
blobf27e1672dcd7c9be40d7caf01209bcb892127604
1 #Maintainer: Jonathan Fine <Were.Vire_AT_gmail_DOT_com>
2 pkgname=alfont
3 pkgver=2.0.9
4 pkgrel=4
5 pkgdesc="AllegroFont is an Allegro wrapper for the wonderful FreeType2 library that makes Allegro (amongst other things) able to load and render TTF and many other famous font formats."
6 arch=('i686' 'x86_64')
7 url='http://chernsha.sitesled.com/'
8 license=('custom:FreeType2 License')
9 depends=('allegro' 'freetype2')
10 makedepends=('unrar')
11 source=(http://chernsha.sitesled.com/AlFont209.rar)
12 md5sums=('92898c28788d42d0eaa53c607ff40974')
14 build() {
15         #unrar is very verbose... lets shut it up
16         unrar x AlFont209.rar alfont/include alfont/src alfont/docs &> /dev/null || return 1
17         cd alfont || return 1
18         
19         #lets build for linux, not windows
20         sed 's/#define ALFONT_WINDOWS//' -i include/alfont.h || return 1
21         sed 's/\/\/#define ALFONT_LINUX/#define ALFONT_LINUX/' -i include/alfont.h || return 1
22         #change a microsoft function to a GNU one
23         sed 's/_msize/malloc_usable_size/g' -i src/alfont.c || return 1
24         
25         gcc -c src/alfont.c -o alfont.o -Iinclude -I/usr/include/freetype2 || return 1
26         ar rsc libalfont.a alfont.o || return 1
27         
28         install -Dm644 libalfont.a $pkgdir/usr/lib/libalfont.a || return 1
29         install -Dm644 include/alfont.h $pkgdir/usr/include/alfont.h || return 1
30         install -Dm644 include/alfontdll.h $pkgdir/usr/include/alfontdll.h || return 1
31         install -Dm644 docs/FTL.txt $pkgdir/usr/share/licenses/alfont/FTL.txt || return 1