blob: d2a2f865e1d7ebd72c486ec2ce31f77685c98bbc (
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
Name: freetype2
Summary: A free and portable font rendering engine
Version: 2.5.5
Release: 1
Group: Graphics/Font Management
License: Freetype or GPL-2.0+
Url: http://www.freetype.org
Source0: http://download.savannah.gnu.org/releases-noredirect/freetype/freetype-%{version}.tar.gz
Source1001: packaging/freetype2.manifest
BuildRequires: pkgconfig(libpng)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Provides: %{name}-bytecode
%description
The FreeType engine is a free and portable font rendering
engine, developed to provide advanced font support for a variety of
platforms and environments. FreeType is a library which can open and
manages font files as well as efficiently load, hint and render
individual glyphs. FreeType is not a font server or a complete
text-rendering library.
%package -n libfreetype
Summary: A TrueType Font Library
Group: Graphics/Font Management
%description -n libfreetype
This library features TrueType fonts for open source projects. This
version also contains an autohinter for producing improved output.
%package devel
Summary: FreeType development libraries and header files
Group: Development/Libraries
Requires: libfreetype = %{version}
Requires: zlib-devel
Requires: pkgconfig
Provides: freetype-devel
%description devel
The freetype-devel package includes the static libraries and header files
for the FreeType font rendering engine.
Install freetype-devel if you want to develop programs which will use
FreeType.
%prep
%setup -q -n freetype-%{version}
%build
cp %{SOURCE1001} .
%configure --disable-static
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' builds/unix/libtool
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
%makeinstall gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
mkdir -p %{buildroot}/usr/share/license
cat docs/FTL.TXT > %{buildroot}/usr/share/license/%{name}
# fix multilib issues
%ifarch x86_64 s390x ia64 ppc64 alpha sparc64 aarch64
%define wordsize 64
%else
%define wordsize 32
%endif
mv $RPM_BUILD_ROOT%{_includedir}/freetype2/config/ftconfig.h \
$RPM_BUILD_ROOT%{_includedir}/freetype2/config/ftconfig-%{wordsize}.h
cat >$RPM_BUILD_ROOT%{_includedir}/freetype2/config/ftconfig.h <<EOF
#ifndef __FTCONFIG_H__MULTILIB
#define __FTCONFIG_H__MULTILIB
#include <bits/wordsize.h>
#if __WORDSIZE == 32
# include "ftconfig-32.h"
#elif __WORDSIZE == 64
# include "ftconfig-64.h"
#else
# error "unexpected value for __WORDSIZE macro"
#endif
#endif
EOF
# Don't package static a or .la files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
%post -n libfreetype -p /sbin/ldconfig
%postun -n libfreetype -p /sbin/ldconfig
%files -n libfreetype
%manifest %{name}.manifest
%defattr(-,root,root,-)
%{_libdir}/libfreetype.so.*
/usr/share/license/%{name}
%files devel
%manifest %{name}.manifest
%defattr(-,root,root,-)
%dir %{_includedir}/freetype2
%{_datadir}/aclocal/freetype2.m4
%{_includedir}/freetype2/*
%{_libdir}/libfreetype.so
%{_bindir}/freetype-config
%{_libdir}/pkgconfig/*.pc
%{_datadir}/man/man1/*
|