]>
Commit | Line | Data |
---|---|---|
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 | |
3 | %define realname glibmm | |
4 | Name: crossmingw32-%{realname} | |
5 | Version: 2.58.0 | |
6 | Release: 1 | |
7 | License: LGPL v2+ | |
8 | Group: Development/Libraries | |
9 | Source0: http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.58/%{realname}-%{version}.tar.xz | |
10 | # Source0-md5: 4a0402ac65a7c47424b4e21b81b079c0 | |
11 | Patch0: glibmm-mingw32.patch | |
12 | URL: http://www.gtkmm.org/ | |
13 | BuildRequires: autoconf >= 2.59 | |
14 | BuildRequires: automake >= 1:1.11 | |
15 | BuildRequires: crossmingw32-gcc-c++ >= 1:4.7 | |
16 | BuildRequires: crossmingw32-glib2 >= 2.56.0 | |
17 | BuildRequires: crossmingw32-libsigc++ >= 2.10.0 | |
18 | BuildRequires: crossmingw32-std-threads | |
19 | BuildRequires: libtool >= 2:2.0 | |
20 | BuildRequires: m4 | |
21 | BuildRequires: mm-common >= 0.9.10 | |
22 | BuildRequires: pkgconfig >= 1:0.15 | |
23 | BuildRequires: tar >= 1:1.22 | |
24 | BuildRequires: xz | |
25 | Requires: crossmingw32-gcc-c++ >= 1:4.7 | |
26 | Requires: crossmingw32-glib2 >= 2.56.0 | |
27 | Requires: crossmingw32-libsigc++ >= 2.10.0 | |
28 | Requires: crossmingw32-std-threads | |
29 | ExcludeArch: i386 | |
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 | |
36 | ||
37 | %define _sysprefix /usr | |
38 | %define _prefix %{_sysprefix}/%{target} | |
39 | %define _libdir %{_prefix}/lib | |
40 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
41 | %define _dlldir /usr/share/wine/windows/system | |
42 | %define __cc %{target}-gcc | |
43 | %define __cxx %{target}-g++ | |
44 | %define __pkgconfig_provides %{nil} | |
45 | %define __pkgconfig_requires %{nil} | |
46 | ||
47 | %ifnarch %{ix86} | |
48 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
49 | # now at least i486 is required for atomic operations | |
50 | %define optflags -O2 -march=i486 | |
51 | %endif | |
52 | # -z options are invalid for mingw linker, most of -f options are Linux-specific | |
53 | %define filterout_ld -Wl,-z,.* | |
54 | %define filterout_c -f[-a-z0-9=]* | |
55 | %define filterout_cxx -f[-a-z0-9=]* | |
56 | ||
57 | %description | |
58 | A C++ interface for glib library - cross MinGW32 version. | |
59 | ||
60 | %description -l pl.UTF-8 | |
61 | Interfejs C++ dla biblioteki glib - wersja skrośna MinGW32. | |
62 | ||
63 | %package static | |
64 | Summary: Static glibmm library (cross MinGW32 version) | |
65 | Summary(pl.UTF-8): Statyczna biblioteka glibmm (wersja skrośna MinGW32) | |
66 | Group: Development/Libraries | |
67 | Requires: %{name} = %{version}-%{release} | |
68 | ||
69 | %description static | |
70 | Static glibmm library (cross MinGW32 version). | |
71 | ||
72 | %description static -l pl.UTF-8 | |
73 | Statyczna biblioteka glibmm (wersja skrośna MinGW32). | |
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 | |
79 | Requires: crossmingw32-glib2-dll >= 2.56.0 | |
80 | Requires: crossmingw32-libsigc++-dll >= 2.10.0 | |
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 | ||
89 | %prep | |
90 | %setup -q -n %{realname}-%{version} | |
91 | %patch0 -p1 | |
92 | ||
93 | %build | |
94 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig | |
95 | %{__libtoolize} | |
96 | %{__aclocal} -I build | |
97 | %{__autoconf} | |
98 | %{__automake} | |
99 | # std-threads require at least WinXP API | |
100 | CPPFLAGS="%{rpmcppflags} -DWINVER=0x0501" | |
101 | # mingw32 requires gnu++11 (instead of c++11) for off[64]_t | |
102 | CXXFLAGS="%{rpmcxxflags} -std=gnu++11" | |
103 | %configure \ | |
104 | --target=%{target} \ | |
105 | --host=%{target} \ | |
106 | --disable-fulldocs \ | |
107 | --disable-silent-rules \ | |
108 | --enable-static | |
109 | ||
110 | %{__make} | |
111 | ||
112 | %install | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %{__make} install \ | |
116 | DESTDIR=$RPM_BUILD_ROOT | |
117 | ||
118 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
119 | %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
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 | ||
126 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{doc,devhelp} | |
127 | # use these from native glibmm if needed | |
128 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/glibmm-2.4/proc | |
129 | ||
130 | %clean | |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
133 | %files | |
134 | %defattr(644,root,root,755) | |
135 | %doc AUTHORS ChangeLog NEWS README | |
136 | %{_libdir}/libgiomm-2.4.dll.a | |
137 | %{_libdir}/libglibmm-2.4.dll.a | |
138 | %{_libdir}/libglibmm_generate_extra_defs-2.4.dll.a | |
139 | %{_libdir}/libgiomm-2.4.la | |
140 | %{_libdir}/libglibmm-2.4.la | |
141 | %{_libdir}/libglibmm_generate_extra_defs-2.4.la | |
142 | %dir %{_libdir}/giomm-2.4 | |
143 | %{_libdir}/giomm-2.4/include | |
144 | %dir %{_libdir}/glibmm-2.4 | |
145 | %{_libdir}/glibmm-2.4/include | |
146 | %{_includedir}/giomm-2.4 | |
147 | %{_includedir}/glibmm-2.4 | |
148 | %{_pkgconfigdir}/giomm-2.4.pc | |
149 | %{_pkgconfigdir}/glibmm-2.4.pc | |
150 | ||
151 | %files static | |
152 | %defattr(644,root,root,755) | |
153 | %{_libdir}/libgiomm-2.4.a | |
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) | |
159 | %{_dlldir}/libgiomm-2.4-*.dll | |
160 | %{_dlldir}/libglibmm-2.4-*.dll | |
161 | %{_dlldir}/libglibmm_generate_extra_defs-2.4-*.dll |