Merge lp://qastaging/~kklimonda/couchdb-glib/gir-fixes into lp://qastaging/couchdb-glib

Proposed by Krzysztof Klimonda
Status: Merged
Approved by: Rodrigo Moya
Approved revision: 246
Merge reported by: Rodrigo Moya
Merged at revision: not available
Proposed branch: lp://qastaging/~kklimonda/couchdb-glib/gir-fixes
Merge into: lp://qastaging/couchdb-glib
Diff against target: 161 lines (+5/-104)
5 files modified
Makefile.am (+1/-1)
configure.ac (+0/-7)
couchdb-glib/Makefile.am (+2/-2)
desktopcouch-glib/Makefile.am (+2/-2)
m4/introspection.m4 (+0/-92)
To merge this branch: bzr merge lp://qastaging/~kklimonda/couchdb-glib/gir-fixes
Reviewer Review Type Date Requested Status
Rodrigo Moya (community) Approve
Review via email: mp+33310@code.qastaging.launchpad.net

Description of the change

Changed couchdb-glib/Makefile.am to use $(datadir)/gir-1.0 and
$(libdir)/girepository-1.0 instead of INTROSPECTION_TYPELIBDIR
and INTROSPECTION_GIRDIR. That's because using those variables is the
wrong way of finding installation directory and it breaks local installations
(even if prefix is set to something else then /usr .gir and .typelib
is being installed in /usr - that doesn't work if user has no persmissions
to write there.

Also removed conditional check from configure.ac which prevented users from
building couchdb-glib with --enable-introspection=no. It may be that there
is a problem somewhere (haven't seen it myself) but if so the problem should
be located and not the workaround created.

To post a comment you must log in.
245. By Krzysztof Klimonda

Don't use INTROSPECTION_TYPELIBDIR and INTROSPECTION_GIRDIR in Makefile.am

246. By Krzysztof Klimonda

Don't ship our own m4/introspection.m4 file.

Outdated version of this file has been the reason for hack in configure.ac
Instead of shipping this file we can Build-Depend on gobject-introspection
package.

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Wouldn't it be better to use $(PKG_CONFIG) --variable=... to get those directories?

$ pkg-config --variable=girdir gobject-introspection-1.0
/opt/extra/share/gir-1.0
$ pkg-config --variable=typelibdir gobject-introspection-1.0
/opt/extra/lib64/girepository-1.0

Also, we don't have the m4 directory in the source tree, so no need to remove that.

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

using pkg-config won't work if we don't have gobject-introspection installed in our prefix:

$ pkg-config --variable=typelibdir gobject-introspection-1.0
/usr/lib/girepository-1.0
$ export PKG_CONFIG_PATH=/home/kklimonda/local/lib/pkgconfig/
$ pkg-config --variable=typelibdir gobject-introspection-1.0
/usr/lib/girepository-1.0

in this case the installation will still fail. Yes, such an installation is probably broken because applications won't find .typelib and .gir files (unless some other env is set) but still there are some good reasons to do that (like for example testing some fix for couchdb-glib itself that's unrelated to gir).

As for m4/ directory I don't quite understand your comment - I have removed it from the source tree after all. Could you elaborate?

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

> using pkg-config won't work if we don't have gobject-introspection installed
> in our prefix:
>
> $ pkg-config --variable=typelibdir gobject-introspection-1.0
> /usr/lib/girepository-1.0
> $ export PKG_CONFIG_PATH=/home/kklimonda/local/lib/pkgconfig/
> $ pkg-config --variable=typelibdir gobject-introspection-1.0
> /usr/lib/girepository-1.0
>
right, so just add those 2 commands in a:

GOBJECT_INTROSPECTION_CHECK(...)

if "x$have_introspection" = "xyes"; then
  call pkg_config....

> in this case the installation will still fail. Yes, such an installation is
> probably broken because applications won't find .typelib and .gir files
> (unless some other env is set) but still there are some good reasons to do
> that (like for example testing some fix for couchdb-glib itself that's
> unrelated to gir).
>
> As for m4/ directory I don't quite understand your comment - I have removed it
> from the source tree after all. Could you elaborate?

well, the diff shows a m4/introspection.m4 being removed, and that file is not in the repo, AFAICS, right?

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

> right, so just add those 2 commands in a:
>
> GOBJECT_INTROSPECTION_CHECK(...)
>
> if "x$have_introspection" = "xyes"; then
> call pkg_config....
>

I guess that may also work - my fix is from GObject Introspection documentation (or rather wiki page about autotools integration: http://live.gnome.org/GObjectIntrospection/AutotoolsIntegration)

> > As for m4/ directory I don't quite understand your comment - I have removed
> it
> > from the source tree after all. Could you elaborate?
>
> well, the diff shows a m4/introspection.m4 being removed, and that file is not
> in the repo, AFAICS, right?

Hmm.. It's both here: http://bazaar.launchpad.net/~vcs-imports/couchdb-glib/trunk/files/head%3A/m4/ and here: http://git.gnome.org/browse/couchdb-glib/tree/m4. I think we may have some sort of interference on the line and we are talking about some different things :).

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Ok, I didn't realize we had the m4 file in git, so yeah, looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches