aboutsummaryrefslogtreecommitdiffstats
path: root/testing/subtitleeditor/enchant2.patch
blob: bf167ed7bac498191b9f396a6e413b3dfde5c0e1 (plain) (blame)
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
Backported from upstream master.

Patch below is alterned to revert commit 5e9525c41272e850cbba0f65ce5809e5167880f2


From 1dd00d036344f72ab8d647d3f5614940c95e2384 Mon Sep 17 00:00:00 2001
From: Nikolay Shaplov <dhyan@nataraj.su>
Date: Sat, 30 Nov 2019 20:57:57 +0300
Subject: [PATCH] Fix build with old version of enchant, take two

enchant-2 is not wide spread enough, for example debian have it only in experemental repo now.
So it would be wise to make it possible to buld subtitleeditor with both enchant and echant-2
---
 configure.ac | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index bfe30a3..beddd65 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,10 +74,17 @@ AC_SUBST(GTKMM_LIBS)
 # =========================================================================
 # check enchant
 
-PKG_CHECK_MODULES(ENCHANT, enchant >= 1.4.0)
+PKG_CHECK_MODULES(ENCHANT2, enchant-2 >= 2.2.0, have_enchant_2=yes, have_enchant_2=no)
 
-AC_SUBST(ENCHANT_CFLAGS)
-AC_SUBST(ENCHANT_LIBS)
+if test "x$have_enchant_2" = "xyes"; then
+	ENCHANT_CFLAGS=$ENCHANT2_CFLAGS
+	ENCHANT_LIBS=$ENCHANT2_LIBS
+	AC_SUBST(ENCHANT_CFLAGS)
+	AC_SUBST(ENCHANT_LIBS)
+
+else
+	PKG_CHECK_MODULES(ENCHANT, enchant >= 1.4.0)
+fi
 
 # =========================================================================
 # check libxml++