pfr How could I patch all these files at once using patch ?
Check the patch first:
$ tar -xf /some/path/ueberzug-18.1.9.tar.gz
$ patch -C -p0 < /tmp/ueberzug-18.1.9.patch
If there are no errors, apply the patch for real:
$ patch -p0 -V none < /tmp/ueberzug-18.1.9.patch
You can also
cd ueberzug-18.1.9 and apply the same patch from there, but then, you'll have to strip one path component from the file paths in the patch file:
$ cd ueberzug-18.1.9
$ patch -p1 -V none < /tmp/ueberzug-18.1.9.patch
You can also use
-p2 and strip 2 components, but, for that to work, you'll have to:
a) split the patch file itself into 3 or 4 pieces (one for each directory, or, one for each file to be patched, resp.,), and
b) cd into each of the directories in turn and apply the correct patch fragments in each.