Not sure what the syntax is in Linux.
On Windows it would be:
cd \path\to\Lazarus
patch -p0 < test.patch
The patch though is easy, just look at it, open the sourcefiles, make the changes (+ markes a line that is added, - marks a line that is deleted. In essence it just comments 2 lines).
After that rebuild Lazarus.
Bart