How to create a .patch file?

(1 comment)

When building open source packages, we don't just get binary packages. The bigger, we approach the scientific and technical achievements and observe the evolution of scientific and technical activities in the world. The scientific and technical achievements in the world are finite, but your imagination and your creative potential based on it are limitless.

Windows believers may not even know: Microsoft has joined the open source community.

Creating a patch file is a basic operation during the building of the packages. You seem to know how to do it. If so, this article lets you visualize a stage where I built the Omarine operating system. If you are a beginner, this article provides detailed instructions on how to create patch files and to patch code.

The Poppler package contains a PDF rendering library and command line tools that are used to manipulate PDF files. Version 0.71.0 of Poppler does not define the GBool data type and the gTrue, gFalse Boolean values. Therefore dependent packages that use old code such as Libreoffice need to be patched.
First, you rename the libreoffice- directory to libreoffice-

mv libreoffice- libreoffice-

Then create a replica directory

cp -r libreoffice-

The file needs to be modified by adding the definition for GBool, gTrue, gFalse, inserting them into line 23:

sed -i '23 i typedef bool GBool;\n#define gTrue true\n#define gFalse false\n' \

Now we create the libreoffice- file:

diff -Naur libreoffice- \ > libreoffice-

The contents of the patch file are as follows:

--- libreoffice- 2018-10-30 02:55:29.000000000 +0700
+++ 2018-12-02 09:55:57.250834967 +0700
@@ -20,6 +20,10 @@

+typedef bool GBool;
+#define gTrue true
+#define gFalse false
#include <sal/types.h>
#include <config_poppler.h>

Performing the patch
Patches can be applied to build package multiple times from the source code. You run the following command:

patch -Np1 -i ../libreoffice-

Current rating: 4


minecraft mod ps3 edition 3 weeks, 1 day ago

Installing 64-bit Java is yet another strategy to raise
the performance of Minecraft. From simple huts and buildings to complex logic gates and sswitch systems employwd to power elaborate cities,
in Minecraft anything is possible. Even though, minecraft might nott exactly
look that great nonettheless it sure offers yyou an adveture like no other.

Link | Reply
Currently unrated

New Comment


required (not published)



What is 9 × 9?


Discount code? It will appear here if you reach more than 100 hits : 1

Top Posts & Pages

Join 1,259 other followers

What is 4 × 1?

Can't see mail in Inbox? Check your Spam folder.

Recent Posts

Follow us

Total views
free icons from