From de82ed918c26094873c5b42de356ee8eab705d1d Mon Sep 17 00:00:00 2001 From: oreo639 Date: Sun, 26 Feb 2023 05:41:35 -0800 Subject: [PATCH] ibus: update to 1.5.28. --- srcpkgs/ibus/patches/fix-cross.patch | 133 +++++++++++++++++++++++++++ srcpkgs/ibus/template | 20 ++-- 2 files changed, 145 insertions(+), 8 deletions(-) create mode 100644 srcpkgs/ibus/patches/fix-cross.patch diff --git a/srcpkgs/ibus/patches/fix-cross.patch b/srcpkgs/ibus/patches/fix-cross.patch new file mode 100644 index 000000000000..f1e23fbfa85c --- /dev/null +++ b/srcpkgs/ibus/patches/fix-cross.patch @@ -0,0 +1,133 @@ +diff --git a/configure.ac b/configure.ac +index cba242df..2a2c2250 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -130,6 +130,7 @@ AC_PROG_CC_STDC + AM_PROG_VALAC([0.20]) + AC_PROG_INSTALL + AC_PROG_MAKE_SET ++AX_PROG_CC_FOR_BUILD + + # i18n stuff + AM_GNU_GETTEXT_VERSION([0.19.8]) +@@ -151,10 +152,13 @@ AC_CHECK_FUNCS(daemon) + AC_CHECK_LIB(c, dlclose, LIBDL="", [AC_CHECK_LIB(dl, dlclose, LIBDL="-ldl")]) + AC_SUBST(LIBDL) + ++# Check if cross compiling. ++AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes) ++ + # Check endianness. + AC_MSG_CHECKING([build system endianness]) + ENDIAN=unknown +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +@@ -165,7 +169,7 @@ AC_RUN_IFELSE( + )], + [ENDIAN=little] + ) +-AC_RUN_IFELSE( ++AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ + #include +diff --git a/m4/Makefile.am b/m4/Makefile.am +index dcf84ac3..f54effe1 100644 +--- a/m4/Makefile.am ++++ b/m4/Makefile.am +@@ -22,6 +22,7 @@ + + EXTRA_DIST = \ + as-version.m4 \ ++ ax_prog_cxx_for_build.m4 \ + ibuslocale.m4 \ + vapigen.m4 \ + $(NULL) +diff --git a/src/Makefile.am b/src/Makefile.am +index 426376dd..5b6024f7 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -41,6 +41,7 @@ INTROSPECTION_COMPILER_ARGS = \ + $(NULL) + INTROSPECTION_GIRS = + CLEANFILES = ++ + noinst_PROGRAMS = gen-internal-compose-table + + # C preprocessor flags +@@ -107,7 +108,7 @@ ibus_sources = \ + ibusxevent.c \ + ibusxml.c \ + $(NULL) +-libibus_1_0_la_SOURCES = \ ++libibus_sources = \ + ibuscomposetable.c \ + ibusenumtypes.c \ + ibusmarshalers.c \ +@@ -166,6 +167,7 @@ ibus_headers = \ + ibusxevent.h \ + ibusxml.h \ + $(NULL) ++libibus_1_0_la_SOURCES = $(libibus_sources) + ibusincludedir = $(includedir)/ibus-@IBUS_API_VERSION@ + ibus_public_headers = \ + $(ibus_headers) \ +@@ -188,6 +190,37 @@ noinst_HEADERS = \ + $(ibus_private_headers) \ + $(NULL) + ++if CROSS_COMPILING ++libnativeibus = libnativeibus-1.0.la ++noinst_LTLIBRARIES = $(libnativeibus) ++ ++libnativeibus_1_0_la_SOURCES = $(libibus_sources) ++libnativeibus_1_0_la_LIBADD = \ ++ @GLIB2_LIBS@ \ ++ @GOBJECT2_LIBS@ \ ++ @GIO2_LIBS@ \ ++ $(NULL) ++libnativeibus_1_0_la_CFLAGS = $(AM_CFLAGS) ++libnativeibus_1_0_la_LDFLAGS = \ ++ -no-undefined \ ++ -export-symbols-regex "ibus_.*" \ ++ -version-info @LT_VERSION_INFO@ \ ++ $(NULL) ++ ++$(noinst_PROGRAMS): CC=$(CC_FOR_BUILD) ++$(noinst_PROGRAMS): CCLD=$(CC_FOR_BUILD) ++$(noinst_PROGRAMS): CFLAGS=$(CFLAGS_FOR_BUILD) ++$(noinst_PROGRAMS): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++$(noinst_PROGRAMS): LDFLAGS=$(LDFLAGS_FOR_BUILD) ++$(noinst_LTLIBRARIES): CC=$(CC_FOR_BUILD) ++$(noinst_LTLIBRARIES): CCLD=$(CC_FOR_BUILD) ++$(noinst_LTLIBRARIES): CFLAGS=$(CFLAGS_FOR_BUILD) ++$(noinst_LTLIBRARIES): CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++$(noinst_LTLIBRARIES): LDFLAGS=$(LDFLAGS_FOR_BUILD) ++else ++libnativeibus = $(libibus) ++endif ++ + gen_internal_compose_table_SOURCES = \ + gencomposetable.c \ + ibuscomposetable.c \ +@@ -368,7 +401,7 @@ emoji_parser_CFLAGS = \ + $(GOBJECT2_CFLAGS) \ + $(NULL) + emoji_parser_LDADD = \ +- $(libibus) \ ++ $(libnativeibus) \ + $(GLIB2_LIBS) \ + $(GOBJECT2_LIBS) \ + $(NULL) +@@ -413,7 +446,7 @@ unicode_parser_CFLAGS = \ + $(NULL) + unicode_parser_LDADD = \ + $(GLIB2_LIBS) \ +- $(libibus) \ ++ $(libnativeibus) \ + $(NULL) + endif + diff --git a/srcpkgs/ibus/template b/srcpkgs/ibus/template index 77a7a06a3037..ffe5ee881f94 100644 --- a/srcpkgs/ibus/template +++ b/srcpkgs/ibus/template @@ -1,7 +1,7 @@ # Template file for 'ibus' pkgname=ibus -version=1.5.27 -revision=2 +version=1.5.28 +revision=1 build_style=gnu-configure build_helper="gir" configure_args="--enable-ui --enable-gtk3 --enable-gtk4 @@ -11,7 +11,7 @@ configure_args="--enable-ui --enable-gtk3 --enable-gtk4 $(vopt_enable dicts emoji-dict) $(vopt_enable dicts unicode-dict) --enable-introspection --enable-vala $(vopt_enable ibus_setup setup)" hostmakedepends="pkg-config libtool gettext-devel intltool dconf - python3 glib-devel vala + python3 glib-devel vala automake gtk-doc $(vopt_if dicts 'cldr-emoji-annotation unicode-character-database unicode-emoji')" makedepends="dconf-devel gtk+-devel gtk+3-devel gtk4-devel hicolor-icon-theme iso-codes json-glib-devel libnotify-devel librsvg-devel python3-xdg @@ -23,15 +23,19 @@ maintainer="oreo639 " license="LGPL-2.1-or-later" homepage="https://github.com/ibus/ibus" distfiles="https://github.com/ibus/ibus/releases/download/${version}/ibus-${version}.tar.gz" -checksum=6efbda5adb96f607cf7108d1e270962c0729a59c9ea6d58eea2dde0e3cbb97df +checksum=6c9ff3a7576c3d61264f386030f47ee467eb7298c8104367002986e008765667 build_options="ibus_setup dicts" desc_option_ibus_setup="Enable support for building the ibus setup UI" -build_options_default="ibus_setup" +build_options_default="ibus_setup dicts" -if [ -z "$CROSS_BUILD" ]; then - build_options_default+=" dicts" -fi +pre_build() { + export GIR_EXTRA_LIBS_PATH="${wrksrc}/src/.libs" +} + +pre_configure() { + autoreconf -fi +} post_install() { vinstall bindings/pygobject/gi/overrides/IBus.py 644 ${py3_sitelib}/gi/overrides