]> git.pld-linux.org Git - SPECS.git/blob - crossmingw32-freetype.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / crossmingw32-freetype.spec
1 #
2 # Conditional build:
3 %bcond_without  lcd             # without LCD subpixel color filtering (Microsoft patents in USA)
4 %bcond_without  harfbuzz        # harfbuzz based autohinting
5 #
6 %define         realname   freetype
7 Summary:        TrueType font rasterizer - MinGW32 cross version
8 Summary(pl.UTF-8):      Rasteryzer fontów TrueType - wersja skrośna dla MinGW32
9 Name:           crossmingw32-%{realname}
10 Version:        2.11.0
11 Release:        1
12 License:        GPL v2 or FTL
13 Group:          Development/Libraries
14 Source0:        https://download.savannah.gnu.org/releases/freetype/%{realname}-%{version}.tar.xz
15 # Source0-md5:  f931582653774e310ed3a7e49b7167a3
16 URL:            http://www.freetype.org/
17 BuildRequires:  crossmingw32-bzip2
18 BuildRequires:  crossmingw32-gcc
19 %{?with_harfbuzz:BuildRequires: crossmingw32-harfbuzz >= 2.0.0}
20 BuildRequires:  crossmingw32-libpng
21 BuildRequires:  crossmingw32-zlib >= 1.2.3-2
22 BuildRequires:  pkgconfig >= 1:0.24
23 BuildRequires:  python
24 BuildRequires:  tar >= 1:1.22
25 BuildRequires:  xz
26 Requires:       crossmingw32-bzip2
27 %{?with_harfbuzz:Requires:      crossmingw32-harfbuzz >= 2.0.0}
28 Requires:       crossmingw32-libpng
29 Requires:       crossmingw32-zlib >= 1.2.3-2
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         specflags_ia32  -fomit-frame-pointer
33 # see <freetype/internal/ftserv.h>, the real horror
34 %define         specflags       -fno-strict-aliasing
35
36 %define         no_install_post_strip   1
37 %define         _enable_debug_packages  0
38
39 %define         target                  i386-mingw32
40 %define         target_platform         i386-pc-mingw32
41
42 %define         _sysprefix              /usr
43 %define         _prefix                 %{_sysprefix}/%{target}
44 %define         _libdir                 %{_prefix}/lib
45 %define         _pkgconfigdir           %{_prefix}/lib/pkgconfig
46 %define         _dlldir                 /usr/share/wine/windows/system
47 %define         __cc                    %{target}-gcc
48 %define         __cxx                   %{target}-g++
49 %define         __pkgconfig_provides    %{nil}
50 %define         __pkgconfig_requires    %{nil}
51
52 %ifnarch %{ix86}
53 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
54 %define         optflags        -O2
55 %endif
56 # -z options are invalid for mingw linker, most of -f options are Linux-specific
57 %define         filterout_ld    -Wl,-z,.*
58 %define         filterout_c     -f[-a-z0-9=]*
59
60 %description
61 The FreeType engine is a free and portable TrueType font rendering
62 engine. It has been developed to provide TrueType support to a great
63 variety of platforms and environments.
64
65 Note that FreeType is a *library*. It is not a font server for your
66 favorite platform, even though it was designed to be used in many of
67 them. Note also that it is *not* a complete text-rendering library.
68 Its purpose is simply to open and manage font files, as well as load,
69 hint and render individual glyphs efficiently. You can also see it as
70 a "TrueType driver" for a higher-level library, though rendering text
71 with it is extremely easy, as demo-ed by the test programs.
72
73 This package contains the cross version for Win32.
74
75 %description -l pl.UTF-8
76 FreeType jest biblioteką służącą do rasteryzacji fontów
77 TrueType. Jest to jedynie biblioteka, a nie serwer fontów, chociaż
78 została ona zaprojektowana do używania także w takich serwerach.
79 Nie jest to też kompletna biblioteka do rasteryzacji tekstu. Jej
80 celem jest tylko odczytywanie i zarządzanie plikami z fontami oraz
81 wczytywanie i wykonywanie hintingu i rasteryzacji poszczególnych
82 glifów. Może być także uważana za "sterownik TrueType" dla
83 bibliotek wyższego poziomu, jednak użycie samej biblioteki FreeType
84 do rasteryzacji jest bardzo proste, co można zobaczyć w programach
85 demonstracyjnych.
86
87 Ten pakiet zawiera wersję skrośną dla Win32.
88
89 %package static
90 Summary:        Static freetype library (cross MinGW32 version)
91 Summary(pl.UTF-8):      Statyczna biblioteka freetype (wersja skrośna MinGW32)
92 Group:          Development/Libraries
93 Requires:       %{name} = %{version}-%{release}
94
95 %description static
96 Static freetype library (cross MinGW32 version).
97
98 %description static -l pl.UTF-8
99 Statyczna biblioteka freetype (wersja skrośna MinGW32).
100
101 %package dll
102 Summary:        DLL freetype library for Windows
103 Summary(pl.UTF-8):      Biblioteka DLL freetype dla Windows
104 Group:          Applications/Emulators
105 Requires:       crossmingw32-bzip2-dll
106 %{?with_harfbuzz:Requires:      crossmingw32-harfbuzz-dll >= 2.0.0}
107 Requires:       crossmingw32-libpng-dll
108 Requires:       crossmingw32-zlib-dll
109 Requires:       wine
110
111 %description dll
112 DLL freetype library for Windows.
113
114 %description dll -l pl.UTF-8
115 Biblioteka DLL freetype dla Windows.
116
117 %prep
118 %setup -q -n %{realname}-%{version}
119
120 %build
121 export PKG_CONFIG_LIBDIR=%{_pkgconfigdir}
122 CFLAGS="%{rpmcflags} \
123 %{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \
124 -DTT_CONFIG_OPTION_SUBPIXEL_HINTING \
125 " \
126 %configure \
127         LIBPNG_CFLAGS="$(pkg-config --cflags libpng)" \
128         LIBPNG_LDFLAGS="$(pkg-config --libs libpng)" \
129         --target=%{target} \
130         --build=i686-pc-linux-gnu \
131         --host=%{target} \
132         --enable-shared \
133         %{!?with_harfbuzz:--without-harfbuzz}
134
135 %{__make}
136
137 %install
138 rm -rf $RPM_BUILD_ROOT
139
140 %{__make} install \
141         DESTDIR=$RPM_BUILD_ROOT
142
143 install -d $RPM_BUILD_ROOT%{_dlldir}
144 %{__mv} -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
145
146 %if 0%{!?debug:1}
147 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
148 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
149 %endif
150
151 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/aclocal
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %files
157 %defattr(644,root,root,755)
158 %doc LICENSE.TXT docs/{CHANGES,FTL.TXT,TODO,formats.txt,raster.txt}
159 %{_libdir}/libfreetype.dll.a
160 %{_libdir}/libfreetype.la
161 %{_includedir}/freetype2
162 %{_pkgconfigdir}/freetype2.pc
163
164 %files static
165 %defattr(644,root,root,755)
166 %{_libdir}/libfreetype.a
167
168 %files dll
169 %defattr(644,root,root,755)
170 %{_dlldir}/libfreetype-*.dll
This page took 0.602962 seconds and 3 git commands to generate.