Skip to contentSkip to conversation

wine: New package

PATCH Superseded André Hentschel 2 participants 6 messages Feb 19, 2015 – Feb 23, 2015

v7 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

PATCH v7 1/1 wine: New package

Adds new package: wine

Wine is a compatibility layer capable of running Windows applications on Linux.

---
I hope i addressed all the comments in the correct manner
try 2: Fix issue spotted by baruch
try 3: Added comments, added hash file, fixed X11 check, depend on internal toolchain, added bison and flex to host dependencies try 4: instead of depending on internal toolchains add the expected tuple via --host
try 5: Added 64-bit check for host-wine and restricted wine build to x86 for now. Also added more comments try 6: Implemented ideas by Yann E. MORIN and added his suggested code. Including:
* download from sourceforge
* reduction of host-wine build process
* improved fix for the gcc wrapper problem
try 7: Moved host-wine related stuff to the bottom and fixed some minor issues pointed out by Yann

 package/Config.in      |   1 +
 package/wine/Config.in |  24 ++++
 package/wine/wine.hash |   2 +
 package/wine/wine.mk   | 293 +++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 320 insertions(+)
package/Config.in +1 -0
index 5f6ebc2..db2c75a 100644
@@ -1015,6 +1015,7 @@ menu "Miscellaneous"
 	source "package/snowball-init/Config.in"
 	source "package/sound-theme-borealis/Config.in"
 	source "package/sound-theme-freedesktop/Config.in"
+	source "package/wine/Config.in"
 endmenu
 
 menu "Networking applications"
package/wine/Config.in new file +24 -0
new file mode 100644
index 0000000..9ac0a83
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_WINE
+	bool "wine"
+	depends on BR2_INET_IPV6
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	# Wine only builds on certain architectures
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	# Wine has much CPU specific code and mostly makes sense on x86
+	depends on BR2_i386
+	help
+	  Wine is a compatibility layer capable of running Windows
+	  applications on Linux. Instead of simulating internal
+	  Windows logic like a virtual machine or emulator, Wine
+	  translates Windows API calls into POSIX calls on-the-fly,
+	  eliminating the performance and memory penalties of other
+	  methods.
+
+	  http://www.winehq.org
+
+comment "wine needs a (e)glibc toolchain w/ IPv6, threads"
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_i386
+	depends on !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
package/wine/wine.hash new file +2 -0
new file mode 100644
index 0000000..2c1ab61
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 f0ab9eede5a0ccacbf6e50682649f9377b9199e49cf55641f1787cf72405acbe wine-1.6.2.tar.bz2
package/wine/wine.mk new file +293 -0

293 lines not on this page · raw message

#1 lore raw

PATCH v7 1/1 wine: New package

Andr?, All,

On 2015-02-19 20:20 +0100, Andr? Hentschel spake thusly:

Quoted 1 line

Adds new package: wine

[--SNIP--]

package/wine/Config.in line 5

Quoted 11 lines
package/wine/Config.in new file +5 -0
new file mode 100644
index 0000000..9ac0a83
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_WINE
+	bool "wine"
+	depends on BR2_INET_IPV6
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC

Glibc implies IPv6 and threads, so depending on glibc is enough.

[--SNIP--]

package/wine/wine.hash line 2

Quoted 8 lines
package/wine/wine.hash new file +2 -0
new file mode 100644
index 0000000..2c1ab61
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 f0ab9eede5a0ccacbf6e50682649f9377b9199e49cf55641f1787cf72405acbe wine-1.6.2.tar.bz2

Weird... I had a local copy of wine-1.6.2 and it had a different sha256:

    0f46dd29b278a3352206b49680f0ac3bfa107e65cb40cb4af51c137f0ebeb271

So Buildroot re-downloaded it, and now tthe sha256 you provides is OK.

Also, SF provides a sha1:

    574b9ccedbf213622b7ee55f715764673fc27692
Quoted 26 lines
package/wine/wine.mk new file +20 -0
new file mode 100644
index 0000000..0f72be5
@@ -0,0 +1,293 @@
+################################################################################
+#
+# wine
+#
+################################################################################
+
+WINE_VERSION = 1.6.2
+WINE_SOURCE = wine-$(WINE_VERSION).tar.bz2
+WINE_SITE = http://downloads.sourceforge.net/project/wine/Source/
+WINE_LICENSE = LGPLv2.1+
+WINE_LICENSE_FILES = COPYING.LIB LICENSE
+WINE_DEPENDENCIES = host-bison host-flex host-wine
+
+# Wine needs its own directory structure and tools for cross compiling
+WINE_CONF_OPTS = \
+	--with-wine-tools=../host-wine-$(WINE_VERSION) \
+	--disable-tests \
+	--disable-win64 \
+	--without-opengl
+

package/wine/wine.mk line 30

Quoted 10 lines
package/wine/wine.mk new file +10 -0
+# Wine uses a wrapper around gcc, and uses the value of --host to
+# construct the filename of the gcc to call.
+# But for external toolchains, we may have a discrepancy between the
+# tuple, GNU_TARGET_NAME, that we construct from our internal
+# variables, and the gcc prefix for the external toolchain.
+# So, we have to iverride whatever the gcc wrapper believes what the
+# reall gcc is named, and force the tuple of the external toolchain,
+# not the one we compute in GNU_TARGET_NAME.
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
+	WINE_CONF_OPTS += TARGETFLAGS="-b $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))"

We usually do not indent the variable assignements in conditional blocks.

I'm doing a few test builds, and will respin an amended version of this patch.

Thanks very much for the hard initial work! :-)

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.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH v7 1/1 wine: New package

Hi,

Am 22.02.2015 um 21:42 schrieb Yann E. MORIN:

Quoted 5 lines

Andr?, All,

On 2015-02-19 20:20 +0100, Andr? Hentschel spake thusly:

Quoted 1 line

Adds new package: wine

[--SNIP--]

Quoted 13 lines

package/wine/Config.in line 5

Quoted 11 lines
package/wine/Config.in new file +5 -0
new file mode 100644
index 0000000..9ac0a83
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_WINE
+	bool "wine"
+	depends on BR2_INET_IPV6
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC

Glibc implies IPv6 and threads, so depending on glibc is enough.

fixed locally, will be in v8, waiting for more comments first

Quoted 11 lines

[--SNIP--]

package/wine/wine.hash line 2

Quoted 8 lines
package/wine/wine.hash new file +2 -0
new file mode 100644
index 0000000..2c1ab61
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 f0ab9eede5a0ccacbf6e50682649f9377b9199e49cf55641f1787cf72405acbe wine-1.6.2.tar.bz2

Weird... I had a local copy of wine-1.6.2 and it had a different sha256:

Quoted 6 lines
    0f46dd29b278a3352206b49680f0ac3bfa107e65cb40cb4af51c137f0ebeb271

So Buildroot re-downloaded it, and now tthe sha256 you provides is OK.

Also, SF provides a sha1:

    574b9ccedbf213622b7ee55f715764673fc27692

fixed locally, will be in v8, waiting for more comments first

Quoted 31 lines
Quoted 31 lines
package/wine/wine.mk new file +25 -0
new file mode 100644
index 0000000..0f72be5
@@ -0,0 +1,293 @@
+################################################################################
+#
+# wine
+#
+################################################################################
+
+WINE_VERSION = 1.6.2
+WINE_SOURCE = wine-$(WINE_VERSION).tar.bz2
+WINE_SITE = http://downloads.sourceforge.net/project/wine/Source/
+WINE_LICENSE = LGPLv2.1+
+WINE_LICENSE_FILES = COPYING.LIB LICENSE
+WINE_DEPENDENCIES = host-bison host-flex host-wine
+
+# Wine needs its own directory structure and tools for cross compiling
+WINE_CONF_OPTS = \
+	--with-wine-tools=../host-wine-$(WINE_VERSION) \
+	--disable-tests \
+	--disable-win64 \
+	--without-opengl
+
+# Wine uses a wrapper around gcc, and uses the value of --host to
+# construct the filename of the gcc to call.
+# But for external toolchains, we may have a discrepancy between the
+# tuple, GNU_TARGET_NAME, that we construct from our internal
+# variables, and the gcc prefix for the external toolchain.
Quoted 8 lines

package/wine/wine.mk line 30

Quoted 5 lines
package/wine/wine.mk new file +5 -0
+# So, we have to iverride whatever the gcc wrapper believes what the
+# reall gcc is named, and force the tuple of the external toolchain,
+# not the one we compute in GNU_TARGET_NAME.
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
+	WINE_CONF_OPTS += TARGETFLAGS="-b $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))"

We usually do not indent the variable assignements in conditional blocks.

I've seen it that way (same goes for the dependencies checking) and i think it's much nicer that way... Is this minor enough to keep it that way?

Quoted 2 lines

I'm doing a few test builds, and will respin an amended version of this patch.

no need for a respin, your comments will simply end up in v8

Quoted 1 line

Thanks very much for the hard initial work! :-)

np :)

#3 lore raw

PATCH v7 1/1 wine: New package

Andre, All,

On 2015-02-22 21:57 +0100, Andr? Hentschel spake thusly:

Quoted 8 lines
Quoted 5 lines

package/wine/wine.mk line 30

Quoted 2 lines
package/wine/wine.mk new file +2 -0
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
+	WINE_CONF_OPTS += TARGETFLAGS="-b $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))"

We usually do not indent the variable assignements in conditional blocks.

I've seen it that way (same goes for the dependencies checking) and i think it's much nicer that way... Is this minor enough to keep it that way?

Well, I'd prefer we don't indent, since we don't do that anywhere else (well, there are a very few packages that do, but they are old, very old; the rule is not to indent).

Quoted 4 lines
Quoted 2 lines

I'm doing a few test builds, and will respin an amended version of this patch.

no need for a respin, your comments will simply end up in v8

OK, great!

Just respin it tonight if you don't have more comments shortly. I know Thomas wanted to look at it and apply it soonish. :-)

Thanks!

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.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH v7 1/1 wine: New package

In reply to André Hentschel

Andre, All,

On 2015-02-22 21:57 +0100, Andr? Hentschel spake thusly:

Quoted 3 lines

Am 22.02.2015 um 21:42 schrieb Yann E. MORIN:

Quoted 2 lines

On 2015-02-19 20:20 +0100, Andr? Hentschel spake thusly:

Quoted 1 line

Adds new package: wine

Another thing I noticed during the build of host-wine:

configure: WARNING: prelink not found, base address of core dlls won't be set correctly.

I am not sure if that will be a problem.

My system lacks prelink installed. Does yours have it?
- if not, I guess you get a working Wine, even without prelink, right?
- if you do, can you check that Wine still works fine without it?

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.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH v7 1/1 wine: New package

Am 22.02.2015 um 22:26 schrieb Yann E. MORIN:

Quoted 5 lines

Andre, All,

On 2015-02-22 21:57 +0100, Andr? Hentschel spake thusly:

Quoted 2 lines

Am 22.02.2015 um 21:42 schrieb Yann E. MORIN:

Quoted 1 line

On 2015-02-19 20:20 +0100, Andr? Hentschel spake thusly:

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Adds new package: wine

Another thing I noticed during the build of host-wine:

configure: WARNING: prelink not found, base address of core dlls won't be set correctly.

I am not sure if that will be a problem.

it doesn't care for host-wine, we just need the tools

Quoted 3 lines

My system lacks prelink installed. Does yours have it?
- if not, I guess you get a working Wine, even without prelink, right?
- if you do, can you check that Wine still works fine without it?

well, a target-prelink would be great, but we should add it at a later point, wine works without it, but might not in some special cases like copy protections thinking twice i remember that there are issues with prelink and crosscompiling, but there is https://www.yoctoproject.org/tools-resources/projects/cross-prelink