]>
Commit | Line | Data |
---|---|---|
8469de34 | 1 | Summary: Useful routines for 'C' programming - MinGW32 cross version |
ab514c36 ER |
2 | Summary(cs.UTF-8): Šikovná knihovna s funkcemi pro pomocné programy |
3 | Summary(da.UTF-8): Nyttige biblioteksfunktioner | |
4 | Summary(de.UTF-8): Eine nützliche Library von Dienstprogramm-Funktionen | |
5 | Summary(es.UTF-8): Conjunto de funciones gráficas utilitarias | |
6 | Summary(fi.UTF-8): Kirjasto, jossa on työkalufunktioita | |
7 | Summary(fr.UTF-8): Bibliothèque de fonctions utilitaires | |
8 | Summary(ja.UTF-8): 便利なユーティリティ関数のライブラリ | |
8469de34 | 9 | Summary(pl.UTF-8): Biblioteka zawierająca wiele użytecznych funkcji C - wersja skrośna dla MinGW32 |
ab514c36 ER |
10 | Summary(pt_BR.UTF-8): Conjunto de funções gráficas utilitárias |
11 | Summary(tr.UTF-8): Yararlı ufak yordamlar kitaplığı | |
12 | Summary(zh_CN.UTF-8): 实用工具函数库 | |
e528a0cc | 13 | %define realname glib |
1bf6ca42 | 14 | Name: crossmingw32-glib2 |
879176a8 | 15 | Version: 2.62.2 |
83471978 | 16 | Release: 1 |
745caf87 | 17 | License: LGPL v2+ |
794b98a7 | 18 | Group: Development/Libraries |
f4c21751 | 19 | Source0: http://ftp.gnome.org/pub/GNOME/sources/glib/2.62/glib-%{version}.tar.xz |
879176a8 | 20 | # Source0-md5: bed3a70397a019965efac0c49f9c8164 |
966922de | 21 | Patch0: glib2-win32.patch |
c6b9b5e4 | 22 | URL: http://www.gtk.org/ |
34e8fb8f | 23 | BuildRequires: crossmingw32-gcc |
c9a1f2ad | 24 | BuildRequires: crossmingw32-gettext |
aeb9b581 | 25 | BuildRequires: crossmingw32-libffi >= 3.0.0 |
34e8fb8f | 26 | BuildRequires: crossmingw32-libiconv |
83471978 | 27 | BuildRequires: crossmingw32-pcre >= 8.31 |
966922de JB |
28 | # rand_s() |
29 | BuildRequires: crossmingw32-runtime >= 1:4.0.3-2 | |
23e253c6 | 30 | # SetThreadErrorMode and more |
f4c21751 | 31 | BuildRequires: crossmingw32-w32api >= 1:5.0.2-7 |
f334d6d2 | 32 | BuildRequires: crossmingw32-zlib |
405204bb | 33 | # host glib-genmarshall and glib-compile-schemas are needed for cross-compiling |
f4c21751 | 34 | BuildRequires: glib2 >= 1:2.62.0 |
966922de | 35 | BuildRequires: gtk-doc >= 1.20 |
83471978 | 36 | BuildRequires: meson >= 0.50.0-2 |
f4c21751 | 37 | BuildRequires: ninja >= 1.5 |
038713af | 38 | BuildRequires: pkgconfig >= 1:0.16 |
83471978 JB |
39 | BuildRequires: python3 >= 1:3.4 |
40 | BuildRequires: rpmbuild(macros) >= 1.736 | |
aeb9b581 JB |
41 | BuildRequires: tar >= 1:1.22 |
42 | BuildRequires: xz | |
794b98a7 | 43 | Requires: crossmingw32-gettext |
83471978 | 44 | Requires: crossmingw32-pcre >= 8.31 |
7b00e9c6 | 45 | ExcludeArch: i386 |
07551a26 | 46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
c6b9b5e4 | 47 | |
48 | %define no_install_post_strip 1 | |
49 | ||
50 | %define target i386-mingw32 | |
c9a1f2ad | 51 | %define host %{target} |
52 | %define target_platform %{target} | |
c6b9b5e4 | 53 | |
328832ab | 54 | %define _sysprefix /usr |
55 | %define _prefix %{_sysprefix}/%{target} | |
26297d4f | 56 | %define _libdir %{_prefix}/lib |
328832ab | 57 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
794b98a7 | 58 | %define _dlldir /usr/share/wine/windows/system |
cad3983f | 59 | %define __pkgconfig_provides %{nil} |
4db9688c | 60 | %define __pkgconfig_requires %{nil} |
83471978 | 61 | # for meson 0.50+, keep __cc/__cxx as host compiler and pass %{target}-* in meson-cross.txt |
c6b9b5e4 | 62 | |
e6c8cfe5 | 63 | %ifnarch %{ix86} |
7b00e9c6 JB |
64 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc. |
65 | # now at least i486 is required for atomic operations | |
66 | %define optflags -O2 -march=i486 | |
e6c8cfe5 | 67 | %endif |
a96a22cc | 68 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
e6c8cfe5 | 69 | %define filterout_ld -Wl,-z,.* |
a96a22cc | 70 | %define filterout_c -f[-a-z0-9=]* |
e6c8cfe5 | 71 | |
c6b9b5e4 | 72 | %description |
73 | GLib, is a library which includes support routines for C such as | |
d2690a19 | 74 | lists, trees, hashes, memory allocation, and many other things. GLib |
c6b9b5e4 | 75 | includes also generally useful data structures used by GIMP and many |
76 | other. | |
77 | ||
9bd01504 | 78 | This package contains the cross version for Win32. |
79 | ||
411499f2 JR |
80 | %description -l cs.UTF-8 |
81 | Šikovná knihovna s funkcemi pro pomocné programy. Vývojové knihovny a | |
82 | hlavičky jsou v balíčku glib-devel. | |
c6b9b5e4 | 83 | |
411499f2 | 84 | %description -l da.UTF-8 |
c6b9b5e4 | 85 | Nyttigt bibliotek med forskellige funktioner. Udviklings- biblioteker |
86 | og headerfiler er i glib-devel pakken. | |
87 | ||
411499f2 JR |
88 | %description -l de.UTF-8 |
89 | Eine nützliche Library von Dienstprogramm-Funktionen. | |
c6b9b5e4 | 90 | Entwicklungs-Libraries und Header befinden sich in glib-devel. |
91 | ||
411499f2 | 92 | %description -l es.UTF-8 |
c6b9b5e4 | 93 | Conjunto de funciones utilitarias. Bibliotecas de desarrollo y |
411499f2 | 94 | archivos de inclusión están en glib-devel. |
c6b9b5e4 | 95 | |
411499f2 JR |
96 | %description -l fi.UTF-8 |
97 | Kirjasto, jossa on työkalufunktioita. Kehitysversiot ja | |
c6b9b5e4 | 98 | header-tiedostot ovat glib-devel-paketissa. |
99 | ||
411499f2 | 100 | %description -l ja.UTF-8 |
411499f2 JR |
101 | GLibはユーティリティ関数を集めた便利なライブラリです。このC言語用ライブラリは、 |
102 | いくつかの問題を解決するよう設計されており、多くのプログラムから要求される使いやすい | |
103 | 関数を提供します。 | |
c6b9b5e4 | 104 | |
411499f2 JR |
105 | GLibはGDK, |
106 | GTK+他多くのアプリケーションで利用される。このライブラリに依存するアプリケーション | |
107 | 等のためにこのglibパッケージをインストールしてください。 | |
c6b9b5e4 | 108 | |
411499f2 | 109 | %description -l pl.UTF-8 |
d2690a19 | 110 | GLib jest zestawem bibliotek zawierających funkcje do obsługi list i |
411499f2 JR |
111 | drzew, funkcje mieszające, funkcje do alokacji pamięci i dużo innych |
112 | podstawowych funkcji i różnych struktur danych używanych przez program | |
c6b9b5e4 | 113 | GIMP i wiele innych. |
114 | ||
411499f2 | 115 | Ten pakiet zawiera wersję skrośną dla Win32. |
9bd01504 | 116 | |
411499f2 JR |
117 | %description -l pt_BR.UTF-8 |
118 | Conjunto de funções utilitárias. Bibliotecas de desenvolvimento e | |
119 | arquivos de inclusão estão em glib-devel. | |
c6b9b5e4 | 120 | |
411499f2 JR |
121 | %description -l tr.UTF-8 |
122 | Yararlı yordamlar kitaplığı. Geliştirme kitaplıkları ve başlık | |
123 | dosyaları glib-devel paketinde yer almaktadır. | |
c6b9b5e4 | 124 | |
83471978 JB |
125 | %package static |
126 | Summary: Static GLib 2 libraries (cross MinGW32 version) | |
127 | Summary(pl.UTF-8): Statyczne biblioteki GLib 2 (wersja skrośna MinGW32) | |
128 | Group: Development/Libraries | |
129 | Requires: %{name} = %{version}-%{release} | |
130 | ||
131 | %description static | |
132 | Static GLib 2 libraries (cross MinGW32 version). | |
133 | ||
134 | %description static -l pl.UTF-8 | |
135 | Statyczne biblioteki GLib 2 (wersja skrośna MinGW32). | |
136 | ||
794b98a7 | 137 | %package dll |
83471978 JB |
138 | Summary: DLL GLib 2 libraries for Windows |
139 | Summary(pl.UTF-8): Biblioteki DLL GLib 2 dla Windows | |
794b98a7 JB |
140 | Group: Applications/Emulators |
141 | Requires: crossmingw32-gettext-dll | |
aeb9b581 | 142 | Requires: crossmingw32-libffi-dll >= 3.0.0 |
83471978 | 143 | Requires: crossmingw32-pcre-dll >= 8.31 |
794b98a7 JB |
144 | Requires: wine |
145 | ||
146 | %description dll | |
83471978 | 147 | DLL GLib 2 libraries for Windows. |
794b98a7 JB |
148 | |
149 | %description dll -l pl.UTF-8 | |
83471978 | 150 | Biblioteki DLL GLib 2 dla Windows. |
794b98a7 | 151 | |
c6b9b5e4 | 152 | %prep |
e528a0cc | 153 | %setup -q -n %{realname}-%{version} |
328832ab | 154 | %patch0 -p1 |
155 | ||
83471978 JB |
156 | cat > meson-cross.txt <<'EOF' |
157 | [host_machine] | |
158 | system = 'windows' | |
159 | cpu_family = 'x86' | |
160 | cpu = 'i386' | |
161 | endian='little' | |
162 | [binaries] | |
163 | c = '%{target}-gcc' | |
164 | cpp = '%{target}-g++' | |
165 | ar = '%{target}-ar' | |
166 | windres = '%{target}-windres' | |
167 | pkgconfig = 'pkg-config' | |
168 | [properties] | |
169 | c_args = ['%(echo %{rpmcflags} | sed -e "s/ \+/ /g;s/ /', '/g")'] | |
170 | EOF | |
171 | ||
328832ab | 172 | %build |
2ff0a90e | 173 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig |
83471978 JB |
174 | %meson build \ |
175 | --cross-file meson-cross.txt \ | |
176 | %{?debug:--debug} \ | |
177 | -Dselinux=disabled | |
178 | ||
179 | %ninja_build -C build | |
c6b9b5e4 | 180 | |
181 | %install | |
182 | rm -rf $RPM_BUILD_ROOT | |
34e8fb8f | 183 | |
83471978 | 184 | %ninja_install -C build |
c6b9b5e4 | 185 | |
794b98a7 | 186 | install -d $RPM_BUILD_ROOT%{_dlldir} |
83471978 | 187 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
b6da3f2c | 188 | |
ce3c9485 JB |
189 | %if 0%{!?debug:1} |
190 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
191 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
192 | %endif | |
193 | ||
794b98a7 | 194 | # use system glib2-devel instead |
83471978 JB |
195 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/{gdbus-codegen,glib-genmarshal,glib-gettextize,glib-mkenums,gtester-report,*.exe} |
196 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{aclocal,bash-completion,gettext,glib-2.0} | |
794b98a7 | 197 | # runtime |
405204bb | 198 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale |
c6b9b5e4 | 199 | |
200 | %clean | |
201 | rm -rf $RPM_BUILD_ROOT | |
202 | ||
794b98a7 | 203 | %files |
37a1690c | 204 | %defattr(644,root,root,755) |
706c24a3 | 205 | %{_libdir}/libgio-2.0.dll.a |
794b98a7 JB |
206 | %{_libdir}/libglib-2.0.dll.a |
207 | %{_libdir}/libgmodule-2.0.dll.a | |
208 | %{_libdir}/libgobject-2.0.dll.a | |
209 | %{_libdir}/libgthread-2.0.dll.a | |
405204bb | 210 | %{_includedir}/gio-win32-2.0 |
328832ab | 211 | %{_includedir}/glib-2.0 |
794b98a7 | 212 | %dir %{_libdir}/glib-2.0 |
328832ab | 213 | %dir %{_libdir}/glib-2.0/include |
214 | %{_libdir}/glib-2.0/include/glibconfig.h | |
706c24a3 | 215 | %{_pkgconfigdir}/gio-2.0.pc |
405204bb | 216 | %{_pkgconfigdir}/gio-windows-2.0.pc |
26297d4f JB |
217 | %{_pkgconfigdir}/glib-2.0.pc |
218 | %{_pkgconfigdir}/gmodule-2.0.pc | |
219 | %{_pkgconfigdir}/gmodule-export-2.0.pc | |
220 | %{_pkgconfigdir}/gmodule-no-export-2.0.pc | |
221 | %{_pkgconfigdir}/gobject-2.0.pc | |
222 | %{_pkgconfigdir}/gthread-2.0.pc | |
794b98a7 | 223 | |
83471978 JB |
224 | %files static |
225 | %defattr(644,root,root,755) | |
226 | %{_libdir}/libgio-2.0.a | |
227 | %{_libdir}/libglib-2.0.a | |
228 | %{_libdir}/libgmodule-2.0.a | |
229 | %{_libdir}/libgobject-2.0.a | |
230 | %{_libdir}/libgthread-2.0.a | |
231 | ||
794b98a7 JB |
232 | %files dll |
233 | %defattr(644,root,root,755) | |
cb341081 JB |
234 | %{_dlldir}/libgio-2.0-0.dll |
235 | %{_dlldir}/libglib-2.0-0.dll | |
236 | %{_dlldir}/libgmodule-2.0-0.dll | |
237 | %{_dlldir}/libgobject-2.0-0.dll | |
238 | %{_dlldir}/libgthread-2.0-0.dll |