]>
Commit | Line | Data |
---|---|---|
1 | Summary: System for layout and rendering of internationalized text - cross MinGW32 version | |
2 | Summary(pl.UTF-8): System renderowania międzynarodowego tekstu - wersja skrośna dla MinGW32 | |
3 | %define realname pango | |
4 | Name: crossmingw32-%{realname} | |
5 | # warning: 1.50.12 requires dwrite | |
6 | Version: 1.50.11 | |
7 | Release: 1 | |
8 | License: LGPL v2+ | |
9 | Group: Development/Libraries | |
10 | Source0: https://download.gnome.org/sources/pango/1.50/%{realname}-%{version}.tar.xz | |
11 | # Source0-md5: 3ff7ab8644a0622f96e7d7f547074096 | |
12 | URL: https://pango.gnome.org/ | |
13 | # cairo-ft cairo-pdf cairo-png cairo-ps cairo-win32 | |
14 | BuildRequires: crossmingw32-cairo >= 1.12.10 | |
15 | BuildRequires: crossmingw32-fontconfig >= 2.13.0 | |
16 | BuildRequires: crossmingw32-freetype >= 2.1.7 | |
17 | BuildRequires: crossmingw32-fribidi >= 1.0.6 | |
18 | BuildRequires: crossmingw32-gcc | |
19 | # when supported by our mingw32 | |
20 | #BuildRequires: crossmingw32-glib2 >= 2.68.0 | |
21 | BuildRequires: crossmingw32-glib2 >= 2.62 | |
22 | BuildRequires: crossmingw32-harfbuzz >= 2.6.0 | |
23 | BuildRequires: crossmingw32-w32api >= 5.0.2-6 | |
24 | # glib-genmarshal, glib-mkenums | |
25 | BuildRequires: glib2-devel >= 1:2.68.0 | |
26 | BuildRequires: meson >= 0.55.3 | |
27 | BuildRequires: ninja >= 1.5 | |
28 | BuildRequires: perl-base | |
29 | BuildRequires: pkgconfig >= 1:0.15 | |
30 | BuildRequires: rpmbuild(macros) >= 1.736 | |
31 | BuildRequires: tar >= 1:1.22 | |
32 | BuildRequires: xz | |
33 | Requires: crossmingw32-cairo >= 1.12.10 | |
34 | Requires: crossmingw32-fontconfig >= 2.13.0 | |
35 | Requires: crossmingw32-freetype >= 2.1.7 | |
36 | Requires: crossmingw32-fribidi >= 1.0.6 | |
37 | #Requires: crossmingw32-glib2 >= 2.68.0 | |
38 | Requires: crossmingw32-glib2 >= 2.62 | |
39 | Requires: crossmingw32-harfbuzz >= 2.6.0 | |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
41 | ||
42 | %define no_install_post_strip 1 | |
43 | %define _enable_debug_packages 0 | |
44 | ||
45 | %define target i386-mingw32 | |
46 | %define target_platform i386-pc-mingw32 | |
47 | ||
48 | %define _sysprefix /usr | |
49 | %define _prefix %{_sysprefix}/%{target} | |
50 | %define _libdir %{_prefix}/lib | |
51 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
52 | %define _dlldir /usr/share/wine/windows/system | |
53 | %define __pkgconfig_provides %{nil} | |
54 | %define __pkgconfig_requires %{nil} | |
55 | # for meson 0.50+, keep __cc/__cxx as host compiler and pass %{target}-* in meson-cross.txt | |
56 | ||
57 | %define _ssp_cflags %{nil} | |
58 | %ifnarch %{ix86} | |
59 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
60 | %define optflags -O2 | |
61 | %endif | |
62 | # -z options are invalid for mingw linker, most of -f options are Linux-specific | |
63 | %define filterout_ld -Wl,-z,.* | |
64 | %define filterout_c -f[-a-z0-9=]* | |
65 | ||
66 | %description | |
67 | System for layout and rendering of internationalized text (cross | |
68 | MinGW32 version). | |
69 | ||
70 | %description -l pl.UTF-8 | |
71 | System obsługi i renderowania międzynarodowego tekstu (wersja skrośna | |
72 | MinGW32). | |
73 | ||
74 | %package static | |
75 | Summary: Static Pango libraries (cross MinGW32 version) | |
76 | Summary(pl.UTF-8): Statyczne biblioteki Pango (wersja skrośna MinGW32) | |
77 | Group: Development/Libraries | |
78 | Requires: %{name} = %{version}-%{release} | |
79 | ||
80 | %description static | |
81 | Static Pango libraries (cross MinGW32 version). | |
82 | ||
83 | %description static -l pl.UTF-8 | |
84 | Statyczne biblioteki Pango (wersja skrośna MinGW32). | |
85 | ||
86 | %package dll | |
87 | Summary: DLL pango libraries for Windows | |
88 | Summary(pl.UTF-8): Biblioteki DLL pango dla Windows | |
89 | Group: Applications/Emulators | |
90 | Requires: crossmingw32-cairo-dll >= 1.12.10 | |
91 | Requires: crossmingw32-fontconfig-dll >= 2.13.0 | |
92 | Requires: crossmingw32-freetype-dll >= 2.1.7 | |
93 | Requires: crossmingw32-fribidi-dll >= 1.0.6 | |
94 | #Requires: crossmingw32-glib2-dll >= 2.68.0 | |
95 | Requires: crossmingw32-glib2-dll >= 2.62 | |
96 | Requires: crossmingw32-harfbuzz-dll >= 2.6.0 | |
97 | Requires: wine | |
98 | ||
99 | %description dll | |
100 | DLL pango libraries for Windows. | |
101 | ||
102 | %description dll -l pl.UTF-8 | |
103 | Biblioteki DLL pango dla Windows. | |
104 | ||
105 | %prep | |
106 | %setup -q -n %{realname}-%{version} | |
107 | ||
108 | # disable unused gi-docgen subproject | |
109 | %{__sed} -i -e '/fallback:.*gi-docgen/d' meson.build | |
110 | ||
111 | cat > meson-cross.txt <<'EOF' | |
112 | [host_machine] | |
113 | system = 'windows' | |
114 | cpu_family = 'x86' | |
115 | cpu = 'i386' | |
116 | endian='little' | |
117 | [binaries] | |
118 | c = '%{target}-gcc' | |
119 | cpp = '%{target}-g++' | |
120 | ar = '%{target}-ar' | |
121 | windres = '%{target}-windres' | |
122 | pkgconfig = 'pkg-config' | |
123 | [properties] | |
124 | c_args = ['%(echo %{rpmcflags} | sed -e "s/ \+/ /g;s/ /', '/g")', '-DWINVER=0x0600'] | |
125 | EOF | |
126 | ||
127 | %build | |
128 | export PKG_CONFIG_LIBDIR=%{_pkgconfigdir} | |
129 | %meson build \ | |
130 | --cross-file meson-cross.txt \ | |
131 | %{?debug:--debug} \ | |
132 | -Dgtk_doc=false \ | |
133 | -Dintrospection=disabled | |
134 | ||
135 | %ninja_build -C build | |
136 | ||
137 | %install | |
138 | rm -rf $RPM_BUILD_ROOT | |
139 | ||
140 | %ninja_install -C build | |
141 | ||
142 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
143 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
144 | ||
145 | %if 0%{!?debug:1} | |
146 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
147 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
148 | %endif | |
149 | ||
150 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/pango-{list,segmentation,view}.exe | |
151 | ||
152 | %clean | |
153 | rm -rf $RPM_BUILD_ROOT | |
154 | ||
155 | %files | |
156 | %defattr(644,root,root,755) | |
157 | %doc NEWS README.md README.win32 THANKS | |
158 | %{_libdir}/libpango-1.0.dll.a | |
159 | %{_libdir}/libpangocairo-1.0.dll.a | |
160 | %{_libdir}/libpangoft2-1.0.dll.a | |
161 | %{_libdir}/libpangowin32-1.0.dll.a | |
162 | %{_includedir}/pango-1.0 | |
163 | %{_pkgconfigdir}/pango.pc | |
164 | %{_pkgconfigdir}/pangocairo.pc | |
165 | %{_pkgconfigdir}/pangofc.pc | |
166 | %{_pkgconfigdir}/pangoft2.pc | |
167 | %{_pkgconfigdir}/pangoot.pc | |
168 | %{_pkgconfigdir}/pangowin32.pc | |
169 | ||
170 | %files static | |
171 | %defattr(644,root,root,755) | |
172 | %{_libdir}/libpango-1.0.a | |
173 | %{_libdir}/libpangocairo-1.0.a | |
174 | %{_libdir}/libpangoft2-1.0.a | |
175 | %{_libdir}/libpangowin32-1.0.a | |
176 | ||
177 | %files dll | |
178 | %defattr(644,root,root,755) | |
179 | %{_dlldir}/libpango-1.0-0.dll | |
180 | %{_dlldir}/libpangocairo-1.0-0.dll | |
181 | %{_dlldir}/libpangoft2-1.0-0.dll | |
182 | %{_dlldir}/libpangowin32-1.0-0.dll |