]> git.pld-linux.org Git - packages/crossmingw32-cairomm.git/blob - crossmingw32-cairomm.spec
- meson build requires mm-common 1.0.0
[packages/crossmingw32-cairomm.git] / crossmingw32-cairomm.spec
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}
5 Version:        1.14.2
6 Release:        1
7 License:        LGPL v2+
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
22 BuildRequires:  xz
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)
27
28 %define         no_install_post_strip   1
29
30 %define         target                  i386-mingw32
31 %define         target_platform         i386-pc-mingw32
32
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}
42
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=]*
47
48 %description
49 C++ wrapper for cairo (cross MinGW32 version).
50
51 %description -l pl.UTF-8
52 Interfejs C++ do cairo (wersja skrośna MinGW32).
53
54 %package static
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}
59
60 %description static
61 Static cairomm library (cross MinGW32 version).
62
63 %description static -l pl.UTF-8
64 Statyczna biblioteka cairomm (wersja skrośna MinGW32).
65
66 %package dll
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
72
73 %description dll
74 DLL cairomm library for Windows.
75
76 %description dll -l pl.UTF-8
77 Biblioteka DLL cairomm dla Windows.
78
79 %prep
80 %setup -q -n %{realname}-%{version}
81
82 cat > meson-cross.txt <<'EOF'
83 [host_machine]
84 system = 'windows'
85 cpu_family = 'x86'
86 cpu = 'i386'
87 endian='little'
88 [binaries]
89 c = '%{target}-gcc'
90 cpp = '%{target}-g++'
91 ar = '%{target}-ar'
92 windres = '%{target}-windres'
93 pkgconfig = 'pkg-config'
94 [properties]
95 %ifarch %{ix86}
96 c_args = ['%(echo %{rpmcflags} | sed -e "s/ \+/ /g;s/ /', '/g")']
97 %else
98 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc.
99 # now at least i486 is required for atomic operations
100 c_args = ['-O2']
101 %endif
102 EOF
103
104 %build
105 export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig
106 %meson build \
107         --cross-file meson-cross.txt
108
109 %ninja_build -C build
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113
114 %ninja_install -C build
115
116 install -d $RPM_BUILD_ROOT%{_dlldir}
117 %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
118
119 %if 0%{!?debug:1}
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
122 %endif
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %files
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
141
142 %files static
143 %defattr(644,root,root,755)
144 %{_libdir}/libcairomm-1.0.a
145
146 %files dll
147 %defattr(644,root,root,755)
148 %{_dlldir}/libcairomm-1.0-1.dll
This page took 0.084858 seconds and 3 git commands to generate.