[Gambas-devel] Gentoo ebuild and patches

Boian Berberov bberberov at ...176...
Wed Sep 10 17:13:40 CEST 2008


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.

*** 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.

*** 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

*** 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.

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.

*** 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.

*** 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.

*** 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.

*** 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.

If I make some more patches for the build system (autoconf and make files),
or revise some, would you consider adopting them?  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

On Tue, Sep 9, 2008 at 05:30, Benoit Minisini
<gambas at ...1...>wrote:

> On vendredi 05 septembre 2008, Boian Berberov wrote:
> > Gambas Developers,
> >
> > I have been writing an updated ebuild (making a new package) for your
> > software for Gentoo Linux.  You can view some of the progress here:
> > http://bugs.gentoo.org/show_bug.cgi?id=229821
> >
> > Quite a few patches have accumulated that are needed to build Gambas for
> > Gentoo.  Please review these patches and consider them for inclusion:
> > gambas-2.7.0-r1-gb.qt-QT_LDFLAGS.patch -
> > http://bugs.gentoo.org/attachment.cgi?id=161148
> > gambas-2.7.0-r1-help-GB_INIT_SHORT.patch -
> > http://bugs.gentoo.org/attachment.cgi?id=161149
> > gambas-2.8.0-sdl-component-name.patch -
> > http://bugs.gentoo.org/attachment.cgi?id=163347
> >
> > If you reject certain patches, could you explain why you cannot adopt
> them.
> > I may make alternative patches and try to submit those at a later date.
> >
> > Boian Berberov
>
> Hi,
>
> I looked at your patches at bugs.gentoo.org, and here are my comments:
>
> *** gambas-2.7.0-r1-gb.qt-QT_LDFLAGS.patch
>
> I don't understand this patch. @QT_LDFLAGS@ is logically needed, they are
> the
> flags coming from pkg-config, so they should not be removed.
>
> *** gambas-2.7.0-r1-help-GB_INIT_SHORT.patch
>
> OK. There is no need to use GB_INIT there.
>
> *** gambas-2.7.0-r1-libtool-and-FLAGS.patch
>
> Please explain the difference between AC_LIBLTDL_CONVENIENCE and
> AC_WITH_LTDL.
>
> Why are you removing the "--enable-optimization" configure flag?
>
> *** gambas-2.7.0-r1-remove-libltdl-from-main.patch
>
> Why are you removing the use of the local libltdl sources?
>
> *** gambas-2.8.0-help-path.patch
>
> OK. It seems to be a fix, and a better way of doing the same thing. Can you
> confirm?
>
> And why did you replace $(LN_S) by "ln -s"?
>
> *** gambas-2.8.0-libtool.patch
>
> Please explain the difference between AC_LIBLTDL_CONVENIENCE and
> AC_WITH_LTDL.
>
> *** gambas-2.8.0-sdl-component-name.patch
>
> Why did you rename the component name?
>
> *** gambas-2.8.2-FLAGS.patch
>
> Why did you remove the "--enable-optimization" configure flag?
>
> Why did you force optimization to "-O3"? I carefully use it on specific
> source
> files, because gcc is not reliable with this optimization, and sometimes
> -O3
> can be slower than -Os.
>
> *** gambas-2.8.2-app-Makefile-install.patch
> *** gambas-2.8.2-comp-Makefile-install.patch
> *** gambas-2.8.2-examples-Makefile-install.patch
>
> OK. It seems to be a better and cleaner way to do the same thing. Can you
> confirm?
>
> Well, thanks anyway for fixing my autoconf && automake files. This
> configuration system is horrible when you try to do something uncommon.
>
> Regards,
>
> --
> Benoit Minisini
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20080910/abb13e3d/attachment.html>


More information about the Devel mailing list