FreeBSD Bugzilla – Attachment 125082 Details for
Bug 168634
[PATCH] chinese/fcitx: new options + fully support IM modules.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fcitx_2.patch
fcitx_2.patch (text/plain), 5.66 KB, created by
lichray
on 2012-06-03 12:30:15 UTC
(
hide
)
Description:
fcitx_2.patch
Filename:
MIME Type:
Creator:
lichray
Created:
2012-06-03 12:30:15 UTC
Size:
5.66 KB
patch
obsolete
>diff -rupN chinese/fcitx.orig/Makefile chinese/fcitx/Makefile >--- chinese/fcitx.orig/Makefile 2012-06-01 00:16:37.000000000 -0500 >+++ chinese/fcitx/Makefile 2012-06-03 06:07:43.543324444 -0500 >@@ -7,7 +7,7 @@ > > PORTNAME= fcitx > PORTVERSION= 4.2.3 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= chinese x11 > MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} > DISTFILES= ${DISTNAME}${EXTRACT_SUFX} pinyin.tar.gz table.tar.gz >@@ -23,10 +23,12 @@ LIB_DEPENDS= execinfo.1:${PORTSDIR}/deve > dbus-1.3:${PORTSDIR}/devel/dbus > RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils > >-MAN1= createPYMB.1 fcitx-remote.1 fcitx.1 mb2org.1 mb2txt.1 \ >- readPYBase.1 readPYMB.1 scel2org.1 txt2mb.1 >+MAN1= createPYMB.1 fcitx-remote.1 fcitx.1 mb2org.1 mb2txt.1 \ >+ readPYBase.1 readPYMB.1 scel2org.1 txt2mb.1 >+SUB_FILES= pkg-message >+SUB_LIST+= PORTSDIR=${PORTSDIR} > >-USE_XZ= yes >+USE_XZ= yes > USE_GNOME= pango intltool gnomehack > USE_GETTEXT= yes > USE_XORG= x11 xext >@@ -34,39 +36,53 @@ USE_LDCONFIG= yes > USE_CMAKE= yes > INSTALLS_ICONS= yes > >-OPTIONS= GTK2 "Enable Gtk2 IM module" off \ >- GTK3 "Enable Gtk3 IM module" off \ >- QT4 "Enable Qt4 IM module" off \ >- OPENCC "Enable OpenCC for Chinese Transform" off \ >- TPUNC "Use traditional quotation marks" off >+OPTIONS_DEFINE= GTK2 GTK3 QT4 OPENCC TPUNC >+ >+GTK2_DESC= "Enable Gtk2 IM module" >+GTK3_DESC= "Enable Gtk3 IM module" >+QT4_DESC= "Enable Qt4 IM module" >+OPENCC_DESC= "Enable OpenCC for Chinese Transform" >+TPUNC_DESC= "Use traditional quotation marks" > > .include <bsd.port.options.mk> > >-.if defined(WITH_GTK2) >+.if ${PORT_OPTIONS:MGTK2} > USE_GNOME+= gtk20 >+PLIST_SUB+= GTK2="" >+SUB_LIST+= GTK2_IM=fcitx > .else > CMAKE_ARGS+= -DENABLE_GTK2_IM_MODULE=OFF >+PLIST_SUB+= GTK2="@comment " >+SUB_LIST+= GTK2_IM=xim > .endif > >-.if defined(WITH_GTK3) >+.if ${PORT_OPTIONS:MGTK3} > USE_GNOME+= gtk30 > CMAKE_ARGS+= -DENABLE_GTK3_IM_MODULE=ON >+PLIST_SUB+= GTK3="" >+SUB_LIST+= GTK3_IM=fcitx >+.else >+PLIST_SUB+= GTK3="@comment " >+SUB_LIST+= GTK3_IM=xim > .endif > >-.if defined(WITH_QT4) >+.if ${PORT_OPTIONS:MQT4} > USE_QT= yes > USE_QT_VER= 4 > QT_COMPONENTS= gui > CMAKE_ARGS+= -DENABLE_QT_IM_MODULE=ON >+PLIST_SUB+= QT4="" >+.else >+PLIST_SUB+= QT4="@comment " > .endif > >-.if defined(WITH_OPENCC) >+.if ${PORT_OPTIONS:MOPENCC} > LIB_DEPENDS+= opencc.1:${PORTSDIR}/chinese/opencc > .else > CMAKE_ARGS+= -DENABLE_OPENCC=OFF > .endif > >-.if defined(WITH_TPUNC) >+.if ${PORT_OPTIONS:MTPUNC} > EXTRA_PATCHES+= ${FILESDIR}/tpunc-data_punc.mb.zh_CN > .endif > >@@ -92,6 +108,12 @@ EXTRA_PATCHES+= ${FILESDIR}/getline-src_ > .endif > > post-install: >+.if ${PORT_OPTIONS:MGTK2} >+ -gtk-query-immodules-2.0 > ${LOCALBASE}/etc/gtk-2.0/gtk.immodules >+.endif >+.if ${PORT_OPTIONS:MGTK3} >+ -gtk-query-immodules-3.0 > ${LOCALBASE}/lib/gtk-3.0/${GTK3_VERSION}/immodules.cache >+.endif > @${ECHO_CMD} > @${CAT} ${PKGMESSAGE} > @${ECHO_CMD} >diff -rupN chinese/fcitx.orig/files/pkg-message.in chinese/fcitx/files/pkg-message.in >--- chinese/fcitx.orig/files/pkg-message.in 1969-12-31 18:00:00.000000000 -0600 >+++ chinese/fcitx/files/pkg-message.in 2012-06-03 06:12:46.026987379 -0500 >@@ -0,0 +1,29 @@ >+************************************************************************ >+ >+Remember to set the environment variable XMODIFIERS: >+ >+ csh/tcsh: setenv XMODIFIERS @im=fcitx >+ sh/bash: export XMODIFIERS='@im=fcitx' >+ >+For GTK+ programs, you may want to set: >+ >+ csh/tcsh: setenv GTK_IM_MODULE %%GTK2_IM%% >+ setenv GTK3_IM_MODULE %%GTK3_IM%% >+ sh/bash: export GTK_IM_MODULE=%%GTK2_IM%% >+ export GTK3_IM_MODULE=%%GTK3_IM%% >+ >+For Qt4 programs, we recommend you to use >+ >+ qtconfig-qt4: %%PORTSDIR%%/misc/qt4-qtconfig >+ >+instead of to manually set QT4_IM_MODULE. >+ >+To start fcitx with your desktop, just >+ >+ cp %%PREFIX%%/share/applications/fcitx.desktop \ >+ ~/.config/autostart/ >+ >+if your desktop environment is XDG-compatible. Otherwise, you have to >+make sure fcitx is started AFTER dbus-launch. >+ >+************************************************************************ >diff -rupN chinese/fcitx.orig/pkg-message chinese/fcitx/pkg-message >--- chinese/fcitx.orig/pkg-message 2011-11-10 23:18:26.000000000 -0600 >+++ chinese/fcitx/pkg-message 1969-12-31 18:00:00.000000000 -0600 >@@ -1,18 +0,0 @@ >-************************************************************************ >- >-Remember to set environment variable XMODIFIERS: >- >- csh/tcsh: setenv XMODIFIERS @im=fcitx >- sh/bash: export XMODIFIERS='@im=fcitx' >- >-Additionally, for GTK/Qt programs, you must also set: >- >- csh/tcsh: setenv GTK_IM_MODULE xim >- setenv QT_IM_MODULE xim >- sh/bash: export GTK_IM_MODULE=xim >- export QT_IM_MODULE=xim >- >-You can replace the `xim` above with `fcitx` if you built fcitx with >-the corresponding IM module. >- >-************************************************************************ >diff -rupN chinese/fcitx.orig/pkg-plist chinese/fcitx/pkg-plist >--- chinese/fcitx.orig/pkg-plist 2012-05-25 02:28:34.000000000 -0500 >+++ chinese/fcitx/pkg-plist 2012-06-03 03:24:56.352442542 -0500 >@@ -64,6 +64,15 @@ lib/libfcitx-core.so.0.3 > lib/libfcitx-utils.so > lib/libfcitx-utils.so.0 > lib/libfcitx-utils.so.0.1 >+%%GTK2%%lib/gtk-2.0/%%GTK2_VERSION%%/immodules/im-fcitx.so >+%%GTK2%%@exec gtk-query-immodules-2.0 > %%LOCALBASE%%/etc/gtk-2.0/gtk.immodules >+%%GTK2%%@unexec gtk-query-immodules-2.0 > %%LOCALBASE%%/etc/gtk-2.0/gtk.immodules >+%%GTK3%%lib/gtk-3.0/%%GTK3_VERSION%%/immodules/im-fcitx.so >+%%GTK3%%@exec gtk-query-immodules-3.0 > %%LOCALBASE%%/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache >+%%GTK3%%@unexec gtk-query-immodules-3.0 > %%LOCALBASE%%/lib/gtk-3.0/%%GTK3_VERSION%%/immodules.cache >+%%QT4%%lib/qt4/plugins/inputmethods/qtim-fcitx.so >+%%QT4%%@dirrmtry lib/qt4/plugins/inputmethods >+%%QT4%%@dirrmtry lib/qt4/plugins > libdata/pkgconfig/fcitx-config.pc > libdata/pkgconfig/fcitx-utils.pc > libdata/pkgconfig/fcitx.pc
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 168634
: 125082