[PATCH] virt-manager: Basic compile environment for Windows (Cygwin)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The attached patch just fixes a few basic compile environment problems for virt-manager under Windows (Cygwin). It doesn't actually run after this, but it does at least compile without any errors.

(1) Added a package check for cairo.

(2) Add cairo CFLAGS and LIBS.

(3) Include <cairo.h>, which is needed because the code uses 'cairo_t'. Goodness knows how this works under Linux.

(4) Make scrollkeeper optional - it's a PITA to compile it under Cygwin, and it seems to be only needed for the help menus.

	-	-	-

Note that to use this you will first need to follow my instructions for compiling libvirt for Windows:

  http://libvirt.org/windows.html

Then you will need to install urlgrabber and virtinst from source (both compile fine).

Then you should install the Cygwin packages 'atk-devel', 'cairo' and 'glitz'.

After applying the patch attached below to the Mercurial version of virt-manager, you can do:

  autoreconf
  ./configure
  make

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
diff -r 562150b337ba configure.ac
--- a/configure.ac	Wed Nov 28 17:58:19 2007 -0500
+++ b/configure.ac	Thu Nov 29 19:46:53 2007 +0000
@@ -13,14 +13,20 @@ AC_PYTHON_DEVEL([>= '2.3.4'])
 
 PKG_CHECK_MODULES(PYGTK2, pygtk-2.0 >= 1.99.11)
 PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.2.0)
+PKG_CHECK_MODULES(CAIRO, cairo)
 
 dnl ====================================
 dnl = Begin tests for scrollkeeper
 dnl ====================================
 AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
 if test x$SCROLLKEEPER_CONFIG = xno; then
-  AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package: http://scrollkeeper.sourceforge.net)
+  AC_MSG_WARN([Couldn't find scrollkeeper-config.
+To get working help menus, please install the 'scrollkeeper' package:
+  http://scrollkeeper.sourceforge.net
+or its replacement 'rarian':
+  http://ftp.acc.umu.se/pub/gnome/sources/rarian/])
 fi
+AM_CONDITIONAL(HAVE_SCROLLKEEPER,[test "x$SCROLLKEEPER_CONFIG" != "xno"])
 dnl ====================================
 dnl = End tests for scrollkeeper
 dnl ====================================
diff -r 562150b337ba help/Makefile.am
--- a/help/Makefile.am	Wed Nov 28 17:58:19 2007 -0500
+++ b/help/Makefile.am	Thu Nov 29 19:46:53 2007 +0000
@@ -1,2 +1,6 @@ SUBDIRS = 						\
+if HAVE_SCROLLKEEPER
+
 SUBDIRS = 						\
 	virt-manager
+
+endif
diff -r 562150b337ba src/graphWidgets/Makefile.am
--- a/src/graphWidgets/Makefile.am	Wed Nov 28 17:58:19 2007 -0500
+++ b/src/graphWidgets/Makefile.am	Thu Nov 29 19:46:53 2007 +0000
@@ -25,7 +25,7 @@ sparkline_la_SOURCES = \
     sparkline.h
 
 sparkline_la_CFLAGS = -fPIC -Wall \
-    -DUSE_CAIRO=1 \
+    -DUSE_CAIRO=1 $(CAIRO_CFLAGS) \
     $(PYGTK2_CFLAGS) \
     $(GTK2_CFLAGS) \
     $(PYTHON_CPPFLAGS)
@@ -33,6 +33,7 @@ sparkline_la_LIBADD = \
 sparkline_la_LIBADD = \
     $(PYGTK2_LIBS) \
     $(GTK2_LIBS) \
+    $(CAIRO_LIBS) \
     $(PYTHON_LDFLAGS)
 
 sparkline_la_LDFLAGS = -module -avoid-version -fPIC
diff -r 562150b337ba src/graphWidgets/cellrenderersparkline.h
--- a/src/graphWidgets/cellrenderersparkline.h	Wed Nov 28 17:58:19 2007 -0500
+++ b/src/graphWidgets/cellrenderersparkline.h	Thu Nov 29 19:46:53 2007 +0000
@@ -22,6 +22,10 @@
 
 #include <pango/pango.h>
 #include <gtk/gtkcellrenderer.h>
+
+#if USE_CAIRO
+#include <cairo.h>
+#endif
 
 
 G_BEGIN_DECLS
diff -r 562150b337ba src/graphWidgets/sparkline.h
--- a/src/graphWidgets/sparkline.h	Wed Nov 28 17:58:19 2007 -0500
+++ b/src/graphWidgets/sparkline.h	Thu Nov 29 19:46:53 2007 +0000
@@ -23,6 +23,10 @@
 
 #include <pango/pango.h>
 #include <gtk/gtkdrawingarea.h>
+
+#if USE_CAIRO
+#include <cairo.h>
+#endif
 
 
 G_BEGIN_DECLS

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux