View previous topic :: View next topic |
Author |
Message |
rianquinn n00b

Joined: 01 Jul 2005 Posts: 29
|
Posted: Sun Feb 12, 2006 8:00 pm Post subject: How to patch WineHQ |
|
|
Ok, I have a Tablet-PC, and I installed wine 0.9.7 and it worked. Then I installed EverNote 1.1 because it is said to work after patching Wine. I have the patch. It is a ".diff" file. How do I apply the patch.
Sorry this is probably Linux 101, but I can't seem to find anything to help me with this.
Thanks, |
|
Back to top |
|
 |
Blood Fluke Apprentice


Joined: 15 Sep 2005 Posts: 224
|
Posted: Mon Feb 13, 2006 12:48 am Post subject: |
|
|
You use the GNU "patch" utility.
It's probably installed by default. |
|
Back to top |
|
 |
PaulBredbury Watchman


Joined: 14 Jul 2005 Posts: 7310
|
Posted: Mon Feb 13, 2006 12:54 am Post subject: |
|
|
As a starter:
|
|
Back to top |
|
 |
ecatmur Advocate


Joined: 20 Oct 2003 Posts: 3595 Location: Edinburgh
|
|
Back to top |
|
 |
-TooL Tux's lil' helper

Joined: 18 Nov 2004 Posts: 75
|
|
Back to top |
|
 |
StringCheesian l33t

Joined: 21 Oct 2003 Posts: 887
|
Posted: Thu Mar 02, 2006 1:47 am Post subject: |
|
|
-TooL wrote: | How would I apply it? There is no HowTo anywhere, and im a newbie trying to help them fix a bug. That patch is an attempt at fixing it. |
Here's a quick tutorial and an example of how to apply that patch:
The syntax is like this: "patch -pnumber < filename.patch"
The -pnumber part: For example, if the patch file says to replace "ignore_me/old/src/blah.c" with "ignore_me/new/src/blah.c" then -p2 would tell patch that we're really talking about "src/blah.c". Basically -pnumber means skip the first number parts of paths given in the patch file.
In your case, if you extract the wine source code you'll see a "dlls" folder. Now look in the patch: Code: | --- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c | Should be "dlls/" not "a/dlls/", so we need "-p1".
Most patch files need -p1 or -p0, anything else is rare. As far as I know looking at the patch file is the only way to determine which to use.
The "<": Normally patch will ask you to type out some patch data for it. This basically tells bash to feed a file into it instead so you don't have to.
"filename.patch": The path and filename to the patch file.
So for example: Code: | # Ask portage to extract the wine source code for us:
ebuild /usr/portage/app-emulation/wine/wine-0.9.8-r1.ebuild unpack
# Go to the directory portage unpacks to:
cd /var/tmp/portage/wine-0.9.8-r1/work/wine-0.9.8
# Apply the patch:
patch -p1 < /path/to/the/patch/file/name_of_the_patch_file.patch
# Now tell portage to emerge it (without extracting over our work):
FEATURES="keepwork" emerge wine |
|
|
Back to top |
|
 |
-TooL Tux's lil' helper

Joined: 18 Nov 2004 Posts: 75
|
Posted: Thu Mar 02, 2006 4:01 am Post subject: |
|
|
I understand the syntax, but I dont understand the file itself, or how/what to save it as.
Like where do I start the highlight for the copy and paste, and do I save it as patch.patch (or whatever I wanna name it as?).
When I do a wget on the URL it saves the URL as a whole, not a .patch file.
I understand the steps:
1. Unpack source code.
2. Go to the directory where its unpacked.
3. Apply patch to source code.
4. Compile the new patched source code (with emerge).
Very easy steps, just I dont understand the patch file url thingy.. _________________ n00b4lyfe |
|
Back to top |
|
 |
StringCheesian l33t

Joined: 21 Oct 2003 Posts: 887
|
Posted: Thu Mar 02, 2006 4:35 am Post subject: |
|
|
-TooL wrote: | Like where do I start the highlight for the copy and paste, and do I save it as patch.patch (or whatever I wanna name it as?). |
I don't know anything about patch file syntax., I just used "Save Page As..." in Firefox and it worked. It doesn't matter what you name it.
-TooL wrote: | When I do a wget on the URL it saves the URL as a whole, not a .patch file. |
Same here with wget (it also downloads a completely different page if you forget to put the URL in quotation marks), but Firefox saves as "git-d16c72dea57e783b76137bdb885df28d0dd36678.patch". |
|
Back to top |
|
 |
-TooL Tux's lil' helper

Joined: 18 Nov 2004 Posts: 75
|
Posted: Thu Mar 02, 2006 9:38 am Post subject: |
|
|
That worked! Thanks for the help. _________________ n00b4lyfe |
|
Back to top |
|
 |
|