1 # Contributor: ezzetabi <ezzetabi@gawab.com>
5 pkgdesc="An outline font viewer for Linux."
7 url="http://gfontview.sourceforge.net/"
10 depends=('giflib' 'gtk' 't1lib')
19 source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz"
20 "http://games.linux.sk/files/freetype-1.3.1.tar.gz"
25 cd "$srcdir"/freetype-1.3.1/lib
26 gcc -Os -c -Iarch/ansi -I. arch/ansi/freetype.c
27 mv freetype.o "$srcdir/$pkgname-$pkgver"
28 cp freetype.h "$srcdir/$pkgname-$pkgver"
29 cp fterrid.h "$srcdir/$pkgname-$pkgver"
30 cp ftnameid.h "$srcdir/$pkgname-$pkgver"
32 gcc -Os -c -I../arch/ansi -I.. ftxerr18.c
33 cp ftxerr18.h "$srcdir/$pkgname-$pkgver"
34 gcc -Os -c -I../arch/ansi -I.. ftxkern.c
35 cp ftxkern.h "$srcdir/$pkgname-$pkgver"
36 gcc -Os -c -I../arch/ansi -I.. ftxpost.c
37 cp ftxpost.h "$srcdir/$pkgname-$pkgver"
38 mv *.o "$srcdir/$pkgname-$pkgver"
40 cd "$srcdir/$pkgname-$pkgver"
42 #ignore freetype v1 failure, we will inject it.
43 sed -i configure -e '/TrueType/ d'
45 #C++ does not allow using the enum keyword that way.
46 sed -i gfont.C -e '1106 s_enum__'
47 sed -i dialogs.C -e '1330 s_enum__'
49 #gcc does not manage multi-line string literals since... long ago.
50 sed -i ps.h -e 's_\\$__'
51 sed -i ps.h -e '/const char/,/;$/ { /const char/b; /;$/b; s_^\|$_"_g }'
52 sed -i ps.h -e '/^[^"]*"[^"]*$/ s_"__'
54 #Oh come on... I cannot believe it never crashed on you...
55 #the sed lines sound crazy, but I just have to swap line 336 and 337.
56 sed -i dialogs.C -ne '
61 sed -i dialogs.C -ne '
66 ./configure --prefix=/usr --enable-gnome=no --disable-nls
68 #We inject the old freetype
69 sed -i Makefile -e '/^gfontview_OBJECTS *=/ s_$_ freetype.o ftxerr18.o ftxkern.o ftxpost.o_'
72 make DESTDIR="$pkgdir/" install
73 install -m755 -d "$pkgdir"/usr/share/ghostscript/fonts
76 md5sums=('f06e0e9d67f7d8b3af251fa593e83eeb'
77 '9a9e7ad00c1ef6dfbf8f8e19ceefb300')
79 # vim:set ts=2 sw=2 et: