blob: 507a3414451acd1587b755de0d2ee895259fc1dc [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001DESCRIPTION = "A multilingual user input method library"
2HOMEPAGE = "http://uim.freedesktop.org/"
3LICENSE = "BSD-3-Clause & LGPLv2+"
Brad Bishopdec060e2019-09-23 08:01:31 -04004LIC_FILES_CHKSUM = "file://COPYING;md5=ab2826b41ca0ff4030d38cc39791d1c8"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05005SECTION = "inputmethods"
6
Brad Bishop779d0ac2019-09-27 08:23:48 -04007SRC_URI = "https://github.com/uim/uim/releases/download/${PV}/uim-${PV}.tar.bz2 \
8 file://0001-Fix-to-set-libedit-path-from-configure-option-proper.patch \
Andrew Geissler2ee498a2020-05-29 15:52:06 -05009 file://JMP_BUF_GC_jmp_buf.patch \
Brad Bishop779d0ac2019-09-27 08:23:48 -040010"
Brad Bishopdec060e2019-09-23 08:01:31 -040011SRC_URI_append_class-target = "\
12 file://uim-module-manager.patch \
Patrick Williamsddad1a12017-02-23 20:36:32 -060013"
Brad Bishopdec060e2019-09-23 08:01:31 -040014SRC_URI[md5sum] = "01c7bd5d0d4f3a9f6f5befe6f57a470b"
15SRC_URI[sha256sum] = "34599bbcc4e5ab87832370763e38be5100984a64237555e9234a1ea225a0fadc"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050016
Andrew Geissler82c905d2020-04-13 13:39:40 -050017UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
18
Brad Bishopdec060e2019-09-23 08:01:31 -040019DEPENDS = "anthy fontconfig libxft libxt glib-2.0 ncurses intltool libedit"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050020DEPENDS_append_class-target = " intltool-native gtk+ gtk+3 uim-native takao-fonts"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050021
22RDEPENDS_uim = "libuim0 libedit"
Brad Bishop316dfdd2018-06-25 12:45:53 -040023RDEPENDS_uim-anthy = "takao-fonts anthy libanthy0"
24RDEPENDS_uim-anthy_append_libc-glibc = " glibc-utils glibc-gconv-euc-jp"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050025
26LEAD_SONAME = "libuim.so.1"
27
Brad Bishop779d0ac2019-09-27 08:23:48 -040028COMPATIBLE_HOST_riscv64 = "null"
29COMPATIBLE_HOST_riscv32 = "null"
30
Brad Bishop8410d612019-11-25 09:40:59 -050031inherit features_check autotools pkgconfig gettext qemu gtk-immodules-cache
Brad Bishop316dfdd2018-06-25 12:45:53 -040032
33REQUIRED_DISTRO_FEATURES = "x11"
34
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035GTKIMMODULES_PACKAGES = "uim-gtk2.0 uim-gtk3"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050036
37EXTRA_OECONF += "--disable-emacs \
Brad Bishop779d0ac2019-09-27 08:23:48 -040038 --with-libedit=${STAGING_EXECPREFIXDIR} \
Patrick Williamsddad1a12017-02-23 20:36:32 -060039 --without-scim \
40 --without-m17nlib \
41 --without-prime \
42 --without-canna \
43 --without-mana \
44 --without-eb \
45"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050046
47CONFIGUREOPTS_remove_class-target = "--disable-silent-rules"
48
Brad Bishopdec060e2019-09-23 08:01:31 -040049# https://github.com/uim/uim/issues/44
50PARALLEL_MAKE = ""
51
Patrick Williamsb48b7b42016-08-17 15:04:38 -050052#Because m4 file's find maxdepth=2, so copy the m4 files of the deep depth.
53do_configure_prepend () {
54 cp ${S}/sigscheme/m4/* ${S}/m4/
55}
56
57do_install_append() {
58 rm -rf ${D}/${datadir}/applications
59}
60
Brad Bishop6e60e8b2018-02-01 10:27:11 -050061PACKAGES =+ "uim-xim uim-utils uim-skk uim-gtk2.0 uim-gtk3 uim-fep uim-anthy uim-common libuim0 libuim-dev"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050062
63FILES_${PN} = "${bindir}/uim-help \
Patrick Williamsddad1a12017-02-23 20:36:32 -060064 ${libdir}/uim/plugin/libuim-* \
65 ${libdir}/libuim-scm* \
66 ${libdir}/libgcroots* \
67 ${libdir}/uim/plugin/libuim-* \
68"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050069
70FILES_libuim0 = "${libdir}/uim/plugin/libuim-custom-enabler.* \
Patrick Williamsddad1a12017-02-23 20:36:32 -060071 ${libdir}/libuim-custom.so.* \
72 ${datadir}/locale/ja/LC_MESSAGES/uim.mo \
73 ${datadir}/locale/fr/LC_MESSAGES/uim.mo \
74 ${datadir}/locale/ko/LC_MESSAGES/uim.mo \
75 ${libdir}/libuim.so.* \
76"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050077FILES_libuim-dev = "${libdir}/libuim*.a \
Patrick Williamsddad1a12017-02-23 20:36:32 -060078 ${libdir}/libuim*.la \
79 ${libdir}/libuim*.so \
80 ${includedir}/uim \
81 ${libdir}/pkgconfig/uim.pc \
82"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050083FILES_uim-anthy = "${libdir}/uim/plugin/libuim-anthy.* \
Patrick Williamsddad1a12017-02-23 20:36:32 -060084 ${datadir}/uim/anthy*.scm \
85"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050086FILES_${PN}-dbg += "${libdir}/*/*/*/.debug ${libdir}/*/*/.debug"
87FILES_${PN}-dev += "${libdir}/uim/plugin/*.la"
88
89FILES_uim-utils = "${bindir}/uim-sh \
Patrick Williamsddad1a12017-02-23 20:36:32 -060090 ${bindir}/uim-module-manager \
91 ${libexecdir}/uim-helper-server \
92"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050093FILES_uim-xim = "${bindir}/uim-xim \
Patrick Williamsddad1a12017-02-23 20:36:32 -060094 ${libexecdir}/uim-candwin-*gtk \
95 ${libexecdir}/uim-candwin-*gtk3 \
96 ${datadir}/man/man1/uim-xim.1 \
97 ${sysconfdir}/X11/xinit/xinput.d/uim* \
98"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050099FILES_uim-common = "${datadir}/uim/pixmaps/*.png \
Patrick Williamsddad1a12017-02-23 20:36:32 -0600100 ${datadir}/uim \
101"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500102FILES_uim-fep = "${bindir}/uim-fep*"
103
104FILES_uim-gtk2.0 = "${libdir}/gtk-2.0 \
Patrick Williamsddad1a12017-02-23 20:36:32 -0600105 ${bindir}/uim-toolbar-gtk \
106 ${bindir}/uim-toolbar-gtk-systray \
107 ${bindir}/uim-*-gtk \
108 ${bindir}/uim-input-pad-ja \
109 ${libdir}/uim/uim-*-gtk \
110"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500111FILES_uim-gtk3 = "${libdir}/gtk-3.0 \
Patrick Williamsddad1a12017-02-23 20:36:32 -0600112 ${bindir}/uim-toolbar-gtk3 \
113 ${bindir}/uim-toolbar-gtk3-systray \
114 ${bindir}/uim-*-gtk3 \
115 ${libdir}/uim/uim-*-gtk3 \
116"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500117FILES_uim-skk = "${libdir}/uim/plugin/libuim-skk.* \
Patrick Williamsddad1a12017-02-23 20:36:32 -0600118 ${datadir}/uim/skk*.scm \
119"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500120
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500121PACKAGE_WRITE_DEPS += "qemu-native"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500122pkg_postinst_uim-anthy() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500123 if test -n "$D"; then
124 ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --register anthy --path $D${datadir}/uim
125 else
126 uim-module-manager --register anthy --path ${datadir}/uim
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500127 fi
128}
129
130pkg_prerm_uim-anthy() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500131 if test -n "$D"; then
132 ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --path $D${datadir}/uim --unregister anthy
133 else
134 uim-module-manager --path ${datadir}/uim --unregister anthy
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500135 fi
136}
137
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500138pkg_postinst_uim-skk() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500139 if test -n "$D"; then
140 ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --register skk --path $D${datadir}/uim
141 else
142 uim-module-manager --register skk --path ${datadir}/uim
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500143 fi
144}
145
146pkg_postrm_uim-skk() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500147 if test -n "$D"; then
148 ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --path $D${datadir}/uim --unregister skk
149 else
150 uim-module-manager --path ${datadir}/uim --unregister skk
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500151 fi
152}
153
154BBCLASSEXTEND = "native"