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: 0974ef291d491f22df287f588580677d
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
29 %define _enable_debug_packages 0
31 %define target i386-mingw32
32 %define target_platform i386-pc-mingw32
34 %define _sysprefix /usr
35 %define _prefix %{_sysprefix}/%{target}
36 %define _libdir %{_prefix}/lib
37 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
38 %define _dlldir /usr/share/wine/windows/system
39 %define __cc %{target}-gcc
40 %define __cxx %{target}-g++
41 %define __pkgconfig_provides %{nil}
42 %define __pkgconfig_requires %{nil}
44 # -z options are invalid for mingw linker, most of -f options are Linux-specific
45 %define filterout_ld -Wl,-z,.*
46 %define filterout_c -f[-a-z0-9=]*
47 %define filterout_cxx -f[-a-z0-9=]*
50 C++ wrapper for cairo (cross MinGW32 version).
52 %description -l pl.UTF-8
53 Interfejs C++ do cairo (wersja skrośna MinGW32).
56 Summary: Static cairomm library (cross MinGW32 version)
57 Summary(pl.UTF-8): Statyczna biblioteka cairomm (wersja skrośna MinGW32)
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
62 Static cairomm library (cross MinGW32 version).
64 %description static -l pl.UTF-8
65 Statyczna biblioteka cairomm (wersja skrośna MinGW32).
68 Summary: DLL cairomm library for Windows
69 Summary(pl.UTF-8): Biblioteka DLL cairomm dla Windows
70 Group: Applications/Emulators
71 Requires: crossmingw32-cairo-dll >= 1.12.0
72 Requires: crossmingw32-libsigc++-dll >= 2.6.0
75 DLL cairomm library for Windows.
77 %description dll -l pl.UTF-8
78 Biblioteka DLL cairomm dla Windows.
81 %setup -q -n %{realname}-%{version}
83 cat > meson-cross.txt <<'EOF'
93 windres = '%{target}-windres'
94 pkgconfig = 'pkg-config'
97 c_args = ['%(echo %{rpmcflags} | sed -e "s/ \+/ /g;s/ /', '/g")']
99 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc.
100 # now at least i486 is required for atomic operations
106 export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig
108 --cross-file meson-cross.txt
110 %ninja_build -C build
113 rm -rf $RPM_BUILD_ROOT
115 %ninja_install -C build
117 install -d $RPM_BUILD_ROOT%{_dlldir}
118 %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
121 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
122 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
126 rm -rf $RPM_BUILD_ROOT
129 %defattr(644,root,root,755)
130 %doc ChangeLog NEWS README.md
131 %{_libdir}/libcairomm-1.0.dll.a
132 %{_libdir}/cairomm-1.0
133 %{_includedir}/cairomm-1.0
134 %{_pkgconfigdir}/cairomm-1.0.pc
135 %{_pkgconfigdir}/cairomm-ft-1.0.pc
136 %{_pkgconfigdir}/cairomm-pdf-1.0.pc
137 %{_pkgconfigdir}/cairomm-png-1.0.pc
138 %{_pkgconfigdir}/cairomm-ps-1.0.pc
139 %{_pkgconfigdir}/cairomm-svg-1.0.pc
140 %{_pkgconfigdir}/cairomm-win32-1.0.pc
141 %{_pkgconfigdir}/cairomm-win32-font-1.0.pc
144 %defattr(644,root,root,755)
145 %{_libdir}/libcairomm-1.0.a
148 %defattr(644,root,root,755)
149 %{_dlldir}/libcairomm-1.0-1.dll