UPDATE (10th Jan 2013): See here for Wine 1.5.21 using the multiarch approach: http://verahill.blogspot.com.au/2013/01/308-compiling-wine-1521-on-debian.html
This time we'll be cheating and using the carbon-dev.org debian rules to build wine 1.5.19, which works amazingly well with a tiny bit of editing. In spite of what it looks like, this build is easy.
This is also my first encounter with multiarch since libgsm was causing issues (think it's moved out of ia32). Ultimately, multiarch will be the proper way to build 32-bit wine anyway, but I'll deal with that some other day.
Interesting fact: if you try to build with ... 1>build.log 2> build.err the build will fail since files are changing in the main directory during build. Make sure that you do e.g. .. 1> ../build.log 2> ../build.err if you want to track the build.
Finally, I've also built wine 1.5.18 this way, in addition to wine 1.5.19.
The build starts here:
Here's my current best guess at dependencies (Note that multiarch on ubuntu is a little bit different from Debian.):
sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install ia32-libs ia32-libs-dev bison flex gcc libc6-dev libfontconfig-dev libfreetype6-dev libglu-dev libgsm1-dev libice-dev libjpeg-dev libldap-dev libmpg123-dev libncurses5-dev libopenal-dev libpng-dev libsm-dev libssl-dev libusb-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxml2-dev libxrandr-dev libxrender-dev libxslt-dev libxt-dev libxxf86vm-dev make libcapi20-dev liblcms-dev libsane-dev libhal-dev libdbus-1-dev valgrind prelink libcups2-dev opencl-dev lib32opencl1 oss4-dev gettext lib32v4l-dev lib32ncurses5-dev lib32asound2-dev libtiff4-dev libgphoto2-2-dev libxkbfile-dev libxxf86dga-dev freeglut3-dev unixodbc-dev gcc-multilib sudo apt-get install libgsm1:i386Once you've got that sorted, it is time to download the sources:Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: gcc-4.7-base:i386 libc6:i386 libc6-i686:i386 libgcc1:i386 Suggested packages: glibc-doc:i386 locales:i386 The following NEW packages will be installed: gcc-4.7-base:i386 libc6:i386 libc6-i686:i386 libgcc1:i386 libgsm1:i386 0 upgraded, 5 newly installed, 0 to remove and 2 not upgraded. Need to get 5,412 kB of archives. After this operation, 11.9 MB of additional disk space will be used. [..]
mkdir -p ~/tmp/wine_1.5.19_carbon/ cd ~/tmp/wine_1.5.19_carbon/ wget http://mirrors.ibiblio.org/wine/source/1.5/wine-1.5.19.tar.bz2 -O wine-unstable_1.5.19.orig.tar.bz2 tar xvf wine-unstable_1.5.19.orig.tar.bz2 cd wine-1.5.19/ wget http://dev.carbon-project.org/debian/wine-unstable/wine-unstable_1.5.5-0.1.debian.tar.bz2 tar xvf wine-unstable_1.5.5-0.1.debian.tar.bz2 rm wine-unstable_1.5.5-0.1.debian.tar.bz2
We could do the editing the proper way, or the quick way. Since I'm not really that familiar with build debian packages the right way (I cheat using checkinstall) we're doing this the quick and dirty way:
sed -i 's/1.5.5/1.5.19/g' debian/changelog sed -i 's/\-4.5//g' debian/rules sed -i 's/\-4.5//g' debian/control sed -i 's/\-4.5//g' debian/control.in
Next, edit debian/patches/series and change it from
to1 debian-changes-from-1.1.32-1.patch 2 readd_xpm.patch 3 function_grep.patch 4 Bug#29669_proposed-fix.patch 5 fix-winegcc-paths.patch 6 Bug#28898_squashed-proposed-patches.patch 7 Bug#28201_proposed-fix-modified.patch
1 debian-changes-from-1.1.32-1.patch 2 readd_xpm.patch 3 function_grep.patch
time dpkg-buildpackage -uc -us
The entire build takes about 40 minutes and gives the following files:
../libwine-alsa-unstable_1.5.19-0.1_amd64.deb ../libwine-dbg-unstable_1.5.19-0.1_amd64.deb ../libwine-ldap-unstable_1.5.19-0.1_amd64.deb ../libwine-sane-unstable_1.5.19-0.1_amd64.deb ../libwine-bin-unstable_1.5.19-0.1_amd64.deb ../libwine-dev-unstable_1.5.19-0.1_amd64.deb ../libwine-openal-unstable_1.5.19-0.1_amd64.deb ../libwine-unstable_1.5.19-0.1_amd64.deb ../libwine-capi-unstable_1.5.19-0.1_amd64.deb ../libwine-gl-unstable_1.5.19-0.1_amd64.deb ../libwine-oss-unstable_1.5.19-0.1_amd64.deb ../wine-bin-unstable_1.5.19-0.1_amd64.deb ../libwine-cms-unstable_1.5.19-0.1_amd64.deb ../libwine-gphoto2-unstable_1.5.19-0.1_amd64.deb ../libwine-print-unstable_1.5.19-0.1_amd64.deb ../wine-unstable_1.5.19-0.1_amd64.deb
cd ../ sudo dpkg -i *.deb
And you're done.
To confirm what version you're using (and get a screenshot like above) do
winecfgand click on 'about'.
Links to this post: