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 220.127.116.11 need to be patched.
First, you rename the libreoffice-18.104.22.168 directory to libreoffice-22.214.171.124.old:
mv libreoffice-126.96.36.199 libreoffice-188.8.131.52.old
Then create a replica directory libreoffice-184.108.40.206.new:
cp -r libreoffice-220.127.116.11.old libreoffice-18.104.22.168.new
libreoffice-22.214.171.124.new/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 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' \ libreoffice-126.96.36.199.new/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
Now we create the
diff -Naur libreoffice-188.8.131.52.old/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx \ libreoffice-184.108.40.206.new/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx > libreoffice-220.127.116.11-poppler71-1.patch
The contents of the patch file are as follows:
--- libreoffice-18.104.22.168.old/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2018-10-30 02:55:29.000000000 +0700 +++ libreoffice-22.214.171.124.new/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx 2018-12-02 09:55:57.250834967 +0700 @@ -20,6 +20,10 @@ #ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_XPDFWRAPPER_PDFIOUTDEV_GPL_HXX #define INCLUDED_SDEXT_SOURCE_PDFIMPORT_XPDFWRAPPER_PDFIOUTDEV_GPL_HXX +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-126.96.36.199-poppler71-1.patchShare on Twitter Share on Facebook Share on Linked In
Can't see mail in Inbox? Check your Spam folder.