]>
Commit | Line | Data |
---|---|---|
83f64ac4 | 1 | %define realname atk |
b28b1bf5 JB |
2 | Summary: ATK - Accessibility Toolkit - cross MinGW32 version |
3 | Summary(pl.UTF-8): ATK - biblioteka ułatwiająca niepełnosprawnym korzystanie z komputerów - wersja skrośna dla MinGW32 | |
83f64ac4 | 4 | Name: crossmingw32-%{realname} |
e7398ba1 | 5 | Version: 2.38.0 |
d0a251d8 | 6 | Release: 1 |
7412a699 | 7 | License: LGPL v2+ |
5a48950d | 8 | Group: Development/Libraries |
e7398ba1 JB |
9 | Source0: https://download.gnome.org/sources/atk/2.38/%{realname}-%{version}.tar.xz |
10 | # Source0-md5: 4dcea15cbf166706c166fc4fee05e3f8 | |
e64e4001 | 11 | URL: https://developer.gnome.org/atk/ |
5a48950d | 12 | BuildRequires: crossmingw32-gcc |
d0a251d8 | 13 | BuildRequires: crossmingw32-glib2 >= 2.38.0 |
111400a9 | 14 | # glib-genmarshal, glib-mkenums |
e7398ba1 | 15 | BuildRequires: glib2-devel >= 1:2.38.0 |
5b2a14e8 | 16 | BuildRequires: meson >= 0.46.0 |
d0a251d8 | 17 | BuildRequires: ninja >= 1.5 |
b5e017bc | 18 | BuildRequires: pkgconfig >= 1:0.15 |
578fa3ed | 19 | BuildRequires: rpmbuild(macros) >= 1.737 |
cd45d277 JB |
20 | BuildRequires: tar >= 1:1.22 |
21 | BuildRequires: xz | |
d0a251d8 | 22 | Requires: crossmingw32-glib2 >= 2.38.0 |
7412a699 | 23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %define no_install_post_strip 1 | |
e7398ba1 | 26 | %define _enable_debug_packages 0 |
7412a699 | 27 | |
28 | %define target i386-mingw32 | |
29 | %define target_platform i386-pc-mingw32 | |
7412a699 | 30 | |
31 | %define _sysprefix /usr | |
32 | %define _prefix %{_sysprefix}/%{target} | |
83f64ac4 | 33 | %define _libdir %{_prefix}/lib |
7412a699 | 34 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
5a48950d | 35 | %define _dlldir /usr/share/wine/windows/system |
e0548e4b | 36 | %define __pkgconfig_provides %{nil} |
bd7db0ee | 37 | %define __pkgconfig_requires %{nil} |
05c0d9ac | 38 | # for meson 0.50+, keep __cc/__cxx as host compiler and pass %{target}-* in meson-cross.txt |
7412a699 | 39 | |
2c1f632c JB |
40 | %ifnarch %{ix86} |
41 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
42 | %define optflags -O2 | |
43 | %endif | |
e6ed5599 | 44 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
2c1f632c | 45 | %define filterout_ld -Wl,-z,.* |
e6ed5599 | 46 | %define filterout_c -f[-a-z0-9=]* |
2c1f632c | 47 | |
7412a699 | 48 | %description |
49 | The ATK library provides a set of interfaces for adding accessibility | |
50 | support to applications and graphical user interface toolkits. By | |
51 | supporting the ATK interfaces, an application or toolkit can be used | |
52 | as tools such as screen readers and magnifiers, and alternative input | |
53 | devices. | |
54 | ||
5a48950d JB |
55 | This package contains the cross version for Win32. |
56 | ||
7412a699 | 57 | %description -l pl.UTF-8 |
58 | Biblioteka ATK udostępnia zestaw interfejsów ułatwiających | |
59 | niepełnosprawnym korzystanie z aplikacji i poszczególnych elementów | |
e5c005db JB |
60 | graficznego interfejsu użytkownika. Poprzez wykorzystanie interfejsów |
61 | ATK, aplikacja lub element interfejsu może być używany z takimi | |
62 | narzędziami jak czytniki ekranu i narzędzia powiększające oraz | |
63 | alternatywnymi urządzeniami wejściowymi. | |
7412a699 | 64 | |
5a48950d JB |
65 | Ten pakiet zawiera wersję skrośną dla Win32. |
66 | ||
67 | %package static | |
b28b1bf5 JB |
68 | Summary: Static atk library (cross MinGW32 version) |
69 | Summary(pl.UTF-8): Statyczna biblioteka atk (wersja skrośna MinGW32) | |
5a48950d JB |
70 | Group: Development/Libraries |
71 | Requires: %{name} = %{version}-%{release} | |
72 | ||
73 | %description static | |
b28b1bf5 | 74 | Static atk library (cross MinGW32 version). |
5a48950d JB |
75 | |
76 | %description static -l pl.UTF-8 | |
b28b1bf5 | 77 | Statyczna biblioteka atk (wersja skrośna MinGW32). |
5a48950d JB |
78 | |
79 | %package dll | |
80 | Summary: DLL atk library for Windows | |
81 | Summary(pl.UTF-8): Biblioteka DLL atk dla Windows | |
82 | Group: Applications/Emulators | |
d0a251d8 | 83 | Requires: crossmingw32-glib2-dll >= 2.38.0 |
5a48950d JB |
84 | Requires: wine |
85 | ||
86 | %description dll | |
87 | DLL atk library for Windows. | |
88 | ||
89 | %description dll -l pl.UTF-8 | |
90 | Biblioteka DLL atk dla Windows. | |
7412a699 | 91 | |
92 | %prep | |
83f64ac4 | 93 | %setup -q -n %{realname}-%{version} |
7412a699 | 94 | |
5b2a14e8 JB |
95 | # enable static library |
96 | %{__sed} -i -e '/^libatk/ s/shared_library/library/' atk/meson.build | |
97 | ||
98 | cat > meson-cross.txt <<'EOF' | |
99 | [host_machine] | |
100 | system = 'windows' | |
101 | cpu_family = 'x86' | |
102 | cpu = 'i386' | |
103 | endian='little' | |
104 | [binaries] | |
05c0d9ac | 105 | c = '%{target}-gcc' |
5b2a14e8 JB |
106 | ar = '%{target}-ar' |
107 | windres = '%{target}-windres' | |
108 | pkgconfig = 'pkg-config' | |
109 | [properties] | |
5b2a14e8 | 110 | c_args = ['%(echo %{rpmcflags} | sed -e "s/ \+/ /g;s/ /', '/g")'] |
5b2a14e8 JB |
111 | EOF |
112 | ||
7412a699 | 113 | %build |
b5e017bc | 114 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig |
5b2a14e8 JB |
115 | %meson build \ |
116 | --cross-file meson-cross.txt \ | |
d0a251d8 JB |
117 | -Ddocs=false \ |
118 | -Dintrospection=false | |
5b2a14e8 | 119 | |
578fa3ed | 120 | %ninja_build -C build |
7412a699 | 121 | |
122 | %install | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
578fa3ed | 125 | %ninja_install -C build |
7412a699 | 126 | |
5a48950d | 127 | install -d $RPM_BUILD_ROOT%{_dlldir} |
5a41cc0a | 128 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
5a48950d JB |
129 | |
130 | %if 0%{!?debug:1} | |
131 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
132 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
133 | %endif | |
134 | ||
5a48950d | 135 | # runtime |
cd45d277 | 136 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale |
7412a699 | 137 | |
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
5a48950d | 141 | %files |
7412a699 | 142 | %defattr(644,root,root,755) |
143 | %doc AUTHORS NEWS README | |
5a48950d | 144 | %{_libdir}/libatk-1.0.dll.a |
5a48950d | 145 | %{_includedir}/atk-1.0 |
e5c005db | 146 | %{_pkgconfigdir}/atk.pc |
5a48950d JB |
147 | |
148 | %files static | |
149 | %defattr(644,root,root,755) | |
150 | %{_libdir}/libatk-1.0.a | |
151 | ||
152 | %files dll | |
153 | %defattr(644,root,root,755) | |
154 | %{_dlldir}/libatk-1.0-*.dll |