Difference between revisions of "How to apply a patch to scribus sourcecode"

From Scribus Wiki
Jump to: navigation, search
(added Testing category)
(explain and clean)
Line 1: Line 1:
 
[[Category:Development]][[Category:FAQ]][[Category:Testing]]
 
[[Category:Development]][[Category:FAQ]][[Category:Testing]]
 
 
See : http://jungels.net/articles/diff-patch-ten-minutes.html
 
See : http://jungels.net/articles/diff-patch-ten-minutes.html
  
{{Template:Update}}
+
==== Apply a patch ====
 
 
== Download Scribus source via svn ==
 
Create a SVN repository on your computer (use svn command in a console window to download the right source) 
 
  
See [[Building_SVN_versions_with_CMake]]
+
* Get the patch. Usually you get download it off the [http://bugs.scribus.net Scribus bug tracker]. Its extension is usually .diff or .patch
  
== Get patch file ==
+
* Look for the date the patch has been created and deduce the svn version that was used to create the patch : the patch fits a specified svn state, and might not be ok in a later state. This is particularly important for patches that modify lot of files, or files that change often, or that have been changed recently.
From mailing list or bug tracker
 
'''Needs to be expanded'''
 
: Is there a direct way people can download patches beside copy/paste from ML or downloading from Mantis?
 
  
 +
* Checkout svn for that specific version, using the -r option
  
Or create a patch file out of your modified source, agains svn version :
+
* go to your svn source folder and copy the patch file there
svn diff -x -u -x -w -x -b > nameofyourpatch.patch
 
  
== Apply the patch ==
+
* Apply the patch using the patch command.
Use the patch command in your console.
+
When the patch file has been correctly prepared with normalized options, the following command should be ok :
'''Needs to be expanded'''
+
patch -p1 < thepatchfile.patch
  
== Compile the source ==
 
Use QT Creator for code-browsing and compiling
 
'''Needs to be expanded'''
 
=== Linux ===
 
  
=== OS X ===
+
==== Create a patch ====
* [[Macports]]
 
* [[Scribus and Homebrew]]
 
  
=== Windows ===
+
Create a patch file out of your modified source, against svn version :
  
==Related==
+
svn diff -x -u -x -w -x -b > nameofyourpatch.patch
* [[Building_SVN_versions_with_CMake]]
 
  
<hr />
 
  
=TODO=
+
==== Links ====
*Add sub-sections for all major platforms
+
* See [[Building_SVN_versions_with_CMake]]
* Add a.l.e's page on how to patch: https://github.com/aoloe/htdocs-graphicslab-archive/blob/master/ui_iv_iu/pages/Howto.Patch  
+
* how to patch: https://github.com/aoloe/htdocs-graphicslab-archive/blob/master/ui_iv_iu/pages/Howto.Patch  
=== OS X ===
 
 
* Specifying patches in Homebrew formulas (https://github.com/Homebrew/homebrew/wiki/Formula-Cookbook#patches)
 
* Specifying patches in Homebrew formulas (https://github.com/Homebrew/homebrew/wiki/Formula-Cookbook#patches)

Revision as of 15:57, 17 October 2014

See : http://jungels.net/articles/diff-patch-ten-minutes.html

Apply a patch

  • Get the patch. Usually you get download it off the Scribus bug tracker. Its extension is usually .diff or .patch
  • Look for the date the patch has been created and deduce the svn version that was used to create the patch : the patch fits a specified svn state, and might not be ok in a later state. This is particularly important for patches that modify lot of files, or files that change often, or that have been changed recently.
  • Checkout svn for that specific version, using the -r option
  • go to your svn source folder and copy the patch file there
  • Apply the patch using the patch command.

When the patch file has been correctly prepared with normalized options, the following command should be ok : patch -p1 < thepatchfile.patch


Create a patch

Create a patch file out of your modified source, against svn version :

svn diff -x -u -x -w -x -b > nameofyourpatch.patch


Links