Recent Ruby: 'depend' files must be changed

Hello all.

I am using Ruby from Matz’s SVN repository. Last time I updated, I
found out that the compilation mechanism of ruby-gnome2 fails to
install most of the newly compiled .so files.

I have found out how to solve the problem locally. What happens is
that mkmf now includes an ‘install-so’ target in the makefile. Thus,
when I run make, for several libraries I get warning like these:

Makefile:223: warning: overriding commands for target install-so' Makefile:167: warning: ignoring old commands for targetinstall-so’

But then, when doing make install, the new library archives are not
copied over the old ones in /usr/local/lib/ruby.

This happens because, in several of the ‘depend’ files, both targets
‘install’ and ‘install-so’ are defined.

I got the mechanism to work by eliminating ‘install-so’. For example,
in the case of glib2, I changed file glib2/ext/glib2/depend from:

–8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<–
install-so:
$(INSTALL_DATA) $(srcdir)/rbglib.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbglibdeprecated.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbglib2conversions.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbgutil.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbgutil_list.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbgutildeprecated.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbgobject.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbgcompat.h $(RUBYARCHDIR)
$(INSTALL_DATA) glib-enum-types.h $(RUBYARCHDIR)

install:
if test -n “$(pkgconfigdir)”; then
$(MAKEDIRS) $(pkgconfigdir);
$(INSTALL_DATA) ruby-glib2.pc $(pkgconfigdir);
fi
–8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<–

to

–8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<–
install:
$(INSTALL_DATA) $(srcdir)/rbglib.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbglibdeprecated.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbglib2conversions.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbgutil.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbgutil_list.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbgutildeprecated.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbgobject.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbgcompat.h $(RUBYARCHDIR)
$(INSTALL_DATA) glib-enum-types.h $(RUBYARCHDIR)
if test -n “$(pkgconfigdir)”; then
$(MAKEDIRS) $(pkgconfigdir);
$(INSTALL_DATA) ruby-glib2.pc $(pkgconfigdir);
fi
–8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<–

Since I do not know exactly how this mechanism works, I cannot say if
this is the right way to solve the problem, but I eventually had a
successful install.

I attach a diff file.

Carlo

Hi,

In [email protected]
“[ruby-gnome2-devel-en] Recent Ruby: ‘depend’ files must be changed”
on Mon, 12 Nov 2012 07:23:32 +0100,
“Carlo E. Prelz” [email protected] wrote:

But then, when doing make install, the new library archives are not
copied over the old ones in /usr/local/lib/ruby.

This happens because, in several of the ‘depend’ files, both targets
‘install’ and ‘install-so’ are defined.

Thanks for your report!
I didn’t notice it.

I got the mechanism to work by eliminating ‘install-so’. For example,
in the case of glib2, I changed file glib2/ext/glib2/depend from:

I think the following approach is better because some
packagers use install-so to install *.so and *.h files:

diff --git a/glib2/ext/glib2/depend b/glib2/ext/glib2/depend
index f601650…6e517c2 100644
— a/glib2/ext/glib2/depend
+++ b/glib2/ext/glib2/depend
@@ -1,4 +1,5 @@
-install-so:
+install-so: install-headers
+install-headers:
$(INSTALL_DATA) $(srcdir)/rbglib.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbglibdeprecated.h $(RUBYARCHDIR)
$(INSTALL_DATA) $(srcdir)/rbglib2conversions.h $(RUBYARCHDIR)

If you can send a pull request on GitHub with the approach,
I’ll merge it. If you cannot it, I’ll do it later.

Thanks,

kou

Subject: Re: [ruby-gnome2-devel-en] Recent Ruby: ‘depend’ files must be
changed
Date: Wed 14 Nov 12 10:48:11PM +0900

Quoting Kouhei S. ([email protected]):

If you can send a pull request on GitHub with the approach,
I’ll merge it. If you cannot it, I’ll do it later.

The whole concept of “send a pull request on GitHub” is a bit hazy
here - I confess I find git often confusing and counterintuitive.

I am sure the world can wait.

Carlo

  •     Se la Strada e la sua Virtu' non fossero state messe da 
    

parte,

  • K * Carlo E. Prelz - [email protected] che bisogno ci
    sarebbe
    •           di parlare tanto di amore e di rettitudine? 
      

(Chuang-Tzu)

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] Recent Ruby: ‘depend’ files must be
changed” on Thu, 15 Nov 2012 21:37:23 +0900 (JST),
Kouhei S. [email protected] wrote:

If you can send a pull request on GitHub with the approach,
I’ll merge it. If you cannot it, I’ll do it later.

The whole concept of “send a pull request on GitHub” is a bit hazy
here - I confess I find git often confusing and counterintuitive.

I am sure the world can wait.

OK. I’ll do it later.
Thanks for your report. It was very helpful.

I’ve fixed it in master.

Thanks,

kou

Subject: Re: [ruby-gnome2-devel-en] Recent Ruby: ‘depend’ files must be
changed
Date: Thu 22 Nov 12 10:01:25PM +0900

Quoting Kouhei S. ([email protected]):

I’ve fixed it in master.

Many thanks, as usual…

Carlo

  •     Se la Strada e la sua Virtu' non fossero state messe da 
    

parte,

  • K * Carlo E. Prelz - [email protected] che bisogno ci
    sarebbe
    •           di parlare tanto di amore e di rettitudine? 
      

(Chuang-Tzu)

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] Recent Ruby: ‘depend’ files must be
changed” on Thu, 15 Nov 2012 07:15:37 +0100,
“Carlo E. Prelz” [email protected] wrote:

I am sure the world can wait.

OK. I’ll do it later.
Thanks for your report. It was very helpful.

Thanks,

kou