Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Packaging

Michael Müller edited this page Oct 3, 2015 · 17 revisions

Info: For Wine < 1.7.34 you have to use the old instructions instead, which are available here.

In case you want to compile Wine Staging or create a package for it, you should follow these instructions. In the past we were using a Makefile to apply our patchset, but this method is deprecated in Wine 1.7.34 and greater - it turned out that this method was just not flexible enough when the number of patches increased. Instead we're now providing a script which can be used to do the same.

Please note that simply applying all patches inside the patches folder won't work. Even when using the script it is still possible to exclude patches if desired, take a look at the end of this document for more details.

Compiling Wine Staging

Before you can start compiling Wine Staging, you need to make sure that you have all necessary dependencies installed. The easiest way to find the appropriate packages for your distribution (especially if you want to create a package) is to take a look at an existing Wine source packages. In case you are using a 64 bit system, you can optionally decide to compile Wine for 32 and 64 bit to create a "WOW64" build, but you will always need at least the 32 bit part. Depending on the Distribution you are using, this can be a bit complicated and you can find some tips in the Wine Wiki.

Wine Staging also supports the following optional dependencies:

Library Function
libpulse PulseAudio support
libattr Windows ACL support
libtxc_dxtn DXTn software decoding / encoding support (*)
libva-x11 GPU video decoding via X11
libva-drm GPU video decoding via DRM
libgtk-3 GTK3 theming support

(*) Since 1.7.37 it is not necessary anymore to have this library available at build time, if it is called either libtxc_dxtn.so or libtxc_dxtn_s2tc.so.0. If your distro uses a library with a different name, you still need it. This change was done to simplify building Wine Staging on distros where libtxc_dxtn is not available in the official repositories.

The compilation will also continue without these libraries installed, though you may want to provide as much features as possible if you are creating a package.

Instructions

The following instructions (based on the Gentoo Wiki) will explain how to compile Wine Staging. If you encounter any problems, feel free to join our IRC channel #wine-staging.

As the first step please grab the latest Wine source (or use the git repos for development):

wget http://prdownloads.sourceforge.net/wine/wine-1.7.38.tar.bz2 
wget https://github.com/wine-compholio/wine-staging/archive/v1.7.38.tar.gz

Extract the archives:

tar xvjf wine-1*.tar.bz2
cd wine-1*
tar xvzf ../v1.7.38.tar.gz --strip-components 1

And apply the patches:

./patches/patchinstall.sh DESTDIR="$(pwd)" --all

Afterwards run configure (you can also specify a prefix if you don't want to install Wine Staging system-wide: --prefix=$HOME/staging-test):

./configure --with-xattr

Before you continue you should make sure that ./configure doesn't show any warnings (look at the end of the output). If there are any warnings, this most likely means that you're missing some important header files. Install them and repeat the ./configure step until all problems are fixed.

Afterwards compile everything (and grab a cup of coffee):

make

And install it (you only need sudo for a system-wide installation):

sudo make install

Excluding patches

It is also possible to apply only a subset of the patches, for example if you're compiling for a distribution where PulseAudio is not installed, or if you just don't like a specific patchset. Please note that some patchsets depend on each other, and requesting an impossible situation might result in a failure to apply all patches.

Lets assume you want to exclude the patchset in directory DIRNAME, then just invoke the script like this:

./patches/patchinstall.sh DESTDIR="$(pwd)" --all -W DIRNAME

Using the same method its also possible to exclude multiple patchsets. If you want to exclude a very large number of patches, it is easier to do specify a list of patches which should be included instead. To apply for example only the patchsets in directory DIRNAME1 and DIRNAME2, you can use:

./patches/patchinstall.sh DESTDIR="$(pwd)" DIRNAME1 DIRNAME2

Additional notes for package maintainers

Some applications and games require fonts like Arial or Courier to run properly. In order to fix this problem Wine Staging contains some open source replacement fonts which use the same metrics as the original fonts by Microsoft. These fonts are licensed under different terms than Wine and you will need to ship the according license files.

By applying the font patches the LICENSE file is being updated to reflect which files are covered by which license. Moreover you will also get the following new files containing the individual licenses: COPYING.arial, COPYING.cour and COPYING.msyh. Simply add these files to your package.

Clone this wiki locally