Eventually we all get to this point I guess where we just get tired of waiting for other people to provide a fresh Blender build with our desired patch for our specific OS and start building Blender on our own.
Now there are plenty of tutorials on how to build Blender from trunk in easy step-by-step guides and yes, that part is easy. However I have not found ONE SINGLE tutorial/guide/helpful tip on how to build Blender with a patch. The closest thing I have found is "Use ‘patch -p0 < patch_file.patch’ ", to the über-experienced super developer this might be so totally obvious that it’s not even worth mentioning but to the total newbie this says absolutely nothing at all.
Apparently all you have to do in Windows is to right-click the root svn directory and use “Apply patch” with tortoise svn. On Linux it doesn’t seem to be so simple. Where do I write it? Where do I apply the patch? When do I apply it, before or after “make”?
So, first thing’s first. I’m trying to build Blender on Linux. I’ve followed this guide and successfully built Blender both from latest svn and from an older source using Cmake. However this is where I am stuck. After some mucking around I figured that I should put the patch file in the root cmake directory and use "patch -p0 < ‘patch_file.patch’ " in the terminal from the root directory before I use “make”?
The errors I’ve encountered from doing that have ranged from
can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: release/scripts/startup/bl_ui/properties_data_lamp.py |=================================================================== |--- release/scripts/startup/bl_ui/properties_data_lamp.py (revision 57511) |+++ release/scripts/startup/bl_ui/properties_data_lamp.py (working copy) -------------------------- File to patch:
svn: E155007: '/Desktop/BlenderTestBuild' is not a working copy
I’ve tried patching it using “patch -p0 < patch.patch”, “patch -i patch.patch” and “svn patch patch.patch” and I suppose they are different commands for different file types (.patch or .diff) but there’s no clear indication on what command to use for which filetype. I’ve tried to patch several different patches using both the latest revision of Blender and old releases. I managed to get one patch to patch the files one time (It said successfully patched a bunch of files) but then the “make” command failed to build Blender and since then I haven’t been able to patch it again, even using the same steps for the same patch from the same source in the same directory.
After 15 hours of trial and error I now give up and ask here. What am I doing wrong?