Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] more than one wine with patches
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
GenProm
Tux's lil' helper
Tux's lil' helper


Joined: 18 Aug 2011
Posts: 90
Location: Germany

PostPosted: Thu Aug 18, 2011 6:43 pm    Post subject: [solved] more than one wine with patches Reply with quote

Hi

Im new to gentoo. In fact i did not even install it yet. But i read the manual 2 times now and im aware that i have to fix the stage3 tarball for sucessful install. But i digress.

I'm a heavy wine user. This means i have different wine installations with different patches. Now im using ubuntu and my layout looks something like this:

wine-XX.tar.bz2 + Some Patch -> compile -> checkinstall -> wineX-with-PatchX.deb
wine-XY.tar.bz2 + Some Patch2 -> compile -> checkinstall -> wineY-with-Patch2.deb

So if i need/want to start a game/programm who needs a specific patch i just install the binary beforehand.

As far as im aware in gentoo i can emerge a wine version who is in the repos.

Question 1: is it possible to patch this version with a custom patch before the emerge compile ?

If so, can i emerge a different wine version and patch it with another patch. How do i switch between versions ?

Question 2: Is there something like checkinstall ? I think, this would be the easiest Option, just build my binaries like before and emerge the needed one onto my system.

I think you get my idea what i need to do. Please be so kind and explain a gentoo way of doing so.
_________________
Thank you for your help.

Manuel


Last edited by GenProm on Thu Aug 18, 2011 7:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7718
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Aug 18, 2011 6:54 pm    Post subject: Reply with quote

GenProm,

Welcome to Gentoo. Applying a custom patch set is straightforward in Gentoo but requires some domain knowledge. The instructions on how to build the package—including what patches to apply—are contained withing the package's ebuild file. There's one ebuild file per supported version of the package. What you will do to apply a custom set of patches to a package is to copy the particular version of the package's ebuild to your local overlay and modify the ebuild to apply your custom patches. There's a place in the local overlay to store the patches as well (the ./files directory). After that, when you build the package, the patches will be applied. Google Gentoo Local Overlay for more details. Additional background information is in the latter part of the Gentoo Handbook. See Part 3. Working with Portage.

The second part of your question is addressed by Gentoo Portage's ability to build binary packages. Once the package has been built from source with the patches you want, you can make a binary package from the installed package with the quickpkg utility. For instance,
Code:
$ sudo quickpkg wine
 * Building package for app-emulation/wine-1.2.3 ...                                                                  [ ok ]

 * Packages now in '/usr/portage/packages':
 * app-emulation/wine-1.2.3: 24.9M
Once you have built up a set of these binary packages, you can quickly install the binary package, using the --usepkg option to the emerge utility:
Code:
sudo emerge --usepkg =wine-1.2.3
That's about it. Feel free to ask if you have any other questions.

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
GenProm
Tux's lil' helper
Tux's lil' helper


Joined: 18 Aug 2011
Posts: 90
Location: Germany

PostPosted: Thu Aug 18, 2011 7:05 pm    Post subject: Reply with quote

Thanks for the quick, precise and really helpful answer.

This is exactly what i want.
But some new questions have risen up in my bain...

- With you explanation i can see how i can make:

gentoo-rep-version-wine + Patch2 or Patch1 and get 2 binaries to use them easily

Also to clarify: i have to change the local overly file to the new patch i guess...

- What is when i need a version of wine who is not in the gentoo repo. Can i use the normal wine source from winehq.org and somehow tell emerge to use this folder like ~/wine-version-not-in-gentoo as a source for emerge and aplay my patches to them ?
_________________
Thank you for your help.

Manuel
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31847
Location: 56N 3W

PostPosted: Thu Aug 18, 2011 7:11 pm    Post subject: Reply with quote

GenProm,

Welcome to Gentoo.

First the good news, stage tarballs built since early July are fixed. Feel free to check. File a bug if you are still finding issues.

Quote:
Question 1: is it possible to patch this version with a custom patch before the emerge compile

Yes. There are several methods. You can put the ebuild into your local overlay and editi it to apply the patch. This always works
Some ebuilds will apply user supplied patches if the patches are supplied in the the right place in /etc/portage. Support for this varies.

Quote:
If so, can i emerge a different wine version and patch it with another patch. How do i switch between versions ?

Thats two questions. Yes you can do this - use the local overlay approach.

Gentoo supports a method called slotting to allow several versions of the same thing to be installed at the same time. Unfortunately WINE is not slotted, so this cannot be used.
This leave several rather ugly alternatives.

You can have several chroots, each with their own version of WINE and chroot to use the version you need. The drawback is that the chroot needs to have all the supporting libraries that WINE needs too.

You can build your versions of WINE with FEATURES=binpackage set. This saves binaries in /usr/portage/packages. With the binaries made, you can switch between them with
Code:
emarge -K =wine-<ver>
That command removes the installed version, if any and installs using the binary.

Do not edit the distfiles directly as portage contains the filesizes and hash values. It will detect your edits and refuse to build. Do not edit the content of /usr/portage, you edits will be lost at your next emerge --sync.

Potage contains these versions of WINE
Code:
/usr/portage/app-emulation/wine $ ls
ChangeLog          wine-1.3.1.ebuild   wine-1.3.18.ebuild  wine-1.3.26.ebuild
Manifest           wine-1.3.10.ebuild  wine-1.3.19.ebuild  wine-1.3.3.ebuild
files              wine-1.3.11.ebuild  wine-1.3.2.ebuild   wine-1.3.4.ebuild
metadata.xml       wine-1.3.12.ebuild  wine-1.3.20.ebuild  wine-1.3.5.ebuild
wine-1.2.1.ebuild  wine-1.3.13.ebuild  wine-1.3.21.ebuild  wine-1.3.6.ebuild
wine-1.2.2.ebuild  wine-1.3.14.ebuild  wine-1.3.22.ebuild  wine-1.3.7.ebuild
wine-1.2.3.ebuild  wine-1.3.15.ebuild  wine-1.3.23.ebuild  wine-1.3.8.ebuild
wine-1.2.ebuild    wine-1.3.16.ebuild  wine-1.3.24.ebuild  wine-1.3.9.ebuild
wine-1.3.0.ebuild  wine-1.3.17.ebuild  wine-1.3.25.ebuild  wine-9999.ebuild

wine-9999 is special. That builds whatever is in the upstream repository when you do the build
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7718
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Aug 18, 2011 7:20 pm    Post subject: Reply with quote

You're gonna need more domain knowledge. (Like the line from Jaws: We're gonna need a bigger boat!)

It's usually (not always, but usually) a fairly simple matter to create an ebuild for a new version of a package. In fact, it's sometimes as easy as copying the ebuild file. However, note that Gentoo's Portage tree always has lots of versions of wine in it. Right now, we have
Code:
~ $ sudo equery list -p wine
 * Searching for wine ...
[-P-] [  ] app-emulation/wine-1.2:0
[-P-] [  ] app-emulation/wine-1.2.1:0
[-P-] [  ] app-emulation/wine-1.2.2:0
[IP-] [  ] app-emulation/wine-1.2.3:0
[-P-] [ ~] app-emulation/wine-1.3.0:0
[-P-] [ ~] app-emulation/wine-1.3.1:0
[-P-] [ ~] app-emulation/wine-1.3.2:0
[-P-] [ ~] app-emulation/wine-1.3.3:0
[-P-] [ ~] app-emulation/wine-1.3.4:0
[-P-] [ ~] app-emulation/wine-1.3.5:0
[-P-] [ ~] app-emulation/wine-1.3.6:0
[-P-] [ ~] app-emulation/wine-1.3.7:0
[-P-] [ ~] app-emulation/wine-1.3.8:0
[-P-] [ ~] app-emulation/wine-1.3.9:0
[-P-] [ ~] app-emulation/wine-1.3.10:0
[-P-] [ ~] app-emulation/wine-1.3.11:0
[-P-] [ ~] app-emulation/wine-1.3.12:0
[-P-] [ ~] app-emulation/wine-1.3.13:0
[-P-] [ ~] app-emulation/wine-1.3.14:0
[-P-] [ ~] app-emulation/wine-1.3.15:0
[-P-] [ ~] app-emulation/wine-1.3.16:0
[-P-] [ ~] app-emulation/wine-1.3.17:0
[-P-] [ ~] app-emulation/wine-1.3.18:0
[-P-] [ ~] app-emulation/wine-1.3.19:0
[-P-] [ ~] app-emulation/wine-1.3.20:0
[-P-] [ ~] app-emulation/wine-1.3.21:0
[-P-] [ ~] app-emulation/wine-1.3.22:0
[-P-] [ ~] app-emulation/wine-1.3.23:0
[-P-] [ ~] app-emulation/wine-1.3.24:0
[-P-] [ ~] app-emulation/wine-1.3.25:0
[-P-] [ ~] app-emulation/wine-1.3.26:0
[-P-] [ -] app-emulation/wine-9999:0
The -9999 version is a so-called "live" version that is built straight from the upstream vcs repositories; it's about as bleeding edge as you can get.

To clarify your questions about applying different patch sets, let's say you're working with wine-1.3.19. For your first patch set, you'd copy the wine-1.3.19.ebuild file to your local overlay under the name (for instance) wine-1.3.19_p1.ebuild and modify that ebuild to apply your first patch set. For your second patch set, you'd copy it to wine-1.3.19_p2.ebuild and modify the ebuild to apply your second patch set. "_pxx" is one of the allowable suffixes that you can use. "wine" is the invariant package name and "1.3.19_p1" and "1.3.19_p2" are two new versions of the package. Both will be distinctly managed by Portage. Clear?

Portage always looks for source tarballs in "/usr/portage/distfiles". You can just download it to there. However, the tarball's location is listed in the ebuild file. Portage will normally fetch it for you.

- John
_________________
This space intentionally left blank.


Last edited by John R. Graham on Thu Aug 18, 2011 7:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
GenProm
Tux's lil' helper
Tux's lil' helper


Joined: 18 Aug 2011
Posts: 90
Location: Germany

PostPosted: Thu Aug 18, 2011 7:25 pm    Post subject: Reply with quote

Thanks for now i think i will figure the rest with some time and more reading. if not i will reopen. As far a support goes im really impressed with the gentoo-community :-D

I hope install will go fine, tried it once till now and i got some grub erros. I will do a hardware upgrade anyway before my next try.
_________________
Thank you for your help.

Manuel
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1590
Location: 127.0.0.1

PostPosted: Fri Aug 19, 2011 10:06 am    Post subject: Reply with quote

In this particular case, and since wine ebuilds supports the epatch_user function from eutils.eclass you can also easily use this functionality.
Suppose you want to compile wine 1.3.25 with foo.patch, and wine 1.3.26 with bar.patch, you will do the following :

  1. Create directories :
    Code:

    # mkdir -p /etc/portage/patches/app-emulation/{wine-1.3.25,wine-1.3.26}

  2. Move patchs you want to apply where you want :
    Code:

    # mv foo.patch /etc/portage/patches/app-emulation/wine-1.3.25/
    # mv bar.patch /etc/portage/patches/app-emulation/wine-1.3.26/

  3. You will have :
    Quote:

    $ ls /etc/portage/patches/app-emulation/wine-1.3.2*
    /etc/portage/patches/app-emulation/wine-1.3.25:
    foo.patch

    /etc/portage/patches/app-emulation/wine-1.3.26:
    bar.patch

  4. And when emerging each version, you will have :
    Code:

    # emerge =wine-1.3.25

    ...

    Applying user patches from /etc/portage/patches//app-emulation/wine-1.3.25 ...
     *   foo.patch ...              [ ok ]


    Code:

    # emerge =wine-1.3.26

    ...

    Applying user patches from /etc/portage/patches//app-emulation/wine-1.3.26 ...
     *   bar.patch ...              [ ok ]

Back to top
View user's profile Send private message
ExecutorElassus
l33t
l33t


Joined: 11 Mar 2004
Posts: 747
Location: Stuttgart, Germany

PostPosted: Sat Sep 10, 2011 1:18 pm    Post subject: Reply with quote

quick question about wine-9999: if I try to emerge it, I get a "missing keyword" error, but the ebuild has the following:

Code:
if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="git://source.winehq.org/git/wine.git"
        inherit git-2 autotools
        SRC_URI=""
        #KEYWORDS=""
So, how do I set this ebuild to work? Do I simply uncomment that line, and add ~arch to it, to allow it to build? Won't that be overwritten next time the -9999 ebuild is updated?

It's been a while since I've worked with live ebuilds :(

Thanks,

EE
EDIT: whoops, duh: package.keywords is my new boyfriend. nvm =/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum