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