summarylogtreecommitdiffstats
path: root/tecmake-fix-Linux5-build.patch
blob: d15dd02dd3811eb27e10970042a85ff099f55fab (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
--- iup/tecmake.mak	2019-06-14 12:29:33.336492042 +0200
+++ iup/tecmake.mak.new	2019-06-14 12:27:56.818718486 +0200
@@ -299,12 +299,12 @@
 
 ifdef GTK_DEFAULT
   ifndef USE_GTK2
-    ifneq ($(findstring Linux4, $(TEC_UNAME)), )
-      USE_GTK3 = Yes
-    endif
-    ifneq ($(findstring Linux31, $(TEC_UNAME)), )
-      USE_GTK3 = Yes
+    ifneq ($(findstring Linux, $(TEC_UNAME)), )
+      ifeq ($(shell expr $(TEC_SYSVERSION)$(TEC_SYSMINOR) \>= 31), 1)
+        USE_GTK3 = Yes
+      endif
     endif
+
     ifneq ($(findstring cygw, $(TEC_UNAME)), )
       USE_GTK3 = Yes
     endif
@@ -1169,15 +1169,16 @@
     LDIR += $(CD_LIB)
   endif
   
-  ifneq ($(findstring Linux26g4, $(TEC_UNAME)), )
-    LIBS += fontconfig
-  endif
-  ifneq ($(findstring Linux3, $(TEC_UNAME)), )
-    LIBS += fontconfig
-  endif
-  ifneq ($(findstring Linux4, $(TEC_UNAME)), )
-    LIBS += fontconfig
+  ifneq ($(findstring Linux, $(TEC_UNAME)), )
+    ifeq ($(shell expr $(TEC_SYSVERSION) \>= 3), 1)
+      LIBS += fontconfig
+    else
+      ifneq ($(findstring Linux26g4, $(TEC_UNAME)), )
+        LIBS += fontconfig
+      endif
+    endif
   endif
+
   ifneq ($(findstring cygw, $(TEC_UNAME)), )
     LIBS += fontconfig
   endif
@@ -1213,18 +1214,20 @@
 endif
 
 ifdef LINK_WEBKIT
-  ifneq ($(findstring Linux4, $(TEC_UNAME)), )
-    LIBS += webkitgtk-3.0
-  else 
-    ifneq ($(findstring Linux3, $(TEC_UNAME)), )
-      ifdef USE_GTK3
-        LIBS += webkitgtk-3.0
-      else
-        LIBS += webkitgtk-1.0
+  ifneq ($(findstring Linux, $(TEC_UNAME)), )
+    ifeq ($(shell expr $(TEC_SYSVERSION) \>= 4), 1)
+      LIBS += webkitgtk-3.0
+    else
+      ifneq ($(findstring Linux3, $(TEC_UNAME)), )
+        ifdef USE_GTK3
+          LIBS += webkitgtk-3.0
+        else
+          LIBS += webkitgtk-1.0
+        endif
       endif
-    else
-      LIBS += webkit-1.0
     endif
+  else
+    LIBS += webkit-1.0
   endif
 endif