Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 2/2] wine: Add gettext dependency check for host-wine
@ 2015-03-08 14:22 André Hentschel
  2015-03-08 14:57 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: André Hentschel @ 2015-03-08 14:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Andr? Hentschel <nerv@dawncrow.de>
---
v2: minor fixes
v3: Add comment and only modify HOST variables

 package/wine/wine.mk | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/package/wine/wine.mk b/package/wine/wine.mk
index 571606d..df13ef7 100644
--- a/package/wine/wine.mk
+++ b/package/wine/wine.mk
@@ -243,6 +243,15 @@ else
 WINE_CONF_OPTS += --without-zlib
 endif
 
+# selecting gettext also enables host-gettext which is
+# essential for .po file support in wrc from host-wine
+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+HOST_WINE_CONF_OPTS += --with-gettext --with-gettextpo
+HOST_WINE_DEPENDENCIES += host-gettext
+else
+HOST_WINE_CONF_OPTS += --without-gettext --without-gettextpo
+endif
+
 # Wine needs to enable 64-bit build tools on 64-bit host
 ifeq ($(HOSTARCH),x86_64)
 HOST_WINE_CONF_OPTS += --enable-win64
@@ -280,8 +289,6 @@ HOST_WINE_CONF_OPTS += \
 	--without-curses \
 	--without-dbus \
 	--without-fontconfig \
-	--without-gettext \
-	--without-gettextpo \
 	--without-gphoto \
 	--without-glu \
 	--without-gnutls \

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 2/2] wine: Add gettext dependency check for host-wine
  2015-03-08 14:22 [Buildroot] [PATCH v3 2/2] wine: Add gettext dependency check for host-wine André Hentschel
@ 2015-03-08 14:57 ` Thomas Petazzoni
  2015-03-08 15:16   ` André Hentschel
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-03-08 14:57 UTC (permalink / raw)
  To: buildroot

Dear Andr? Hentschel,

On Sun, 08 Mar 2015 15:22:57 +0100, Andr? Hentschel wrote:

> +# selecting gettext also enables host-gettext which is
> +# essential for .po file support in wrc from host-wine
> +ifeq ($(BR2_PACKAGE_GETTEXT),y)
> +HOST_WINE_CONF_OPTS += --with-gettext --with-gettextpo
> +HOST_WINE_DEPENDENCIES += host-gettext
> +else
> +HOST_WINE_CONF_OPTS += --without-gettext --without-gettextpo
> +endif

I'm sorry but this still doesn't make sense.

BR2_PACKAGE_GETTEXT=y indicates that the gettext package is built for
the *target*, i.e it installs stuff in $(TARGET_DIR) and
$(STAGING_DIR), most notably the libintl library.

So, using BR2_PACKAGE_GETTEXT=y as an indication to know whether
gettext support is available for a *host* package (which looks only in
$(HOST_DIR)) does not make sense.

What are you trying to do here?

If you're trying to have optional gettext support for the target Wine,
then what you need is:

+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+WINE_CONF_OPTS += --with-gettext --with-gettextpo
+WINE_DEPENDENCIES += host-gettext
+else
+WINE_CONF_OPTS += --without-gettext --without-gettextpo
+endif

and of course, remove the unconditional --without-gettext
--without-gettextpo from WINE_CONF_OPTS.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 2/2] wine: Add gettext dependency check for host-wine
  2015-03-08 14:57 ` Thomas Petazzoni
@ 2015-03-08 15:16   ` André Hentschel
  2015-03-08 17:31     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: André Hentschel @ 2015-03-08 15:16 UTC (permalink / raw)
  To: buildroot

Am 08.03.2015 um 15:57 schrieb Thomas Petazzoni:
> Dear Andr? Hentschel,
> 
> On Sun, 08 Mar 2015 15:22:57 +0100, Andr? Hentschel wrote:
> 
>> +# selecting gettext also enables host-gettext which is
>> +# essential for .po file support in wrc from host-wine
>> +ifeq ($(BR2_PACKAGE_GETTEXT),y)
>> +HOST_WINE_CONF_OPTS += --with-gettext --with-gettextpo
>> +HOST_WINE_DEPENDENCIES += host-gettext
>> +else
>> +HOST_WINE_CONF_OPTS += --without-gettext --without-gettextpo
>> +endif
> 
> I'm sorry but this still doesn't make sense.
> 
> BR2_PACKAGE_GETTEXT=y indicates that the gettext package is built for
> the *target*, i.e it installs stuff in $(TARGET_DIR) and
> $(STAGING_DIR), most notably the libintl library.
> 
> So, using BR2_PACKAGE_GETTEXT=y as an indication to know whether
> gettext support is available for a *host* package (which looks only in
> $(HOST_DIR)) does not make sense.
> 
> What are you trying to do here?
> 
> If you're trying to have optional gettext support for the target Wine,
> then what you need is:

Wine is built using host-wine, so i need gettext support in host-wines wrt.
For this i want to detect if host-gettext will be build, but the only way I see
to do so is to query BR2_PACKAGE_GETTEXT which is obviously a target package, but also
will build host-gettext

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 2/2] wine: Add gettext dependency check for host-wine
  2015-03-08 15:16   ` André Hentschel
@ 2015-03-08 17:31     ` Thomas Petazzoni
  2015-03-08 17:52       ` André Hentschel
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-03-08 17:31 UTC (permalink / raw)
  To: buildroot

Dear Andr? Hentschel,

On Sun, 08 Mar 2015 16:16:56 +0100, Andr? Hentschel wrote:

> Wine is built using host-wine, so i need gettext support in host-wines wrt.

In which cases do you need gettext support in host-wine?

Always ? Only when the target wine is going to be built with gettext
support (which your patch does not do) ?

Why in the first place would we want to have gettext support in
host-wine ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 2/2] wine: Add gettext dependency check for host-wine
  2015-03-08 17:31     ` Thomas Petazzoni
@ 2015-03-08 17:52       ` André Hentschel
  2015-03-14 17:44         ` Yann E. MORIN
  0 siblings, 1 reply; 6+ messages in thread
From: André Hentschel @ 2015-03-08 17:52 UTC (permalink / raw)
  To: buildroot

Am 08.03.2015 um 18:31 schrieb Thomas Petazzoni:
> Dear Andr? Hentschel,
> 
> On Sun, 08 Mar 2015 16:16:56 +0100, Andr? Hentschel wrote:
> 
>> Wine is built using host-wine, so i need gettext support in host-wines wrt.
> 
> In which cases do you need gettext support in host-wine?
> 
> Always ? Only when the target wine is going to be built with gettext
> support (which your patch does not do) ?

When host-gettext is built, then we could use it, otherwise target wine will be english only.
I don't think this diserves a hard dependency, do you?

> Why in the first place would we want to have gettext support in
> host-wine ?

Wine has a tool called wrc which transforms dialogs/strings and such into a windows like resource file.
With the help of the gettext library wrc merges the translations from wines po-files into that resource file.
As the wrc tool from host-wine is used, we need the gettext support there.
Further there are no runtime requirements, so in fact it doesn't matter to wine(or even host-wine) if the target
gettext is built.
Note: host-gettext and target gettext are two different things:

# For the target version, we only need the runtime, and for the host
# version, we only need the tools.
GETTEXT_SUBDIR = gettext-runtime
HOST_GETTEXT_SUBDIR = gettext-tools

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v3 2/2] wine: Add gettext dependency check for host-wine
  2015-03-08 17:52       ` André Hentschel
@ 2015-03-14 17:44         ` Yann E. MORIN
  0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2015-03-14 17:44 UTC (permalink / raw)
  To: buildroot

Andr?, All,

On 2015-03-08 18:52 +0100, Andr? Hentschel spake thusly:
> Am 08.03.2015 um 18:31 schrieb Thomas Petazzoni:
> > Dear Andr? Hentschel,
> > 
> > On Sun, 08 Mar 2015 16:16:56 +0100, Andr? Hentschel wrote:
> > 
> >> Wine is built using host-wine, so i need gettext support in host-wines wrt.
> > 
> > In which cases do you need gettext support in host-wine?
> > 
> > Always ? Only when the target wine is going to be built with gettext
> > support (which your patch does not do) ?
> 
> When host-gettext is built, then we could use it, otherwise target wine will be english only.
> I don't think this diserves a hard dependency, do you?
> 
> > Why in the first place would we want to have gettext support in
> > host-wine ?
> 
> Wine has a tool called wrc which transforms dialogs/strings and such into a windows like resource file.
> With the help of the gettext library wrc merges the translations from wines po-files into that resource file.
> As the wrc tool from host-wine is used, we need the gettext support there.
> Further there are no runtime requirements, so in fact it doesn't matter to wine(or even host-wine) if the target
> gettext is built.

So, from what I understand:
  - we need the host gettext tools to be able to produce the resource
    files
  - the resource files are used at runtime, but that's handled by Wine
    itself, without the need for any help from gettext

If that is so, then all you need is to just depend on host-gettext:

HOST_WINE_DEPENDENCIES += host-gettext
HOST_WINE_CONF_OPTS += --with-gettext --with-gettextpo

That does not have to be condional on the package gettext at all.

What is maybe misleading is that there is no BR2_PACKAGE_HOST_GETTEXT to
depend on. That's not necessary to depend on a host package, whether
from a target package or another host package.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-14 17:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-08 14:22 [Buildroot] [PATCH v3 2/2] wine: Add gettext dependency check for host-wine André Hentschel
2015-03-08 14:57 ` Thomas Petazzoni
2015-03-08 15:16   ` André Hentschel
2015-03-08 17:31     ` Thomas Petazzoni
2015-03-08 17:52       ` André Hentschel
2015-03-14 17:44         ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox