Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 May 2026 01:47:33 +0000
From:      Vladimir Druzenko <vvd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3b9c03ffec18 - main - chinese/fcitx: Fix options GTK2 and GTK3, improve port
Message-ID:  <69f7fab5.3ba7b.4fac01fb@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3b9c03ffec18ae4118649e4c7c58010d5f1a18e1

commit 3b9c03ffec18ae4118649e4c7c58010d5f1a18e1
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2026-05-04 01:33:32 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-05-04 01:33:32 +0000

    chinese/fcitx: Fix options GTK2 and GTK3, improve port
    
    GTK2 and GTK3 options aren't working properly: even if disable GTK2, it
    gets re-enabled GTK2.
    
    Improve port:
    - Replace PORTVERSION with DISTVERSION.
    - Fix warnings from portclippy.
    - Set dependency from ecm as build.
    - Convert CMAKE_ARGS to CMAKE_ON and CMAKE_OFF.
    - Replace ".if ${PORT_OPTIONS:M***}" with new style options.
    - Remove unnecessary KDE_MAN_PREFIX - it have default value.
    - Remove description of Qt4 module from pkg-message.
    - Use DESKTOPDIR in pkg-message.
    
    PR:             294883
    Approved by:    lichray@gmail.com (maintainer)
    Sponsored by:   UNIS Labs
    Co-authored-by: Ken DEGUCHI <kdeguchi@sz.tokoha-u.ac.jp>
    MFH:            2026Q2
---
 chinese/fcitx/Makefile             | 105 ++++++++++++++++---------------------
 chinese/fcitx/files/pkg-message.in |   8 +--
 2 files changed, 45 insertions(+), 68 deletions(-)

diff --git a/chinese/fcitx/Makefile b/chinese/fcitx/Makefile
index 766c88a118d1..081fe35f4094 100644
--- a/chinese/fcitx/Makefile
+++ b/chinese/fcitx/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	fcitx
-PORTVERSION=	4.2.9.9
-PORTREVISION=	2
+DISTVERSION=	4.2.9.9
+PORTREVISION=	3
 CATEGORIES=	chinese x11
 MASTER_SITES=	http://download.fcitx-im.org/fcitx/:fcitx \
 		http://download.fcitx-im.org/data/:data
@@ -34,83 +34,66 @@ LIB_DEPENDS=	libcairo.so:graphics/cairo \
 RUN_DEPENDS=	xdg-open:devel/xdg-utils \
 		xkeyboard-config>=0:x11/xkeyboard-config
 
-SUB_FILES=	pkg-message
-SUB_LIST+=	PORTSDIR=${PORTSDIR}
-
-CONFLICTS_INSTALL=	fcitx5 zh-fcitx5-chinese-addons # bin/createPYMB share/icons/hicolor/128x128/apps/fcitx.png share/icons/hicolor/16x16/apps/fcitx-fullwidth-active.png
-
-USE_GNOME=	pango intltool libxml2 introspection
-USE_KDE=	ecm
-USE_XORG=	x11 xext xkbfile sm ice
-USE_LDCONFIG=	yes
 USES=		compiler:c++11-lang gnome tar:xz cmake:noninja desktop-file-utils \
 		gettext-tools:build,run gettext-runtime iconv:wchar_t \
 		kde:5 pkgconfig shared-mime-info compiler:c++14-lang xorg
+USE_GNOME=	intltool introspection libxml2 pango
+USE_KDE=	ecm:build
+USE_LDCONFIG=	yes
+USE_XORG=	ice sm x11 xext xkbfile
 
-OPTIONS_DEFINE=	GTK2 GTK3 OPENCC TPUNC DOCS
-OPTIONS_DEFAULT=GTK2 GTK3
-OPTIONS_SUB=	yes
+CMAKE_ARGS=	-DDATADIR=${DATADIR} \
+		-DGOBJECT_INTROSPECTION_GIRDIR=${PREFIX}/share/gir-1.0 \
+		-DGOBJECT_INTROSPECTION_TYPELIBDIR=${PREFIX}/lib/girepository-1.0 \
+		-DPREFIX=${PREFIX}
+CMAKE_ON=	FORCE_ENCHANT
+.if defined(WITH_DEBUG)
+CMAKE_ON+=	ENABLE_DEBUG
+.endif
+CMAKE_OFF=	ENABLE_QT \
+		ENABLE_QT_IM_MODULE \
+		ENABLE_QT_GUI \
+		ENABLE_XDGAUTOSTART \
+		LIBICONV_LIBC_HAS_ICONV_OPEN \
 
-GTK2_DESC=	Enable Gtk2 IM module
-GTK2_USE=	GNOME=gtk20
-GTK2_CMAKE_ON=	-DENABLE_GTK2_IM_MODULE=ON
+CONFLICTS_INSTALL=	fcitx5 zh-fcitx5-chinese-addons # bin/createPYMB share/icons/hicolor/128x128/apps/fcitx.png share/icons/hicolor/16x16/apps/fcitx-fullwidth-active.png
 
-GTK3_DESC=	Enable Gtk3 IM module
-GTK3_USE=	GNOME=gtk30
-GTK3_CMAKE_ON=	-DENABLE_GTK3_IM_MODULE=ON
+SUB_FILES=	pkg-message
+SUB_LIST=	DESKTOPDIR=${DESKTOPDIR}
 
+OPTIONS_DEFINE=		DOCS GTK2 GTK3 OPENCC TPUNC
+OPTIONS_DEFAULT=	GTK2 GTK3
+OPTIONS_SUB=		yes
+
+GTK2_DESC=	Enable Gtk2 IM module
+GTK3_DESC=	Enable Gtk3 IM module
 OPENCC_DESC=	Enable OpenCC for Chinese Transform
 TPUNC_DESC=	Use traditional quotation marks
 
-.include <bsd.port.options.mk>
-
-KDE_MAN_PREFIX=	${PREFIX}/share/man
-CMAKE_ARGS+=	-DENABLE_XDGAUTOSTART=OFF -DFORCE_ENCHANT=ON \
-		-DLIBICONV_LIBC_HAS_ICONV_OPEN=OFF \
-		-DDATADIR=${DATADIR} \
-		-DDOCSDIR=${DOCSDIR} \
-		-DGOBJECT_INTROSPECTION_GIRDIR=${PREFIX}/share/gir-1.0 \
-		-DGOBJECT_INTROSPECTION_TYPELIBDIR=${PREFIX}/lib/girepository-1.0 \
-		-DPREFIX=${PREFIX} \
-		-DENABLE_QT=OFF -DENABLE_QT_IM_MODULE=OFF -DENABLE_QT_GUI=OFF
-
-.if ${PORT_OPTIONS:MGTK2}
-SUB_LIST+=	GTK2_IM=fcitx
-.else
-SUB_LIST+=	GTK2_IM=xim
-.endif
+GTK2_USE=		GNOME=gtk20
+GTK2_CMAKE_BOOL=	ENABLE_GTK2_IM_MODULE
+GTK2_VARS=		SUB_LIST+=GTK2_IM=fcitx
+GTK2_VARS_OFF=		SUB_LIST+=GTK2_IM=xim
 
-.if ${PORT_OPTIONS:MGTK3}
-PLIST_SUB+=	GTK3=""
-SUB_LIST+=	GTK3_IM=fcitx
-.else
-PLIST_SUB+=	GTK3="@comment "
-SUB_LIST+=	GTK3_IM=xim
-.endif
+GTK3_USE=		GNOME=gtk30
+GTK3_CMAKE_BOOL=	ENABLE_GTK3_IM_MODULE
+GTK3_VARS=		SUB_LIST+=GTK3_IM=fcitx
+GTK3_VARS_OFF=		SUB_LIST+=GTK3_IM=xim
 
-.if ${PORT_OPTIONS:MOPENCC}
-LIB_DEPENDS+=	libopencc.so:chinese/opencc
-.else
-CMAKE_ARGS+=	-DENABLE_OPENCC=OFF
-.endif
+OPENCC_LIB_DEPENDS=	libopencc.so:chinese/opencc
+OPENCC_CMAKE_BOOL=	ENABLE_OPENCC
 
-.if ${PORT_OPTIONS:MTPUNC}
-EXTRA_PATCHES+=	${FILESDIR}/tpunc-data_punc.mb.zh_CN
-.endif
-
-.if defined(WITH_DEBUG)
-CMAKE_ARGS+=	-DENABLE_DEBUG=ON
-.endif
+TPUNC_EXTRA_PATCHES=	${PATCHDIR}/tpunc-data_punc.mb.zh_CN
 
 _DICT_VER=	20121020
 _PYSTROKE_VER=	20121124
 _PYTABLE_VER=	20121124
 
 post-patch:
-	@${CP} ${_DISTDIR}/en_dict-${_DICT_VER}.tar.gz ${WRKSRC}/src/module/spell/dict/.
-	@${CP} ${_DISTDIR}/pinyin.tar.gz ${WRKSRC}/src/im/pinyin/data/.
-	@${CP} ${_DISTDIR}/py_stroke-${_PYSTROKE_VER}.tar.gz ${WRKSRC}/src/module/pinyin-enhance/data/.
-	@${CP} ${_DISTDIR}/py_table-${_PYTABLE_VER}.tar.gz ${WRKSRC}/src/module/pinyin-enhance/data/.
-	@${CP} ${_DISTDIR}/table.tar.gz ${WRKSRC}/src/im/table/data/.
+	@${CP} ${_DISTDIR}/en_dict-${_DICT_VER}.tar.gz ${WRKSRC}/src/module/spell/dict/
+	@${CP} ${_DISTDIR}/pinyin.tar.gz ${WRKSRC}/src/im/pinyin/data/
+	@${CP} ${_DISTDIR}/py_stroke-${_PYSTROKE_VER}.tar.gz ${WRKSRC}/src/module/pinyin-enhance/data/
+	@${CP} ${_DISTDIR}/py_table-${_PYTABLE_VER}.tar.gz ${WRKSRC}/src/module/pinyin-enhance/data/
+	@${CP} ${_DISTDIR}/table.tar.gz ${WRKSRC}/src/im/table/data/
 
 .include <bsd.port.mk>
diff --git a/chinese/fcitx/files/pkg-message.in b/chinese/fcitx/files/pkg-message.in
index 645a4af9f80b..a21c8076dded 100644
--- a/chinese/fcitx/files/pkg-message.in
+++ b/chinese/fcitx/files/pkg-message.in
@@ -13,15 +13,9 @@ For GTK+ programs, you may want to set:
 	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 \
+	cp %%DESKTOPDIR%%/fcitx.desktop \
 	    ~/.config/autostart/
 EOM
 }


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f7fab5.3ba7b.4fac01fb>