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