From 5ea3ad1ce9fa607ba2fb8e34f28ffa8ec514b72b Mon Sep 17 00:00:00 2001 From: Andrew Savchenko Date: Wed, 6 Mar 2019 02:26:18 +0300 Subject: app-i18n/uim: restore qt4 support On older boxes qt4 support is still needed. Signed-off-by: Andrew Savchenko --- app-i18n/uim/Manifest | 1 + app-i18n/uim/files/50uim-gentoo.el | 2 + app-i18n/uim/files/uim-gentoo.patch | 28 +++++ app-i18n/uim/files/uim-tinfo.patch | 38 ++++++ app-i18n/uim/files/uim-xkb.patch | 18 +++ app-i18n/uim/files/uim-zh-TW.patch | 11 ++ app-i18n/uim/files/xinput-uim | 6 + app-i18n/uim/metadata.xml | 25 ++++ app-i18n/uim/uim-1.8.8-r100.ebuild | 236 ++++++++++++++++++++++++++++++++++++ profiles/categories | 1 + 10 files changed, 366 insertions(+) create mode 100644 app-i18n/uim/Manifest create mode 100644 app-i18n/uim/files/50uim-gentoo.el create mode 100644 app-i18n/uim/files/uim-gentoo.patch create mode 100644 app-i18n/uim/files/uim-tinfo.patch create mode 100644 app-i18n/uim/files/uim-xkb.patch create mode 100644 app-i18n/uim/files/uim-zh-TW.patch create mode 100644 app-i18n/uim/files/xinput-uim create mode 100644 app-i18n/uim/metadata.xml create mode 100644 app-i18n/uim/uim-1.8.8-r100.ebuild diff --git a/app-i18n/uim/Manifest b/app-i18n/uim/Manifest new file mode 100644 index 0000000..b7beaed --- /dev/null +++ b/app-i18n/uim/Manifest @@ -0,0 +1 @@ +DIST uim-1.8.8.tar.bz2 6228743 SHA256 34599bbcc4e5ab87832370763e38be5100984a64237555e9234a1ea225a0fadc SHA512 2257ae48f4f2b79039a5f6be0fc740e218d5609e004dad9a5a1aa5d4066587ee59d0be06bc23c7d567a48901466227fedc4778b480f7184d84b0b3b4dddac9a3 WHIRLPOOL f257e43827abed146ec9fc7f8ee8c62d568c01cae7abf8b962f47876a03dfcba9c9436ba65d4b08b6c0a725ec5b1477860387ea32a52ecdb6eb7a44ae77995b9 diff --git a/app-i18n/uim/files/50uim-gentoo.el b/app-i18n/uim/files/50uim-gentoo.el new file mode 100644 index 0000000..101505c --- /dev/null +++ b/app-i18n/uim/files/50uim-gentoo.el @@ -0,0 +1,2 @@ +(add-to-list 'load-path "@SITELISP@") +(autoload 'uim-mode "uim" nil t) diff --git a/app-i18n/uim/files/uim-gentoo.patch b/app-i18n/uim/files/uim-gentoo.patch new file mode 100644 index 0000000..de498b7 --- /dev/null +++ b/app-i18n/uim/files/uim-gentoo.patch @@ -0,0 +1,28 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -38,6 +38,7 @@ + AC_PATH_PROGS(SED, sed gsed) + AX_PATH_QMAKE4 + AX_PATH_QMAKE5 ++PKG_PROG_PKG_CONFIG + + AM_MAINTAINER_MODE + +@@ -1618,7 +1619,7 @@ + fi + AX_LANG_WNOERROR # end AC_LANG_WERROR + +- QT_CONFIG_OPTS="debug" ++ QT_CONFIG_OPTS="debug nostrip" + else + CFLAGS="$CFLAGS -DNDEBUG" + CXXFLAGS="$CXXFLAGS -DNDEBUG" +@@ -1629,7 +1630,7 @@ + AX_CFLAGS_GCC_OPTION([-Wno-unused-function], [UIM_SCM_CFLAGS]) + AX_LANG_WNOERROR # end AC_LANG_WERROR + +- QT_CONFIG_OPTS="release" ++ QT_CONFIG_OPTS="release nostrip" + fi + + AC_ARG_ENABLE(warnings-into-error, diff --git a/app-i18n/uim/files/uim-tinfo.patch b/app-i18n/uim/files/uim-tinfo.patch new file mode 100644 index 0000000..e2fcfce --- /dev/null +++ b/app-i18n/uim/files/uim-tinfo.patch @@ -0,0 +1,38 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1180,9 +1180,13 @@ + + if test "x$enable_fep" != xno; then + enable_fep=yes +- AC_CHECK_LIB(curses, setupterm, FEP_LIBADD="-lcurses $FEP_LIBADD", +- [AC_CHECK_LIB(ncurses, setupterm, FEP_LIBADD="-lncurses $FEP_LIBADD", +- AC_MSG_WARN([fep needs setupterm in libcurses or libncurses. disabled...]);enable_fep=no)]) ++ PKG_CHECK_MODULES(CURSES, ncurses, ++ [FEP_LIBADD="$CURSES_LIBS $FEP_LIBADD"], ++ [ ++ AC_CHECK_LIB(curses, setupterm, FEP_LIBADD="-lcurses $FEP_LIBADD", ++ [AC_CHECK_LIB(ncurses, setupterm, FEP_LIBADD="-lncurses $FEP_LIBADD", ++ AC_MSG_WARN([fep needs setupterm in libcurses or libncurses. disabled...]);enable_fep=no)]) ++ ]) + AC_CHECK_FUNCS(forkpty) + if test "x$ac_cv_func_forkpty" = xno; then + AC_CHECK_LIB(util, forkpty, +@@ -1319,10 +1323,14 @@ + saved_LDFLAGS=$LDFLAGS + CPPFLAGS="${CPPFLAGS} -I$libedit_path/include" + LDFLAGS="${LDFLAGS} -L$libedit_path/lib" +- AC_CHECK_LIB(curses, tgetent, LIBEDIT_LIBS="-lcurses", +- [AC_CHECK_LIB(ncurses, tgetent, LIBEDIT_LIBS="-lncurses", +- AC_MSG_WARN("libedit needs libcurses or libncurses. disabled...") +- with_libedit=no)]) ++ PKG_CHECK_MODULES(CURSES, ncurses, ++ [LIBEDIT_LIBS="$CURSES_LIBS"], ++ [ ++ AC_CHECK_LIB(curses, tgetent, LIBEDIT_LIBS="-lcurses", ++ [AC_CHECK_LIB(ncurses, tgetent, LIBEDIT_LIBS="-lncurses", ++ AC_MSG_WARN("libedit needs libcurses or libncurses. disabled...") ++ with_libedit=no)]) ++ ]) + + if test "x$with_libedit" != xno; then + AC_CHECK_LIB(edit, el_init, diff --git a/app-i18n/uim/files/uim-xkb.patch b/app-i18n/uim/files/uim-xkb.patch new file mode 100644 index 0000000..538fd96 --- /dev/null +++ b/app-i18n/uim/files/uim-xkb.patch @@ -0,0 +1,18 @@ +--- a/uim/Makefile.am ++++ b/uim/Makefile.am +@@ -181,6 +181,7 @@ + libuim_eb_la_CFLAGS = @EBCONF_PTHREAD_CFLAGS@ -Wall + endif + ++if LIBUIM_X_UTIL + if XKB + uim_plugin_LTLIBRARIES += libuim-xkb.la + libuim_xkb_la_SOURCES = uim-xkb.c +@@ -189,6 +190,7 @@ + libuim_xkb_la_CFLAGS = @X11_CFLAGS@ + libuim_xkb_la_CPPFLAGS = -I$(top_srcdir) + endif ++endif + + if OSX_DCS + uim_plugin_LTLIBRARIES += libuim-osx-dcs.la diff --git a/app-i18n/uim/files/uim-zh-TW.patch b/app-i18n/uim/files/uim-zh-TW.patch new file mode 100644 index 0000000..f738500 --- /dev/null +++ b/app-i18n/uim/files/uim-zh-TW.patch @@ -0,0 +1,11 @@ +--- a/xim/convdisp.cpp ++++ b/xim/convdisp.cpp +@@ -69,7 +69,7 @@ + #endif + + const char *fontset_zhCN = "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1, -isas-fangsong ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0"; +-const char *fontset_zhTW = "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1, -taipei-fixed-medium-r-normal--16-150-75-75-c-160-big5-0"; ++const char *fontset_zhTW = "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1, -eten-fixed-medium-r-normal--16-150-75-75-c-160-big5.eten-0"; + const char *fontset_ja = "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1, -jis-fixed-medium-r-normal--16-*-75-75-c-160-jisx0208.1983-0, -sony-fixed-medium-r-normal--16-*-*-*-c-80-jisx0201.1976-0"; + const char *fontset_ko = "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1, -daewoo-gothic-medium-r-normal--16-120-100-100-c-160-ksc5601.1987-0"; + diff --git a/app-i18n/uim/files/xinput-uim b/app-i18n/uim/files/xinput-uim new file mode 100644 index 0000000..a0969dd --- /dev/null +++ b/app-i18n/uim/files/xinput-uim @@ -0,0 +1,6 @@ +XIM=uim +XIM_PROGRAM="@EPREFIX@/usr/bin/uim-xim" +XIM_ARGS= +GTK_IM_MODULE=uim +QT_IM_MODULE=uim +SHORT_DESC=UIM diff --git a/app-i18n/uim/metadata.xml b/app-i18n/uim/metadata.xml new file mode 100644 index 0000000..2a05a27 --- /dev/null +++ b/app-i18n/uim/metadata.xml @@ -0,0 +1,25 @@ + + + + + cjk@gentoo.org + Cjk + + + uim is a simple, secure and flexible input method library. At the moment + Anthy, SKK, Prime, T-code, TUT-code (these are Japanese input method), + Pinyin (Chinese input method), Hangul (Korean input method), IPA + (International Phonetic Alphabet) are implemented. You can extend the + library with Scheme thus easily, or with C if it becomes rather complicated. + + + Enable support for app-i18n/anthy + Enable support for dev-libs/eb + Enable support for x11-libs/gtk+:2 + Enable support for app-i18n/skk-jisyo + Enable support for deprecated dev-qt/qtgui:4 + + + uim/uim + + diff --git a/app-i18n/uim/uim-1.8.8-r100.ebuild b/app-i18n/uim/uim-1.8.8-r100.ebuild new file mode 100644 index 0000000..0b4e259 --- /dev/null +++ b/app-i18n/uim/uim-1.8.8-r100.ebuild @@ -0,0 +1,236 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit autotools elisp-common flag-o-matic gnome2-utils + +DESCRIPTION="A multilingual input method framework" +HOMEPAGE="https://github.com/uim/uim" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.bz2" + +LICENSE="BSD GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" +IUSE="X +anthy canna curl eb emacs expat libffi gtk gtk2 l10n_ja l10n_ko l10n_zh-CN l10n_zh-TW libedit libnotify libressl m17n-lib ncurses nls qt4 qt5 skk sqlite ssl static-libs xft" +RESTRICT="test" +REQUIRED_USE="gtk? ( X ) + gtk2? ( X ) + qt4? ( X ) + qt5? ( X ) + xft? ( X )" + +CDEPEND="!dev-scheme/sigscheme + X? ( + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXext + x11-libs/libXft + x11-libs/libXrender + x11-libs/libXt + ) + anthy? ( app-i18n/anthy ) + canna? ( app-i18n/canna ) + curl? ( net-misc/curl ) + eb? ( dev-libs/eb ) + emacs? ( virtual/emacs ) + expat? ( dev-libs/expat ) + libffi? ( virtual/libffi ) + gtk? ( x11-libs/gtk+:3 ) + gtk2? ( x11-libs/gtk+:2 ) + libedit? ( dev-libs/libedit ) + libnotify? ( x11-libs/libnotify ) + m17n-lib? ( dev-libs/m17n-lib ) + ncurses? ( sys-libs/ncurses:0= ) + nls? ( virtual/libintl ) + qt4? ( dev-qt/qtgui:4[qt3support] ) + qt5? ( dev-qt/qtx11extras:5 ) + skk? ( app-i18n/skk-jisyo ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${CDEPEND} + dev-util/intltool + sys-devel/gettext + virtual/pkgconfig + X? ( x11-base/xorg-proto )" +RDEPEND="${CDEPEND} + X? ( + media-fonts/font-sony-misc + l10n_ja? ( + || ( + media-fonts/font-jis-misc + media-fonts/intlfonts + ) + ) + l10n_ko? ( + || ( + media-fonts/font-daewoo-misc + media-fonts/intlfonts + ) + ) + l10n_zh-CN? ( + || ( + media-fonts/font-isas-misc + media-fonts/intlfonts + ) + ) + l10n_zh-TW? ( media-fonts/intlfonts ) + )" + +PATCHES=( + "${FILESDIR}"/${PN}-gentoo.patch + "${FILESDIR}"/${PN}-tinfo.patch + "${FILESDIR}"/${PN}-xkb.patch + "${FILESDIR}"/${PN}-zh-TW.patch +) +DOCS=( AUTHORS NEWS README RELNOTE doc ) + +AT_NO_RECURSIVE="yes" +SITEFILE="50${PN}-gentoo.el" + +src_prepare() { + default + sed -i "s:\$libedit_path/lib:/$(get_libdir):g" configure.ac + # fix build with >=dev-scheme/chicken-4, bug #656852 + touch scm/json-parser-expanded.scm + # fix build with "-march=pentium4 -O2", bug #661806 + use x86 && append-cflags $(test-flags-CC -fno-inline-small-functions) + + eautoreconf +} + +src_configure() { + local myconf=( + $(use_with X x) + $(use_with anthy anthy-utf8) + $(use_with canna) + $(use_with curl) + $(use_with eb) + $(use_enable emacs) + $(use_with emacs lispdir "${SITELISP}") + $(use_with expat) + $(use_with libedit) + $(use_with libffi ffi) + $(use_with gtk gtk3) + $(use_with gtk2) + $(use_with m17n-lib m17nlib) + $(use_enable ncurses fep) + $(use_enable nls) + $(use_with qt4) + $(use_with qt4 qt4-immodule) + $(use_with qt4 qt4-qt3support) + $(use_with qt5) + $(use_with qt5 qt5-immodule) + $(use_with skk) + $(use_with sqlite sqlite3) + $(use_enable ssl openssl) + $(use_enable static-libs static) + $(use_with xft) + --without-anthy + --enable-default-toolkit=$(usex gtk gtk3 $(usex gtk2 gtk $(usex qt5 qt5))) + --disable-gnome-applet + --disable-gnome3-applet + --disable-kde-applet + --disable-kde4-applet + --without-mana + --without-prime + ) + + if (use gtk || use gtk2) && (use anthy || use canna); then + myconf+=( --enable-dict ) + else + myconf+=( --disable-dict ) + fi + + if use libnotify; then + myconf+=( --enable-notify=libnotify ) + fi + + if use gtk || use gtk2 || use qt5 || use qt4; then + myconf+=( --enable-pref ) + else + myconf+=( --disable-pref ) + fi + + export QT4DIR="$(qt4_get_libdir)" + econf "${myconf[@]}" +} + +src_compile() { + default + + if use emacs; then + cd emacs + elisp-compile *.el || die + fi +} + +src_install() { + # bug #222677 + emake -j1 DESTDIR="${D}" install + rm -f doc/Makefile* + einstalldocs + + find "${ED}"/usr/$(get_libdir)/${PN} -name '*.la' -delete || die + use static-libs || find "${ED}" -name '*.la' -delete || die + + insinto /etc/X11/xinit/xinput.d + sed \ + -e "s:@EPREFIX@:${EPREFIX}:g" \ + "${FILESDIR}"/xinput-${PN} > "${T}"/${PN}.conf + doins "${T}"/${PN}.conf + + if use X; then + docinto xim + dodoc xim/README* + fi + + if use emacs; then + elisp-install ${PN}-el emacs/*.el{,c} + elisp-site-file-install "${FILESDIR}"/${SITEFILE} ${PN}-el + docinto emacs + dodoc emacs/README* + fi + + if use ncurses; then + docinto fep + dodoc fep/README* + fi +} + +pkg_postinst() { + elog "New input method switcher has been introduced. You need to set" + elog + elog "% GTK_IM_MODULE=uim ; export GTK_IM_MODULE" + elog "% QT_IM_MODULE=uim ; export QT_IM_MODULE" + elog "% XMODIFIERS=@im=uim ; export XMODIFIERS" + elog + elog "If you would like to use uim-anthy as default input method, put" + elog "(define default-im-name 'anthy)" + elog "to your ~/.uim." + elog + elog "All input methods can be found by running uim-im-switcher-gtk, " + elog "uim-im-switcher-gtk3 or uim-im-switcher-qt5." + + if use emacs; then + elisp-site-regen + echo + elog "uim is autoloaded with Emacs with a minimal set of features:" + elog "There is no keybinding defined to call it directly, so please" + elog "create one yourself and choose an input method." + elog "Integration with LEIM is not done with this ebuild, please have" + elog "a look at the documentation how to achieve this." + fi + use gtk && gnome2_query_immodules_gtk3 + use gtk2 && gnome2_query_immodules_gtk2 +} + +pkg_postrm() { + use emacs && elisp-site-regen + use gtk && gnome2_query_immodules_gtk3 + use gtk2 && gnome2_query_immodules_gtk2 +} diff --git a/profiles/categories b/profiles/categories index 21e2eb6..9e2ce5e 100644 --- a/profiles/categories +++ b/profiles/categories @@ -1,6 +1,7 @@ app-admin app-doc app-emulation +app-i18n app-text app-vim dev-libs -- cgit v1.2.3-65-gdbad