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