You are not logged in.

#1 2009-02-10 22:49:09

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

[SOLVED] Patch Wine on x86_64

Ok, so I would like to play WC3 with wine.

Now to play WC3 I need to patch Wine with this:
http://bugs.winehq.org/attachment.cgi?id=8368

So back in the Ubuntu days I just downloaded the wine soure, patched it with:
patch -p1 < war3patch
then the standard:
./configure
make
sudo make install

Now, I understand this doesn't work in Arch.

I read the wiki on wine, and it says there is not a x86_64 version of wine, but you can just download the "bin32-wine" from AUR, and install that.

So how do apply my patch to the PKGBUILD or am I going about this completely wrong?

Last edited by Dethredic (2009-02-11 18:12:57)

Offline

#2 2009-02-10 22:53:40

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] Patch Wine on x86_64

Ubuntu has a multi-lib setup by default, so you compiled 32 bit Wine with a 32 bit tool chain. These threads come up quite frequently, and I believe that the final solution always ends something like "create a 32 bit chroot and compile it from there".

Offline

#3 2009-02-10 22:57:52

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: [SOLVED] Patch Wine on x86_64

skottish wrote:

Ubuntu has a multi-lib setup by default, so you compiled 32 bit Wine with a 32 bit tool chain. These threads come up quite frequently, and I believe that the final solution always ends something like "create a 32 bit chroot and compile it from there".

Ok, someone told me I had to do that. I made the chroot and am in it (I think), but I am not really sure what I have to do...

I changed directories to the director with the patched source, and I get:
bash-3.2# /etc/rc.d/arch32 start
:: Starting Arch32 chroot                                                [DONE]
bash-3.2# chroot /opt/arch32
bash-3.2# cd /home/phil/builds/wine-1.1.14
bash-3.2# makepkg -s --asroot
==> ERROR: PKGBUILD does not exist.

I could be doing this chrooting thing completely wrong.

Last edited by Dethredic (2009-02-10 23:03:41)

Offline

#4 2009-02-10 23:04:35

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] Patch Wine on x86_64

It looks like there's nothing in the Arch-Wine folder other than the PKGBUILD. I added the patch name to the source array, deleted the md5sums line, and put the patch command right before configure. Save this as PKGBUILD and save it in its own folder. Put the patch in the same directory, and run makepkg.

# $Id$
# Maintainer: Eduardo Romero <eduardo@archlinux.org>
pkgname=wine
pkgver=1.1.14
pkgrel=1
pkgdesc="A compatibility layer for running Windows programs"
url="http://www.winehq.com"
arch=('i686')
license=('LGPL')
depends=('fontconfig' 'libldap' 'libxslt' 'lcms' 'libxxf86dga' \
         'libxcursor' 'libxrandr' 'libxdamage' 'mesa')
makedepends=('cups' 'sane' 'fontforge' 'flex' 'bison' 'libgphoto2' 
             'libxinerama' 'esound' 'giflib' 'ncurses' 'libxcomposite' 'samba' \
             'libxpm' 'libxmu' 'libxxf86vm' 'perl' 'libxml2')
optdepends=("cups" "sane" "libgphoto2" "alsa-lib" "giflib" "libjpeg" "libpng" \
           "perl")
source=(http://downloads.sourceforge.net/wine/wine-$pkgver.tar.bz2 war3patch)


build() {
  cd $srcdir/$pkgname-$pkgver

  patch -p1 < war3patch

  ./configure --prefix=/usr --sysconfdir=/etc --with-x
  make depend || return 1
  make || return 1
  make prefix=$pkgdir/usr install || return 1
  mkdir -p $pkgdir/etc/wine
}

Offline

#5 2009-02-11 00:14:00

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: [SOLVED] Patch Wine on x86_64

Ok, I followed your instructions in my x32 chroot (I hope I was supposed to do that).
After about an hour of downloading/installing dependencies and making or whatever it does after that, it gave the the  .pkg.tar.gz. I installed this with: pacman -U wine-1.1.14-1-i686.pkg.tar.gz.

I then ran "winecfg" (I was still root cause in my chroot I can't get to my normal user, dunno why? su phil isn't working). I did get the config menu.

I then tried running "winecfg" not in my chroot and it says it can't find the command.

So, does this mean that whenever I need to run / install warcraft 3 I need to do it via the root user in my chroot? Will it have integration with my openbox environment? By this I mean if I am in thunar, can I right click and go open with wine?

If not, is there an easy way to do this?

Last edited by Dethredic (2009-02-11 00:20:54)

Offline

#6 2009-02-11 00:26:10

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] Patch Wine on x86_64

Unfortunately I don't know anything about chroot environments. I do know that if the package was installed with your 64 bit stuff, you should be able to use the dependencies listed with the bin32-wine package (lib32*). Of course this means that there's a bunch more downloading to do.

Offline

#7 2009-02-11 00:36:38

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: [SOLVED] Patch Wine on x86_64

Ok, I am not sure I 100% understood you. I tried:
phil ~  $  cd '/home/phil/builds/wine'
phil ~/builds/wine  $  makepkg -s
==> ERROR: wine is not available for the 'x86_64' architecture.
    Note that many packages may need a line added to their PKGBUILD
    such as arch=('x86_64').
(that was not in my chroot, it was as my normal user)

The wiki says for x86_64 users to use this PKGBUILD:
http://aur.archlinux.org/packages/bin32 … e/PKGBUILD

If you applied the patch to that then I installed it normally (not from chroot) would that not work?

Offline

#8 2009-02-11 00:44:29

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: [SOLVED] Patch Wine on x86_64

Ok, so currently you have a 32-bit package that you built in your chroot, you have two choices
1) keep the chroot, if you copy or link the /etc/passwd and /etc/group files from your arch64 system into the chroot you should be able to use your regular user (you might want to check the 'configure the new system' part of http://wiki.archlinux.org/index.php/Arc … bit_system)

2) use the bin32-wine PKGBUILD to create a package that you can install on your 64bit system.  If you don't already have them this will require a number of lib32 packages from [community].  You shold just be able to change the source array to:
source=("binarynames" "/path/to/your/i686/package/wine-i686.pkg.tar.gz")
you will also need to generate the correct md5sum for that file, then a simple makepkg will give you a package that you can install under your main system and you won't need the chroot to run wine.

If you think that you will want to keep up with the (AFAIK frequent) wine releases and maintain the patch then its probably simplest to keep the chroot since you will need to compile each time to apply the patch.  If you aren't going to update then you might want to go the lib32* route.

Offline

#9 2009-02-11 00:47:53

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: [SOLVED] Patch Wine on x86_64

Dethredic wrote:

The wiki says for x86_64 users to use this PKGBUILD:
http://aur.archlinux.org/packages/bin32 … e/PKGBUILD

If you applied the patch to that then I installed it normally (not from chroot) would that not work?

No, if you look at the bin32-wine PKGBUILD all it is doing is downloading the pre-compiled binary package produced for arch32, moving some of the files around so they don't interfeer with the 64bit files and packaging the result up, since its only dealing with binary files its not possible to patch it.

Since arch64 is not a multi-lib environment the only way to actually compile 32-bit code is via a chroot.

Last edited by ghostHack (2009-02-11 00:50:49)

Offline

#10 2009-02-11 00:52:36

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] Patch Wine on x86_64

My instructions were on to build a patched version of Wine on your system. It will need to be built from within the chroot environment because it's a 32 bit program. I believe that there are other ways, but from what I read that this is the simplest.

In order to run the program, you'll either need to install Wine in the chroot and run it from there, or you'll need to install a bunch of 32 bit libraries in your 64 bit install. In Arch those libraries are packaged as lib32-<library name>.

Offline

#11 2009-02-11 00:58:29

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: [SOLVED] Patch Wine on x86_64

ghostHack wrote:

Ok, so currently you have a 32-bit package that you built in your chroot, you have two choices
1) keep the chroot, if you copy or link the /etc/passwd and /etc/group files from your arch64 system into the chroot you should be able to use your regular user (you might want to check the 'configure the new system' part of http://wiki.archlinux.org/index.php/Arc … bit_system)

2) use the bin32-wine PKGBUILD to create a package that you can install on your 64bit system.  If you don't already have them this will require a number of lib32 packages from [community].  You shold just be able to change the source array to:
source=("binarynames" "/path/to/your/i686/package/wine-i686.pkg.tar.gz")
you will also need to generate the correct md5sum for that file, then a simple makepkg will give you a package that you can install under your main system and you won't need the chroot to run wine.

If you think that you will want to keep up with the (AFAIK frequent) wine releases and maintain the patch then its probably simplest to keep the chroot since you will need to compile each time to apply the patch.  If you aren't going to update then you might want to go the lib32* route.

Well, if WC3 works, then I don't see myself updating.

I changed the source line fine, but I don't know how to generate the md5sum.

Offline

#12 2009-02-11 01:02:37

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] Patch Wine on x86_64

You can simply remove it. If you need to generate md5sums, use makepkg -g without any being in the file. But that's something you add in after a successful build.

Offline

#13 2009-02-11 01:13:58

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: [SOLVED] Patch Wine on x86_64

Almost there....

phil ~/builds/bin32-wine  $  makepkg -s
==> Making package: bin32-wine 1.1.14-1 x86_64 (Tue Feb 10 17:08:24 PST 2009)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Found binarynames in build dir
==> ERROR: ~/builds/wine/wine-1.1.14-1-i686.pkg.tar.gz was not found in the build directory and is not a URL.
phil ~/builds/bin32-wine  $  cd ..
phil ~/builds  $  cd wine
phil ~/builds/wine  $  ls -l
total 30752
-rwxrwxr-x 1 phil users      968 2009-02-10 15:08 PKGBUILD
-rwxrwxr-x 1 phil users     1021 2009-02-10 15:10 PKGBUILD.other
-rwxrwxr-x 1 phil users        0 2009-02-10 15:10 PKGBUILD.other~
-rwxrwxr-x 1 phil users      968 2009-02-10 15:07 PKGBUILD~
drwxrwxr-x 4 phil users      4096 2009-02-10 16:04 pkg
drwxrwxr-x 3 phil users      4096 2009-02-10 15:42 src
-rwxrwxr-x 1 phil users      927 2009-02-10 07:35 war3patch
-rwxrwxr-x 1 phil users  16438445 2009-02-10 16:04 wine-1.1.14-1-i686.pkg.tar.gz
-rwxrwxr-x 1 phil users  15023413 2009-01-30 08:54 wine-1.1.14.tar.bz2
phil ~/builds/wine  $

I the wine-1.1.14-1-i686.pkg.tar.gz was originally owned by root (prob cause it was created in chroot),  but I changed that and the permissions to 775, but that didn't help. Is the path name wrong or something? I don't see it...

Offline

#14 2009-02-11 11:02:11

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: [SOLVED] Patch Wine on x86_64

you need to put the proper path, i.e. /home/phil/builds/wine/wine-1.1.14-1-i686.pkg.tar.gz in the sources array

Offline

#15 2009-02-11 12:51:22

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: [SOLVED] Patch Wine on x86_64

ghostHack wrote:

you need to put the proper path, i.e. /home/phil/builds/wine/wine-1.1.14-1-i686.pkg.tar.gz in the sources array

I still get the same error:

[phil@Arch ~]$ cd '/home/phil/builds/bin32-wine'
[phil@Arch bin32-wine]$ makepkg -s
==> Making package: bin32-wine 1.1.14-1 x86_64 (Wed Feb 11 04:41:16 PST 2009)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
  -> Found binarynames in build dir
==> ERROR: /home/phil/builds/wine/wine-1.1.14-1-i686.pkg.tar.gz was not found in the build directory and is not a URL.
[phil@Arch bin32-wine]$

EDIT: Ok, I just moved the .pkg.tar.gz to the same dir and it worked (changed the source line too of course). The rest went without error, and now I have (hopefully patched) wine running under x86_64.

Thanks to both of you.

Last edited by Dethredic (2009-02-11 12:55:14)

Offline

#16 2009-02-11 18:04:24

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: [SOLVED] Patch Wine on x86_64

Dethredic wrote:
ghostHack wrote:

you need to put the proper path, i.e. /home/phil/builds/wine/wine-1.1.14-1-i686.pkg.tar.gz in the sources array

I still get the same error:

doh roll

sorry for pointing you in the wrong direction there, glad you got it working though.

Offline

Board footer

Powered by FluxBB