How does one apply a patch?

Non release banter
Post Reply
User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

How does one apply a patch?

Post#1 by francois » 23 Jul 2011, 01:03

I am trying to apply a patch needed in the compilation of a package:
viewtopic.php?f=81&t=704

I have googled a little and found patch(1) - Linux man page:
http://linux.die.net/man/1/patch
and found a thread:
http://www.linuxquestions.org/questions ... ost4422822

I still am lost in the clouds.

What is the usual format for a patch? Text file, bash file ...
How does one apply the patch command and where should be the patch located in reference to the package to be patched?
Last edited by francois on 23 Jul 2011, 10:11, edited 1 time in total.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: How doe one apply a patch?

Post#2 by Ahau » 23 Jul 2011, 02:30

Patches are plain text. Put the plain text file, patchfile (or whatever you like) in the root directory of the source you're compiling, then:

patch -p1 < patchfile

That's unfortunately the extent of my knowledge. I'm still struggling with patches as well ;)
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
francois
Contributor
Contributor
Posts: 4902
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

Re: How does one apply a patch?

Post#3 by francois » 23 Jul 2011, 10:57

Thanks Ahau.
Voltaire: Le mieux est l'ennemi du bien.

Post Reply