[Gambas-devel] Gentoo ebuild and patches

Benoit Minisini gambas at ...1...
Wed Sep 10 19:44:09 CEST 2008


On mercredi 10 septembre 2008, Boian Berberov wrote:
> Benoit,
>
> I am going to try to explain why I made each patch below.  These comments
> are based on the gambas 2.8.2 tarball that is downloadable through
> sourceforge:
>
> *** gambas-2.7.0-r1-gb.qt-QT_LDFLAGS.patch
> GB_COMPONENT is used instead of GB_COMPONENT_PKG_CONFIG in
> qt.gb/configure.ac.  From what I understand, the variables removed by this
> patch are simply not produced in this case.  This caused the build process
> to fail so I made the patch to remove the missing variables.

OK.

>
> *** gambas-2.7.0-r1-help-GB_INIT_SHORT.patch
> I thought so.  I do not remember if it was necessarily causing problems,
> and that is why I created it, or if it simply reduces autoreconf time.
>

OK.

> *** gambas-2.7.0-r1-libtool-and-FLAGS.patch
> This patch is no longer used and has been split into the
> gambas-2.8.0-libtool.patch and the gambas-2.8.2-FLAGS.patch

OK.

>
> *** gambas-2.7.0-r1-remove-libltdl-from-main.patch
> This is a Gentoo-specific patch working together with
> gambas-2.8.0-libtool.patch. See below.
>
> *** gambas-2.8.0-help-path.patch
> This patch was revised several times and originally it had a different
> purpose.  Currently, it simply prevents the copying of the tar file.
> Originally, it also changed the install location of the help directory, but
> then I realized that I do not know if that location is relevant within the
> Gambas IDE so I reverted that.

It is relevant. The help files must be located into 
$(GAMBAS_INSTALL_DIR)/share/gambas2/help

>
> I am not sure why I am forced to use "ln -s" instead of $(LN_S) in the
> ebuild, but I know that it does not work.  I believe that is a
> Gentoo-specific issue so I would not advise you to adopt this particular
> replacement.

OK.

>
> *** gambas-2.8.0-libtool.patch
> This is a Gentoo-specific patch working together with
> gambas-2.7.0-r1-remove-libltdl-from-main.patch.  The original problem of
> the bug was that Gambas was failing to build with libtool 2.2.4.  The way I
> fixed this problem was by removing libtool, to the best of my ability, and
> running autoreconf, to recreate it.  I believe this replacement (in the
> patch) causes autoreconf to use the local copy of libltdl instead of the
> provided one.

I have libtool 1.5 on my Mandriva 2008.1 yet.

>
> *** gambas-2.8.0-sdl-component-name.patch
> gb.sdl.sound/configure.ac lists the component name as sdl_sound:
>
> ...
> dnl check for SDL libs
> GB_COMPONENT(
>   sdl_sound,
>   SDL_SOUND,
> ...
>
> When --enable-sdlsound is passed to ./configure, the component does not
> enable because of the name difference. (sdlsound <-> sdl_sound) I do not
> remember but I think --enable-sdl_sound did not work either.  This patch
> makes the two names the same.

So I will do the contrary! I will replace 'sdl_sound' by 'sdlsound' 
and 'SDL_SOUND' by 'SDLSOUND'.

>
> *** gambas-2.8.2-FLAGS.patch
> This is a Gentoo-specific patch, although I am not sure this is the best
> way to do things.
>
> Gentoo users are supposed to do all the optimizations by themselves.  In
> general, their FLAGS should take precedence, unless this causes a build
> failure.  At least that is how I understand the Gentoo philosophy.
>
> You are right.  I probably should not force the -O3 on AM_CFLAGS_OPT. I
> believed that you had a compelling reason to use -03 so I left is alone.
> -O3 is not recommended by Gentoo so the majority of users will not have it
> set. Normally I would have to track down the usage of AM_CFLAGS_OPT and
> remove it, but I have not gotten that far yet, plus if there is a reason
> for it, it might be worth it to leave it alone.

OK.

>
> *** gambas-2.8.2-app-Makefile-install.patch
> *** gambas-2.8.2-comp-Makefile-install.patch
> *** gambas-2.8.2-examples-Makefile-install.patch
> I implemented these patches because .gambas files that were not building
> correctly were still being installed.  I rewrote these patches about three
> times and I am still not sure they are the best way to handle things, but
> at least the package has better chances of getting updated in Gentoo now,
> IMHO.

OK.

>
> If I make some more patches for the build system (autoconf and make files),
> or revise some, would you consider adopting them?  

Of course, I already did. But it depends on the patch.

> I will try to make them 
> distribution/OS-neutral, but I do not use many different OSs so someone
> else will have to test them for compatibility.
>
> Boian Berberov
>

Well, I think one more brain is not superfluous to deal with autoconf & 
automake!

Regards,

-- 
Benoit Minisini




More information about the Devel mailing list