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