summaryrefslogtreecommitdiff
path: root/inputmethod
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-05-31 14:22:38 +0000
committerobache <obache@pkgsrc.org>2014-05-31 14:22:38 +0000
commite32185c9b7142ec7c9ca3851c85f110fbaaa9a83 (patch)
tree236cf5d156ab9774ec0fe5308df24a8f1c9eb261 /inputmethod
parent1b6212fffc9dceabe11ba926c85d82080295b613 (diff)
downloadpkgsrc-e32185c9b7142ec7c9ca3851c85f110fbaaa9a83.tar.gz
Introduce UIM module handling framework.
Switch to use it even on UIM base package. Bump PKGREVISION.
Diffstat (limited to 'inputmethod')
-rw-r--r--inputmethod/uim/DEINSTALL7
-rw-r--r--inputmethod/uim/INSTALL10
-rw-r--r--inputmethod/uim/Makefile31
-rw-r--r--inputmethod/uim/PLIST27
-rw-r--r--inputmethod/uim/files/modules.tmpl22
-rw-r--r--inputmethod/uim/modules.mk47
-rw-r--r--inputmethod/uim/options.mk4
7 files changed, 87 insertions, 61 deletions
diff --git a/inputmethod/uim/DEINSTALL b/inputmethod/uim/DEINSTALL
deleted file mode 100644
index 5a5e97abac6..00000000000
--- a/inputmethod/uim/DEINSTALL
+++ /dev/null
@@ -1,7 +0,0 @@
-# $NetBSD: DEINSTALL,v 1.1 2014/01/20 13:26:54 ryoon Exp $
-
-case ${STAGE} in
-DEINSTALL)
- ${PREFIX}/bin/uim-module-manager --unregister-all
- ;;
-esac
diff --git a/inputmethod/uim/INSTALL b/inputmethod/uim/INSTALL
deleted file mode 100644
index b1b5dd67ddb..00000000000
--- a/inputmethod/uim/INSTALL
+++ /dev/null
@@ -1,10 +0,0 @@
-# $NetBSD: INSTALL,v 1.1 2014/01/20 13:26:54 ryoon Exp $
-
-case ${STAGE} in
-POST-INSTALL)
- cd ${PREFIX}/share/uim/pkgsrc
- for m in *
- do ${PREFIX}/bin/uim-module-manager --register ${m}
- done
- ;;
-esac
diff --git a/inputmethod/uim/Makefile b/inputmethod/uim/Makefile
index 4cd613a6a2f..840f2b2a118 100644
--- a/inputmethod/uim/Makefile
+++ b/inputmethod/uim/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.97 2014/05/15 14:41:53 adam Exp $
+# $NetBSD: Makefile,v 1.98 2014/05/31 14:22:38 obache Exp $
#
.include "../../inputmethod/uim/Makefile.common"
-PKGREVISION= 13
+PKGREVISION= 14
COMMENT= Multilingual input method library
#LICENSE= See ${WRKSRC}/COPYING
@@ -17,27 +17,25 @@ PKGCONFIG_OVERRIDE+= ${WRKSRC}/uim.pc.in
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --disable-emacs
CONFIGURE_ARGS+= --with-libgcroots=installed
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASE}
LDFLAGS.SunOS+= -mimpure-text
CFLAGS.SunOS+= -std=c99 -D__EXTENSIONS__
.include "options.mk"
-MAKE_DIRS+= etc/uim
-INSTALLATION_DIRS+= share/doc/uim share/examples/uim
+PKG_SYSCONFSUBDIR= uim
+INSTALLATION_DIRS+= share/doc/uim
+
+INSTALL_MAKE_FLAGS+= sysconfdir=${PREFIX}/share/examples
EGDIR= ${PREFIX}/share/examples/uim
-CONF_FILES= ${EGDIR}/loader.scm.example \
- ${PKG_SYSCONFDIR}/uim/loader.scm
-CONF_FILES+= ${EGDIR}/installed-modules.scm.example \
- ${PKG_SYSCONFDIR}/uim/installed-modules.scm
+CONF_FILES= ${EGDIR}/loader.scm \
+ ${PKG_SYSCONFDIR}/loader.scm
+CONF_FILES+= ${EGDIR}/installed-modules.scm \
+ ${PKG_SYSCONFDIR}/installed-modules.scm
post-install:
-# Register uim module infomation
- ${MKDIR} ${DESTDIR}${PREFIX}/share/uim/pkgsrc
-.for m in ${UIM_MODULES}
- ${TOUCH} ${DESTDIR}${PREFIX}/share/uim/pkgsrc/${m}
-.endfor
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/uim
${INSTALL_DATA} ${WRKSRC}/doc/COMPATIBILITY ${DESTDIR}${PREFIX}/share/doc/uim
${INSTALL_DATA} ${WRKSRC}/doc/CUSTOM ${DESTDIR}${PREFIX}/share/doc/uim
@@ -48,11 +46,8 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/doc/PLUGIN ${DESTDIR}${PREFIX}/share/doc/uim
${INSTALL_DATA} ${WRKSRC}/doc/UIM-SCM ${DESTDIR}${PREFIX}/share/doc/uim
${INSTALL_DATA} ${WRKSRC}/doc/UIM-SH ${DESTDIR}${PREFIX}/share/doc/uim
-# loader.scm and installed-modules.scm is updated by uim-module-manager.
- ${MV} ${DESTDIR}${PREFIX}/etc/uim/loader.scm \
- ${DESTDIR}${EGDIR}/loader.scm.example
- ${MV} ${DESTDIR}${PREFIX}/etc/uim/installed-modules.scm \
- ${DESTDIR}${EGDIR}/installed-modules.scm.example
+_BUILDING_UIM= YES
+.include "modules.mk"
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
diff --git a/inputmethod/uim/PLIST b/inputmethod/uim/PLIST
index 74e6d48df82..b0492bcaa2d 100644
--- a/inputmethod/uim/PLIST
+++ b/inputmethod/uim/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.22 2014/01/20 13:26:54 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.23 2014/05/31 14:22:38 obache Exp $
${PLIST.qt3}bin/uim-chardict-qt
${PLIST.qt}bin/uim-chardict-qt4
${PLIST.uim-dict-gtk}bin/uim-dict-gtk
@@ -158,7 +158,7 @@ share/uim/im-switcher.scm
share/uim/im.scm
share/uim/init.scm
share/uim/input-parse.scm
-share/examples/uim/installed-modules.scm.example
+share/examples/uim/installed-modules.scm
share/uim/ipa-x-sampa.scm
share/uim/iso-639-1.scm
share/uim/japanese-act.scm
@@ -183,7 +183,7 @@ share/uim/lib/srfi-95.scm
share/uim/lib/unittest.scm
share/uim/light-record.scm
share/uim/load-action.scm
-share/examples/uim/loader.scm.example
+share/examples/uim/loader.scm
share/uim/lolevel.scm
share/uim/look-custom.scm
share/uim/look.scm
@@ -363,27 +363,6 @@ share/uim/pixmaps/zm.svg
share/uim/pixmaps/zm_dark_background.png
share/uim/pixmaps/zm_dark_background.svg
share/uim/plugin.scm
-share/uim/pkgsrc/ajax-ime
-${PLIST.anthy}share/uim/pkgsrc/anthy
-share/uim/pkgsrc/baidu-olime-jp
-share/uim/pkgsrc/byeoru
-${PLIST.canna}share/uim/pkgsrc/canna
-share/uim/pkgsrc/elatin
-share/uim/pkgsrc/google-cgiapi-jp
-share/uim/pkgsrc/look
-share/uim/pkgsrc/ipa-x-sampa
-share/uim/pkgsrc/latin
-${PLIST.m17nlib}share/uim/pkgsrc/m17nlib
-${PLIST.prime}share/uim/pkgsrc/prime
-share/uim/pkgsrc/pyload
-${PLIST.sj3}share/uim/pkgsrc/sj3
-share/uim/pkgsrc/skk
-share/uim/pkgsrc/social-ime
-share/uim/pkgsrc/tutcode
-share/uim/pkgsrc/viqr
-${PLIST.wnn}share/uim/pkgsrc/wnn
-share/uim/pkgsrc/xmload
-${PLIST.expat}share/uim/pkgsrc/yahoo-jp
share/uim/predict-custom.scm
share/uim/predict-google-suggest.scm
share/uim/predict-look-skk.scm
diff --git a/inputmethod/uim/files/modules.tmpl b/inputmethod/uim/files/modules.tmpl
new file mode 100644
index 00000000000..2d9058eb9a5
--- /dev/null
+++ b/inputmethod/uim/files/modules.tmpl
@@ -0,0 +1,22 @@
+# $NetBSD: modules.tmpl,v 1.1 2014/05/31 14:22:38 obache Exp $
+#
+# Manager UIM modules
+#
+
+case ${STAGE} in
+POST-INSTALL)
+ if [ "${PKGBASE}" = "uim" ]; then
+ cd @UIM_MODULE_LIST_DIR@ && \
+ @UIM_MODULE_MANAGER@ --register *
+ else
+ @UIM_MODULE_MANAGER@ --register @UIM_MODULES@
+ fi
+ ;;
+DEINSTALL)
+ if [ "${PKGBASE}" = "uim" ]; then
+ @UIM_MODULE_MANAGER@ --unregister-all
+ else
+ @UIM_MODULE_MANAGER@ --unregister @UIM_MODULES@
+ fi
+ ;;
+esac
diff --git a/inputmethod/uim/modules.mk b/inputmethod/uim/modules.mk
new file mode 100644
index 00000000000..0e397ab2733
--- /dev/null
+++ b/inputmethod/uim/modules.mk
@@ -0,0 +1,47 @@
+# $NetBSD: modules.mk,v 1.1 2014/05/31 14:22:38 obache Exp $
+#
+# This Makefile fragment is intended to be included by packages that install
+# UIM modules. It takes care of update the corresponding databases
+# at (de)installation time.
+#
+# The following variables can be defined:
+# UIM_MODULES - Set to list of UIM module names installed by the package.
+
+.if !defined(UIM_MODULES_MK)
+UIM_MODULES_MK= # defined
+
+.if (defined(UIM_MODULES) && !empty(UIM_MODULES)) || defined(_BUILDING_UIM)
+
+. if defined(_BUILDING_UIM)
+BUILDLINK_PREFIX.uim= ${PREFIX}
+. else
+EVAL_PREFIX+= BUILDLINK_PREFIX.uim=uim
+DEPENDS+= uim-[0-9]*:../../inputmethod/uim
+. endif
+
+UIM_MODULE_MANAGER= ${BUILDLINK_PREFIX.uim}/bin/uim-module-manager
+UIM_MODULE_LIST_DIR= ${BUILDLINK_PREFIX.uim}/share/uim/pkgsrc
+
+FILES_SUBST+= UIM_MODULE_MANAGER=${UIM_MODULE_MANAGER:Q}
+FILES_SUBST+= UIM_MODULE_LIST_DIR=${UIM_MODULE_LIST_DIR:Q}
+FILES_SUBST+= UIM_MODULES=${UIM_MODULES:Q}
+INSTALL_TEMPLATES+= ../../inputmethod/uim/files/modules.tmpl
+DEINSTALL_TEMPLATES+= ../../inputmethod/uim/files/modules.tmpl
+
+GENERATE_PLIST+= for m in ${UIM_MODULES}; do \
+ echo ${UIM_MODULE_LIST_DIR:S,^${BUILDLINK_PREFIX.uim}/,,}/$${m}; \
+ done
+
+post-install: uim-add-module-names
+uim-add-module-names: .PHONY
+ ${INSTALL_DATA_DIR} ${DESTDIR}${UIM_MODULE_LIST_DIR}
+ ${RUN}cd ${DESTDIR}${UIM_MODULE_LIST_DIR}; \
+ for m in ${UIM_MODULES}; do \
+ ${INSTALL_DATA} /dev/null $${m}; \
+ done
+
+.endif
+
+TOOLS_NOOP+= uim-module-manager
+
+.endif # UIM_MODULES_MK
diff --git a/inputmethod/uim/options.mk b/inputmethod/uim/options.mk
index 099568b4642..07aba02f2f5 100644
--- a/inputmethod/uim/options.mk
+++ b/inputmethod/uim/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.29 2014/01/20 13:26:54 ryoon Exp $
+# $NetBSD: options.mk,v 1.30 2014/05/31 14:22:38 obache Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.uim
PKG_SUPPORTED_OPTIONS= anthy canna curl eb expat ffi gnome gnome3 gtk gtk3 m17nlib openssl prime sj3 sqlite uim-fep wnn4 xim
@@ -81,7 +81,7 @@ CONFIGURE_ARGS+= --disable-fep
. include "../../inputmethod/anthy/buildlink3.mk"
CONFIGURE_ARGS+= --with-anthy-utf8
PLIST.anthy= yes
-UIM_MODULES+= anthy
+UIM_MODULES+= anthy anthy-utf8
.else
CONFIGURE_ARGS+= --without-anthy
.endif