Mageia Bugzilla – Attachment 2507 Details for
Bug 4609
Virt-Manager shows: "Cannot display graphical console" type 'spice': no module named SpiceClientGtk
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to build with gtk+2 and ship python module
spice-gtk-enable-python.patch (text/plain), 4.06 KB, created by
Buchan Milne
on 2012-06-29 16:10:15 CEST
(
hide
)
Description:
Patch to build with gtk+2 and ship python module
Filename:
MIME Type:
Creator:
Buchan Milne
Created:
2012-06-29 16:10:15 CEST
Size:
4.06 KB
patch
obsolete
>Index: SPECS/spice-gtk.spec >=================================================================== >--- SPECS/spice-gtk.spec (revision 262778) >+++ SPECS/spice-gtk.spec (working copy) >@@ -4,7 +4,7 @@ > %define glibmajor 1 > %define libglib %mklibname spice-client-glib %{glibapi} %{glibmajor} > %define glibgir %mklibname spice-client-glib-gir %{glibapi} >-%define gtkapi 3.0 >+%global gtkapi 2.0 > %define gtkmajor 1 > %define libgtk %mklibname spice-client-gtk %{gtkapi} %{gtkmajor} > %define gtkgir %mklibname spice-client-gtk-gir %{gtkapi} >@@ -28,8 +28,10 @@ > BuildRequires: pkgconfig(gobject-2.0) > BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.9.4 > BuildRequires: pkgconfig(gthread-2.0) > 2.0.0 >+%if "%gtkapi" == "3.0" > BuildRequires: pkgconfig(gtk+-3.0) >= 2.91.3 > BuildRequires: pkgconfig(gtk+-x11-3.0) >+%endif > BuildRequires: pkgconfig(gudev-1.0) > BuildRequires: pkgconfig(libcacard) >= 0.1.2 > BuildRequires: pkgconfig(libpulse) >@@ -66,7 +68,9 @@ > %package -n %{libglib} > Summary: Runtime libraries for %{name} > Group: System/Libraries >+%if "%gtkapi" == "3.0" > Conflicts: %{_lib}spice-gtk3.0_1 < 0.7.81-2 >+%endif > > %description -n %{libglib} > Runtime libraries for %{name}. >@@ -75,7 +79,9 @@ > Summary: GObject introspection interface library for %{name} > Group: System/Libraries > Requires: %{libglib} = %{version}-%{release} >+%if "%gtkapi" == "3.0" > Conflicts: %{_lib}spice-gtk3.0_1 < 0.7.81-2 >+%endif > > %description -n %{glibgir} > GObject introspection interface library for %{name}. >@@ -83,7 +89,9 @@ > %package -n %{libgtk} > Summary: Runtime libraries for %{name} > Group: System/Libraries >+%if "%gtkapi" == "3.0" > Obsoletes: %{_lib}spice-gtk3.0_1 < 0.7.81-2 >+%endif > > %description -n %{libgtk} > Runtime libraries for %{name}. >@@ -92,7 +100,9 @@ > Summary: GObject introspection interface library for %{name} > Group: System/Libraries > Requires: %{libgtk} = %{version}-%{release} >+%if "%gtkapi" == "3.0" > Conflicts: %{_lib}spice-gtk3.0_1 < 0.7.81-2 >+%endif > > %description -n %{gtkgir} > GObject introspection interface library for %{name}. >@@ -100,7 +110,9 @@ > %package -n %{libcontroller} > Summary: Runtime libraries for %{name} > Group: System/Libraries >+%if "%gtkapi" == "3.0" > Conflicts: %{_lib}spice-gtk3.0_1 < 0.7.81-2 >+%endif > > %description -n %{libcontroller} > Runtime libraries for %{name}. >@@ -112,11 +124,22 @@ > Requires: %{libgtk} = %{version}-%{release} > Requires: %{libcontroller} = %{version}-%{release} > Provides: %{name}-devel = %{version}-%{release} >+%if "%gtkapi" == "3.0" > Obsoletes: %{_lib}spice-gtk3.0-devel < 0.7.81-2 >+%endif > > %description -n %{develname} > Development files for %{name}. > >+%if "%gtkapi" == "2.0" >+%package -n python-spice-client-gtk >+Summary: Python module SpiceGtkClient >+Group: Python >+ >+%description -n python-spice-client-gtk >+Python module SpiceGtkClient, required for SPICE support in virt-manager. >+%endif >+ > %prep > %setup -q > %apply_patches >@@ -125,6 +148,7 @@ > autoreconf -ifv > %configure2_5x \ > --with-gtk=%{gtkapi} \ >+ --with-python=yes \ > --disable-static \ > %if %{build_vala} > --enable-vala \ >@@ -177,16 +201,16 @@ > %files -n %{develname} > %doc %{_datadir}/gtk-doc/html/spice-gtk > %{_includedir}/spice-client-glib-2.0 >-%{_includedir}/spice-client-gtk-3.0/ >+%{_includedir}/spice-client-gtk-%{gtkapi}/ > %{_includedir}/spice-controller/ > %{_libdir}/libspice-client-glib-2.0.so >-%{_libdir}/libspice-client-gtk-3.0.so >+%{_libdir}/libspice-client-gtk-%{gtkapi}.so > %{_libdir}/libspice-controller.so > %{_libdir}/pkgconfig/spice-client-glib-2.0.pc >-%{_libdir}/pkgconfig/spice-client-gtk-3.0.pc >+%{_libdir}/pkgconfig/spice-client-gtk-%{gtkapi}.pc > %{_libdir}/pkgconfig/spice-controller.pc > %{_datadir}/gir-1.0/SpiceClientGLib-2.0.gir >-%{_datadir}/gir-1.0/SpiceClientGtk-3.0.gir >+%{_datadir}/gir-1.0/SpiceClientGtk-%{gtkapi}.gir > %if %{build_vala} > %{_datadir}/vala/vapi/spice-protocol.vapi > %{_datadir}/vala/vapi/spice-client-glib-%{glibapi}.deps >@@ -194,3 +218,10 @@ > %{_datadir}/vala/vapi/spice-client-gtk-%{gtkapi}.deps > %{_datadir}/vala/vapi/spice-client-gtk-%{gtkapi}.vapi > %endif >+ >+%if "%gtkapi" == "2.0" >+%files -n python-spice-client-gtk >+%python_sitearch/SpiceClientGtk* >+%endif >+ >+
Index: SPECS/spice-gtk.spec =================================================================== --- SPECS/spice-gtk.spec (revision 262778) +++ SPECS/spice-gtk.spec (working copy) @@ -4,7 +4,7 @@ %define glibmajor 1 %define libglib %mklibname spice-client-glib %{glibapi} %{glibmajor} %define glibgir %mklibname spice-client-glib-gir %{glibapi} -%define gtkapi 3.0 +%global gtkapi 2.0 %define gtkmajor 1 %define libgtk %mklibname spice-client-gtk %{gtkapi} %{gtkmajor} %define gtkgir %mklibname spice-client-gtk-gir %{gtkapi} @@ -28,8 +28,10 @@ BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) >= 0.9.4 BuildRequires: pkgconfig(gthread-2.0) > 2.0.0 +%if "%gtkapi" == "3.0" BuildRequires: pkgconfig(gtk+-3.0) >= 2.91.3 BuildRequires: pkgconfig(gtk+-x11-3.0) +%endif BuildRequires: pkgconfig(gudev-1.0) BuildRequires: pkgconfig(libcacard) >= 0.1.2 BuildRequires: pkgconfig(libpulse) @@ -66,7 +68,9 @@ %package -n %{libglib} Summary: Runtime libraries for %{name} Group: System/Libraries +%if "%gtkapi" == "3.0" Conflicts: %{_lib}spice-gtk3.0_1 < 0.7.81-2 +%endif %description -n %{libglib} Runtime libraries for %{name}. @@ -75,7 +79,9 @@ Summary: GObject introspection interface library for %{name} Group: System/Libraries Requires: %{libglib} = %{version}-%{release} +%if "%gtkapi" == "3.0" Conflicts: %{_lib}spice-gtk3.0_1 < 0.7.81-2 +%endif %description -n %{glibgir} GObject introspection interface library for %{name}. @@ -83,7 +89,9 @@ %package -n %{libgtk} Summary: Runtime libraries for %{name} Group: System/Libraries +%if "%gtkapi" == "3.0" Obsoletes: %{_lib}spice-gtk3.0_1 < 0.7.81-2 +%endif %description -n %{libgtk} Runtime libraries for %{name}. @@ -92,7 +100,9 @@ Summary: GObject introspection interface library for %{name} Group: System/Libraries Requires: %{libgtk} = %{version}-%{release} +%if "%gtkapi" == "3.0" Conflicts: %{_lib}spice-gtk3.0_1 < 0.7.81-2 +%endif %description -n %{gtkgir} GObject introspection interface library for %{name}. @@ -100,7 +110,9 @@ %package -n %{libcontroller} Summary: Runtime libraries for %{name} Group: System/Libraries +%if "%gtkapi" == "3.0" Conflicts: %{_lib}spice-gtk3.0_1 < 0.7.81-2 +%endif %description -n %{libcontroller} Runtime libraries for %{name}. @@ -112,11 +124,22 @@ Requires: %{libgtk} = %{version}-%{release} Requires: %{libcontroller} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} +%if "%gtkapi" == "3.0" Obsoletes: %{_lib}spice-gtk3.0-devel < 0.7.81-2 +%endif %description -n %{develname} Development files for %{name}. +%if "%gtkapi" == "2.0" +%package -n python-spice-client-gtk +Summary: Python module SpiceGtkClient +Group: Python + +%description -n python-spice-client-gtk +Python module SpiceGtkClient, required for SPICE support in virt-manager. +%endif + %prep %setup -q %apply_patches @@ -125,6 +148,7 @@ autoreconf -ifv %configure2_5x \ --with-gtk=%{gtkapi} \ + --with-python=yes \ --disable-static \ %if %{build_vala} --enable-vala \ @@ -177,16 +201,16 @@ %files -n %{develname} %doc %{_datadir}/gtk-doc/html/spice-gtk %{_includedir}/spice-client-glib-2.0 -%{_includedir}/spice-client-gtk-3.0/ +%{_includedir}/spice-client-gtk-%{gtkapi}/ %{_includedir}/spice-controller/ %{_libdir}/libspice-client-glib-2.0.so -%{_libdir}/libspice-client-gtk-3.0.so +%{_libdir}/libspice-client-gtk-%{gtkapi}.so %{_libdir}/libspice-controller.so %{_libdir}/pkgconfig/spice-client-glib-2.0.pc -%{_libdir}/pkgconfig/spice-client-gtk-3.0.pc +%{_libdir}/pkgconfig/spice-client-gtk-%{gtkapi}.pc %{_libdir}/pkgconfig/spice-controller.pc %{_datadir}/gir-1.0/SpiceClientGLib-2.0.gir -%{_datadir}/gir-1.0/SpiceClientGtk-3.0.gir +%{_datadir}/gir-1.0/SpiceClientGtk-%{gtkapi}.gir %if %{build_vala} %{_datadir}/vala/vapi/spice-protocol.vapi %{_datadir}/vala/vapi/spice-client-glib-%{glibapi}.deps @@ -194,3 +218,10 @@ %{_datadir}/vala/vapi/spice-client-gtk-%{gtkapi}.deps %{_datadir}/vala/vapi/spice-client-gtk-%{gtkapi}.vapi %endif + +%if "%gtkapi" == "2.0" +%files -n python-spice-client-gtk +%python_sitearch/SpiceClientGtk* +%endif + +
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 4609
: 2507