1 Summary: C++ wrapper for cairo - cross MinGW32 version
2 Summary(pl.UTF-8): Interfejs C++ do cairo - wersja skrośna dla MinGW32
3 %define realname cairomm
4 Name: crossmingw32-%{realname}
8 Group: Development/Libraries
9 Source0: https://www.cairographics.org/releases/%{realname}-%{version}.tar.xz
10 # Source0-md5: fbcaad2d3756b42592fe8c92b39945f5
11 URL: https://www.cairographics.org/
12 BuildRequires: crossmingw32-cairo >= 1.12.0
13 BuildRequires: crossmingw32-gcc-c++ >= 1:4.6
14 BuildRequires: crossmingw32-libsigc++ >= 2.6.0
15 BuildRequires: meson >= 0.50.0
16 BuildRequires: mm-common >= 1.0.0
17 BuildRequires: ninja >= 1.5
18 BuildRequires: pkgconfig >= 1:0.15
19 BuildRequires: python3 >= 1:3.5
20 BuildRequires: rpmbuild(macros) >= 1.736
21 BuildRequires: tar >= 1:1.22
23 Requires: crossmingw32-cairo >= 1.12.0
24 Requires: crossmingw32-gcc-c++ >= 1:4.6
25 Requires: crossmingw32-libsigc++ >= 2.6.0
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define no_install_post_strip 1
30 %define target i386-mingw32
31 %define target_platform i386-pc-mingw32
33 %define _sysprefix /usr
34 %define _prefix %{_sysprefix}/%{target}
35 %define _libdir %{_prefix}/lib
36 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
37 %define _dlldir /usr/share/wine/windows/system
38 %define __cc %{target}-gcc
39 %define __cxx %{target}-g++
40 %define __pkgconfig_provides %{nil}
41 %define __pkgconfig_requires %{nil}
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 %define filterout_cxx -f[-a-z0-9=]*
49 C++ wrapper for cairo (cross MinGW32 version).
51 %description -l pl.UTF-8
52 Interfejs C++ do cairo (wersja skrośna MinGW32).
55 Summary: Static cairomm library (cross MinGW32 version)
56 Summary(pl.UTF-8): Statyczna biblioteka cairomm (wersja skrośna MinGW32)
57 Group: Development/Libraries
58 Requires: %{name} = %{version}-%{release}
61 Static cairomm library (cross MinGW32 version).
63 %description static -l pl.UTF-8
64 Statyczna biblioteka cairomm (wersja skrośna MinGW32).
67 Summary: DLL cairomm library for Windows
68 Summary(pl.UTF-8): Biblioteka DLL cairomm dla Windows
69 Group: Applications/Emulators
70 Requires: crossmingw32-cairo-dll >= 1.12.0
71 Requires: crossmingw32-libsigc++-dll >= 2.6.0
74 DLL cairomm library for Windows.
76 %description dll -l pl.UTF-8
77 Biblioteka DLL cairomm dla Windows.
80 %setup -q -n %{realname}-%{version}
82 cat > meson-cross.txt <<'EOF'
92 windres = '%{target}-windres'
93 pkgconfig = 'pkg-config'
96 c_args = ['%(echo %{rpmcflags} | sed -e "s/ \+/ /g;s/ /', '/g")']
98 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc.
99 # now at least i486 is required for atomic operations
105 export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig
107 --cross-file meson-cross.txt
109 %ninja_build -C build
112 rm -rf $RPM_BUILD_ROOT
114 %ninja_install -C build
116 install -d $RPM_BUILD_ROOT%{_dlldir}
117 %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
120 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
121 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
125 rm -rf $RPM_BUILD_ROOT
128 %defattr(644,root,root,755)
129 %doc AUTHORS ChangeLog MAINTAINERS NEWS README
130 %{_libdir}/libcairomm-1.0.dll.a
131 %{_libdir}/cairomm-1.0
132 %{_includedir}/cairomm-1.0
133 %{_pkgconfigdir}/cairomm-1.0.pc
134 %{_pkgconfigdir}/cairomm-ft-1.0.pc
135 %{_pkgconfigdir}/cairomm-pdf-1.0.pc
136 %{_pkgconfigdir}/cairomm-png-1.0.pc
137 %{_pkgconfigdir}/cairomm-ps-1.0.pc
138 %{_pkgconfigdir}/cairomm-svg-1.0.pc
139 %{_pkgconfigdir}/cairomm-win32-1.0.pc
140 %{_pkgconfigdir}/cairomm-win32-font-1.0.pc
143 %defattr(644,root,root,755)
144 %{_libdir}/libcairomm-1.0.a
147 %defattr(644,root,root,755)
148 %{_dlldir}/libcairomm-1.0-1.dll