diff --git a/build_sylpheed_macos.sh b/build_sylpheed_macos.sh index 39bcfaf..bd24fe1 100755 --- a/build_sylpheed_macos.sh +++ b/build_sylpheed_macos.sh @@ -52,18 +52,20 @@ EOF mkdir -p "${HOME}/gtk/inst/lib/pkgconfig" "${HOME}/gtk/inst/include/enchant-2" cp -a "${SOURCE_DIR}/enchant/enchant.h" "${HOME}/gtk/inst/include/enchant-2/" -clang "${SOURCE_DIR}/enchant/enchant.m" -O3 -DNDEBUG -dynamiclib -fPIC -current_version 6.4.0 -compatibility_version 6.0.0 \ +clang "${SOURCE_DIR}/enchant/enchant.m" -O3 -DNDEBUG -dynamiclib -fPIC -current_version 8.0.0 -compatibility_version 8.0.0 \ -mmacos-version-min=${MACOSX_DEPLOYMENT_TARGET} -arch arm64 -framework AppKit -framework Foundation \ -Weverything -Wno-gnu-zero-variadic-macro-arguments -Wno-documentation-unknown-command -Wno-poison-system-directories \ + -Wno-declaration-after-statement \ -o "${HOME}/gtk/inst/lib/libenchant-2.dylib" -install_name "${HOME}/gtk/inst/lib/libenchant-2.dylib" cat << EOF > "${HOME}/gtk/inst/lib/pkgconfig/enchant-2.pc" prefix=${HOME}/gtk/inst -libdir=\${prefix}/lib +exec_prefix=\${prefix} +libdir=\${exec_prefix}/lib includedir=\${prefix}/include Name: libenchant Description: A spell checking library -Version: 2.3.4 +Version: 2.5.0 Libs: -L\${libdir} -lenchant-2 Cflags: -I\${includedir}/enchant-2 EOF @@ -168,18 +170,20 @@ EOF mkdir -p "${HOME}/gtk/inst/lib/pkgconfig" "${HOME}/gtk/inst/include/enchant-2" cp -a "${SOURCE_DIR}/enchant/enchant.h" "${HOME}/gtk/inst/include/enchant-2/" -clang "${SOURCE_DIR}/enchant/enchant.m" -O3 -DNDEBUG -dynamiclib -fPIC -current_version 6.3.0 -compatibility_version 6.0.0 \ +clang "${SOURCE_DIR}/enchant/enchant.m" -O3 -DNDEBUG -dynamiclib -fPIC -current_version 8.0.0 -compatibility_version 8.0.0 \ -mmacos-version-min=${MACOSX_DEPLOYMENT_TARGET} -arch x86_64 -framework AppKit -framework Foundation \ -Weverything -Wno-gnu-zero-variadic-macro-arguments -Wno-documentation-unknown-command -Wno-poison-system-directories \ + -Wno-declaration-after-statement \ -o "${HOME}/gtk/inst/lib/libenchant-2.dylib" -install_name "${HOME}/gtk/inst/lib/libenchant-2.dylib" cat << EOF > "${HOME}/gtk/inst/lib/pkgconfig/enchant-2.pc" prefix=${HOME}/gtk/inst -libdir=\${prefix}/lib +exec_prefix=\${prefix} +libdir=\${exec_prefix}/lib includedir=\${prefix}/include Name: libenchant Description: A spell checking library -Version: 2.3.3 +Version: 2.5.0 Libs: -L\${libdir} -lenchant-2 Cflags: -I\${includedir}/enchant-2 EOF diff --git a/enchant/enchant.h b/enchant/enchant.h index 2211fa4..0d03142 100644 --- a/enchant/enchant.h +++ b/enchant/enchant.h @@ -1,5 +1,6 @@ /* enchant * Copyright (C) 2003 Dom Lachowicz + * Copyright (C) 2016-2023 Reuben Thomas * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,8 +17,8 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - * In addition, as a special exception, Dom Lachowicz - * gives permission to link the code of this program with + * In addition, as a special exception, the copyright holders + * give permission to link the code of this program with * non-LGPL Spelling Provider libraries (eg: a MSFT Office * spell checker backend) and distribute linked combinations including * the two. You must obey the GNU Lesser General Public License in all @@ -65,9 +66,21 @@ void enchant_broker_free (EnchantBroker * broker); * @tag: The non-null language tag you wish to request a dictionary for ("en_US", "de_DE", ...) * * Returns: An #EnchantDict, or %null if no suitable dictionary could be found. This dictionary is reference counted. + * The default personal wordlist file is used. */ EnchantDict *enchant_broker_request_dict (EnchantBroker * broker, const char *const tag); +/** + * enchant_broker_request_dict_with_pwl + * @broker: A non-null #EnchantBroker + * @tag: The non-null language tag you wish to request a dictionary for ("en_US", "de_DE", ...) + * @pwl: A non-null pathname in the GLib file name encoding (UTF-8 on Windows) to the personal wordlist file + * + * Returns: An #EnchantDict, or %null if no suitable dictionary could be found, or if the pwl could not be opened. + * This dictionary is reference counted. + */ +EnchantDict *enchant_broker_request_dict_with_pwl (EnchantBroker * broker, const char *const tag, const char *pwl); + /** * enchant_broker_request_pwl_dict * @@ -184,8 +197,8 @@ char **enchant_dict_suggest (EnchantDict * dict, const char *const word, * @word: The non-null word you wish to add to your personal dictionary, in UTF-8 encoding * @len: The byte length of @word, or -1 for strlen (@word) * - * Remarks: if the word exists in the exclude dictionary, it will be removed from the - * exclude dictionary + * The word is also added to the session. If the word exists in the exclude + * dictionary, it will be removed from the exclude dictionary. */ void enchant_dict_add (EnchantDict * dict, const char *const word, ssize_t len); @@ -205,6 +218,7 @@ void enchant_dict_add_to_session (EnchantDict * dict, const char *const word, ss * remove from the personal dictionary, in UTF-8 encoding * @len: The byte length of @word, or -1 for strlen (@word) * + * The word is also removed from the session. */ void enchant_dict_remove (EnchantDict * dict, const char *const word, ssize_t len); @@ -241,9 +255,7 @@ int enchant_dict_is_removed (EnchantDict * dict, const char *const word, ssize_t * @cor: The non-null correction word, in UTF-8 encoding * @cor_len: The byte length of @cor, or -1 for strlen (@cor) * - * Notes that you replaced @mis with @cor, so it's possibly more likely - * that future occurrences of @mis will be replaced with @cor. So it might - * bump @cor up in the suggestion list. + * Does nothing; API is deprecated and retained only for backwards compatibility. */ void enchant_dict_store_replacement (EnchantDict * dict, const char *const mis, ssize_t mis_len, diff --git a/enchant/enchant.m b/enchant/enchant.m index 1b3dc4d..c1c6aa0 100644 --- a/enchant/enchant.m +++ b/enchant/enchant.m @@ -1,8 +1,8 @@ /* clang enchant.m -O3 \ -dynamiclib -fPIC \ - -current_version 6.4.0 \ - -compatibility_version 6.0.0 \ + -current_version 8.0.0 \ + -compatibility_version 8.0.0 \ -mmacos-version-min=10.9 \ -framework AppKit \ -framework Foundation \ @@ -10,6 +10,7 @@ -Wno-gnu-zero-variadic-macro-arguments \ -Wno-documentation-unknown-command \ -Wno-poison-system-directories \ + -Wno-declaration-after-statement \ -o libenchant-2.dylib \ -install_name "${PWD}/libenchant-2.dylib" */ @@ -59,7 +60,7 @@ NSMutableSet *ignores; }; -EnchantBroker *enchant_broker_init() +EnchantBroker *enchant_broker_init(void) { ENCHANT_DEBUG = !!getenv("ENCHANT_DEBUG"); dprintf(); diff --git a/modulesets/bootstrap.modules b/modulesets/bootstrap.modules index af23ca3..b638076 100644 --- a/modulesets/bootstrap.modules +++ b/modulesets/bootstrap.modules @@ -173,7 +173,7 @@ - + @@ -186,7 +186,7 @@ - + @@ -405,7 +405,7 @@ - +