summaryrefslogtreecommitdiff
path: root/app-text/katarakt/files/katarakt-0.2-poppler.patch
blob: 7979bf6a59cd199423ad05dc36015dd2bcd97011 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 23b68e9c48204d43b37b23735ad9ea0b219fec7b Mon Sep 17 00:00:00 2001
From: Philipp Erhardt <Philipp.Erhardt@informatik.stud.uni-erlangen.de>
Date: Mon, 19 Oct 2020 20:42:37 +0200
Subject: [PATCH] Fix compilation if the version number contains a leading zero

---
 katarakt.pro | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/katarakt.pro b/katarakt.pro
index a632713db2ce..84cd59797d0a 100644
--- a/katarakt.pro
+++ b/katarakt.pro
@@ -17,9 +17,9 @@ unix {
 
     isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config    # same as in link_pkgconfig.prf
     POPPLER_VERSION = $$system($$PKG_CONFIG --modversion $$POPPLER)
-    POPPLER_VERSION_MAJOR = $$system(echo "$$POPPLER_VERSION" | cut -d . -f 1)
-    POPPLER_VERSION_MINOR = $$system(echo "$$POPPLER_VERSION" | cut -d . -f 2)
-    POPPLER_VERSION_MICRO = $$system(echo "$$POPPLER_VERSION" | cut -d . -f 3)
+    POPPLER_VERSION_MAJOR = $$system(echo "$$POPPLER_VERSION" | cut -d . -f 1 | sed "\'s,^0*\\(.\\),\1,\'")
+    POPPLER_VERSION_MINOR = $$system(echo "$$POPPLER_VERSION" | cut -d . -f 2 | sed "\'s,^0*\\(.\\),\1,\'")
+    POPPLER_VERSION_MICRO = $$system(echo "$$POPPLER_VERSION" | cut -d . -f 3 | sed "\'s,^0*\\(.\\),\1,\'")
 
     DEFINES += POPPLER_VERSION_MAJOR=$$POPPLER_VERSION_MAJOR
     DEFINES += POPPLER_VERSION_MINOR=$$POPPLER_VERSION_MINOR
-- 
2.33.0