blob: 87719af994e54e9c7dc297bc97f2a1f9f9a22d7e (
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
84
85
86
|
# Maintainer: Brian Bidulock <bidulock@openss7.org>
# Contributor: ezzetabi <ezzetabi@gawab.com>
pkgname=gfontview
pkgver=0.5.0
pkgrel=4
pkgdesc="An outline font viewer for Linux."
arch=(i686 x86_64)
url="http://gfontview.sourceforge.net/"
license=('GPL')
groups=()
depends=('giflib4' 'gtk' 't1lib')
makedepends=('cups' 'patchelf')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!emptydirs')
install=
changelog=ChangeLog
source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz"
"http://games.linux.sk/files/freetype-1.3.1.tar.gz"
)
noextract=()
build() {
cd "$srcdir"/freetype-1.3.1/lib
gcc -Os -c -Iarch/ansi -I. arch/ansi/freetype.c
mv freetype.o "$srcdir/$pkgname-$pkgver"
cp freetype.h "$srcdir/$pkgname-$pkgver"
cp fterrid.h "$srcdir/$pkgname-$pkgver"
cp ftnameid.h "$srcdir/$pkgname-$pkgver"
cd extend
gcc -Os -c -I../arch/ansi -I.. ftxerr18.c
cp ftxerr18.h "$srcdir/$pkgname-$pkgver"
gcc -Os -c -I../arch/ansi -I.. ftxkern.c
cp ftxkern.h "$srcdir/$pkgname-$pkgver"
gcc -Os -c -I../arch/ansi -I.. ftxpost.c
cp ftxpost.h "$srcdir/$pkgname-$pkgver"
mv *.o "$srcdir/$pkgname-$pkgver"
cd "$srcdir/$pkgname-$pkgver"
#ignore freetype v1 failure, we will inject it.
sed -i configure -e '/TrueType/ d'
#C++ does not allow using the enum keyword that way.
sed -i gfont.C -e '1106 s_enum__'
sed -i dialogs.C -e '1330 s_enum__'
#gcc does not manage multi-line string literals since... long ago.
sed -i ps.h -e 's_\\$__'
sed -i ps.h -e '/const char/,/;$/ { /const char/b; /;$/b; s_^\|$_"_g }'
sed -i ps.h -e '/^[^"]*"[^"]*$/ s_"__'
#Oh come on... I cannot believe it never crashed on you...
#the sed lines sound crazy, but I just have to swap line 336 and 337.
sed -i dialogs.C -ne '
334!{p;d;}
h;n;:1
335!{N;b1}
G;h;n;p;g;p'
sed -i dialogs.C -ne '
334!{p;d;}
h;n;:1
336!{N;b1}
G;h;n;p;g;p'
CPPFLAGS="-I/usr/include/giflib4" LDFLAGS="-L/usr/lib/giflib4" ./configure --prefix=/usr --enable-gnome=no --disable-nls
#We inject the old freetype
sed -i Makefile -e '/^gfontview_OBJECTS *=/ s_$_ freetype.o ftxerr18.o ftxkern.o ftxpost.o_'
make || return 1
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" applicationsdir='${datadir}/applications' install
install -m755 -d "$pkgdir"/usr/share/ghostscript/fonts
strip "$pkgdir"/usr/bin/gfontview
patchelf --set-rpath /usr/lib/giflib4 "$pkgdir"/usr/bin/gfontview
}
md5sums=('f06e0e9d67f7d8b3af251fa593e83eeb'
'9a9e7ad00c1ef6dfbf8f8e19ceefb300')
# vim:set ts=2 sw=2 et:
|