blob: cc28e6e8fd69a14b5bac8a5e5f1ec267c0539aba [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 Bishopdec060e2019-09-23 08:01:31 -04007SRC_URI = "https://github.com/uim/uim/releases/download/${PV}/uim-${PV}.tar.bz2"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05008
Brad Bishopdec060e2019-09-23 08:01:31 -04009SRC_URI_append_class-target = "\
10 file://uim-module-manager.patch \
Patrick Williamsddad1a12017-02-23 20:36:32 -060011 file://0001-fix-bug-for-cross-compile.patch \
12"
Brad Bishopdec060e2019-09-23 08:01:31 -040013SRC_URI[md5sum] = "01c7bd5d0d4f3a9f6f5befe6f57a470b"
14SRC_URI[sha256sum] = "34599bbcc4e5ab87832370763e38be5100984a64237555e9234a1ea225a0fadc"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015
Brad Bishopdec060e2019-09-23 08:01:31 -040016DEPENDS = "anthy fontconfig libxft libxt glib-2.0 ncurses intltool libedit"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050017DEPENDS_append_class-target = " intltool-native gtk+ gtk+3 uim-native takao-fonts"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050018
19RDEPENDS_uim = "libuim0 libedit"
Brad Bishop316dfdd2018-06-25 12:45:53 -040020RDEPENDS_uim-anthy = "takao-fonts anthy libanthy0"
21RDEPENDS_uim-anthy_append_libc-glibc = " glibc-utils glibc-gconv-euc-jp"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050022
23LEAD_SONAME = "libuim.so.1"
24
Brad Bishop316dfdd2018-06-25 12:45:53 -040025inherit distro_features_check autotools pkgconfig gettext qemu gtk-immodules-cache
26
27REQUIRED_DISTRO_FEATURES = "x11"
28
Brad Bishopd7bf8c12018-02-25 22:55:05 -050029GTKIMMODULES_PACKAGES = "uim-gtk2.0 uim-gtk3"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050030
31EXTRA_OECONF += "--disable-emacs \
Patrick Williamsddad1a12017-02-23 20:36:32 -060032 --without-scim \
33 --without-m17nlib \
34 --without-prime \
35 --without-canna \
36 --without-mana \
37 --without-eb \
38"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050039
40CONFIGUREOPTS_remove_class-target = "--disable-silent-rules"
41
Brad Bishopdec060e2019-09-23 08:01:31 -040042# https://github.com/uim/uim/issues/44
43PARALLEL_MAKE = ""
44
Patrick Williamsb48b7b42016-08-17 15:04:38 -050045#Because m4 file's find maxdepth=2, so copy the m4 files of the deep depth.
46do_configure_prepend () {
47 cp ${S}/sigscheme/m4/* ${S}/m4/
48}
49
50do_install_append() {
51 rm -rf ${D}/${datadir}/applications
52}
53
Brad Bishop6e60e8b2018-02-01 10:27:11 -050054PACKAGES =+ "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 -050055
56FILES_${PN} = "${bindir}/uim-help \
Patrick Williamsddad1a12017-02-23 20:36:32 -060057 ${libdir}/uim/plugin/libuim-* \
58 ${libdir}/libuim-scm* \
59 ${libdir}/libgcroots* \
60 ${libdir}/uim/plugin/libuim-* \
61"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050062
63FILES_libuim0 = "${libdir}/uim/plugin/libuim-custom-enabler.* \
Patrick Williamsddad1a12017-02-23 20:36:32 -060064 ${libdir}/libuim-custom.so.* \
65 ${datadir}/locale/ja/LC_MESSAGES/uim.mo \
66 ${datadir}/locale/fr/LC_MESSAGES/uim.mo \
67 ${datadir}/locale/ko/LC_MESSAGES/uim.mo \
68 ${libdir}/libuim.so.* \
69"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050070FILES_libuim-dev = "${libdir}/libuim*.a \
Patrick Williamsddad1a12017-02-23 20:36:32 -060071 ${libdir}/libuim*.la \
72 ${libdir}/libuim*.so \
73 ${includedir}/uim \
74 ${libdir}/pkgconfig/uim.pc \
75"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050076FILES_uim-anthy = "${libdir}/uim/plugin/libuim-anthy.* \
Patrick Williamsddad1a12017-02-23 20:36:32 -060077 ${datadir}/uim/anthy*.scm \
78"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050079FILES_${PN}-dbg += "${libdir}/*/*/*/.debug ${libdir}/*/*/.debug"
80FILES_${PN}-dev += "${libdir}/uim/plugin/*.la"
81
82FILES_uim-utils = "${bindir}/uim-sh \
Patrick Williamsddad1a12017-02-23 20:36:32 -060083 ${bindir}/uim-module-manager \
84 ${libexecdir}/uim-helper-server \
85"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050086FILES_uim-xim = "${bindir}/uim-xim \
Patrick Williamsddad1a12017-02-23 20:36:32 -060087 ${libexecdir}/uim-candwin-*gtk \
88 ${libexecdir}/uim-candwin-*gtk3 \
89 ${datadir}/man/man1/uim-xim.1 \
90 ${sysconfdir}/X11/xinit/xinput.d/uim* \
91"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050092FILES_uim-common = "${datadir}/uim/pixmaps/*.png \
Patrick Williamsddad1a12017-02-23 20:36:32 -060093 ${datadir}/uim \
94"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050095FILES_uim-fep = "${bindir}/uim-fep*"
96
97FILES_uim-gtk2.0 = "${libdir}/gtk-2.0 \
Patrick Williamsddad1a12017-02-23 20:36:32 -060098 ${bindir}/uim-toolbar-gtk \
99 ${bindir}/uim-toolbar-gtk-systray \
100 ${bindir}/uim-*-gtk \
101 ${bindir}/uim-input-pad-ja \
102 ${libdir}/uim/uim-*-gtk \
103"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500104FILES_uim-gtk3 = "${libdir}/gtk-3.0 \
Patrick Williamsddad1a12017-02-23 20:36:32 -0600105 ${bindir}/uim-toolbar-gtk3 \
106 ${bindir}/uim-toolbar-gtk3-systray \
107 ${bindir}/uim-*-gtk3 \
108 ${libdir}/uim/uim-*-gtk3 \
109"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500110FILES_uim-skk = "${libdir}/uim/plugin/libuim-skk.* \
Patrick Williamsddad1a12017-02-23 20:36:32 -0600111 ${datadir}/uim/skk*.scm \
112"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500113
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500114PACKAGE_WRITE_DEPS += "qemu-native"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500115pkg_postinst_uim-anthy() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500116 if test -n "$D"; then
117 ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --register anthy --path $D${datadir}/uim
118 else
119 uim-module-manager --register anthy --path ${datadir}/uim
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500120 fi
121}
122
123pkg_prerm_uim-anthy() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500124 if test -n "$D"; then
125 ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --path $D${datadir}/uim --unregister anthy
126 else
127 uim-module-manager --path ${datadir}/uim --unregister anthy
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500128 fi
129}
130
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500131pkg_postinst_uim-skk() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500132 if test -n "$D"; then
133 ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --register skk --path $D${datadir}/uim
134 else
135 uim-module-manager --register skk --path ${datadir}/uim
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500136 fi
137}
138
139pkg_postrm_uim-skk() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500140 if test -n "$D"; then
141 ${@qemu_run_binary(d, '$D', '${bindir}/uim-module-manager')} --path $D${datadir}/uim --unregister skk
142 else
143 uim-module-manager --path ${datadir}/uim --unregister skk
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500144 fi
145}
146
147BBCLASSEXTEND = "native"