Commit 8087c3e5 authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz

build: Use only meson for squeekboard

This breaks autoconf. The only resulting binary is the squeekboard GUI. It still needs the autotools-built eekboard client in order to do anything useful. That one needs to be built using a different branch, making this a WIP.
parent 10bd0ea0
Pipeline #5074 passed with stage
in 1 minute and 23 seconds
......@@ -12,9 +12,6 @@ build_automake:
tags:
- librem5
script:
- ./autogen.sh --enable-vala=no --enable-xtest=no --prefix=`pwd`/../eekboard-install/
- make
- make install
- mkdir -p ../build
- PKG_CONFIG_PATH=`pwd`/../eekboard-install/lib/pkgconfig/ meson ../build/ --prefix=`pwd`/../squeekboard-install/
- cd ../build
......
install_data(
'themes/default.css',
install_dir: pkgdatadir + '/themes',
)
install_data(
'keyboards/keyboards.xml',
install_dir: pkgdatadir + '/keyboards/',
)
install_data(
'keyboards/geometry/compact.xml',
install_dir: pkgdatadir + '/keyboards/geometry/',
)
symbols = [
'ar.xml',
'as-inscript.xml',
'be.xml',
'bn-inscript.xml',
'fa.xml',
'gu-inscript.xml',
'he.xml',
'hi-inscript.xml',
'ja-kana.xml',
'kk.xml',
'kn-inscript.xml',
'ks-inscript.xml',
'ks.xml',
'mai-inscript.xml',
'ml-inscript.xml',
'mr-inscript.xml',
'my.xml',
'or-inscript.xml',
'pa-inscript.xml',
'ru.xml',
'sd-inscript.xml',
'ta-inscript.xml',
'te-inscript.xml',
'th.xml',
'ua.xml',
'ug.xml',
'us.xml',
'zh-bopomofo.xml',
]
foreach symbol: symbols
install_data(
'keyboards/symbols/' + symbol,
install_dir: pkgdatadir + '/keyboards/symbols/',
)
endforeach
......@@ -2,6 +2,7 @@
# Copyright (C) 2010-2011 Daiki Ueno <ueno@unixuser.org>
# Copyright (C) 2010-2011 Red Hat, Inc.
# Copyright (C) 2019 Purism, SPC
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
......@@ -21,12 +22,17 @@
import sys
import re
if len(sys.argv) != 2:
print >> sys.stderr, "Usage: %s TABLE-NAME" % sys.argv[0]
if len(sys.argv) > 3:
print >> sys.stderr, "Usage: %s TABLE-NAME [INPUT_FILE]" % sys.argv[0]
sys.exit(-1)
if len(sys.argv) < 3:
in_stream = sys.stdin
else:
in_stream = open(sys.argv[2])
table = dict()
for line in sys.stdin:
for line in in_stream:
line = line.decode('UTF-8')
match = re.match(r'\s*(0x[0-9A-F]+)\s+(\S*)\s+(\S*)', line, re.I)
if match:
......
gnome = import('gnome')
enum_headers = [
'eek-symbol.h',
'eek-types.h',
]
enums = gnome.mkenums_simple('eek-enumtypes', sources: enum_headers)
marshalers = gnome.genmarshal(
'eek-marshalers',
sources: ['eek-marshalers.list'],
prefix: '_eek_marshal',
internal: true,
)
python = find_program('python2')
gen_keysym_entries_special = generator(
python,
arguments: ['@CURRENT_SOURCE_DIR@/gen-keysym-entries.py', 'special_keysym_entries', '@INPUT@'],
capture: true,
output: 'eek-@BASENAME@.h',
)
gen_keysym_entries_unicode = generator(
python,
arguments: ['@CURRENT_SOURCE_DIR@/gen-keysym-entries.py', 'unicode_keysym_entries', '@INPUT@'],
capture: true,
output: 'eek-@BASENAME@.h',
)
gen_keysym_entries_xkeysym = generator(
python,
arguments: ['@CURRENT_SOURCE_DIR@/gen-keysym-entries.py', 'xkeysym_keysym_entries', '@INPUT@'],
capture: true,
output: 'eek-@BASENAME@.h',
)
keysym_entries = [
gen_keysym_entries_special.process('./special-keysym-entries.txt'),
gen_keysym_entries_unicode.process('./unicode-keysym-entries.txt'),
gen_keysym_entries_xkeysym.process('./xkeysym-keysym-entries.txt'),
]
......@@ -29,6 +29,7 @@
#include "config.h"
#endif /* HAVE_CONFIG_H */
#include "eekboard/key-emitter.h"
#include "eekboard/eekboard-context-service.h"
#include "eekboard/eekboard-xklutil.h"
#include "eek/eek-xkl.h"
......@@ -62,6 +63,7 @@ static guint signals[LAST_SIGNAL] = { 0, };
struct _EekboardContextServicePrivate {
GDBusConnection *connection;
GDBusNodeInfo *introspection_data;
guint registration_id;
char *object_path;
char *client_name;
......@@ -166,6 +168,7 @@ eekboard_context_service_real_create_keyboard (EekboardContextService *self,
GError *error;
if (g_str_has_prefix (keyboard_type, "xkb:")) {
/* TODO: Depends on xklavier
XklConfigRec *rec =
eekboard_xkl_config_rec_from_string (&keyboard_type[4]);
......@@ -186,6 +189,8 @@ eekboard_context_service_real_create_keyboard (EekboardContextService *self,
g_object_unref (layout);
return NULL;
}
*/
return NULL;
} else {
error = NULL;
layout = eek_xml_layout_new (keyboard_type, &error);
......@@ -719,9 +724,20 @@ on_key_released (EekKeyboard *keyboard,
g_source_remove (context->priv->repeat_timeout_id);
context->priv->repeat_timeout_id = 0;
guint keycode = eek_key_get_keycode (key);
EekSymbol *symbol = eek_key_get_symbol_with_fallback (key, 0, 0);
guint modifiers = eek_keyboard_get_modifiers (context->priv->keyboard);
/* KeyActivated signal has not been emitted in repeat handler */
emit_key_activated_dbus_signal (context,
context->priv->repeat_key);
// Insert
EekboardContext ec = {0};
Client c = {&ec, 0, {0}};
emit_key_activated(&ec, keycode, symbol, modifiers, &c);
//emit_key_activated_dbus_signal (context,
// context->priv->repeat_key);
}
}
......
......@@ -29,7 +29,7 @@
#endif /* HAVE_CONFIG_H */
#include "eekboard/eekboard-context.h"
#include "eekboard/eekboard-marshalers.h"
//#include "eekboard/eekboard-marshalers.h"
#define I_(string) g_intern_static_string (string)
......@@ -251,6 +251,7 @@ eekboard_context_class_init (EekboardContextClass *klass)
* The ::key-activated signal is emitted each time a key is
* pressed in @context.
*/
/*
signals[KEY_ACTIVATED] =
g_signal_new (I_("key-activated"),
G_TYPE_FROM_CLASS(gobject_class),
......@@ -264,7 +265,7 @@ eekboard_context_class_init (EekboardContextClass *klass)
G_TYPE_UINT,
G_TYPE_OBJECT,
G_TYPE_UINT);
*/
/**
* EekboardContext::destroyed:
* @context: an #EekboardContext
......
This diff is collapsed.
#ifndef KEYEMITTER_H
#define KEYEMITTER_H
#include <glib.h>
#include <X11/XKBlib.h>
#include "eek/eek.h"
typedef struct {
gint group;
} EekboardContext;
typedef struct {
EekboardContext *context;
XkbDescRec *xkb;
guint modifier_keycodes[8];
} Client;
void
emit_key_activated (EekboardContext *context,
guint keycode,
EekSymbol *symbol,
guint modifiers,
Client *client);
gboolean
client_enable_xtest (Client *client);
void
client_disable_xtest (Client *client);
#endif // KEYEMITTER_H
......@@ -3,7 +3,7 @@ project(
'c',
version: '1.0.9',
license: 'GPLv3',
meson_version: '>=0.40.1',
meson_version: '>=0.43.0',
default_options: [ 'warning_level=1', 'buildtype=debugoptimized', 'c_std=gnu11' ],
)
......@@ -11,9 +11,6 @@ prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
pkgdatadir = join_paths(datadir, meson.project_name())
install_data(
'data/themes/default.css',
install_dir: pkgdatadir + '/themes',
)
subdir('data')
subdir('eek')
subdir('src')
......@@ -2,27 +2,59 @@ sources = [
'server-service.c',
'server-context-service.c',
'server-main.c',
'../eekboard/eekboard-service.c',
'../eek/eek.c',
'../eek/eek-container.c',
'../eek/eek-element.c',
'../eek/eek-gtk-keyboard.c',
'../eek/eek-gtk-renderer.c',
'../eek/eek-key.c',
'../eek/eek-keyboard.c',
'../eek/eek-keyboard-drawing.c',
'../eek/eek-keysym.c',
'../eek/eek-layout.c',
'../eek/eek-renderer.c',
'../eek/eek-section.c',
'../eek/eek-serializable.c',
'../eek/eek-symbol.c',
'../eek/eek-symbol-matrix.c',
'../eek/eek-text.c',
'../eek/eek-theme.c',
'../eek/eek-theme-context.c',
'../eek/eek-theme-node.c',
'../eek/eek-types.c',
'../eek/eek-xml-layout.c',
enums,
keysym_entries,
marshalers,
'../eekboard/key-emitter.c',
'../eekboard/eekboard-context-service.c',
# $(srcdir)/eekboard-client.c \
# $(srcdir)/eekboard-context.c \
'../eekboard/eekboard-xklutil.c',
'../eekboard/eekboard-context.c',
'../eekboard/eekboard-service.c',
# '../eekboard/eekboard-xklutil.c',
]
cc = meson.get_compiler('c')
deps = [
# dependency('glib-2.0', version: '>=2.26.0'),
dependency('gio-2.0', version: '>=2.26.0'),
dependency('gtk+-3.0', version: '>=3.0'),
dependency('eek-gtk-0.90'),
dependency('libxklavier'), # FIXME remove
dependency('libcroco-0.6'),
cc.find_library('m'),
# dependency('libxklavier'), # FIXME remove
]
# Replacement for eekboard-server
squeekboard = executable('squeekboard',
sources,
include_directories: [include_directories('..')],
include_directories: [include_directories('..'), include_directories('../eek')],
dependencies: deps,
install: true,
c_args: ['-DTHEMESDIR="' + pkgdatadir + '/themes"', '-DEEKBOARD_COMPILATION=1'],
c_args: [
'-DTHEMESDIR="' + pkgdatadir + '/themes"',
'-DKEYBOARDSDIR="' + pkgdatadir + '/keyboards"',
'-DEEKBOARD_COMPILATION=1',
'-DEEK_COMPILATION=1'],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment