]>
Commit | Line | Data |
---|---|---|
bc13ea8e JB |
1 | Summary: A C++ interface for glib library - cross MinGW32 version |
2 | Summary(pl.UTF-8): Interfejs C++ dla biblioteki glib - wersja skrośna MinGW32 | |
03cf31c3 JB |
3 | %define realname glibmm |
4 | Name: crossmingw32-%{realname} | |
437b9e14 | 5 | Version: 2.66.7 |
7700f46c | 6 | Release: 1 |
fa9e202d | 7 | License: LGPL v2+ |
759ce599 | 8 | Group: Development/Libraries |
7e0f286f | 9 | Source0: https://download.gnome.org/sources/glibmm/2.66/%{realname}-%{version}.tar.xz |
437b9e14 | 10 | # Source0-md5: c6edf4cc986adec2a6d21e7423bad7d1 |
15f7ed63 | 11 | Patch0: glibmm-mingw32.patch |
545e7450 | 12 | URL: https://www.gtkmm.org/ |
bc13ea8e | 13 | BuildRequires: autoconf >= 2.59 |
85f6f607 | 14 | BuildRequires: automake >= 1:1.11 |
7bc3f178 | 15 | BuildRequires: crossmingw32-gcc-c++ >= 1:4.7 |
545e7450 | 16 | BuildRequires: crossmingw32-glib2 >= 2.62.0 |
4d8dadaf | 17 | BuildRequires: crossmingw32-libsigc++ >= 2.10.0 |
15f7ed63 | 18 | BuildRequires: crossmingw32-std-threads |
35bf2c84 | 19 | BuildRequires: libtool >= 2:2.0 |
bc13ea8e | 20 | BuildRequires: m4 |
15f7ed63 | 21 | BuildRequires: mm-common >= 0.9.10 |
441179cf JB |
22 | BuildRequires: perl-XML-Parser |
23 | BuildRequires: perl-base | |
fa9e202d | 24 | BuildRequires: pkgconfig >= 1:0.15 |
03a6960c JB |
25 | BuildRequires: tar >= 1:1.22 |
26 | BuildRequires: xz | |
7bc3f178 | 27 | Requires: crossmingw32-gcc-c++ >= 1:4.7 |
545e7450 | 28 | Requires: crossmingw32-glib2 >= 2.62.0 |
4d8dadaf | 29 | Requires: crossmingw32-libsigc++ >= 2.10.0 |
15f7ed63 | 30 | Requires: crossmingw32-std-threads |
a99b5429 | 31 | ExcludeArch: i386 |
cbc44f5b | 32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
34 | %define no_install_post_strip 1 | |
3667c1ce | 35 | %define _enable_debug_packages 0 |
cbc44f5b | 36 | |
37 | %define target i386-mingw32 | |
38 | %define target_platform i386-pc-mingw32 | |
cbc44f5b | 39 | |
40 | %define _sysprefix /usr | |
41 | %define _prefix %{_sysprefix}/%{target} | |
32a5567a | 42 | %define _libdir %{_prefix}/lib |
759ce599 JB |
43 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
44 | %define _dlldir /usr/share/wine/windows/system | |
cbc44f5b | 45 | %define __cc %{target}-gcc |
46 | %define __cxx %{target}-g++ | |
de0bc545 | 47 | %define __pkgconfig_provides %{nil} |
be43f551 | 48 | %define __pkgconfig_requires %{nil} |
cbc44f5b | 49 | |
d573ab95 JB |
50 | %ifnarch %{ix86} |
51 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
a99b5429 JB |
52 | # now at least i486 is required for atomic operations |
53 | %define optflags -O2 -march=i486 | |
d573ab95 | 54 | %endif |
e882ae34 | 55 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
d573ab95 | 56 | %define filterout_ld -Wl,-z,.* |
e882ae34 JB |
57 | %define filterout_c -f[-a-z0-9=]* |
58 | %define filterout_cxx -f[-a-z0-9=]* | |
d573ab95 | 59 | |
cbc44f5b | 60 | %description |
bc13ea8e | 61 | A C++ interface for glib library - cross MinGW32 version. |
cbc44f5b | 62 | |
f45ed5c9 | 63 | %description -l pl.UTF-8 |
bc13ea8e | 64 | Interfejs C++ dla biblioteki glib - wersja skrośna MinGW32. |
cbc44f5b | 65 | |
759ce599 | 66 | %package static |
bc13ea8e JB |
67 | Summary: Static glibmm library (cross MinGW32 version) |
68 | Summary(pl.UTF-8): Statyczna biblioteka glibmm (wersja skrośna MinGW32) | |
759ce599 JB |
69 | Group: Development/Libraries |
70 | Requires: %{name} = %{version}-%{release} | |
71 | ||
72 | %description static | |
bc13ea8e | 73 | Static glibmm library (cross MinGW32 version). |
759ce599 JB |
74 | |
75 | %description static -l pl.UTF-8 | |
bc13ea8e | 76 | Statyczna biblioteka glibmm (wersja skrośna MinGW32). |
759ce599 JB |
77 | |
78 | %package dll | |
79 | Summary: DLL glibmm library for Windows | |
80 | Summary(pl.UTF-8): Biblioteka DLL glibmm dla Windows | |
81 | Group: Applications/Emulators | |
545e7450 | 82 | Requires: crossmingw32-glib2-dll >= 2.62.0 |
4d8dadaf | 83 | Requires: crossmingw32-libsigc++-dll >= 2.10.0 |
759ce599 JB |
84 | Requires: wine |
85 | ||
86 | %description dll | |
87 | DLL glibmm library for Windows. | |
88 | ||
89 | %description dll -l pl.UTF-8 | |
90 | Biblioteka DLL glibmm dla Windows. | |
91 | ||
cbc44f5b | 92 | %prep |
03cf31c3 | 93 | %setup -q -n %{realname}-%{version} |
15f7ed63 | 94 | %patch0 -p1 |
cbc44f5b | 95 | |
96 | %build | |
667b9562 | 97 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig |
2a6d148d | 98 | mm-common-prepare --copy --force |
cbc44f5b | 99 | %{__libtoolize} |
6b2b65e2 | 100 | %{__aclocal} -I build |
cbc44f5b | 101 | %{__autoconf} |
2a6d148d | 102 | %{__autoheader} |
cbc44f5b | 103 | %{__automake} |
7bc3f178 JB |
104 | # std-threads require at least WinXP API |
105 | CPPFLAGS="%{rpmcppflags} -DWINVER=0x0501" | |
b6e3aa78 JB |
106 | # mingw32 requires gnu++11 (instead of c++11) for off[64]_t |
107 | CXXFLAGS="%{rpmcxxflags} -std=gnu++11" | |
cbc44f5b | 108 | %configure \ |
b7ddf918 | 109 | --target=%{target} \ |
cbc44f5b | 110 | --host=%{target} \ |
7e0f286f | 111 | --disable-documentation \ |
2a6d148d | 112 | --enable-maintainer-mode \ |
4d8dadaf | 113 | --disable-silent-rules \ |
b7ddf918 | 114 | --enable-static |
cbc44f5b | 115 | |
116 | %{__make} | |
117 | ||
118 | %install | |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
121 | %{__make} install \ | |
122 | DESTDIR=$RPM_BUILD_ROOT | |
123 | ||
759ce599 | 124 | install -d $RPM_BUILD_ROOT%{_dlldir} |
7bc3f178 | 125 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} |
759ce599 | 126 | |
8aa54ffe JB |
127 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la |
128 | ||
759ce599 JB |
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 | ||
759ce599 | 134 | # use these from native glibmm if needed |
03a6960c | 135 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/glibmm-2.4/proc |
759ce599 | 136 | |
cbc44f5b | 137 | %clean |
138 | rm -rf $RPM_BUILD_ROOT | |
139 | ||
140 | %files | |
141 | %defattr(644,root,root,755) | |
437b9e14 | 142 | %doc ChangeLog NEWS README.md |
e5e7a5f4 | 143 | %{_libdir}/libgiomm-2.4.dll.a |
759ce599 JB |
144 | %{_libdir}/libglibmm-2.4.dll.a |
145 | %{_libdir}/libglibmm_generate_extra_defs-2.4.dll.a | |
e5e7a5f4 JB |
146 | %dir %{_libdir}/giomm-2.4 |
147 | %{_libdir}/giomm-2.4/include | |
03cf31c3 JB |
148 | %dir %{_libdir}/glibmm-2.4 |
149 | %{_libdir}/glibmm-2.4/include | |
e5e7a5f4 | 150 | %{_includedir}/giomm-2.4 |
03cf31c3 | 151 | %{_includedir}/glibmm-2.4 |
e5e7a5f4 | 152 | %{_pkgconfigdir}/giomm-2.4.pc |
759ce599 JB |
153 | %{_pkgconfigdir}/glibmm-2.4.pc |
154 | ||
155 | %files static | |
156 | %defattr(644,root,root,755) | |
e5e7a5f4 | 157 | %{_libdir}/libgiomm-2.4.a |
759ce599 JB |
158 | %{_libdir}/libglibmm-2.4.a |
159 | %{_libdir}/libglibmm_generate_extra_defs-2.4.a | |
160 | ||
161 | %files dll | |
162 | %defattr(644,root,root,755) | |
b04e9929 JB |
163 | %{_dlldir}/libgiomm-2.4-1.dll |
164 | %{_dlldir}/libglibmm-2.4-1.dll | |
165 | %{_dlldir}/libglibmm_generate_extra_defs-2.4-1.dll |