aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/hime/APKBUILD101
-rw-r--r--testing/hime/fix-im-client-ldflags.patch14
-rwxr-xr-xtesting/hime/hime-gtk2.post-install4
-rwxr-xr-xtesting/hime/hime-gtk2.post-upgrade4
-rwxr-xr-xtesting/hime/hime-gtk3.post-install4
-rwxr-xr-xtesting/hime/hime-gtk3.post-upgrade4
-rw-r--r--testing/hime/use-bash-not-sh.patch104
7 files changed, 235 insertions, 0 deletions
diff --git a/testing/hime/APKBUILD b/testing/hime/APKBUILD
new file mode 100644
index 00000000000..ac64a7dc5f6
--- /dev/null
+++ b/testing/hime/APKBUILD
@@ -0,0 +1,101 @@
+# Contributor: rubicon <rubicon@mailo.com>
+# Maintainer: rubicon <rubicon@mailo.com>
+pkgname=hime
+pkgver=0.9.12_git20220426
+_gitrev=c66f0671a4d2a9e35d68c4e11af8986ffadc2d4f
+pkgrel=0
+pkgdesc="HIME Input Method Editor"
+url="https://hime-ime.github.io/"
+arch="all"
+license="LGPL-2.1-or-later AND GPL-2.0-or-later"
+depends="bash cmd:whereis"
+makedepends="
+ bash
+ libxtst-dev
+ cmd:whereis
+ cmd:iconv
+ anthy-dev
+ libchewing-dev
+ gtk+2.0-dev
+ gtk+3.0-dev
+ qt5-qtbase-dev
+ qt6-qtbase-dev
+ "
+subpackages="
+ $pkgname-doc
+ $pkgname-lang
+ $pkgname-dev
+ $pkgname-anthy
+ $pkgname-chewing
+ $pkgname-gtk2
+ $pkgname-gtk3
+ $pkgname-qt5
+ $pkgname-qt6
+ "
+options="!check"
+source="$pkgname-$pkgver.tar.gz::https://github.com/hime-ime/hime/archive/$_gitrev/hime-$_gitrev.tar.gz
+ use-bash-not-sh.patch
+ fix-im-client-ldflags.patch
+ "
+builddir="$srcdir/hime-$_gitrev"
+
+build() {
+ ./configure --prefix=/usr \
+ --with-gtk=2.0 \
+ --qt6-moc-path=/usr/lib/qt6/libexec/moc
+ make
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+anthy() {
+ pkgdesc="$pkgdesc (Anthy Hiragana support)"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel anthy"
+ amove usr/lib/hime/anthy-module.so
+}
+
+chewing() {
+ pkgdesc="$pkgdesc (Chewing Bopomofo support)"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel libchewing"
+ amove usr/lib/hime/chewing-module.so
+}
+
+gtk2() {
+ pkgdesc="$pkgdesc (Gtk+2 immodule)"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel gtk+2.0"
+ install="$subpkgname.post-install $subpkgname.post-upgrade"
+ amove usr/lib/gtk-2.0/*/immodules/im-hime.so
+}
+
+gtk3() {
+ pkgdesc="$pkgdesc (Gtk+3 immodule)"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel gtk+3.0"
+ install="$subpkgname.post-install $subpkgname.post-upgrade"
+ amove usr/lib/gtk-3.0/*/immodules/im-hime.so
+}
+
+qt5() {
+ pkgdesc="$pkgdesc (Qt5 immodule)"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel qt5-qtbase-x11"
+ amove usr/lib/qt5/plugins/platforminputcontexts/im-hime.so
+}
+
+qt6() {
+ pkgdesc="$pkgdesc (Qt6 immodule)"
+ depends=""
+ install_if="$pkgname=$pkgver-r$pkgrel qt6-qtbase-x11"
+ amove usr/lib/qt6/plugins/platforminputcontexts/im-hime.so
+}
+
+sha512sums="
+808766419ee1ea17b2dc162667e2213ac5b1a2882d64218d2636f3ca72db9de24bc7a262b88bc52fe84ffee5b60b1964406f9fd5324b44503de31f1c4b60cc06 hime-0.9.12_git20220426.tar.gz
+4e38121579f986fd90b926e77e413b81ee0001a6cba1ae1be14e66b22b2b9ac172dfd9ed1d51c15040bfab5135c2bd8214edb97e762648059aaa92162cab3a2c use-bash-not-sh.patch
+80fd7ff717bdac553e440dedc84d0db9785f0e775a7848dda9e92f1da9018713714ced7a9f6fe9120a2b0d9e3d49a4eb25557432d21f01a5e4298506a3aa21d9 fix-im-client-ldflags.patch
+"
diff --git a/testing/hime/fix-im-client-ldflags.patch b/testing/hime/fix-im-client-ldflags.patch
new file mode 100644
index 00000000000..4e58f141380
--- /dev/null
+++ b/testing/hime/fix-im-client-ldflags.patch
@@ -0,0 +1,14 @@
+--- a/src/im-client/Makefile
++++ b/src/im-client/Makefile
+@@ -35,9 +35,9 @@
+ @echo "linking $@ ..."
+
+ ifeq ($(FREEBSD), 0)
+- $(CC) $(SO_FLAGS) -Wl,-soname,libhime-im-client.so.1 $(OBJS) $(LDFLAGS+) -o $@ -L/usr/X11R6/lib
++ $(CC) $(SO_FLAGS) -Wl,-soname,libhime-im-client.so.1 $(OBJS) $(LDFLAGS) -o $@ -L/usr/X11R6/lib
+ else
+- $(CC) $(SO_FLAGS) -Wl,-soname,libhime-im-client.so.1 $(OBJS) $(LDFLAGS+) -o $@ -L/usr/local/lib
++ $(CC) $(SO_FLAGS) -Wl,-soname,libhime-im-client.so.1 $(OBJS) $(LDFLAGS) -o $@ -L/usr/local/lib
+ endif
+ ln -sf $(SOFILEVER) $(SOFILE)
+ ln -sf $(SOFILEVER) $(SOFILE).1
diff --git a/testing/hime/hime-gtk2.post-install b/testing/hime/hime-gtk2.post-install
new file mode 100755
index 00000000000..4d32561b145
--- /dev/null
+++ b/testing/hime/hime-gtk2.post-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+/usr/bin/gtk-query-immodules-2.0 --update-cache
+
+exit 0
diff --git a/testing/hime/hime-gtk2.post-upgrade b/testing/hime/hime-gtk2.post-upgrade
new file mode 100755
index 00000000000..4d32561b145
--- /dev/null
+++ b/testing/hime/hime-gtk2.post-upgrade
@@ -0,0 +1,4 @@
+#!/bin/sh
+/usr/bin/gtk-query-immodules-2.0 --update-cache
+
+exit 0
diff --git a/testing/hime/hime-gtk3.post-install b/testing/hime/hime-gtk3.post-install
new file mode 100755
index 00000000000..75e5a242951
--- /dev/null
+++ b/testing/hime/hime-gtk3.post-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+/usr/bin/gtk-query-immodules-3.0 --update-cache
+
+exit 0
diff --git a/testing/hime/hime-gtk3.post-upgrade b/testing/hime/hime-gtk3.post-upgrade
new file mode 100755
index 00000000000..75e5a242951
--- /dev/null
+++ b/testing/hime/hime-gtk3.post-upgrade
@@ -0,0 +1,4 @@
+#!/bin/sh
+/usr/bin/gtk-query-immodules-3.0 --update-cache
+
+exit 0
diff --git a/testing/hime/use-bash-not-sh.patch b/testing/hime/use-bash-not-sh.patch
new file mode 100644
index 00000000000..006b13ef71a
--- /dev/null
+++ b/testing/hime/use-bash-not-sh.patch
@@ -0,0 +1,104 @@
+--- a/filter/arukas
++++ b/filter/arukas
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # hime filter arukas version 0.0.1
+ read -r -t 1 aa
+ echo -n $aa | \
+--- a/filter/big5only
++++ b/filter/big5only
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # hime filter big5only version 0.0.1
+ read -r -t 1 aa
+ echo -n $aa | \
+--- a/filter/jp2cn
++++ b/filter/jp2cn
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # hime filter jp2cn version 0.0.3
+ read -r aa
+ MATCH=`tail -n 681 $0 | grep $aa | head -n 1`
+--- a/filter/jp2tw
++++ b/filter/jp2tw
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # hime filter jp2tw version 0.0.3
+ read -r aa
+ MATCH=`tail -n 327 $0 | grep $aa | head -n 1`
+--- a/filter/sakura
++++ b/filter/sakura
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # hime filter sakura version 0.0.3
+ read -r -t 1 aa
+ echo -n $aa | \
+--- a/filter/tw2jp
++++ b/filter/tw2jp
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # hime filter tw2jp version 0.0.2
+ read -r aa
+ MATCH=`tail -n 332 $0 | grep $aa | head -n 1`
+--- a/filter/zh2jp
++++ b/filter/zh2jp
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # hime filter zh2jp version 0.0.2
+ read -r aa
+ MATCH=`tail -n 787 $0 | grep $aa | head -n 1`
+--- a/filter/zh2tw
++++ b/filter/zh2tw
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # hime filter zh2tw version 0.0.3
+ read -r -t 1 aa
+ U2S=`echo -n $aa | iconv -f UTF-8 -t GB2312 -c`
+--- a/scripts/gtab.append_prepare
++++ b/scripts/gtab.append_prepare
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ [ -f "$1" ] && exit 0
+
+--- a/scripts/hime-env
++++ b/scripts/hime-env
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # Copyright and license see bottom of this file
+ echo "====Detecting hime install===="
+ HIME_BINARY=$(whereis hime | cut -d ' ' -f 2)
+--- a/scripts/hime-user-setup
++++ b/scripts/hime-user-setup
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ if [ -z "$1" ] || [ -z "$2" ]; then
+ echo "please specify hime_table_dir hime_bin_dir"
+--- a/scripts/tsin-gtab-import
++++ b/scripts/tsin-gtab-import
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ pushd "$HOME/.config/hime"
+ f="$1.append.gtab.tsin-db"
+--- a/scripts/utf8-edit
++++ b/scripts/utf8-edit
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ PATH="$PATH:/opt/gnome/bin:/usr/local/bin"
+