[PATCH] Another Qt/gtk configure patch

classic Classic list List threaded Threaded
11 messages Options
Wols Lists Wols Lists
Reply | Threaded
Open this post in threaded view
|

[PATCH] Another Qt/gtk configure patch

I've now got configure autodetecting Qt4, and created an "automagic"
patch. Things are still partly broken because to fix things properly I
need to get rid of OOO_WIDGET_FLAGS, and that's probably a big job ...

Anyways, the patch does the following:

Adds a new --enable-automagic option. As the help says, if enabled, the
default is to switch on everything it finds. If disabled it won't switch
anything on by default. But at present, the only thing it works on is
Qt4 and gtk2.

kde3 support is now disabled by default.

kde4 support is now autodetected, and enabled by default unless you
specify otherwise. Like gtk2, if you specify it and it isn't there, it
will give you an error (can someone test this, I've got kde4 on my
system so I haven't ... :-)

I said it's partly broken because of OOO_WIDGET_FLAGS - I know I've
added enable-automagic to LibreOfficeLinuxDevel.conf.in but it doesn't
do anything there because of OOO_WIDGET_FLAGS, you have to specify it on
the ./autogen.sh command line instead :-( So fixing that is on my todo
list ... :-)

But at least we can get rid of all that "you need
--enable/disable-kde/kde4" crap on the "how to build" and tell newbies
"just use --enable-automagic".

Has anybody still got a KDE3 system? Can you send me the relevant
pkg-config file from /usr/libX/pkgconfig/ so I can try and get that to
autodetect?

And does anybody just happen to know how important OOO_WIDGET_FLAGS is?
If I can just ditch it and move the autodetect stuff into
libreoffice.../configure.in, it'll make life much simpler ...

Cheers,
Wol

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

0001-Create-automagic-option-and-apply-it-to-gtk-kde-tool.patch (4K) Download Attachment
spaetz spaetz
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Another Qt/gtk configure patch

On Mon, 01 Nov 2010 22:18:46 +0000, Wols Lists wrote:
> I've now got configure autodetecting Qt4, and created an "automagic"
> patch. Things are still partly broken because to fix things properly I
> need to get rid of OOO_WIDGET_FLAGS, and that's probably a big job ...

> Adds a new --enable-automagic option.

Shouldn't automagic be the default? ie building support for whatever is
available on the machine sounds a sensible default to
me. People/Packagebuilder can still manually enable/disable support fot
things.

/me shrugs. Not sure.

Sebastian
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Wols Lists Wols Lists
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Another Qt/gtk configure patch

On 02/11/10 08:54, Sebastian Spaeth wrote:

> On Mon, 01 Nov 2010 22:18:46 +0000, Wols Lists wrote:
>> I've now got configure autodetecting Qt4, and created an "automagic"
>> patch. Things are still partly broken because to fix things properly I
>> need to get rid of OOO_WIDGET_FLAGS, and that's probably a big job ...
>> Adds a new --enable-automagic option.
> Shouldn't automagic be the default? ie building support for whatever is
> available on the machine sounds a sensible default to
> me. People/Packagebuilder can still manually enable/disable support fot
> things.
>
I get the impression it isn't. Do we really want to enable a bunch of
obscure options by default? cf the discussion we just had about
binfilter (although I gather that's slightly different :-)

Anyways, we've now got the option - configure will by default set up a
sane bunch of options, while automagic will force all defaults to either
"on" or "off".

In particular, there's a page on the gentoo wiki (I've put a pointer to
it in our development wiki) that says that automatically enabling things
can be a packager's nightmare. They've only got to miss a "disable" for
some weird option they happen to have installed, and next thing they
know they've shipped a package that depends on this weird option - AND
DOESN'T DOCUMENT THAT FACT!

That's why, imho, "disable-automagic" is important (and that's why it's
called magic not matic :-). If that happens, it's now an upstream bug,
not a silly packager. And it's easy for us to fix each option as we add
it, not so easy for them to spot we've enabled something obscure.

> /me shrugs. Not sure.
>
> Sebastian

Cheers,
Wol
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Norbert Thiebaud Norbert Thiebaud
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Another Qt/gtk configure patch

In reply to this post by spaetz
On Tue, Nov 2, 2010 at 3:54 AM, Sebastian Spaeth <[hidden email]> wrote:

> On Mon, 01 Nov 2010 22:18:46 +0000, Wols Lists wrote:
>> I've now got configure autodetecting Qt4, and created an "automagic"
>> patch. Things are still partly broken because to fix things properly I
>> need to get rid of OOO_WIDGET_FLAGS, and that's probably a big job ...
>
>> Adds a new --enable-automagic option.
>
> Shouldn't automagic be the default? ie building support for whatever is
> available on the machine sounds a sensible default to
> me. People/Packagebuilder can still manually enable/disable support fot
> things.

+1
Norbert

>
> /me shrugs. Not sure.
>
> Sebastian
> _______________________________________________
> LibreOffice mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Norbert Thiebaud Norbert Thiebaud
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Another Qt/gtk configure patch

In reply to this post by Wols Lists
On Tue, Nov 2, 2010 at 4:10 AM, Wols Lists <[hidden email]> wrote:

> On 02/11/10 08:54, Sebastian Spaeth wrote:
>> On Mon, 01 Nov 2010 22:18:46 +0000, Wols Lists wrote:
>>> I've now got configure autodetecting Qt4, and created an "automagic"
>>> patch. Things are still partly broken because to fix things properly I
>>> need to get rid of OOO_WIDGET_FLAGS, and that's probably a big job ...
>>> Adds a new --enable-automagic option.
>> Shouldn't automagic be the default? ie building support for whatever is
>> available on the machine sounds a sensible default to
>> me. People/Packagebuilder can still manually enable/disable support fot
>> things.
>>
> I get the impression it isn't. Do we really want to enable a bunch of
> obscure options by default? cf the discussion we just had about
> binfilter (although I gather that's slightly different :-)
>
> Anyways, we've now got the option - configure will by default set up a
> sane bunch of options, while automagic will force all defaults to either
> "on" or "off".
>
> In particular, there's a page on the gentoo wiki (I've put a pointer to
> it in our development wiki) that says that automatically enabling things
> can be a packager's nightmare. They've only got to miss a "disable" for
> some weird option they happen to have installed, and next thing they
> know they've shipped a package that depends on this weird option - AND
> DOESN'T DOCUMENT THAT FACT!

How about a --packager-mode kind of flag, that will yell at you if you
forgot to explicitly choose a value ?


>
> That's why, imho, "disable-automagic" is important (and that's why it's
> called magic not matic :-). If that happens, it's now an upstream bug,
> not a silly packager. And it's easy for us to fix each option as we add
> it, not so easy for them to spot we've enabled something obscure.
>
>> /me shrugs. Not sure.
>>
>> Sebastian
>
> Cheers,
> Wol
> _______________________________________________
> LibreOffice mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Rene Engelhard Rene Engelhard
Reply | Threaded
Open this post in threaded view
|

--enable-automagic (was: Re: [PATCH] Another Qt/gtk configure patch)

In reply to this post by Wols Lists
On Tue, Nov 02, 2010 at 09:10:23AM +0000, Wols Lists wrote:
> In particular, there's a page on the gentoo wiki (I've put a pointer to
> it in our development wiki) that says that automatically enabling things
> can be a packager's nightmare. They've only got to miss a "disable" for

True.

> some weird option they happen to have installed, and next thing they
> know they've shipped a package that depends on this weird option - AND
> DOESN'T DOCUMENT THAT FACT!

This is not a big deal for runtime deps, both rpm and deb have mechanisms to
find out what libs executables/libs need and putting them into Depends.. If you
have a own system, you have to implement such stuff on your own anyways, so...

For build-dependencies you're right, that can get a nightmare. Or you
forget one option, and in a clean chroot the package is not installed -> feature
not there.
Or even worse, you get additional stuff in "unclean" chroots you didn't expect
and maybe don't even want.

> That's why, imho, "disable-automagic" is important (and that's why it's
> called magic not matic :-). If that happens, it's now an upstream bug,
> not a silly packager. And it's easy for us to fix each option as we add
> it, not so easy for them to spot we've enabled something obscure.

Though, but a --enable/--dsiable-automagic is not senseful either.

Grüße/Regards,

René
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Lubos Lunak Lubos Lunak
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Another Qt/gtk configure patch

In reply to this post by Wols Lists
On Monday 01 of November 2010, Wols Lists wrote:
> Has anybody still got a KDE3 system? Can you send me the relevant
> pkg-config file from /usr/libX/pkgconfig/ so I can try and get that to
> autodetect?

 KDE3 does not provide pkgconfig files, only Qt3. You can check what is
provided e.g. at
http://download.opensuse.org/repositories/KDE:/KDE3/openSUSE_11.3/x86_64/ 
(qt3-devel and kdelibs3-devel packages).

 Also, just checking for QtCore.pc and enabling KDE4 support based on that is
wrong. Presence of libQtCore neither means all required Qt4 libraries are
present nor KDE4 is present.

--
 Lubos Lunak
 [hidden email]
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Wols Lists Wols Lists
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Another Qt/gtk configure patch

On 02/11/10 13:23, Lubos Lunak wrote:
> On Monday 01 of November 2010, Wols Lists wrote:
>> Has anybody still got a KDE3 system? Can you send me the relevant
>> pkg-config file from /usr/libX/pkgconfig/ so I can try and get that to
>> autodetect?
>  KDE3 does not provide pkgconfig files, only Qt3. You can check what is
> provided e.g. at
> http://download.opensuse.org/repositories/KDE:/KDE3/openSUSE_11.3/x86_64/ 
> (qt3-devel and kdelibs3-devel packages).
Thanks. I'll take a look.
>  Also, just checking for QtCore.pc and enabling KDE4 support based on that is
> wrong. Presence of libQtCore neither means all required Qt4 libraries are
> present nor KDE4 is present.
>
I had a nasty suspicion that might be the case. But that means digging
into libreoffice.../configure.in (which I was expecting to have to do,
anyway ...)

Is KDE support fundamentally different from gtk support? Bearing in mind
that OOo seems to treat them as equivalent, but KDE is a DE while gtk is
a toolkit?

The main aim was to improve on what we had at present :-)

Bearing in mind the automagic stuff as well, it looks like I'm going to
be redoing that, so I might as well redo this at the same time. Hey-ho.

Cheers,
Wol
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Wols Lists Wols Lists
Reply | Threaded
Open this post in threaded view
|

Re: --enable-automagic

In reply to this post by Rene Engelhard
On 02/11/10 12:34, Rene Engelhard wrote:

> On Tue, Nov 02, 2010 at 09:10:23AM +0000, Wols Lists wrote:
>> In particular, there's a page on the gentoo wiki (I've put a pointer to
>> it in our development wiki) that says that automatically enabling things
>> can be a packager's nightmare. They've only got to miss a "disable" for
> True.
>
>> some weird option they happen to have installed, and next thing they
>> know they've shipped a package that depends on this weird option - AND
>> DOESN'T DOCUMENT THAT FACT!
> This is not a big deal for runtime deps, both rpm and deb have mechanisms to
> find out what libs executables/libs need and putting them into Depends.. If you
> have a own system, you have to implement such stuff on your own anyways, so...

I need to re-read that gentoo page (as a gentoo user I really ought to
make sure I understand it :-)

And not all distros use rpm/deb :-) the whole point of the gentoo page
iiui is that upstream sometimes do silly things that makes their life
difficult.

> For build-dependencies you're right, that can get a nightmare. Or you
> forget one option, and in a clean chroot the package is not installed -> feature
> not there.
> Or even worse, you get additional stuff in "unclean" chroots you didn't expect
> and maybe don't even want.
>
>> That's why, imho, "disable-automagic" is important (and that's why it's
>> called magic not matic :-). If that happens, it's now an upstream bug,
>> not a silly packager. And it's easy for us to fix each option as we add
>> it, not so easy for them to spot we've enabled something obscure.
> Though, but a --enable/--dsiable-automagic is not senseful either.

Sorry - I can't parse that :-) It's obvious you're German so something's
got lost in the translation ...

Norbert suggested a packager mode flag, but that's basically just a
rename of this flag. At the end of the day, the devs (quite reasonably)
want everything to be on by default, packagers afaict want it off. Do we
keep this flag, or rename it, or is there another way to do it?
> Grüße/Regards,
>
> René

Cheers,
Wol
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Norbert Thiebaud Norbert Thiebaud
Reply | Threaded
Open this post in threaded view
|

Re: --enable-automagic

On Tue, Nov 2, 2010 at 9:26 AM, Wols Lists <[hidden email]> wrote:

> On 02/11/10 12:34, Rene Engelhard wrote:
>> On Tue, Nov 02, 2010 at 09:10:23AM +0000, Wols Lists wrote:
>>> In particular, there's a page on the gentoo wiki (I've put a pointer to
>>> it in our development wiki) that says that automatically enabling things
>>> can be a packager's nightmare. They've only got to miss a "disable" for
>> True.
>>
>>> some weird option they happen to have installed, and next thing they
>>> know they've shipped a package that depends on this weird option - AND
>>> DOESN'T DOCUMENT THAT FACT!
>> This is not a big deal for runtime deps, both rpm and deb have mechanisms to
>> find out what libs executables/libs need and putting them into Depends.. If you
>> have a own system, you have to implement such stuff on your own anyways, so...
>
> I need to re-read that gentoo page (as a gentoo user I really ought to
> make sure I understand it :-)
>
> And not all distros use rpm/deb :-) the whole point of the gentoo page
> iiui is that upstream sometimes do silly things that makes their life
> difficult.
>> For build-dependencies you're right, that can get a nightmare. Or you
>> forget one option, and in a clean chroot the package is not installed -> feature
>> not there.
>> Or even worse, you get additional stuff in "unclean" chroots you didn't expect
>> and maybe don't even want.
>>
>>> That's why, imho, "disable-automagic" is important (and that's why it's
>>> called magic not matic :-). If that happens, it's now an upstream bug,
>>> not a silly packager. And it's easy for us to fix each option as we add
>>> it, not so easy for them to spot we've enabled something obscure.
>> Though, but a --enable/--dsiable-automagic is not senseful either.
>
> Sorry - I can't parse that :-) It's obvious you're German so something's
> got lost in the translation ...
>
> Norbert suggested a packager mode flag, but that's basically just a
> rename of this flag.

more a reversal of the default:

I see it as:
default is 'automagic=true' (more exactly 'not having --maintainer-mode')
and it do a best effort to build with what you have

that way a causal haker can do
./configure
and it does something sensible based on the environement.

if you want a speficifc distro-pattern use --with-distro= (which
whould disable the automagic things) (you can still override
individual by adding --with-xxx --enable-xxx etc.

if you want to pick exactly what you want: --maintainer-mode, with the
exhaustive list of everything that need choosing. (note: as a side
effect, when a new options show up, distro-profile will break... which
is a good thing, since distro maitainer should make a decision about
that new options... and that will certainly attract their attention
:-) )

LO dev can use --with-distro=LibreOfiiceDev, that will activate as
much thing as possible


>At the end of the day, the devs (quite reasonably)
> want everything to be on by default, packagers afaict want it off. Do we
> keep this flag, or rename it, or is there another way to do it?
>> Grüße/Regards,
>>
>> René
>
> Cheers,
> Wol
> _______________________________________________
> LibreOffice mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Lubos Lunak Lubos Lunak
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Another Qt/gtk configure patch

In reply to this post by Wols Lists
On Tuesday 02 of November 2010, Wols Lists wrote:
> Is KDE support fundamentally different from gtk support? Bearing in mind
> that OOo seems to treat them as equivalent, but KDE is a DE while gtk is
> a toolkit?

 No, it's the same, one enables support for integration with GNOME stack, the
other with KDE stack (and KDE is actually not a DE,
http://dot.kde.org/2009/11/24/repositioning-kde-brand).

--
 Lubos Lunak
 [hidden email]
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice