[libvirt] [libvirt-glib 1/5] Add various missing packages to libvirt-gobject-1.0.pc

--- libvirt-gobject-1.0.pc.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt-gobject-1.0.pc.in b/libvirt-gobject-1.0.pc.in index 5442ba4..3141e87 100644 --- a/libvirt-gobject-1.0.pc.in +++ b/libvirt-gobject-1.0.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@ Name: libvirt-gobject Version: @VERSION@ Description: libvirt GObject library -Requires: gobject-2.0 libvirt-gconfig-1.0 +Requires: gio-2.0 gobject-2.0 libvirt-gconfig-1.0 Libs: -L${libdir} -lvirt-gobject-1.0 -Libs.private: @LIBVIRT_LIBS@ +Requires.private: gthread-2.0 libvirt Cflags: -I${includedir}/libvirt-gobject-1.0 -- 1.7.7.3

It uses GMutex so it needs to be linked with gthread --- libvirt-gobject/Makefile.am | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libvirt-gobject/Makefile.am b/libvirt-gobject/Makefile.am index ec7b454..59d9b2d 100644 --- a/libvirt-gobject/Makefile.am +++ b/libvirt-gobject/Makefile.am @@ -64,15 +64,17 @@ libvirt_gobject_1_0_la_CFLAGS = \ -DLIBVIRT_GOBJECT_BUILD \ $(COVERAGE_CFLAGS) \ -I$(top_srcdir) \ - $(LIBVIRT_CFLAGS) \ - $(GOBJECT2_CFLAGS) \ $(GIO2_CFLAGS) \ + $(GOBJECT2_CFLAGS) \ + $(GTHREAD2_CFLAGS) \ + $(LIBVIRT_CFLAGS) \ $(LIBXML2_CFLAGS) \ $(WARN_CFLAGS) libvirt_gobject_1_0_la_LIBADD = \ - $(LIBVIRT_LIBS) \ - $(GOBJECT2_LIBS) \ $(GIO2_LIBS) \ + $(GOBJECT2_LIBS) \ + $(GTHREAD2_LIBS) \ + $(LIBVIRT_LIBS) \ ../libvirt-glib/libvirt-glib-1.0.la \ ../libvirt-gconfig/libvirt-gconfig-1.0.la \ $(CYGWIN_EXTRA_LIBADD) -- 1.7.7.3

On Tue, Nov 29, 2011 at 12:32:45PM +0100, Christophe Fergeau wrote:
It uses GMutex so it needs to be linked with gthread --- libvirt-gobject/Makefile.am | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/libvirt-gobject/Makefile.am b/libvirt-gobject/Makefile.am index ec7b454..59d9b2d 100644 --- a/libvirt-gobject/Makefile.am +++ b/libvirt-gobject/Makefile.am @@ -64,15 +64,17 @@ libvirt_gobject_1_0_la_CFLAGS = \ -DLIBVIRT_GOBJECT_BUILD \ $(COVERAGE_CFLAGS) \ -I$(top_srcdir) \ - $(LIBVIRT_CFLAGS) \ - $(GOBJECT2_CFLAGS) \ $(GIO2_CFLAGS) \ + $(GOBJECT2_CFLAGS) \ + $(GTHREAD2_CFLAGS) \ + $(LIBVIRT_CFLAGS) \ $(LIBXML2_CFLAGS) \ $(WARN_CFLAGS) libvirt_gobject_1_0_la_LIBADD = \ - $(LIBVIRT_LIBS) \ - $(GOBJECT2_LIBS) \ $(GIO2_LIBS) \ + $(GOBJECT2_LIBS) \ + $(GTHREAD2_LIBS) \ + $(LIBVIRT_LIBS) \ ../libvirt-glib/libvirt-glib-1.0.la \ ../libvirt-gconfig/libvirt-gconfig-1.0.la \ $(CYGWIN_EXTRA_LIBADD)
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Overriding PKG_CONFIG_PATH when generating LibvirtGObject-1.0.gir is wrong since this means that if glib/gio/... are installed in a prefix that is not one of the default pkg-config paths, then they won't be found. PKG_CONFIG_PATH is overridden so that g-ir-scanner can find LibvirtGLib-1.0 and LibvirtGConfig-1.0 in the build tree. Since g-ir-scanner provides --include-uninstalled for that purpose, use that instead. --- libvirt-gobject/Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libvirt-gobject/Makefile.am b/libvirt-gobject/Makefile.am index 59d9b2d..54907e7 100644 --- a/libvirt-gobject/Makefile.am +++ b/libvirt-gobject/Makefile.am @@ -118,15 +118,15 @@ CLEANFILES = $(BUILT_SOURCES) if WITH_GOBJECT_INTROSPECTION LibvirtGObject-1.0.gir: libvirt-gobject-1.0.la $(G_IR_SCANNER) Makefile.am - $(AM_V_GEN)PKG_CONFIG_PATH=$(top_builddir) $(G_IR_SCANNER) \ + $(AM_V_GEN)$(G_IR_SCANNER) \ --quiet \ --warn-all \ --namespace LibvirtGObject \ --nsversion 1.0 \ --include GObject-2.0 \ --include Gio-2.0 \ - --include LibvirtGLib-1.0 \ - --include LibvirtGConfig-1.0 \ + --include-uninstalled $(top_builddir)/libvirt-glib/LibvirtGLib-1.0.gir \ + --include-uninstalled $(top_builddir)/libvirt-gconfig/LibvirtGConfig-1.0.gir \ --identifier-prefix=GVir \ --symbol-prefix=gvir \ --library=$(builddir)/libvirt-gobject-1.0.la \ -- 1.7.7.3

On Tue, Nov 29, 2011 at 12:32:46PM +0100, Christophe Fergeau wrote:
Overriding PKG_CONFIG_PATH when generating LibvirtGObject-1.0.gir is wrong since this means that if glib/gio/... are installed in a prefix that is not one of the default pkg-config paths, then they won't be found. PKG_CONFIG_PATH is overridden so that g-ir-scanner can find LibvirtGLib-1.0 and LibvirtGConfig-1.0 in the build tree. Since g-ir-scanner provides --include-uninstalled for that purpose, use that instead. --- libvirt-gobject/Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Remove some redundant arguments (--pkg seems unneeded when --include is used), most include paths are unneeded, ... --- libvirt-gconfig/Makefile.am | 8 +++----- libvirt-glib/Makefile.am | 4 +--- libvirt-gobject/Makefile.am | 5 +---- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am index 22259c3..b8f3605 100644 --- a/libvirt-gconfig/Makefile.am +++ b/libvirt-gconfig/Makefile.am @@ -116,17 +116,15 @@ LibvirtGConfig-1.0.gir: libvirt-gconfig-1.0.la $(G_IR_SCANNER) Makefile.am --library=$(builddir)/libvirt-gconfig-1.0.la \ --output $@ \ -I$(top_srcdir) \ - -I$(top_builddir) \ $(LIBXML2_CFLAGS) \ --verbose \ - --pkg=gobject-2.0 \ --c-include="libvirt-gconfig/libvirt-gconfig.h" \ --pkg-export=libvirt-gconfig-1.0 \ - $(srcdir)/libvirt-gconfig.h \ + $(srcdir)/libvirt-gconfig.h \ $(GCONFIG_SOURCE_FILES:%=$(srcdir)/%) \ $(GCONFIG_HEADER_FILES:%=$(srcdir)/%) \ - $(builddir)/libvirt-gconfig-enum-types.c \ - $(builddir)/libvirt-gconfig-enum-types.h + $(builddir)/libvirt-gconfig-enum-types.c \ + $(builddir)/libvirt-gconfig-enum-types.h girdir = $(datadir)/gir-1.0 diff --git a/libvirt-glib/Makefile.am b/libvirt-glib/Makefile.am index 0638a64..ae4070f 100644 --- a/libvirt-glib/Makefile.am +++ b/libvirt-glib/Makefile.am @@ -47,11 +47,9 @@ LibvirtGLib-1.0.gir: libvirt-glib-1.0.la $(G_IR_SCANNER) Makefile.am --identifier-prefix=GVir \ --symbol-prefix=gvir \ --library=$(builddir)/libvirt-glib-1.0.la \ - --add-include-path=$(builddir) \ --output $@ \ -I$(top_srcdir) \ - -I$(srcdir) \ - --pkg=glib-2.0 \ + --verbose \ --pkg=gthread-2.0 \ --c-include="libvirt-glib/libvirt-glib.h" \ --pkg-export=libvirt-glib-1.0 \ diff --git a/libvirt-gobject/Makefile.am b/libvirt-gobject/Makefile.am index 54907e7..5aa1080 100644 --- a/libvirt-gobject/Makefile.am +++ b/libvirt-gobject/Makefile.am @@ -130,14 +130,11 @@ LibvirtGObject-1.0.gir: libvirt-gobject-1.0.la $(G_IR_SCANNER) Makefile.am --identifier-prefix=GVir \ --symbol-prefix=gvir \ --library=$(builddir)/libvirt-gobject-1.0.la \ - --add-include-path=$(top_builddir)/libvirt-glib \ - --add-include-path=$(top_builddir)/libvirt-gconfig \ --output $@ \ - -I$(top_srcdir) \ -I$(top_builddir) \ + -I$(top_srcdir) \ $(LIBXML2_CFLAGS) \ --verbose \ - --pkg=gobject-2.0 \ --pkg=gthread-2.0 \ --c-include="libvirt-gobject/libvirt-gobject.h" \ --pkg-export=libvirt-gobject-1.0 \ -- 1.7.7.3

On Tue, Nov 29, 2011 at 12:32:47PM +0100, Christophe Fergeau wrote:
Remove some redundant arguments (--pkg seems unneeded when --include is used), most include paths are unneeded, ... --- libvirt-gconfig/Makefile.am | 8 +++----- libvirt-glib/Makefile.am | 4 +--- libvirt-gobject/Makefile.am | 5 +---- 3 files changed, 5 insertions(+), 12 deletions(-)
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

libvirt-gconfig genum files are generated in $srcdir but g-ir-scanner was told to look for them in $builddir which didn't work so well :) --- libvirt-gconfig/Makefile.am | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am index b8f3605..f40d32e 100644 --- a/libvirt-gconfig/Makefile.am +++ b/libvirt-gconfig/Makefile.am @@ -121,10 +121,8 @@ LibvirtGConfig-1.0.gir: libvirt-gconfig-1.0.la $(G_IR_SCANNER) Makefile.am --c-include="libvirt-gconfig/libvirt-gconfig.h" \ --pkg-export=libvirt-gconfig-1.0 \ $(srcdir)/libvirt-gconfig.h \ - $(GCONFIG_SOURCE_FILES:%=$(srcdir)/%) \ - $(GCONFIG_HEADER_FILES:%=$(srcdir)/%) \ - $(builddir)/libvirt-gconfig-enum-types.c \ - $(builddir)/libvirt-gconfig-enum-types.h + $(libvirt_gconfig_1_0_la_HEADERS:%=$(srcdir)/%) \ + $(libvirt_gconfig_1_0_la_SOURCES:%=$(srcdir)/%) girdir = $(datadir)/gir-1.0 -- 1.7.7.3

On Tue, Nov 29, 2011 at 12:32:48PM +0100, Christophe Fergeau wrote:
libvirt-gconfig genum files are generated in $srcdir but g-ir-scanner was told to look for them in $builddir which didn't work so well :) --- libvirt-gconfig/Makefile.am | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am index b8f3605..f40d32e 100644 --- a/libvirt-gconfig/Makefile.am +++ b/libvirt-gconfig/Makefile.am @@ -121,10 +121,8 @@ LibvirtGConfig-1.0.gir: libvirt-gconfig-1.0.la $(G_IR_SCANNER) Makefile.am --c-include="libvirt-gconfig/libvirt-gconfig.h" \ --pkg-export=libvirt-gconfig-1.0 \ $(srcdir)/libvirt-gconfig.h \ - $(GCONFIG_SOURCE_FILES:%=$(srcdir)/%) \ - $(GCONFIG_HEADER_FILES:%=$(srcdir)/%) \ - $(builddir)/libvirt-gconfig-enum-types.c \ - $(builddir)/libvirt-gconfig-enum-types.h + $(libvirt_gconfig_1_0_la_HEADERS:%=$(srcdir)/%) \ + $(libvirt_gconfig_1_0_la_SOURCES:%=$(srcdir)/%)
NACK, this isn't correct. The enum files *are* generated in $builddir. The problem is that the libvirt-gconfig/Makefile.am rules are causing the generatd files to be included by make dist, so when you then unpack the dist you get the enums in $srcdir instead. Take a look at libvirt-gobject/Makefile.am which handles enums differently thus avoiding including them in the dist. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Tue, Nov 29, 2011 at 12:58:33PM +0000, Daniel P. Berrange wrote:
On Tue, Nov 29, 2011 at 12:32:48PM +0100, Christophe Fergeau wrote:
libvirt-gconfig genum files are generated in $srcdir but g-ir-scanner was told to look for them in $builddir which didn't work so well :) --- libvirt-gconfig/Makefile.am | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am index b8f3605..f40d32e 100644 --- a/libvirt-gconfig/Makefile.am +++ b/libvirt-gconfig/Makefile.am @@ -121,10 +121,8 @@ LibvirtGConfig-1.0.gir: libvirt-gconfig-1.0.la $(G_IR_SCANNER) Makefile.am --c-include="libvirt-gconfig/libvirt-gconfig.h" \ --pkg-export=libvirt-gconfig-1.0 \ $(srcdir)/libvirt-gconfig.h \ - $(GCONFIG_SOURCE_FILES:%=$(srcdir)/%) \ - $(GCONFIG_HEADER_FILES:%=$(srcdir)/%) \ - $(builddir)/libvirt-gconfig-enum-types.c \ - $(builddir)/libvirt-gconfig-enum-types.h + $(libvirt_gconfig_1_0_la_HEADERS:%=$(srcdir)/%) \ + $(libvirt_gconfig_1_0_la_SOURCES:%=$(srcdir)/%)
NACK, this isn't correct.
The enum files *are* generated in $builddir. The problem is that the libvirt-gconfig/Makefile.am rules are causing the generatd files to be included by make dist, so when you then unpack the dist you get the enums in $srcdir instead. Take a look at libvirt-gobject/Makefile.am which handles enums differently thus avoiding including them in the dist.
Ok, thanks a lot for the explanation. I'll post an updated patch, and this hunk needs to go from the patch cleaning up gir generation: diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am index 7f57aa5..b14bd92 100644 --- a/libvirt-gconfig/Makefile.am +++ b/libvirt-gconfig/Makefile.am @@ -117,6 +117,7 @@ LibvirtGConfig-1.0.gir: libvirt-gconfig-1.0.la $(G_IR_SCANNER) Makefile.am --symbol-prefix=gvir \ --library=$(builddir)/libvirt-gconfig-1.0.la \ --output $@ \ - -I$(top_builddir) \ -I$(top_srcdir) \ $(LIBXML2_CFLAGS) \ --verbose \ Christophe

Do not ship autogenerated glib enum definitions in the tarball, otherwise they won't get regenerated in the build directory when using a tarball, and rules trying to find these files in the build directory will fail (eg the gir generation rule) --- libvirt-gconfig/Makefile.am | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am index 4828fb9..b14bd92 100644 --- a/libvirt-gconfig/Makefile.am +++ b/libvirt-gconfig/Makefile.am @@ -62,11 +62,13 @@ GCONFIG_SOURCE_FILES = \ libvirt_gconfig_1_0_ladir = $(includedir)/libvirt-gconfig-1.0/libvirt-gconfig libvirt_gconfig_1_0_la_HEADERS = \ - $(GCONFIG_HEADER_FILES) \ + $(GCONFIG_HEADER_FILES) +nodist_libvirt_gconfig_1_0_la_HEADERS = \ $(builddir)/libvirt-gconfig-enum-types.h libvirt_gconfig_1_0_la_SOURCES = \ $(libvirt_gconfig_1_0_la_HEADERS) \ - $(GCONFIG_SOURCE_FILES) \ + $(GCONFIG_SOURCE_FILES) +nodist_libvirt_gconfig_1_0_la_SOURCES = \ $(builddir)/libvirt-gconfig-enum-types.c libvirt_gconfig_1_0_la_CFLAGS = \ -DDATADIR="\"$(datadir)\"" \ -- 1.7.7.3

On Tue, Nov 29, 2011 at 02:44:19PM +0100, Christophe Fergeau wrote:
Do not ship autogenerated glib enum definitions in the tarball, otherwise they won't get regenerated in the build directory when using a tarball, and rules trying to find these files in the build directory will fail (eg the gir generation rule) --- libvirt-gconfig/Makefile.am | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am index 4828fb9..b14bd92 100644 --- a/libvirt-gconfig/Makefile.am +++ b/libvirt-gconfig/Makefile.am @@ -62,11 +62,13 @@ GCONFIG_SOURCE_FILES = \
libvirt_gconfig_1_0_ladir = $(includedir)/libvirt-gconfig-1.0/libvirt-gconfig libvirt_gconfig_1_0_la_HEADERS = \ - $(GCONFIG_HEADER_FILES) \ + $(GCONFIG_HEADER_FILES) +nodist_libvirt_gconfig_1_0_la_HEADERS = \ $(builddir)/libvirt-gconfig-enum-types.h libvirt_gconfig_1_0_la_SOURCES = \ $(libvirt_gconfig_1_0_la_HEADERS) \ - $(GCONFIG_SOURCE_FILES) \ + $(GCONFIG_SOURCE_FILES) +nodist_libvirt_gconfig_1_0_la_SOURCES = \ $(builddir)/libvirt-gconfig-enum-types.c libvirt_gconfig_1_0_la_CFLAGS = \ -DDATADIR="\"$(datadir)\"" \
ACK looks good now Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Tue, Nov 29, 2011 at 12:32:44PM +0100, Christophe Fergeau wrote:
--- libvirt-gobject-1.0.pc.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvirt-gobject-1.0.pc.in b/libvirt-gobject-1.0.pc.in index 5442ba4..3141e87 100644 --- a/libvirt-gobject-1.0.pc.in +++ b/libvirt-gobject-1.0.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@ Name: libvirt-gobject Version: @VERSION@ Description: libvirt GObject library -Requires: gobject-2.0 libvirt-gconfig-1.0 +Requires: gio-2.0 gobject-2.0 libvirt-gconfig-1.0 Libs: -L${libdir} -lvirt-gobject-1.0 -Libs.private: @LIBVIRT_LIBS@ +Requires.private: gthread-2.0 libvirt Cflags: -I${includedir}/libvirt-gobject-1.0
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Christophe Fergeau
-
Daniel P. Berrange