diff --git a/LICENSES/BSD-3-Clause.txt b/LICENSES/BSD-3-Clause.txt deleted file mode 100644 index 086d3992c..000000000 --- a/LICENSES/BSD-3-Clause.txt +++ /dev/null @@ -1,11 +0,0 @@ -Copyright (c) . - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/cmake/FindENCHANT.cmake b/cmake/FindENCHANT.cmake deleted file mode 100644 index c843e72e0..000000000 --- a/cmake/FindENCHANT.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# SPDX-FileCopyrightText: 2006 Zack Rusin -# -# SPDX-License-Identifier: BSD-3-Clause -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -# - Try to find the Enchant spell checker -# Once done this will define -# -# ENCHANT_FOUND - system has ENCHANT -# ENCHANT_INCLUDE_DIR - the ENCHANT include directory -# ENCHANT_LIBRARIES - Link these to use ENCHANT -# ENCHANT_DEFINITIONS - Compiler switches required for using ENCHANT - -if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) - # in cache already - set(ENCHANT_FOUND TRUE) -else() - if(NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_ENCHANT enchant) - set(ENCHANT_DEFINITIONS ${PC_ENCHANT_CFLAGS_OTHER}) - endif() - - find_path(ENCHANT_INCLUDE_DIR - NAMES enchant++.h - HINTS ${PC_ENCHANT_INCLUDEDIR} ${PC_ENCHANT_INCLUDE_DIRS} - PATH_SUFFIXES enchant-2 enchant - ) - - find_library(ENCHANT_LIBRARIES - NAMES enchant-2 enchant - HINTS ${PC_ENCHANT_LIBDIR} - ${PC_ENCHANT_LIBRARY_DIRS} - ) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES) - - mark_as_advanced(ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES) - - # check if function enchant_get_version() exists - set(CMAKE_REQUIRED_INCLUDES ${ENCHANT_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${ENCHANT_LIBRARIES}) - check_symbol_exists(enchant_get_version "enchant.h" HAVE_ENCHANT_GET_VERSION) - set(CMAKE_REQUIRED_INCLUDES) - set(CMAKE_REQUIRED_LIBRARIES) -endif() diff --git a/config.h.cmake b/config.h.cmake index eec9097bd..1b105b1ff 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -52,7 +52,6 @@ SPDX-License-Identifier: GPL-3.0-or-later #cmakedefine HAVE_HTONLL #cmakedefine HAVE_EAT_NEWLINE_GLITCH #cmakedefine HAVE_ASPELL_VERSION_STRING -#cmakedefine HAVE_ENCHANT_GET_VERSION #cmakedefine HAVE_GUILE_GMP_MEMORY_FUNCTIONS #define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@" diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 0b7196cb8..252d026e2 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -206,7 +206,7 @@ endif() if(ENABLE_SPELL) if(ENABLE_ENCHANT) - find_package(ENCHANT) + pkg_check_modules(ENCHANT enchant-2) if(ENCHANT_FOUND) add_subdirectory(spell) else() diff --git a/src/plugins/spell/CMakeLists.txt b/src/plugins/spell/CMakeLists.txt index 7c5ff7607..199e9c2b3 100644 --- a/src/plugins/spell/CMakeLists.txt +++ b/src/plugins/spell/CMakeLists.txt @@ -32,8 +32,8 @@ add_library(spell MODULE set_target_properties(spell PROPERTIES PREFIX "") if(ENCHANT_FOUND) - include_directories(${ENCHANT_INCLUDE_DIR}) - target_link_libraries(spell ${ENCHANT_LIBRARIES} coverage_config) + include_directories(${ENCHANT_INCLUDE_DIRS}) + target_link_libraries(spell ${ENCHANT_LDFLAGS} coverage_config) add_definitions(-DUSE_ENCHANT) else() if(ASPELL_FOUND) diff --git a/src/plugins/spell/spell.c b/src/plugins/spell/spell.c index ab51dd410..782001f2f 100644 --- a/src/plugins/spell/spell.c +++ b/src/plugins/spell/spell.c @@ -1123,12 +1123,8 @@ spell_debug_libs_cb (const void *pointer, void *data, const char *signal, (void) signal_data; #ifdef USE_ENCHANT -#ifdef HAVE_ENCHANT_GET_VERSION weechat_printf (NULL, " %s: enchant %s", SPELL_PLUGIN_NAME, enchant_get_version ()); -#else - weechat_printf (NULL, " %s: enchant (?)", SPELL_PLUGIN_NAME); -#endif /* HAVE_ENCHANT_GET_VERSION */ #else #ifdef HAVE_ASPELL_VERSION_STRING weechat_printf (NULL, " %s: aspell %s",