diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2021-09-10 00:09:26 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2021-09-10 00:09:26 +0900 |
commit | fbea5441fc53ae1d5533bed1ee53009141cf905a (patch) | |
tree | 08e413af84278b129bfd6292ce4baaed405bb2b7 | |
parent | 4957d1468db4fc5ed30c3ae1f2afac9e51b329d6 (diff) | |
download | ibus-fbea5441fc53ae1d5533bed1ee53009141cf905a.tar.gz |
Fix build errors in Ubuntu focal
- Ubuntu focal uses glib 2.64.6 which does not include errno.h
so config.h includes errno.h as the workaround.
- make autogen.sh not to delete dist files in Travis
- Call $(PYTHON) for gensimple.py for Ubuntu python3
- Add a code review in src/ibuscomposetable.c
BUG=https://github.com/ibus/ibus/pull/2348
-rw-r--r-- | .travis.yml | 4 | ||||
-rwxr-xr-x | autogen.sh | 2 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | engine/Makefile.am | 2 | ||||
-rw-r--r-- | src/ibuscomposetable.c | 4 | ||||
-rw-r--r-- | src/ibusregistry.c | 4 | ||||
-rw-r--r-- | src/ibusshare.c | 3 |
7 files changed, 26 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index e90dc230..a7c0dd46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,6 +46,8 @@ jobs: - name: Build in Ubuntu before_script: - sudo apt-get -qq update + env: + - SAVE_DIST_FILES=1 script: - set -e - git pull --depth=200 @@ -54,6 +56,7 @@ jobs: - > ./autogen.sh --with-ucd-dir='/usr/share/unicode' + --enable-install-tests # Set the cutom DESTDIR because the default DESTDIR # /home/travis/bulid/fujiwarat/$PKG/ibus/ibus-$VERSION/_inst seems to be # too long and failed to set DESTDIR to install bindings/pygobject/IBus.py @@ -64,6 +67,7 @@ jobs: --disable-schemas-install --enable-memconf --with-ucd-dir='/usr/share/unicode' + --enable-install-tests " DISABLE_GUI_TESTS="ibus-compose ibus-keypress test-stress" VERBOSE=1 @@ -53,4 +53,4 @@ ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" REQUIRED_AUTOMAKE_VERSION=1.11 CFLAGS="$CFL echo "rm $f" rm $f done -} +} || : diff --git a/configure.ac b/configure.ac index 29f8b3db..ce096ad3 100644 --- a/configure.ac +++ b/configure.ac @@ -162,6 +162,15 @@ PKG_CHECK_MODULES(GIO2, [ PKG_CHECK_MODULES(GTHREAD2, [ gthread-2.0 >= glib_required_version ]) +PKG_CHECK_EXISTS( + [glib-2.0 >= 2.65.0], + [AC_DEFINE(GLIB2_EMBED_ERRNO_H, TRUE, [glib2 include errno.h])] +) +AH_BOTTOM([ +#ifndef GLIB2_EMBED_ERRNO_H +# include <errno.h> +#endif +]) # --disable-tests option. AC_ARG_ENABLE(tests, diff --git a/engine/Makefile.am b/engine/Makefile.am index 84bc7f6c..03867f52 100644 --- a/engine/Makefile.am +++ b/engine/Makefile.am @@ -99,7 +99,7 @@ simple.xml: simple.xml.in mv $@.tmp $@ simple.xml.in: - $(srcdir)/gensimple.py \ + $(PYTHON) $(srcdir)/gensimple.py \ --input=$(XKBCONFIG_BASE)/rules/evdev.xml \ --output=$@ \ --version=$(VERSION).`date '+%Y%m%d'` \ diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c index d4184d30..b76464bc 100644 --- a/src/ibuscomposetable.c +++ b/src/ibuscomposetable.c @@ -18,6 +18,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include <glib.h> #include <glib/gstdio.h> @@ -1606,6 +1609,7 @@ ibus_compose_table_compact_check (const IBusComposeTableCompactEx row_stride = i + 1; if (seq_index[i + 1] - seq_index[i] > 0) { + g_assert (row_stride); seq = bsearch (compose_buffer + 1, table->data + seq_index[i], (seq_index[i + 1] - seq_index[i]) / row_stride, diff --git a/src/ibusregistry.c b/src/ibusregistry.c index 23c5ca1b..962afb20 100644 --- a/src/ibusregistry.c +++ b/src/ibusregistry.c @@ -20,6 +20,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <gio/gio.h> #include <glib/gstdio.h> #include <string.h> diff --git a/src/ibusshare.c b/src/ibusshare.c index 8974511a..0c0bda10 100644 --- a/src/ibusshare.c +++ b/src/ibusshare.c @@ -20,6 +20,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif #include "ibusshare.h" #include <glib.h> |