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