|
|
ddcdae6 |
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
6ff05c4 |
index de9d8e5..d7830ec 100644
|
|
|
ddcdae6 |
--- a/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/CMakeLists.txt
|
|
|
6ff05c4 |
@@ -37,31 +37,17 @@ SET(VERSION_PATCH "9.2")
|
|
|
ddcdae6 |
SET(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
|
|
ddcdae6 |
SET(LICENSE "GPL3")
|
|
|
ddcdae6 |
SET(PKG_STRING "${PROJECT_NAME} ${VERSION}")
|
|
|
ddcdae6 |
-STRING(REPLACE "\";\"" "\ " PKG_STRING ${PKG_STRING})
|
|
|
ddcdae6 |
-
|
|
|
ddcdae6 |
-IF(DEFINED LIBDIR)
|
|
|
ddcdae6 |
- SET(LIBDIR ${LIBDIR}/${PROJECT_NAME})
|
|
|
ddcdae6 |
-ELSE(DEFINED LIBDIR)
|
|
|
ddcdae6 |
- SET(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME})
|
|
|
ddcdae6 |
-ENDIF(DEFINED LIBDIR)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-IF(NOT DEFINED SHAREDIR)
|
|
|
6ff05c4 |
- SET(SHAREDIR ${CMAKE_INSTALL_PREFIX}/share)
|
|
|
396d3f1 |
-ENDIF(NOT DEFINED SHAREDIR)
|
|
|
6ff05c4 |
+SET(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/${PROJECT_NAME})
|
|
|
6ff05c4 |
+SET(SHAREDIR ${CMAKE_INSTALL_PREFIX}/share)
|
|
|
6ff05c4 |
+SET(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
|
|
|
6ff05c4 |
+SET(INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME})
|
|
|
6ff05c4 |
|
|
|
6ff05c4 |
IF(NOT DEFINED MANDIR)
|
|
|
6ff05c4 |
SET(MANDIR ${SHAREDIR}/man)
|
|
|
6ff05c4 |
ENDIF(NOT DEFINED MANDIR)
|
|
|
6ff05c4 |
|
|
|
ddcdae6 |
-IF(NOT DEFINED LOCALEDIR)
|
|
|
ddcdae6 |
- SET(LOCALEDIR ${SHAREDIR}/locale)
|
|
|
ddcdae6 |
-ENDIF(NOT DEFINED LOCALEDIR)
|
|
|
ddcdae6 |
-
|
|
|
ddcdae6 |
-IF(DEFINED INCLUDEDIR)
|
|
|
ddcdae6 |
- SET(INCLUDEDIR ${INCLUDEDIR}/${PROJECT_NAME})
|
|
|
ddcdae6 |
-ELSE(DEFINED INCLUDEDIR)
|
|
|
6ff05c4 |
- SET(INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME})
|
|
|
ddcdae6 |
-ENDIF(DEFINED INCLUDEDIR)
|
|
|
ddcdae6 |
+STRING(REPLACE "\";\"" "\ " PKG_STRING ${PKG_STRING})
|
|
|
ddcdae6 |
|
|
|
6ff05c4 |
OPTION(ENABLE_NCURSES "Enable Ncurses interface" ON)
|
|
|
6ff05c4 |
OPTION(ENABLE_GTK "Enable GTK interface" OFF)
|
|
|
6ff05c4 |
@@ -128,10 +114,10 @@ ADD_CUSTOM_TARGET(dist
|
|
|
ddcdae6 |
SET(PACKAGE "${PROJECT_NAME}")
|
|
|
ddcdae6 |
SET(prefix "${CMAKE_INSTALL_PREFIX}")
|
|
|
ddcdae6 |
SET(exec_prefix "\${prefix}")
|
|
|
ddcdae6 |
-SET(libdir "\${exec_prefix}/lib")
|
|
|
ddcdae6 |
+SET(libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
|
|
|
ddcdae6 |
SET(includedir "\${prefix}/include")
|
|
|
ddcdae6 |
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/weechat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/weechat.pc @ONLY)
|
|
|
ddcdae6 |
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.pc DESTINATION ${LIBDIR}/../pkgconfig)
|
|
|
ddcdae6 |
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/weechat.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
# packages
|
|
|
ddcdae6 |
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Fast, light and extensible chat client")
|
|
|
ddcdae6 |
diff --git a/Makefile.am b/Makefile.am
|
|
|
396d3f1 |
index e22fc38..0931194 100644
|
|
|
ddcdae6 |
--- a/Makefile.am
|
|
|
ddcdae6 |
+++ b/Makefile.am
|
|
|
ddcdae6 |
@@ -31,6 +31,7 @@ EXTRA_DIST = CMakeLists.txt \
|
|
|
ddcdae6 |
cmake/cmake_uninstall.cmake.in \
|
|
|
ddcdae6 |
cmake/FindAsciidoc.cmake \
|
|
|
ddcdae6 |
cmake/FindAspell.cmake \
|
|
|
ddcdae6 |
+ cmake/FindENCHANT.cmake \
|
|
|
ddcdae6 |
cmake/FindGcrypt.cmake \
|
|
|
ddcdae6 |
cmake/FindGettext.cmake \
|
|
|
ddcdae6 |
cmake/FindGnuTLS.cmake \
|
|
|
ddcdae6 |
diff --git a/cmake/FindENCHANT.cmake b/cmake/FindENCHANT.cmake
|
|
|
ddcdae6 |
new file mode 100644
|
|
|
ddcdae6 |
index 0000000..9c13c48
|
|
|
ddcdae6 |
--- /dev/null
|
|
|
ddcdae6 |
+++ b/cmake/FindENCHANT.cmake
|
|
|
ddcdae6 |
@@ -0,0 +1,44 @@
|
|
|
ddcdae6 |
+# - Try to find the Enchant spell checker
|
|
|
ddcdae6 |
+# Once done this will define
|
|
|
ddcdae6 |
+#
|
|
|
ddcdae6 |
+# ENCHANT_FOUND - system has ENCHANT
|
|
|
ddcdae6 |
+# ENCHANT_INCLUDE_DIR - the ENCHANT include directory
|
|
|
ddcdae6 |
+# ENCHANT_LIBRARIES - Link these to use ENCHANT
|
|
|
ddcdae6 |
+# ENCHANT_DEFINITIONS - Compiler switches required for using ENCHANT
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+# Copyright (c) 2006, Zack Rusin, <zack@kde.org>
|
|
|
ddcdae6 |
+#
|
|
|
ddcdae6 |
+# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
ddcdae6 |
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+if (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+ # in cache already
|
|
|
ddcdae6 |
+ set(ENCHANT_FOUND TRUE)
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+else (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
|
|
|
ddcdae6 |
+ if (NOT WIN32)
|
|
|
ddcdae6 |
+ # use pkg-config to get the directories and then use these values
|
|
|
ddcdae6 |
+ # in the FIND_PATH() and FIND_LIBRARY() calls
|
|
|
ddcdae6 |
+ find_package(PkgConfig)
|
|
|
ddcdae6 |
+ pkg_check_modules(PC_ENCHANT QUIET enchant)
|
|
|
ddcdae6 |
+ set(ENCHANT_DEFINITIONS ${PC_ENCHANT_CFLAGS_OTHER})
|
|
|
ddcdae6 |
+ endif (NOT WIN32)
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+ find_path(ENCHANT_INCLUDE_DIR
|
|
|
ddcdae6 |
+ NAMES enchant++.h
|
|
|
ddcdae6 |
+ HINTS ${PC_ENCHANT_INCLUDEDIR}
|
|
|
ddcdae6 |
+ ${PC_ENCHANT_INCLUDE_DIRS}
|
|
|
ddcdae6 |
+ PATH_SUFFIXES enchant )
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+ find_library(ENCHANT_LIBRARIES NAMES enchant
|
|
|
ddcdae6 |
+ HINTS ${PC_ENCHANT_LIBDIR}
|
|
|
ddcdae6 |
+ ${PC_ENCHANT_LIBRARY_DIRS} )
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+ include(FindPackageHandleStandardArgs)
|
|
|
ddcdae6 |
+ find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES )
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+ mark_as_advanced(ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES)
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+endif (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
|
|
|
ddcdae6 |
diff --git a/configure.in b/configure.in
|
|
|
6ff05c4 |
index 7edeb6a..541230d 100644
|
|
|
ddcdae6 |
--- a/configure.in
|
|
|
ddcdae6 |
+++ b/configure.in
|
|
|
6ff05c4 |
@@ -293,24 +293,29 @@ fi
|
|
|
a8224d5 |
# ---------------------------------- aspell ------------------------------------
|
|
|
ddcdae6 |
|
|
|
a8224d5 |
if test "x$enable_aspell" = "xyes" ; then
|
|
|
6ff05c4 |
- ASPELL_CFLAGS=""
|
|
|
6ff05c4 |
- ASPELL_LFLAGS=""
|
|
|
6ff05c4 |
-
|
|
|
6ff05c4 |
- AC_CHECK_HEADER(aspell.h,ac_found_aspell_header="yes",ac_found_aspell_header="no")
|
|
|
6ff05c4 |
- AC_CHECK_LIB(aspell,new_aspell_speller,ac_found_aspell_lib="yes",ac_found_aspell_lib="no")
|
|
|
6ff05c4 |
-
|
|
|
6ff05c4 |
- AC_MSG_CHECKING(for aspell headers and librairies)
|
|
|
6ff05c4 |
- if test "x$ac_found_aspell_header" = "xno" -o "x$ac_found_aspell_lib" = "xno" ; then
|
|
|
6ff05c4 |
- AC_MSG_RESULT(no)
|
|
|
6ff05c4 |
- AC_MSG_WARN([
|
|
|
ddcdae6 |
+ # Check ENCHANT is available
|
|
|
ddcdae6 |
+ PKG_CHECK_MODULES(ENCHANT, [enchant], [CFLAGS="$CFLAGS -DUSE_ENCHANT"],
|
|
|
ddcdae6 |
+ # otherwise Check ASPELL is available
|
|
|
ddcdae6 |
+ [
|
|
|
6ff05c4 |
+ ASPELL_CFLAGS=""
|
|
|
6ff05c4 |
+ ASPELL_LFLAGS=""
|
|
|
6ff05c4 |
+
|
|
|
6ff05c4 |
+ AC_CHECK_HEADER(aspell.h,ac_found_aspell_header="yes",ac_found_aspell_header="no")
|
|
|
6ff05c4 |
+ AC_CHECK_LIB(aspell,new_aspell_speller,ac_found_aspell_lib="yes",ac_found_aspell_lib="no")
|
|
|
6ff05c4 |
+
|
|
|
6ff05c4 |
+ AC_MSG_CHECKING(for aspell headers and librairies)
|
|
|
6ff05c4 |
+ if test "x$ac_found_aspell_header" = "xno" -o "x$ac_found_aspell_lib" = "xno" ; then
|
|
|
6ff05c4 |
+ AC_MSG_RESULT(no)
|
|
|
6ff05c4 |
+ AC_MSG_WARN([
|
|
|
6ff05c4 |
*** Aspell headers and/or libraries couldn't be found on your system.
|
|
|
6ff05c4 |
*** Try to install them with your software package manager.
|
|
|
6ff05c4 |
*** WeeChat will be built without Aspell support.])
|
|
|
6ff05c4 |
- enable_aspell="no"
|
|
|
6ff05c4 |
- not_found="$not_found aspell"
|
|
|
6ff05c4 |
- else
|
|
|
6ff05c4 |
- AC_MSG_RESULT(yes)
|
|
|
6ff05c4 |
- ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
|
|
|
6ff05c4 |
+ enable_aspell="no"
|
|
|
6ff05c4 |
+ not_found="$not_found aspell"
|
|
|
6ff05c4 |
+ else
|
|
|
6ff05c4 |
+ AC_MSG_RESULT(yes)
|
|
|
6ff05c4 |
+ ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
|
|
|
6ff05c4 |
+ fi
|
|
|
ddcdae6 |
fi
|
|
|
ddcdae6 |
else
|
|
|
a8224d5 |
not_asked="$not_asked aspell"
|
|
|
ddcdae6 |
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
|
6ff05c4 |
index 8c4f316..d8beb76 100644
|
|
|
ddcdae6 |
--- a/src/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/CMakeLists.txt
|
|
|
6ff05c4 |
@@ -32,6 +32,7 @@ ADD_DEFINITIONS(-DHAVE_CONFIG_H)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
INCLUDE(CheckIncludeFiles)
|
|
|
ddcdae6 |
INCLUDE(CheckFunctionExists)
|
|
|
ddcdae6 |
+INCLUDE(CheckCCompilerFlag)
|
|
|
a8224d5 |
INCLUDE(CheckSymbolExists)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
CHECK_INCLUDE_FILES("arpa/inet.h" HAVE_ARPA_INET_H)
|
|
|
6ff05c4 |
@@ -74,6 +75,14 @@ CHECK_FUNCTION_EXISTS(mallinfo HAVE_MALLINFO)
|
|
|
ddcdae6 |
CHECK_INCLUDE_FILES("regex.h" HAVE_REGEX_H)
|
|
|
ddcdae6 |
CHECK_FUNCTION_EXISTS(regexec HAVE_REGEXEC)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
+CHECK_C_COMPILER_FLAG(-fPIE HAVE_FPIE_SUPPORT)
|
|
|
ddcdae6 |
+if (HAVE_FPIE_SUPPORT)
|
|
|
ddcdae6 |
+ set (WEECHAT_PIE_CFLAGS "-fPIE")
|
|
|
ddcdae6 |
+ set (WEECHAT_PIE_LDFLAGS "-pie")
|
|
|
ddcdae6 |
+else(HAVE_FPIE_SUPPORT)
|
|
|
ddcdae6 |
+ message(STATUS "Your compiler doesn't support PIE flag")
|
|
|
ddcdae6 |
+endif(HAVE_FPIE_SUPPORT)
|
|
|
a8224d5 |
+
|
|
|
a8224d5 |
CHECK_SYMBOL_EXISTS("eat_newline_glitch" "term.h" HAVE_EAT_NEWLINE_GLITCH)
|
|
|
ddcdae6 |
|
|
|
a8224d5 |
# weechat_gui_common MUST be the first lib in the list
|
|
|
ddcdae6 |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
|
|
|
396d3f1 |
index f5afb18..1505694 100644
|
|
|
ddcdae6 |
--- a/src/core/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/core/CMakeLists.txt
|
|
|
396d3f1 |
@@ -43,6 +43,8 @@ wee-url.c wee-url.h
|
|
|
ddcdae6 |
wee-utf8.c wee-utf8.h
|
|
|
ddcdae6 |
wee-util.c wee-util.h)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WEECHAT_PIE_CFLAGS}")
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
# Check for flock support
|
|
|
ddcdae6 |
INCLUDE(CheckSymbolExists)
|
|
|
ddcdae6 |
CHECK_INCLUDE_FILES("sys/file.h" HAVE_SYS_FILE_H)
|
|
|
ddcdae6 |
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
|
|
|
396d3f1 |
index e0d7ba6..7da79d2 100644
|
|
|
ddcdae6 |
--- a/src/gui/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/gui/CMakeLists.txt
|
|
|
a8224d5 |
@@ -39,6 +39,11 @@ gui-mouse.c gui-mouse.h
|
|
|
ddcdae6 |
gui-nicklist.c gui-nicklist.h
|
|
|
ddcdae6 |
gui-window.c gui-window.h)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WEECHAT_PIE_CFLAGS}")
|
|
|
ddcdae6 |
+SET(CMAKE_EXE_LINKER_FLAGS
|
|
|
ddcdae6 |
+ "${CMAKE_EXE_LINKER_FLAGS} ${WEECHAT_PIE_LDFLAGS}")
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
|
|
|
ddcdae6 |
ADD_LIBRARY(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC})
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
|
|
|
6ff05c4 |
index cb5d705..23b974c 100644
|
|
|
ddcdae6 |
--- a/src/plugins/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/plugins/CMakeLists.txt
|
|
|
6ff05c4 |
@@ -34,6 +34,10 @@ ADD_LIBRARY(weechat_plugins STATIC ${LIB_PLUGINS_SRC})
|
|
|
ddcdae6 |
|
|
|
6ff05c4 |
ADD_DEFINITIONS(${CMAKE_SHARED_LIBRARY_C_FLAGS})
|
|
|
6ff05c4 |
ADD_LIBRARY(weechat_plugins_scripts STATIC ${LIB_PLUGINS_SCRIPTS_SRC})
|
|
|
ddcdae6 |
+SET_TARGET_PROPERTIES(weechat_plugins
|
|
|
ddcdae6 |
+ PROPERTIES COMPILE_FLAGS "${WEECHAT_PIE_CFLAGS}")
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+SET(PLUGIN_INSTALL_DIR lib${LIB_SUFFIX}/${PROJECT_NAME}/plugins)
|
|
|
6ff05c4 |
|
|
|
ddcdae6 |
INCLUDE(CheckIncludeFiles)
|
|
|
ddcdae6 |
INCLUDE(CheckFunctionExists)
|
|
|
6ff05c4 |
@@ -43,13 +47,19 @@ IF(ENABLE_ALIAS)
|
|
|
ddcdae6 |
ADD_SUBDIRECTORY( alias )
|
|
|
ddcdae6 |
ENDIF(ENABLE_ALIAS)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-IF(ENABLE_ASPELL)
|
|
|
6ff05c4 |
- # Check for aspell libraries
|
|
|
6ff05c4 |
- FIND_PACKAGE(Aspell)
|
|
|
6ff05c4 |
- IF(ASPELL_FOUND)
|
|
|
a8224d5 |
+IF(NOT DISABLE_ASPELL)
|
|
|
ddcdae6 |
+ # Check for enchant libraries
|
|
|
ddcdae6 |
+ FIND_PACKAGE(ENCHANT)
|
|
|
ddcdae6 |
+ IF(ENCHANT_FOUND)
|
|
|
ddcdae6 |
ADD_SUBDIRECTORY( aspell )
|
|
|
6ff05c4 |
- ENDIF(ASPELL_FOUND)
|
|
|
ddcdae6 |
-ENDIF(ENABLE_ASPELL)
|
|
|
6ff05c4 |
+ ELSE(ENCHANT_FOUND)
|
|
|
6ff05c4 |
+ # Check for aspell libraries
|
|
|
6ff05c4 |
+ FIND_PACKAGE(Aspell)
|
|
|
6ff05c4 |
+ IF(ASPELL_FOUND)
|
|
|
6ff05c4 |
+ ADD_SUBDIRECTORY( aspell )
|
|
|
6ff05c4 |
+ ENDIF(ASPELL_FOUND)
|
|
|
ddcdae6 |
+ ENDIF(ENCHANT_FOUND)
|
|
|
a8224d5 |
+ENDIF(NOT DISABLE_ASPELL)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
IF(ENABLE_CHARSET)
|
|
|
ddcdae6 |
# Check for iconv support.
|
|
|
ddcdae6 |
diff --git a/src/plugins/alias/CMakeLists.txt b/src/plugins/alias/CMakeLists.txt
|
|
|
396d3f1 |
index d58edcf..1aee736 100644
|
|
|
ddcdae6 |
--- a/src/plugins/alias/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/plugins/alias/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -25,4 +25,4 @@ SET_TARGET_PROPERTIES(alias PROPERTIES PREFIX "")
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
TARGET_LINK_LIBRARIES(alias)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS alias LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS alias LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
ddcdae6 |
diff --git a/src/plugins/aspell/CMakeLists.txt b/src/plugins/aspell/CMakeLists.txt
|
|
|
396d3f1 |
index 787194d..8676c70 100644
|
|
|
ddcdae6 |
--- a/src/plugins/aspell/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/plugins/aspell/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -24,9 +24,15 @@ weechat-aspell-config.c weechat-aspell-config.h
|
|
|
ddcdae6 |
weechat-aspell-speller.c weechat-aspell-speller.h)
|
|
|
ddcdae6 |
SET_TARGET_PROPERTIES(aspell PROPERTIES PREFIX "")
|
|
|
ddcdae6 |
|
|
|
6ff05c4 |
-IF(ASPELL_FOUND)
|
|
|
6ff05c4 |
- INCLUDE_DIRECTORIES(${ASPELL_INCLUDE_PATH})
|
|
|
6ff05c4 |
- TARGET_LINK_LIBRARIES(aspell ${ASPELL_LIBRARY})
|
|
|
6ff05c4 |
-ENDIF(ASPELL_FOUND)
|
|
|
ddcdae6 |
+IF(ENCHANT_FOUND)
|
|
|
ddcdae6 |
+ INCLUDE_DIRECTORIES(${ENCHANT_INCLUDE_DIR})
|
|
|
ddcdae6 |
+ TARGET_LINK_LIBRARIES(aspell ${ENCHANT_LIBRARIES})
|
|
|
ddcdae6 |
+ ADD_DEFINITIONS(-DUSE_ENCHANT)
|
|
|
ddcdae6 |
+ELSE(ENCHANT_FOUND)
|
|
|
6ff05c4 |
+ IF(ASPELL_FOUND)
|
|
|
6ff05c4 |
+ INCLUDE_DIRECTORIES(${ASPELL_INCLUDE_PATH})
|
|
|
6ff05c4 |
+ TARGET_LINK_LIBRARIES(aspell ${ASPELL_LIBRARY})
|
|
|
6ff05c4 |
+ ENDIF(ASPELL_FOUND)
|
|
|
ddcdae6 |
+ENDIF(ENCHANT_FOUND)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS aspell LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS aspell LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
ddcdae6 |
diff --git a/src/plugins/aspell/Makefile.am b/src/plugins/aspell/Makefile.am
|
|
|
396d3f1 |
index 4e3b6be..e4d7541 100644
|
|
|
ddcdae6 |
--- a/src/plugins/aspell/Makefile.am
|
|
|
ddcdae6 |
+++ b/src/plugins/aspell/Makefile.am
|
|
|
ddcdae6 |
@@ -18,7 +18,7 @@
|
|
|
ddcdae6 |
# along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
|
|
|
ddcdae6 |
#
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(ASPELL_CFLAGS)
|
|
|
ddcdae6 |
+INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(ASPELL_CFLAGS) $(ENCHANT_CFLAGS)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
libdir = ${weechat_libdir}/plugins
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
@@ -31,6 +31,6 @@ aspell_la_SOURCES = weechat-aspell.c \
|
|
|
ddcdae6 |
weechat-aspell-speller.c \
|
|
|
ddcdae6 |
weechat-aspell-speller.h
|
|
|
ddcdae6 |
aspell_la_LDFLAGS = -module
|
|
|
ddcdae6 |
-aspell_la_LIBADD = $(ASPELL_LFLAGS)
|
|
|
ddcdae6 |
+aspell_la_LIBADD = $(ASPELL_LFLAGS) $(ENCHANT_LIBS)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
EXTRA_DIST = CMakeLists.txt
|
|
|
ddcdae6 |
diff --git a/src/plugins/aspell/weechat-aspell-speller.c b/src/plugins/aspell/weechat-aspell-speller.c
|
|
|
396d3f1 |
index b5cbbd4..47ab2c1 100644
|
|
|
ddcdae6 |
--- a/src/plugins/aspell/weechat-aspell-speller.c
|
|
|
ddcdae6 |
+++ b/src/plugins/aspell/weechat-aspell-speller.c
|
|
|
ddcdae6 |
@@ -33,6 +33,9 @@
|
|
|
ddcdae6 |
struct t_aspell_speller *weechat_aspell_spellers = NULL;
|
|
|
ddcdae6 |
struct t_aspell_speller *last_weechat_aspell_speller = NULL;
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+extern EnchantBroker *broker;
|
|
|
ddcdae6 |
+#endif
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
/*
|
|
|
ddcdae6 |
* weechat_aspell_speller_exists: return 1 if an aspell dict exists for a lang,
|
|
|
ddcdae6 |
@@ -42,6 +45,9 @@ struct t_aspell_speller *last_weechat_aspell_speller = NULL;
|
|
|
ddcdae6 |
int
|
|
|
ddcdae6 |
weechat_aspell_speller_exists (const char *lang)
|
|
|
ddcdae6 |
{
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+ return enchant_broker_dict_exists(broker, lang);
|
|
|
ddcdae6 |
+#else
|
|
|
ddcdae6 |
struct AspellConfig *config;
|
|
|
ddcdae6 |
AspellDictInfoList *list;
|
|
|
ddcdae6 |
AspellDictInfoEnumeration *el;
|
|
|
ddcdae6 |
@@ -67,6 +73,7 @@ weechat_aspell_speller_exists (const char *lang)
|
|
|
ddcdae6 |
delete_aspell_config (config);
|
|
|
396d3f1 |
|
|
|
ddcdae6 |
return rc;
|
|
|
ddcdae6 |
+#endif
|
|
|
ddcdae6 |
}
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
/*
|
|
|
6ff05c4 |
@@ -129,10 +136,14 @@ struct t_aspell_speller *
|
|
|
ddcdae6 |
weechat_aspell_speller_new (const char *lang)
|
|
|
ddcdae6 |
{
|
|
|
ddcdae6 |
struct t_aspell_speller *new_speller;
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+ EnchantDict *ret;
|
|
|
ddcdae6 |
+#else
|
|
|
ddcdae6 |
AspellConfig *config;
|
|
|
ddcdae6 |
AspellCanHaveError *ret;
|
|
|
ddcdae6 |
struct t_infolist *infolist;
|
|
|
6ff05c4 |
-
|
|
|
ddcdae6 |
+#endif
|
|
|
6ff05c4 |
+
|
|
|
ddcdae6 |
if (!lang)
|
|
|
ddcdae6 |
return NULL;
|
|
|
6ff05c4 |
|
|
|
6ff05c4 |
@@ -142,7 +153,18 @@ weechat_aspell_speller_new (const char *lang)
|
|
|
6ff05c4 |
"%s: creating new speller for lang \"%s\"",
|
|
|
40e8b57 |
ASPELL_PLUGIN_NAME, lang);
|
|
|
ddcdae6 |
}
|
|
|
6ff05c4 |
-
|
|
|
6ff05c4 |
+
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+ ret = enchant_broker_request_dict (broker, lang);
|
|
|
ddcdae6 |
+ if (!ret)
|
|
|
ddcdae6 |
+ {
|
|
|
ddcdae6 |
+ weechat_printf (NULL,
|
|
|
ddcdae6 |
+ "%s%s: error: %s",
|
|
|
40e8b57 |
+ weechat_prefix ("error"), ASPELL_PLUGIN_NAME,
|
|
|
ddcdae6 |
+ lang);
|
|
|
ddcdae6 |
+ return NULL;
|
|
|
ddcdae6 |
+ }
|
|
|
ddcdae6 |
+#else
|
|
|
ddcdae6 |
/* create a speller instance for the newly created cell */
|
|
|
ddcdae6 |
config = new_aspell_config();
|
|
|
ddcdae6 |
aspell_config_replace (config, "lang", lang);
|
|
|
396d3f1 |
@@ -172,6 +194,7 @@ weechat_aspell_speller_new (const char *lang)
|
|
|
ddcdae6 |
delete_aspell_can_have_error (ret);
|
|
|
ddcdae6 |
return NULL;
|
|
|
ddcdae6 |
}
|
|
|
ddcdae6 |
+#endif
|
|
|
396d3f1 |
|
|
|
ddcdae6 |
/* create and add a new speller cell */
|
|
|
ddcdae6 |
new_speller = malloc (sizeof (*new_speller));
|
|
|
6ff05c4 |
@@ -182,8 +205,12 @@ weechat_aspell_speller_new (const char *lang)
|
|
|
6ff05c4 |
weechat_prefix ("error"), ASPELL_PLUGIN_NAME);
|
|
|
ddcdae6 |
return NULL;
|
|
|
ddcdae6 |
}
|
|
|
6ff05c4 |
-
|
|
|
6ff05c4 |
+
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+ new_speller->speller = ret;
|
|
|
ddcdae6 |
+#else
|
|
|
ddcdae6 |
new_speller->speller = to_aspell_speller (ret);
|
|
|
ddcdae6 |
+#endif
|
|
|
ddcdae6 |
new_speller->lang = strdup (lang);
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
/* add speller to list */
|
|
|
6ff05c4 |
@@ -194,10 +221,12 @@ weechat_aspell_speller_new (const char *lang)
|
|
|
6ff05c4 |
else
|
|
|
ddcdae6 |
weechat_aspell_spellers = new_speller;
|
|
|
ddcdae6 |
last_weechat_aspell_speller = new_speller;
|
|
|
6ff05c4 |
-
|
|
|
6ff05c4 |
+
|
|
|
ddcdae6 |
+#ifndef USE_ENCHANT
|
|
|
ddcdae6 |
/* free config */
|
|
|
ddcdae6 |
delete_aspell_config (config);
|
|
|
6ff05c4 |
-
|
|
|
ddcdae6 |
+#endif
|
|
|
6ff05c4 |
+
|
|
|
ddcdae6 |
return new_speller;
|
|
|
ddcdae6 |
}
|
|
|
6ff05c4 |
|
|
|
40e8b57 |
@@ -221,8 +250,12 @@ weechat_aspell_speller_free (struct t_aspell_speller *speller)
|
|
|
ddcdae6 |
/* free data */
|
|
|
ddcdae6 |
if (speller->speller)
|
|
|
ddcdae6 |
{
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+ enchant_broker_free_dict(broker, speller->speller);
|
|
|
ddcdae6 |
+#else
|
|
|
ddcdae6 |
aspell_speller_save_all_word_lists (speller->speller);
|
|
|
ddcdae6 |
delete_aspell_speller (speller->speller);
|
|
|
ddcdae6 |
+#endif
|
|
|
ddcdae6 |
}
|
|
|
ddcdae6 |
if (speller->lang)
|
|
|
ddcdae6 |
free (speller->lang);
|
|
|
ddcdae6 |
diff --git a/src/plugins/aspell/weechat-aspell-speller.h b/src/plugins/aspell/weechat-aspell-speller.h
|
|
|
396d3f1 |
index 5be2f7d..da36e52 100644
|
|
|
ddcdae6 |
--- a/src/plugins/aspell/weechat-aspell-speller.h
|
|
|
ddcdae6 |
+++ b/src/plugins/aspell/weechat-aspell-speller.h
|
|
|
ddcdae6 |
@@ -23,7 +23,11 @@
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
struct t_aspell_speller
|
|
|
ddcdae6 |
{
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+ EnchantDict *speller; /* enchant speller */
|
|
|
ddcdae6 |
+#else
|
|
|
ddcdae6 |
AspellSpeller *speller; /* aspell speller */
|
|
|
ddcdae6 |
+#endif
|
|
|
ddcdae6 |
char *lang; /* language */
|
|
|
396d3f1 |
|
|
|
ddcdae6 |
struct t_aspell_speller *prev_speller; /* pointer to next speller */
|
|
|
ddcdae6 |
diff --git a/src/plugins/aspell/weechat-aspell.c b/src/plugins/aspell/weechat-aspell.c
|
|
|
6ff05c4 |
index d0e08f8..df2e97c 100644
|
|
|
ddcdae6 |
--- a/src/plugins/aspell/weechat-aspell.c
|
|
|
ddcdae6 |
+++ b/src/plugins/aspell/weechat-aspell.c
|
|
|
6ff05c4 |
@@ -49,6 +49,10 @@ struct t_gui_buffer *aspell_buffer_spellers = NULL;
|
|
|
ddcdae6 |
char *aspell_last_modifier_string = NULL; /* last str. received by modifier */
|
|
|
ddcdae6 |
char *aspell_last_modifier_result = NULL; /* last str. built by modifier */
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+EnchantBroker *broker;
|
|
|
ddcdae6 |
+#endif
|
|
|
ddcdae6 |
+
|
|
|
6ff05c4 |
/*
|
|
|
6ff05c4 |
* aspell supported langs, updated on 2012-07-05
|
|
|
6ff05c4 |
* URL: ftp://ftp.gnu.org/gnu/aspell/dict/0index.html
|
|
|
6ff05c4 |
@@ -396,6 +400,55 @@ weechat_aspell_iso_to_country (const char *code)
|
|
|
ddcdae6 |
return strdup ("Unknown");
|
|
|
ddcdae6 |
}
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+void EnchantDictDescribe(const char * const lang_tag,
|
|
|
ddcdae6 |
+ const char * const provider_name,
|
|
|
ddcdae6 |
+ const char * const provider_desc,
|
|
|
ddcdae6 |
+ const char * const provider_file,
|
|
|
ddcdae6 |
+ void * user_data)
|
|
|
ddcdae6 |
+{
|
|
|
ddcdae6 |
+ char *country, *lang, *pos;
|
|
|
ddcdae6 |
+ char buffer[192];
|
|
|
ddcdae6 |
+ (void)provider_name;
|
|
|
ddcdae6 |
+ (void)provider_desc;
|
|
|
ddcdae6 |
+ (void)provider_file;
|
|
|
ddcdae6 |
+ (void)user_data;
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+ country = NULL;
|
|
|
ddcdae6 |
+ pos = strchr (lang_tag, '_');
|
|
|
ddcdae6 |
+ if (!pos)
|
|
|
ddcdae6 |
+ pos = strchr (lang_tag, '-');
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+ if (pos)
|
|
|
ddcdae6 |
+ {
|
|
|
ddcdae6 |
+ pos[0] = '\0';
|
|
|
ddcdae6 |
+ lang = weechat_aspell_iso_to_lang ((char*)lang_tag);
|
|
|
ddcdae6 |
+ pos[0] = '_';
|
|
|
ddcdae6 |
+ country = weechat_aspell_iso_to_country (pos + 1);
|
|
|
ddcdae6 |
+ }
|
|
|
ddcdae6 |
+ else
|
|
|
ddcdae6 |
+ lang = weechat_aspell_iso_to_lang ((char*)lang_tag);
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+ if (pos)
|
|
|
ddcdae6 |
+ {
|
|
|
ddcdae6 |
+ snprintf (buffer, sizeof (buffer), "%-22s %s (%s)",
|
|
|
ddcdae6 |
+ lang_tag, lang, country);
|
|
|
ddcdae6 |
+ }
|
|
|
ddcdae6 |
+ else
|
|
|
ddcdae6 |
+ {
|
|
|
ddcdae6 |
+ snprintf (buffer, sizeof (buffer), "%-22s %s",
|
|
|
ddcdae6 |
+ lang_tag, lang);
|
|
|
ddcdae6 |
+ }
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+ weechat_printf (NULL, " %s", buffer);
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
+ if (lang)
|
|
|
ddcdae6 |
+ free (lang);
|
|
|
ddcdae6 |
+ if (country)
|
|
|
ddcdae6 |
+ free (country);
|
|
|
ddcdae6 |
+}
|
|
|
ddcdae6 |
+#endif
|
|
|
ddcdae6 |
+
|
|
|
ddcdae6 |
/*
|
|
|
ddcdae6 |
* weechat_aspell_speller_list_dicts: list all aspell dict installed on system
|
|
|
ddcdae6 |
* and display them
|
|
|
6ff05c4 |
@@ -404,6 +457,7 @@ weechat_aspell_iso_to_country (const char *code)
|
|
|
ddcdae6 |
void
|
|
|
ddcdae6 |
weechat_aspell_speller_list_dicts ()
|
|
|
ddcdae6 |
{
|
|
|
ddcdae6 |
+#ifndef USE_ENCHANT
|
|
|
ddcdae6 |
char *country, *lang, *pos;
|
|
|
ddcdae6 |
char buffer[192];
|
|
|
ddcdae6 |
struct AspellConfig *config;
|
|
|
6ff05c4 |
@@ -414,13 +468,17 @@ weechat_aspell_speller_list_dicts ()
|
|
|
ddcdae6 |
config = new_aspell_config();
|
|
|
ddcdae6 |
list = get_aspell_dict_info_list (config);
|
|
|
ddcdae6 |
el = aspell_dict_info_list_elements (list);
|
|
|
6ff05c4 |
-
|
|
|
ddcdae6 |
+#endif
|
|
|
6ff05c4 |
+
|
|
|
ddcdae6 |
weechat_printf (NULL, "");
|
|
|
ddcdae6 |
weechat_printf (NULL,
|
|
|
6ff05c4 |
/* TRANSLATORS: "%s" is "aspell" */
|
|
|
ddcdae6 |
_( "%s dictionaries list:"),
|
|
|
40e8b57 |
ASPELL_PLUGIN_NAME);
|
|
|
396d3f1 |
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+ enchant_broker_list_dicts(broker, EnchantDictDescribe, NULL);
|
|
|
ddcdae6 |
+#else
|
|
|
ddcdae6 |
while ((dict = aspell_dict_info_enumeration_next (el)))
|
|
|
ddcdae6 |
{
|
|
|
ddcdae6 |
country = NULL;
|
|
|
6ff05c4 |
@@ -473,6 +531,7 @@ weechat_aspell_speller_list_dicts ()
|
|
|
396d3f1 |
|
|
|
ddcdae6 |
delete_aspell_dict_info_enumeration (el);
|
|
|
ddcdae6 |
delete_aspell_config (config);
|
|
|
ddcdae6 |
+#endif
|
|
|
ddcdae6 |
}
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
/*
|
|
|
6ff05c4 |
@@ -502,6 +561,9 @@ weechat_aspell_add_word (const char *lang, const char *word)
|
|
|
ddcdae6 |
ptr_speller = new_speller;
|
|
|
ddcdae6 |
}
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+ enchant_dict_add(ptr_speller->speller, word, strlen(word));
|
|
|
ddcdae6 |
+#else
|
|
|
ddcdae6 |
if (aspell_speller_add_to_personal (ptr_speller->speller,
|
|
|
ddcdae6 |
word,
|
|
|
ddcdae6 |
strlen (word)) == 1)
|
|
|
6ff05c4 |
@@ -517,7 +579,8 @@ weechat_aspell_add_word (const char *lang, const char *word)
|
|
|
ddcdae6 |
"dictionary"),
|
|
|
40e8b57 |
weechat_prefix ("error"), ASPELL_PLUGIN_NAME);
|
|
|
ddcdae6 |
}
|
|
|
6ff05c4 |
-
|
|
|
ddcdae6 |
+#endif
|
|
|
6ff05c4 |
+
|
|
|
ddcdae6 |
if (new_speller)
|
|
|
ddcdae6 |
weechat_aspell_speller_free (new_speller);
|
|
|
6ff05c4 |
}
|
|
|
6ff05c4 |
@@ -630,7 +693,11 @@ weechat_aspell_check_word (struct t_gui_buffer *buffer, const char *word)
|
|
|
396d3f1 |
for (ptr_speller = weechat_aspell_spellers; ptr_speller;
|
|
|
396d3f1 |
ptr_speller = ptr_speller->next_speller)
|
|
|
396d3f1 |
{
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
396d3f1 |
+ if (enchant_dict_check(ptr_speller->speller, word, strlen(word)) == 0)
|
|
|
ddcdae6 |
+#else
|
|
|
396d3f1 |
if (aspell_speller_check (ptr_speller->speller, word, -1) == 1)
|
|
|
ddcdae6 |
+#endif
|
|
|
396d3f1 |
{
|
|
|
396d3f1 |
rc = 1;
|
|
|
396d3f1 |
break;
|
|
|
6ff05c4 |
@@ -1042,6 +1109,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
|
|
396d3f1 |
|
|
|
ddcdae6 |
weechat_plugin = plugin;
|
|
|
396d3f1 |
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+ /* acquire enchant broker */
|
|
|
ddcdae6 |
+ broker = enchant_broker_init();
|
|
|
ddcdae6 |
+ if (!broker)
|
|
|
ddcdae6 |
+ return WEECHAT_RC_ERROR;
|
|
|
ddcdae6 |
+#endif
|
|
|
396d3f1 |
+
|
|
|
ddcdae6 |
if (!weechat_aspell_config_init ())
|
|
|
ddcdae6 |
return WEECHAT_RC_ERROR;
|
|
|
40e8b57 |
|
|
|
6ff05c4 |
@@ -1119,5 +1193,10 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
|
|
396d3f1 |
|
|
|
ddcdae6 |
weechat_aspell_config_free ();
|
|
|
396d3f1 |
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+ /* release enchant broker */
|
|
|
ddcdae6 |
+ enchant_broker_free (broker);
|
|
|
ddcdae6 |
+#endif
|
|
|
396d3f1 |
+
|
|
|
ddcdae6 |
return WEECHAT_RC_OK;
|
|
|
ddcdae6 |
}
|
|
|
ddcdae6 |
diff --git a/src/plugins/aspell/weechat-aspell.h b/src/plugins/aspell/weechat-aspell.h
|
|
|
6ff05c4 |
index 3c95074..5a4f174 100644
|
|
|
ddcdae6 |
--- a/src/plugins/aspell/weechat-aspell.h
|
|
|
ddcdae6 |
+++ b/src/plugins/aspell/weechat-aspell.h
|
|
|
40e8b57 |
@@ -21,7 +21,11 @@
|
|
|
ddcdae6 |
#ifndef __WEECHAT_ASPELL_H
|
|
|
ddcdae6 |
#define __WEECHAT_ASPELL_H 1
|
|
|
ddcdae6 |
|
|
|
6ff05c4 |
-#include <aspell.h>
|
|
|
ddcdae6 |
+#ifdef USE_ENCHANT
|
|
|
ddcdae6 |
+# include <enchant.h>
|
|
|
ddcdae6 |
+#else
|
|
|
6ff05c4 |
+# include <aspell.h>
|
|
|
ddcdae6 |
+#endif
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
#define weechat_plugin weechat_aspell_plugin
|
|
|
40e8b57 |
#define ASPELL_PLUGIN_NAME "aspell"
|
|
|
ddcdae6 |
diff --git a/src/plugins/charset/CMakeLists.txt b/src/plugins/charset/CMakeLists.txt
|
|
|
396d3f1 |
index 489ca9a..4f6c859 100644
|
|
|
ddcdae6 |
--- a/src/plugins/charset/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/plugins/charset/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -29,4 +29,4 @@ IF(ICONV_FOUND)
|
|
|
ddcdae6 |
ENDIF(ICONV_LIBRARY)
|
|
|
ddcdae6 |
ENDIF(ICONV_FOUND)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS charset LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS charset LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
ddcdae6 |
diff --git a/src/plugins/demo/CMakeLists.txt b/src/plugins/demo/CMakeLists.txt
|
|
|
396d3f1 |
index 184060f..2eaa1c6 100644
|
|
|
ddcdae6 |
--- a/src/plugins/demo/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/plugins/demo/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -22,4 +22,4 @@ SET_TARGET_PROPERTIES(demo PROPERTIES PREFIX "")
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
TARGET_LINK_LIBRARIES(demo)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS demo LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS demo LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
ddcdae6 |
diff --git a/src/plugins/fifo/CMakeLists.txt b/src/plugins/fifo/CMakeLists.txt
|
|
|
396d3f1 |
index 55fc505..8f204f3 100644
|
|
|
ddcdae6 |
--- a/src/plugins/fifo/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/plugins/fifo/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -24,4 +24,4 @@ SET_TARGET_PROPERTIES(fifo PROPERTIES PREFIX "")
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
TARGET_LINK_LIBRARIES(fifo)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS fifo LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS fifo LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
ddcdae6 |
diff --git a/src/plugins/irc/CMakeLists.txt b/src/plugins/irc/CMakeLists.txt
|
|
|
6ff05c4 |
index 978e2b0..bd30635 100644
|
|
|
ddcdae6 |
--- a/src/plugins/irc/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/plugins/irc/CMakeLists.txt
|
|
|
6ff05c4 |
@@ -56,4 +56,4 @@ LIST(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
TARGET_LINK_LIBRARIES(irc ${LINK_LIBS})
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS irc LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS irc LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
ddcdae6 |
diff --git a/src/plugins/logger/CMakeLists.txt b/src/plugins/logger/CMakeLists.txt
|
|
|
396d3f1 |
index 3650b70..29f96f2 100644
|
|
|
ddcdae6 |
--- a/src/plugins/logger/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/plugins/logger/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -27,4 +27,4 @@ SET_TARGET_PROPERTIES(logger PROPERTIES PREFIX "")
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
TARGET_LINK_LIBRARIES(logger)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS logger LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS logger LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
6ff05c4 |
diff --git a/src/plugins/lua/CMakeLists.txt b/src/plugins/lua/CMakeLists.txt
|
|
|
6ff05c4 |
index 1955b58..54dd91b 100644
|
|
|
6ff05c4 |
--- a/src/plugins/lua/CMakeLists.txt
|
|
|
6ff05c4 |
+++ b/src/plugins/lua/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -32,4 +32,4 @@ IF(LUA_FOUND)
|
|
|
ddcdae6 |
ENDIF(LUA_LIBRARY AND LUALIB_LIBRARY)
|
|
|
ddcdae6 |
ENDIF(LUA_FOUND)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS lua LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS lua LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
6ff05c4 |
diff --git a/src/plugins/perl/CMakeLists.txt b/src/plugins/perl/CMakeLists.txt
|
|
|
6ff05c4 |
index 6bb7c2f..abc51ac 100644
|
|
|
6ff05c4 |
--- a/src/plugins/perl/CMakeLists.txt
|
|
|
6ff05c4 |
+++ b/src/plugins/perl/CMakeLists.txt
|
|
|
6ff05c4 |
@@ -43,4 +43,4 @@ IF(PERL_FOUND)
|
|
|
ddcdae6 |
ENDIF(PERL_DYNALOADER)
|
|
|
ddcdae6 |
ENDIF(PERL_FOUND)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS perl LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS perl LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
6ff05c4 |
diff --git a/src/plugins/python/CMakeLists.txt b/src/plugins/python/CMakeLists.txt
|
|
|
6ff05c4 |
index 669bb34..4c7f5a7 100644
|
|
|
6ff05c4 |
--- a/src/plugins/python/CMakeLists.txt
|
|
|
6ff05c4 |
+++ b/src/plugins/python/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -28,4 +28,4 @@ IF(PYTHON_FOUND)
|
|
|
6ff05c4 |
TARGET_LINK_LIBRARIES(python ${PYTHON_LIBRARY} weechat_plugins_scripts)
|
|
|
ddcdae6 |
ENDIF(PYTHON_FOUND)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS python LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS python LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
6ff05c4 |
diff --git a/src/plugins/relay/CMakeLists.txt b/src/plugins/relay/CMakeLists.txt
|
|
|
6ff05c4 |
index bdd8276..cb8fcdc 100644
|
|
|
6ff05c4 |
--- a/src/plugins/relay/CMakeLists.txt
|
|
|
6ff05c4 |
+++ b/src/plugins/relay/CMakeLists.txt
|
|
|
6ff05c4 |
@@ -46,4 +46,4 @@ ENDIF(GNUTLS_FOUND)
|
|
|
6ff05c4 |
|
|
|
6ff05c4 |
TARGET_LINK_LIBRARIES(relay ${LINK_LIBS})
|
|
|
6ff05c4 |
|
|
|
6ff05c4 |
-INSTALL(TARGETS relay LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
6ff05c4 |
+INSTALL(TARGETS relay LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
6ff05c4 |
diff --git a/src/plugins/ruby/CMakeLists.txt b/src/plugins/ruby/CMakeLists.txt
|
|
|
6ff05c4 |
index 5f2aa86..48a3cd7 100644
|
|
|
6ff05c4 |
--- a/src/plugins/ruby/CMakeLists.txt
|
|
|
6ff05c4 |
+++ b/src/plugins/ruby/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -27,4 +27,4 @@ IF(RUBY_FOUND)
|
|
|
6ff05c4 |
TARGET_LINK_LIBRARIES(ruby ${RUBY_LIBRARY} weechat_plugins_scripts)
|
|
|
ddcdae6 |
ENDIF(RUBY_FOUND)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS ruby LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS ruby LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
6ff05c4 |
diff --git a/src/plugins/tcl/CMakeLists.txt b/src/plugins/tcl/CMakeLists.txt
|
|
|
6ff05c4 |
index a33487c..d561b97 100644
|
|
|
6ff05c4 |
--- a/src/plugins/tcl/CMakeLists.txt
|
|
|
6ff05c4 |
+++ b/src/plugins/tcl/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -34,4 +34,4 @@ IF(TCL_FOUND)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
ENDIF(TCL_FOUND)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS tcl LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS tcl LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|
|
|
ddcdae6 |
diff --git a/src/plugins/xfer/CMakeLists.txt b/src/plugins/xfer/CMakeLists.txt
|
|
|
396d3f1 |
index 6ad17f0..280a34e 100644
|
|
|
ddcdae6 |
--- a/src/plugins/xfer/CMakeLists.txt
|
|
|
ddcdae6 |
+++ b/src/plugins/xfer/CMakeLists.txt
|
|
|
ddcdae6 |
@@ -33,4 +33,4 @@ SET_TARGET_PROPERTIES(xfer PROPERTIES PREFIX "")
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
TARGET_LINK_LIBRARIES(xfer)
|
|
|
ddcdae6 |
|
|
|
ddcdae6 |
-INSTALL(TARGETS xfer LIBRARY DESTINATION ${LIBDIR}/plugins)
|
|
|
ddcdae6 |
+INSTALL(TARGETS xfer LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
|