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