From patchwork Tue Feb 24 20:24:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Zwing?= X-Patchwork-Id: 443127 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 86A90140142 for ; Wed, 25 Feb 2015 07:24:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DEB1291A67; Tue, 24 Feb 2015 20:24:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ubIEniDzNI0Z; Tue, 24 Feb 2015 20:24:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 350C3919E6; Tue, 24 Feb 2015 20:24:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 67C191C1F39 for ; Tue, 24 Feb 2015 20:24:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5F6D99186D for ; Tue, 24 Feb 2015 20:24:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B6qLaG3SwYoo for ; Tue, 24 Feb 2015 20:24:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.163]) by whitealder.osuosl.org (Postfix) with ESMTPS id 580688AD08 for ; Tue, 24 Feb 2015 20:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1424809449; l=10801; s=domk; d=dawncrow.de; h=Content-Transfer-Encoding:Content-Type:Subject:CC:To:MIME-Version: From:Date; bh=l4tYdl3NMaxP9H/RAlZftyK9k0BSP+/Bno216/9R2J4=; b=GIiXPq2OCk+YEsVXZftgOcfX3/TdnW4zWBQ339UIwlX4N6UU0Qd9WybXx5gYYEqTWuK luwv7qCfUfEuIfZn4mqOeth1QZyaV9gh1DOFgiSuFZ26fSAz2kaURT9e7YzGBOj9FAp59 p0SLjhzfJuwG9gAFzH++3N/Tfn+xZXpqEzs= X-RZG-AUTH: :ImkWY2CseuihIZy6ZWWciR6unPh5JPSWE7VxbdUCFBN5njG7Q28CH4dMenuI X-RZG-CLASS-ID: mo00 Received: from [192.168.178.50] ([185.61.122.30]) by smtp.strato.de (RZmta 37.3 AUTH) with ESMTPSA id 507672r1OKO9Edd (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate); Tue, 24 Feb 2015 21:24:09 +0100 (CET) Message-ID: <54ECDDE1.3040507@dawncrow.de> Date: Tue, 24 Feb 2015 21:24:01 +0100 From: =?UTF-8?B?QW5kcsOpIEhlbnRzY2hlbA==?= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: buildroot@busybox.net Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH v9] wine: New package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Adds new package: wine Wine is a compatibility layer capable of running Windows applications on Linux. Signed-off-by: André Hentschel Cc: Yann E. MORIN Tested-by: "Yann E. MORIN" [Only build-tested, not run-time tested y lack of Windows apps] Acked-by: "Yann E. MORIN" --- For the sake of it, here is v9 :) 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 try 8: Removed dependencies on IPv6 and threads, fixed hash and indentation try 9: Fixed a comment and an indentation package/Config.in | 1 + package/wine/Config.in | 21 ++++ package/wine/wine.hash | 3 + package/wine/wine.mk | 293 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 318 insertions(+) diff --git a/package/Config.in b/package/Config.in index fe3d3d0..23ac9f2 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1043,6 +1043,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..26de143 --- /dev/null +++ b/package/wine/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_WINE + bool "wine" + 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" + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_i386 + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/wine/wine.hash b/package/wine/wine.hash new file mode 100644 index 0000000..71d633c --- /dev/null +++ b/package/wine/wine.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/wine/files/Source/ +md5 0f6c56f86befe38e219090915f81f48a wine-1.6.2.tar.bz2 +sha1 574b9ccedbf213622b7ee55f715764673fc27692 wine-1.6.2.tar.bz2 diff --git a/package/wine/wine.mk b/package/wine/wine.mk new file mode 100644 index 0000000..4873c60 --- /dev/null +++ b/package/wine/wine.mk @@ -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. +# 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))" +endif + +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 + +# To support freetype in wine we also need freetype in host-wine for the cross compiling tools +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_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_XLIB_LIBX11),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 + +# Wine needs to enable 64-bit build tools on 64-bit host +ifeq ($(HOSTARCH),x86_64) +HOST_WINE_CONF_OPTS += --enable-win64 +endif + +# Wine only needs the host tools to be built, so cut-down the +# build time by building just what we need. +define HOST_WINE_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) \ + tools \ + tools/widl \ + tools/winebuild \ + tools/winegcc \ + tools/wmc \ + tools/wrc +endef + +# Wine only needs its host variant to be built, not that it is +# installed, as it uses the tools from the build directory. But +# we have no way in Buildroot to state that a host package should +# not be installed. So, just provide an noop install command. +define HOST_WINE_INSTALL_CMDS + : +endef + +# We are focused on the cross compiling tools, disable everything else +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-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))