tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
fcitx: use enchant2
Averell Dalton
6 years ago
c055ac14
19c18e10
+46
-2
2 changed files
expand all
collapse all
unified
split
pkgs
tools
inputmethods
fcitx
find-enchant-lib.patch
unwrapped.nix
+42
pkgs/tools/inputmethods/fcitx/find-enchant-lib.patch
···
1
1
+
diff --git a/cmake/FindEnchant.cmake b/cmake/FindEnchant.cmake
2
2
+
index 7c182e6a..5537595e 100644
3
3
+
--- a/cmake/FindEnchant.cmake
4
4
+
+++ b/cmake/FindEnchant.cmake
5
5
+
@@ -16,7 +16,7 @@ if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
6
6
+
endif(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
7
7
+
8
8
+
find_package(PkgConfig)
9
9
+
-pkg_check_modules(PC_ENCHANT enchant)
10
10
+
+pkg_check_modules(PC_ENCHANT enchant-2)
11
11
+
12
12
+
find_path(ENCHANT_INCLUDE_DIR
13
13
+
NAMES enchant.h
14
14
+
@@ -24,7 +24,7 @@ find_path(ENCHANT_INCLUDE_DIR
15
15
+
PATH_SUFFIXES "enchant")
16
16
+
17
17
+
find_library(ENCHANT_LIBRARIES
18
18
+
- NAMES enchant
19
19
+
+ NAMES enchant-2
20
20
+
HINTS ${PC_ENCHANT_LIBRARY_DIRS})
21
21
+
22
22
+
if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
23
23
+
@@ -39,7 +39,7 @@ if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
24
24
+
#include <stdlib.h>
25
25
+
#include <stddef.h>
26
26
+
#include <string.h>
27
27
+
- #include <enchant/enchant.h>
28
28
+
+ #include <enchant-2/enchant.h>
29
29
+
30
30
+
EnchantBroker *enchant_broker_init();
31
31
+
char **enchant_dict_suggest(EnchantDict *dict, const char *str,
32
32
+
@@ -78,6 +78,10 @@ if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
33
33
+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}")
34
34
+
endif()
35
35
+
36
36
+
+if(ENCHANT_API_COMPATIBLE)
37
37
+
+ set(ENCHANT_LIBRARY_FILENAME ${ENCHANT_LIBRARIES})
38
38
+
+endif(ENCHANT_API_COMPATIBLE)
39
39
+
+
40
40
+
include(FindPackageHandleStandardArgs)
41
41
+
find_package_handle_standard_args(Enchant DEFAULT_MSG ENCHANT_LIBRARIES
42
42
+
ENCHANT_INCLUDE_DIR ENCHANT_API_COMPATIBLE)
+4
-2
pkgs/tools/inputmethods/fcitx/unwrapped.nix
···
1
1
{ stdenv, fetchurl, pkgconfig, cmake, intltool, gettext
2
2
-
, libxml2, enchant1, isocodes, icu, libpthreadstubs
2
2
+
, libxml2, enchant2, isocodes, icu, libpthreadstubs
3
3
, pango, cairo, libxkbfile, libXau, libXdmcp, libxkbcommon
4
4
, dbus, gtk2, gtk3, qt4, extra-cmake-modules
5
5
, xkeyboard_config, pcre, libuuid
···
59
59
''
60
60
;
61
61
62
62
+
patches = [ ./find-enchant-lib.patch ];
63
63
+
62
64
postPatch = ''
63
65
substituteInPlace src/frontend/qt/CMakeLists.txt \
64
66
--replace $\{QT_PLUGINS_DIR} $out/lib/qt4/plugins
···
69
71
nativeBuildInputs = [ cmake extra-cmake-modules intltool pkgconfig pcre ];
70
72
71
73
buildInputs = [
72
72
-
xkeyboard_config enchant1 gettext isocodes icu libpthreadstubs libXau libXdmcp libxkbfile
74
74
+
xkeyboard_config enchant2 gettext isocodes icu libpthreadstubs libXau libXdmcp libxkbfile
73
75
libxkbcommon libxml2 dbus cairo gtk2 gtk3 pango qt4 libuuid
74
76
];
75
77