Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH try 2] wine: New package
@ 2015-01-06 21:05 André Hentschel
  2015-01-07 21:09 ` Thomas Petazzoni
  2015-01-08 10:03 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: André Hentschel @ 2015-01-06 21:05 UTC (permalink / raw)
  To: buildroot

Adds new package: wine

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

Signed-off-by: Andr? Hentschel <nerv@dawncrow.de>
---
No comments on my last RFC makes me think it's good enough for submission.
try 2: Fix issue spotted by baruch

 package/Config.in      |   1 +
 package/wine/Config.in |  20 +++++++++++
 package/wine/wine.mk   | 264 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 285 insertions(+)

diff --git a/package/Config.in b/package/Config.in
index 8d91b04..1f196ba 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1004,6 +1004,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"
diff --git a/package/wine/Config.in b/package/wine/Config.in
new file mode 100644
index 0000000..05c69c8
--- /dev/null
+++ b/package/wine/Config.in
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_WINE
+	bool "wine"
+	depends on BR2_INET_IPV6
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	# Wine has much CPU specific code
+	depends on BR2_i386 || BR2_x86_64
+	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_i386 || BR2_x86_64
+	depends on !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
diff --git a/package/wine/wine.mk b/package/wine/wine.mk
new file mode 100644
index 0000000..13329f3
--- /dev/null
+++ b/package/wine/wine.mk
@@ -0,0 +1,264 @@
+################################################################################
+#
+# wine
+#
+################################################################################
+
+WINE_VERSION = 1.6.2
+WINE_SOURCE = wine-$(WINE_VERSION).tar.bz2
+WINE_SITE = http://source.winehq.org/git/wine.git/snapshot/
+WINE_LICENSE = LGPLv2.1+
+WINE_LICENSE_FILES = COPYING.LIB
+WINE_INSTALL_TARGET = YES
+WINE_DEPENDENCIES = host-wine
+
+#Wine needs its own directory structure and tools for cross compiling
+WINE_CONF_OPTS += --with-wine-tools=../host-wine-$(WINE_VERSION)
+WINE_CONF_OPTS += --disable-tests
+WINE_CONF_OPTS += --without-opengl
+WINE_CONF_OPTS += $(if $(BR2_ARCH_IS_64),--enable-win64)
+
+HOST_WINE_DEPENDENCIES =
+
+ifeq ($(BR2_PACKAGE_CUPS),y)
+	WINE_CONF_OPTS += --with-cups
+	WINE_DEPENDENCIES += cups
+else
+	WINE_CONF_OPTS += --without-cups
+endif
+
+ifeq ($(BR2_PACKAGE_DBUS),y)
+	WINE_CONF_OPTS += --with-dbus
+	WINE_DEPENDENCIES += dbus
+else
+	WINE_CONF_OPTS += --without-dbus
+endif
+
+ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
+	WINE_CONF_OPTS += --with-fontconfig
+	WINE_DEPENDENCIES += fontconfig
+else
+	WINE_CONF_OPTS += --without-fontconfig
+endif
+
+ifeq ($(BR2_PACKAGE_FREETYPE),y)
+	WINE_CONF_OPTS += --with-freetype
+	HOST_WINE_CONF_OPTS += --with-freetype
+	WINE_DEPENDENCIES += freetype
+	HOST_WINE_DEPENDENCIES += host-freetype
+else
+	WINE_CONF_OPTS += --without-freetype
+	HOST_WINE_CONF_OPTS += --without-freetype
+endif
+
+ifeq ($(BR2_PACKAGE_GNUTLS),y)
+	WINE_CONF_OPTS += --with-gnutls
+	WINE_DEPENDENCIES += gnutls
+else
+	WINE_CONF_OPTS += --without-gnutls
+endif
+
+ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE),y)
+	WINE_CONF_OPTS += --with-gstreamer
+	WINE_DEPENDENCIES += gst-plugins-base
+else
+	WINE_CONF_OPTS += --without-gstreamer
+endif
+
+ifeq ($(BR2_PACKAGE_JPEG),y)
+	WINE_CONF_OPTS += --with-jpeg
+	WINE_DEPENDENCIES += jpeg
+else
+	WINE_CONF_OPTS += --without-jpeg
+endif
+
+ifeq ($(BR2_PACKAGE_LCMS2),y)
+	WINE_CONF_OPTS += --with-cms
+	WINE_DEPENDENCIES += lcms2
+else
+	WINE_CONF_OPTS += --without-cms
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGLU),y)
+	WINE_CONF_OPTS += --with-glu
+	WINE_DEPENDENCIES += libglu
+else
+	WINE_CONF_OPTS += --without-glu
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPCAP),y)
+	WINE_CONF_OPTS += --with-pcap
+	WINE_DEPENDENCIES += libpcap
+else
+	WINE_CONF_OPTS += --without-pcap
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPNG),y)
+	WINE_CONF_OPTS += --with-png
+	WINE_DEPENDENCIES += libpng
+else
+	WINE_CONF_OPTS += --without-png
+endif
+
+ifeq ($(BR2_PACKAGE_LIBV4L),y)
+	WINE_CONF_OPTS += --with-v4l
+	WINE_DEPENDENCIES += libv4l
+else
+	WINE_CONF_OPTS += --without-v4l
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+	WINE_CONF_OPTS += --with-xml
+	WINE_DEPENDENCIES += libxml2
+else
+	WINE_CONF_OPTS += --without-xml
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXSLT),y)
+	WINE_CONF_OPTS += --with-xslt
+	WINE_DEPENDENCIES += libxslt
+else
+	WINE_CONF_OPTS += --without-xslt
+endif
+
+ifeq ($(BR2_PACKAGE_MPG123),y)
+	WINE_CONF_OPTS += --with-mpg123
+	WINE_DEPENDENCIES += mpg123
+else
+	WINE_CONF_OPTS += --without-mpg123
+endif
+
+ifeq ($(BR2_PACKAGE_NCURSES),y)
+	WINE_CONF_OPTS += --with-curses
+	WINE_DEPENDENCIES += ncurses
+else
+	WINE_CONF_OPTS += --without-curses
+endif
+
+ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y)
+	WINE_CONF_OPTS += --with-sane
+	WINE_DEPENDENCIES += sane-backends
+else
+	WINE_CONF_OPTS += --without-sane
+endif
+
+ifeq ($(BR2_PACKAGE_TIFF),y)
+	WINE_CONF_OPTS += --with-tiff
+	WINE_DEPENDENCIES += tiff
+else
+	WINE_CONF_OPTS += --without-tiff
+endif
+
+ifeq ($(BR2_PACKAGE_XORG7),y)
+	WINE_CONF_OPTS += --with-x
+	WINE_DEPENDENCIES += xlib_libX11
+else
+	WINE_CONF_OPTS += --without-x
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
+	WINE_CONF_OPTS += --with-xcomposite
+	WINE_DEPENDENCIES += xlib_libXcomposite
+else
+	WINE_CONF_OPTS += --without-xcomposite
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
+	WINE_CONF_OPTS += --with-xcursor
+	WINE_DEPENDENCIES += xlib_libXcursor
+else
+	WINE_CONF_OPTS += --without-xcursor
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
+	WINE_CONF_OPTS += --with-xinput --with-xinput2
+	WINE_DEPENDENCIES += xlib_libXi
+else
+	WINE_CONF_OPTS += --without-xinput --without-xinput2
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
+	WINE_CONF_OPTS += --with-xinerama
+	WINE_DEPENDENCIES += xlib_libXinerama
+else
+	WINE_CONF_OPTS += --without-xinerama
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
+	WINE_CONF_OPTS += --with-xrandr
+	WINE_DEPENDENCIES += xlib_libXrandr
+else
+	WINE_CONF_OPTS += --without-xrandr
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y)
+	WINE_CONF_OPTS += --with-xrender
+	WINE_DEPENDENCIES += xlib_libXrender
+else
+	WINE_CONF_OPTS += --without-xrender
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
+	WINE_CONF_OPTS += --with-xxf86vm
+	WINE_DEPENDENCIES += xlib_libXxf86vm
+else
+	WINE_CONF_OPTS += --without-xxf86vm
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+	WINE_CONF_OPTS += --with-zlib
+	WINE_DEPENDENCIES += zlib
+else
+	WINE_CONF_OPTS += --without-zlib
+endif
+
+HOST_WINE_CONF_OPTS += \
+	--disable-tests \
+	--disable-win16 \
+	--without-alsa \
+	--without-capi \
+	--without-cms \
+	--without-coreaudio \
+	--without-cups \
+	--without-curses \
+	--without-dbus \
+	--without-fontconfig \
+	--without-gettext \
+	--without-gettextpo \
+	--without-gphoto \
+	--without-glu \
+	--without-gnutls \
+	--without-gsm \
+	--without-gstreamer \
+	--without-hal \
+	--without-jpeg \
+	--without-ldap \
+	--without-mpg123 \
+	--without-netapi \
+	--without-openal \
+	--without-opencl \
+	--without-opengl \
+	--without-osmesa \
+	--without-oss \
+	--without-pcap \
+	--without-png \
+	--without-sane \
+	--without-tiff \
+	--without-v4l \
+	--without-x \
+	--without-xcomposite \
+	--without-xcursor \
+	--without-xinerama \
+	--without-xinput \
+	--without-xinput2 \
+	--without-xml \
+	--without-xrandr \
+	--without-xrender \
+	--without-xshape \
+	--without-xshm \
+	--without-xslt \
+	--without-xxf86vm \
+	--without-zlib
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))

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

* [Buildroot] [PATCH try 2] wine: New package
  2015-01-06 21:05 [Buildroot] [PATCH try 2] wine: New package André Hentschel
@ 2015-01-07 21:09 ` Thomas Petazzoni
  2015-01-08 10:03 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2015-01-07 21:09 UTC (permalink / raw)
  To: buildroot

Dear Andr? Hentschel,

On Tue, 06 Jan 2015 22:05:41 +0100, Andr? Hentschel wrote:
> Adds new package: wine
> 
>   Wine is a compatibility layer capable of running Windows applications on Linux.
> 
> Signed-off-by: Andr? Hentschel <nerv@dawncrow.de>
> ---
> No comments on my last RFC makes me think it's good enough for submission.
> try 2: Fix issue spotted by baruch

Thanks for this new version. See some comments below.

First, one thing that surprises me is the number of optional features
that you try to support. Did you really tried all of them? Are you
using all of them? In general, when we add a new package, we don't
necessarily try to support all possible optional dependencies, because
it's not necessarily easy.

But well, as long as you're ready to fix potential build issues that
will arise in the autobuilders after building the wine package, I'm
fine :-)

> +WINE_VERSION = 1.6.2
> +WINE_SOURCE = wine-$(WINE_VERSION).tar.bz2
> +WINE_SITE = http://source.winehq.org/git/wine.git/snapshot/

Since you're download a tarball, please add a wine.hash file. See the
Buildroot manual for more details about hash files.

> +WINE_LICENSE = LGPLv2.1+
> +WINE_LICENSE_FILES = COPYING.LIB
> +WINE_INSTALL_TARGET = YES
> +WINE_DEPENDENCIES = host-wine
> +
> +#Wine needs its own directory structure and tools for cross compiling
> +WINE_CONF_OPTS += --with-wine-tools=../host-wine-$(WINE_VERSION)
> +WINE_CONF_OPTS += --disable-tests
> +WINE_CONF_OPTS += --without-opengl
> +WINE_CONF_OPTS += $(if $(BR2_ARCH_IS_64),--enable-win64)

Please use only one assigment:

WINE_CONF_OPTS = \
	--with-wine-tools=... \
	--disable-tests \
	--without-opengl \
	$(if ...)


> +ifeq ($(BR2_PACKAGE_FREETYPE),y)
> +	WINE_CONF_OPTS += --with-freetype
> +	HOST_WINE_CONF_OPTS += --with-freetype
> +	WINE_DEPENDENCIES += freetype
> +	HOST_WINE_DEPENDENCIES += host-freetype

This is not correct: BR2_PACKAGE_FREETYPE indicates that the target
freetype package is enabled, not that we want freetype support in
host-wine. Please only adjust WINE_CONF_OPTS and WINE_DEPENDENCIES, not
HOST_WINE_CONF_OPTS and HOST_WINE_DEPENDENCIES. Unless you have a
really good reason to do so, which should be explained in a comment.

> +else
> +	WINE_CONF_OPTS += --without-freetype
> +	HOST_WINE_CONF_OPTS += --without-freetype
> +endif

Ditto.

> +ifeq ($(BR2_PACKAGE_XORG7),y)
> +	WINE_CONF_OPTS += --with-x
> +	WINE_DEPENDENCIES += xlib_libX11
> +else
> +	WINE_CONF_OPTS += --without-x
> +endif

If you do this, then you need:

	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7

in wine/Config.in.

Thanks,

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

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

* [Buildroot] [PATCH try 2] wine: New package
  2015-01-06 21:05 [Buildroot] [PATCH try 2] wine: New package André Hentschel
  2015-01-07 21:09 ` Thomas Petazzoni
@ 2015-01-08 10:03 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2015-01-08 10:03 UTC (permalink / raw)
  To: buildroot

Dear Andr? Hentschel,

On Tue, 06 Jan 2015 22:05:41 +0100, Andr? Hentschel wrote:
> Adds new package: wine
> 
>   Wine is a compatibility layer capable of running Windows applications on Linux.
> 
> Signed-off-by: Andr? Hentschel <nerv@dawncrow.de>

I did some actual testing of this, and here are the issues:

 * host-flex should be in HOST_WINE_DEPENDENCIES. Otherwise, I get
   "configure: error: no suitable flex found" at configure time of
   host-wine. You didn't see the error because you have the flex
   utility installed in your system.

 * host-bison should be in HOST_WINE_DEPENDENCIES, for the same reason.

 * With those issues fixed, the build still doesn't work, I get a
   "winebuild: cannot find suitable name lister" message. More log
   below:

../../../host-wine-1.6.2/tools/winegcc/winegcc -b i586-buildroot-linux-gnu  -B../../../host-wine-1.6.2/tools/winebuild --sysroot=../.. -fasynchronous-unwind-tables -shared ./advapi32.spec advapi.o cred.o crypt.o crypt_arc4.o crypt_des.o crypt_lmhash.o crypt_md4.o crypt_md5.o crypt_sha.o eventlog.o lsa.o registry.o security.o service.o   svcctl_c.o    version.res    -o advapi32.dll.so -lrpcrt4  -Wb,-drpcrt4 ../../libs/port/libwine_port.a
../../../host-wine-1.6.2/tools/winegcc/winegcc -b i586-buildroot-linux-gnu  -B../../../host-wine-1.6.2/tools/winebuild --sysroot=../.. -fasynchronous-unwind-tables -shared ./advapi32.spec advapi.o cred.o crypt.o crypt_arc4.o crypt_des.o crypt_lmhash.o crypt_md4.o crypt_md5.o crypt_sha.o eventlog.o lsa.o registry.o security.o service.o   svcctl_c.o    version.res    -o advapi32.dll.fake -lrpcrt4  -Wb,-drpcrt4 ../../libs/port/libwine_port.a
winebuild: cannot find suitable name lister
winegcc: ../../../host-wine-1.6.2/tools/winebuild/winebuild failed
make[3]: *** [advapi32.dll.so] Error 2
make[2]: *** [dlls/advapi32] Error 2
../../../host-wine-1.6.2/tools/winegcc/winegcc -b i586-buildroot-linux-gnu  -B../../../host-wine-1.6.2/tools/winebuild --sysroot=../.. -fasynchronous-unwind-tables -shared ./actxprxy.spec usrmarshal.o   actxprxy_activscp_p.o actxprxy_comcat_p.o actxprxy_docobj_p.o actxprxy_hlink_p.o actxprxy_htiface_p.o actxprxy_htiframe_p.o actxprxy_objsafe_p.o actxprxy_ocmm_p.o actxprxy_servprov_p.o actxprxy_shldisp_p.o actxprxy_shobjidl_p.o actxprxy_urlhist_p.o  actxprxy_activscp_r.res actxprxy_comcat_r.res actxprxy_docobj_r.res actxprxy_hlink_r.res actxprxy_htiface_r.res actxprxy_htiframe_r.res actxprxy_objsafe_r.res actxprxy_ocmm_r.res actxprxy_servprov_r.res actxprxy_shldisp_r.res actxprxy_shobjidl_r.res actxprxy_urlhist_r.res    dlldata.o  -o actxprxy.dll.so  -luuid -loleaut32 -lole32 -lrpcrt4  ../../libs/port/libwine_port.a
../../../host-wine-1.6.2/tools/winegcc/winegcc -b i586-buildroot-linux-gnu  -B../../../host-wine-1.6.2/tools/winebuild --sysroot=../.. -fasynchronous-unwind-tables -shared ./actxprxy.spec usrmarshal.o   actxprxy_activscp_p.o actxprxy_comcat_p.o actxprxy_docobj_p.o actxprxy_hlink_p.o actxprxy_htiface_p.o actxprxy_htiframe_p.o actxprxy_objsafe_p.o actxprxy_ocmm_p.o actxprxy_servprov_p.o actxprxy_shldisp_p.o actxprxy_shobjidl_p.o actxprxy_urlhist_p.o  actxprxy_activscp_r.res actxprxy_comcat_r.res actxprxy_docobj_r.res actxprxy_hlink_r.res actxprxy_htiface_r.res actxprxy_htiframe_r.res actxprxy_objsafe_r.res actxprxy_ocmm_r.res actxprxy_servprov_r.res actxprxy_shldisp_r.res actxprxy_shobjidl_r.res actxprxy_urlhist_r.res    dlldata.o  -o actxprxy.dll.fake  -luuid -loleaut32 -lole32 -lrpcrt4  ../../libs/port/libwine_port.a
winebuild: cannot find suitable name lister
winegcc: ../../../host-wine-1.6.2/tools/winebuild/winebuild failed
make[3]: *** [actxprxy.dll.so] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [dlls/actxprxy] Error 2
make[1]: *** [/home/test/outputs/wine/build/wine-1.6.2/.stamp_built] Error 2
make: *** [_all] Error 2

Best regards,

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

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

end of thread, other threads:[~2015-01-08 10:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-06 21:05 [Buildroot] [PATCH try 2] wine: New package André Hentschel
2015-01-07 21:09 ` Thomas Petazzoni
2015-01-08 10:03 ` Thomas Petazzoni

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