]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
Build enchant win8 provider with mingw
authorPatrick <redacted>
Fri, 16 Jul 2021 02:54:16 +0000 (21:54 -0500)
committerPatrick Griffis <redacted>
Fri, 16 Jul 2021 03:02:37 +0000 (22:02 -0500)
meson.build
src/libenchant_win8/meson.build [new file with mode: 0644]
src/libenchant_win8/win8_provider.cpp
src/meson.build

index fe5f245d4b13c0517e21b5d7a31b2f36231e2b58..6c3b5cdc534c44152fe6052ec3af75f6e92d7275 100644 (file)
@@ -85,11 +85,18 @@ configure_file(output: 'config.h', configuration: config_h)
 config_h_include = include_directories('.')
 
 if host_machine.system() == 'windows'
+  add_languages('cpp')
+
   add_project_arguments(
     '-DWIN32',
-    '-DNTDDI_VERSION=NTDDI_WIN7',
-    '-D_WIN32_WINNT=_WIN32_WINNT_WIN7',
+    '-DNTDDI_VERSION=NTDDI_WIN8',
+    '-D_WIN32_WINNT=_WIN32_WINNT_WIN8',
      language: 'c')
+  add_project_arguments(
+    '-DWIN32',
+    '-DNTDDI_VERSION=NTDDI_WIN8',
+    '-D_WIN32_WINNT=_WIN32_WINNT_WIN8',
+     language: 'cpp')
 endif
 
 
diff --git a/src/libenchant_win8/meson.build b/src/libenchant_win8/meson.build
new file mode 100644 (file)
index 0000000..156c941
--- /dev/null
@@ -0,0 +1,7 @@
+shared_module('enchant_win8',\r
+  sources: 'win8_provider.cpp',\r
+  dependencies: [libgio_dep, dependency('enchant-2')],\r
+  include_directories: config_h_include,\r
+  install: true,\r
+  install_dir: get_option('libdir') / 'enchant-2',\r
+)\r
index 73f16610c07d0baf3376211b86e2f176932f31a4..f3f12de4864004daf83bb1263dc26d3f21af95b8 100644 (file)
 
 #include "config.h"
 
-#include <Spellcheck.h>
+#include <stdint.h>
+
+#include <spellcheck.h>
 #include <glib.h>
 
-#include "typedef.h" // for ssize_t
 #include <enchant-provider.h>
 
-ENCHANT_PLUGIN_DECLARE ("win8")
-
 /* --------- Utils ----------*/
 
 static char *
@@ -232,12 +231,6 @@ win8_provider_list_dicts (EnchantProvider *provider, size_t *out_n_dicts)
        return enumstring_to_chararray (dicts, out_n_dicts, TRUE);
 }
 
-static void
-win8_provider_free_string_list (EnchantProvider *provider, char **str_list)
-{
-       g_strfreev (str_list);
-}
-
 static void
 win8_provider_dispose (EnchantProvider *provider)
 {
@@ -283,7 +276,6 @@ init_enchant_provider (void)
        provider->identify = win8_provider_identify;
        provider->describe = win8_provider_describe;
        provider->list_dicts = win8_provider_list_dicts;
-       provider->free_string_list = win8_provider_free_string_list;
 
        provider->user_data = factory;
 
index 23453ec12d72bd2dda7695b1bcc3f8c8399225e8..677eba77918ac787f86846c756662eea3e8c1877 100644 (file)
@@ -2,6 +2,10 @@ subdir('common')
 
 if get_option('gtk-frontend')
   subdir('fe-gtk')
+
+  if host_machine.system() == 'windows'
+    subdir('libenchant_win8')
+  endif
 endif
 
 if get_option('text-frontend')