Skip to contentSkip to conversation

wine: Add gettext dependency check for host-wine

PATCH Superseded André Hentschel 3 participants 6 messages Mar 8, 2015 – Mar 14, 2015

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/2 wine: Add gettext dependency check for host-wine

---
v2: minor fixes
v3: Add comment and only modify HOST variables

 package/wine/wine.mk | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
package/wine/wine.mk +9 -2
index 571606d..df13ef7 100644
@@ -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 \
#1 lore raw

PATCH v3 2/2 wine: Add gettext dependency check for host-wine

Dear Andr? Hentschel,

package/wine/wine.mk else · line 253

Quoted 8 lines · Andr? Hentschel
package/wine/wine.mk +8 -0
+# 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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v3 2/2 wine: Add gettext dependency check for host-wine

Am 08.03.2015 um 15:57 schrieb Thomas Petazzoni:

Quoted 19 lines

Dear Andr? Hentschel,

package/wine/wine.mk else · line 253

Quoted 8 lines · Andr? Hentschel
package/wine/wine.mk +8 -0
+# 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.

Quoted 8 lines

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

#3 lore raw

PATCH v3 2/2 wine: Add gettext dependency check for host-wine

Dear Andr? Hentschel,

Quoted 1 line · Andr? Hentschel

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH v3 2/2 wine: Add gettext dependency check for host-wine

Am 08.03.2015 um 18:31 schrieb Thomas Petazzoni:

Quoted 10 lines

Dear Andr? Hentschel,

Quoted 1 line · Andr? Hentschel

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?

Quoted 2 lines

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

#5 lore raw

PATCH v3 2/2 wine: Add gettext dependency check for host-wine

Andr?, All,

On 2015-03-08 18:52 +0100, Andr? Hentschel spake thusly:

Quoted 15 lines

Am 08.03.2015 um 18:31 schrieb Thomas Petazzoni:

Quoted 10 lines

Dear Andr? Hentschel,

Quoted 1 line · Andr? Hentschel

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?

Quoted 8 lines
Quoted 2 lines

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.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'