From nobody Sat Mar 18 13:13:32 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pf1f50Bnrz3yYs0; Sat, 18 Mar 2023 13:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pf1f46dlrz48ky; Sat, 18 Mar 2023 13:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679145212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VibyQ/Mx9HFPi12LhV13R1kTJS3nhm5XAeugqQB2rn0=; b=t70PxhxJLNQubdfUKnHFEx3DGr8Cjn6oYTc03TFSQAVPFDlEZenFepC7pDh9EQKGorCFfM V21idRsLSv2K0jHswYeD74hrH84ebQst2f6C1fvDYAhUz2pEDzzI1GYUA8IndhFiWMdxLt k0GSl1903FMo9wc2CUauk7beEJsxgsX6T6bMKuSsQ1O5KTBN5OWPipDPlCfQ3aB38dWOuf lqu6AJuNSSf/xFGDqrZUn16Yhw6p41WpYeSepbrWH2Ka5OEHeqr/HbcnmMUpnYfhneYUYF gqWqd5G503m0g5j8CkoSNnbVkIgWTirnfgnIXmEkW+7j3s0LnlsQXM+ZqtGmkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679145212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VibyQ/Mx9HFPi12LhV13R1kTJS3nhm5XAeugqQB2rn0=; b=GycITQSxnA7r2Ry6QfM89m7YRgNrKk4JLfL6Z7QMbDrpJX/Fi2YJBnT188gbfKexLRGn6Z ruuDZwOLp6CMge83j7tYZev39WDdSn46sRMBVjn/wFBR8me3BVTZaazmX5wuxpTp2UleLi ico+VpwfFxMRwfjPxJX6n/OImAoxIvCKanLjYpDNUeYRjbDN9JYOcI1+hRuk6FziNWTDaw JB2bXKVoWPQLXjd8hLK2wkc7vjMm08+86YAdsvxCLUSuT2J60OsFBtcnmndhGs1j/vRXK2 rb+g987nG/klAFLemQb3X7y7aLjW4adzuKWCidnPqmzt2tA/YBCbl1wb6suzIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679145212; a=rsa-sha256; cv=none; b=Vf7QIUQnMmcihZOw2AM3mhX3xgPtDNmR2SLfFUpu1ukOKo0XbLb9QApivirKiw86Moh4DP zUgajUX4yOLg3CDIUo03QXxN7bhaPKWjFLvKAwB77Jw13lr1sowlYDBrDg/KL1kOsaGrEg PPI67WYrd7yuphVwWpygUkq/642DBdkfWmV65K0rN4kqiT0ZEJ8UFLTmB9upGq2Xa3Qtqw I1QgEYSlVhRD2V9pILEaCu+2nlMpH6oM0EcRwlrFQBGZ4gt1omoKO/DEtWej+GFWmDSpKD hqcHN6ere6FGZodHoMtPmKvKuKNOn6X6kIUNIjonm7zcDgpS9ElO68P3MdjDbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pf1f45jGfz17Yk; Sat, 18 Mar 2023 13:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32IDDWh2011117; Sat, 18 Mar 2023 13:13:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32IDDWHJ011116; Sat, 18 Mar 2023 13:13:32 GMT (envelope-from git) Date: Sat, 18 Mar 2023 13:13:32 GMT Message-Id: <202303181313.32IDDWHJ011116@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 5d6891c1e621 - main - textproc/fcitx5-gtk*: Add GTK4 support List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d6891c1e621ca95fd97010a069c0781e0d41b81 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=5d6891c1e621ca95fd97010a069c0781e0d41b81 commit 5d6891c1e621ca95fd97010a069c0781e0d41b81 Author: Li-Wen Hsu AuthorDate: 2023-03-18 13:06:19 +0000 Commit: Li-Wen Hsu CommitDate: 2023-03-18 13:06:19 +0000 textproc/fcitx5-gtk*: Add GTK4 support - Split into gtk2, gtk3, gtk4 FLAVORS - Extract common files to textproc/fcitx5-gtk-common Approved by: khng Differential Revision: https://reviews.freebsd.org/D38074 --- textproc/Makefile | 1 + textproc/fcitx5-gtk-common/Makefile | 18 ++++++++++++++ textproc/fcitx5-gtk/Makefile | 28 +++++++++++++++++++--- .../fcitx5-gtk/{pkg-plist => pkg-plist.common} | 6 ----- textproc/fcitx5-gtk/pkg-plist.gtk2 | 3 +++ textproc/fcitx5-gtk/pkg-plist.gtk3 | 3 +++ textproc/fcitx5-gtk/pkg-plist.gtk4 | 1 + 7 files changed, 51 insertions(+), 9 deletions(-) diff --git a/textproc/Makefile b/textproc/Makefile index fbba825f4661..eb715443fc39 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -205,6 +205,7 @@ SUBDIR += fcitx5 SUBDIR += fcitx5-configtool SUBDIR += fcitx5-gtk + SUBDIR += fcitx5-gtk-common SUBDIR += fcitx5-lua SUBDIR += fcitx5-m17n SUBDIR += fcitx5-qt diff --git a/textproc/fcitx5-gtk-common/Makefile b/textproc/fcitx5-gtk-common/Makefile new file mode 100644 index 000000000000..79e1e775e448 --- /dev/null +++ b/textproc/fcitx5-gtk-common/Makefile @@ -0,0 +1,18 @@ +COMMENT= Fcitx support for GTK+ (common files) + +PKGNAMESUFFIX= -common + +MASTERDIR= ${.CURDIR}/../fcitx5-gtk + +RUN_DEPENDS= # empty + +PLIST= ${MASTERDIR}/pkg-plist.common + +FLAVORS= # empty +FLAVOR= # empty + +CMAKE_ON= # empty +CMAKE_OFF= ENABLE_GTK2_IM_MODULE ENABLE_GTK3_IM_MODULE \ + ENABLE_GTK4_IM_MODULE + +.include "${MASTERDIR}/Makefile" diff --git a/textproc/fcitx5-gtk/Makefile b/textproc/fcitx5-gtk/Makefile index 3d4bae6ee258..0bb995ec2f22 100644 --- a/textproc/fcitx5-gtk/Makefile +++ b/textproc/fcitx5-gtk/Makefile @@ -4,13 +4,21 @@ PORTREVISION= 1 CATEGORIES= textproc MAINTAINER= khng@FreeBSD.org -COMMENT= Fcitx support for GTK+ 2/3 +COMMENT?= Fcitx support for GTK+ ${FLAVOR} WWW= https://github.com/fcitx/fcitx5-gtk LICENSE= LGPL21+ LICENSE_FILE= ${WRKSRC}/LICENSES/LGPL-2.1-or-later.txt LIB_DEPENDS= libxkbcommon.so:x11/libxkbcommon +RUN_DEPENDS?= fcitx5-gtk-common>=${DISTVERSION}:textproc/fcitx5-gtk-common + +FLAVORS?= gtk3 gtk2 gtk4 +FLAVOR?= ${FLAVORS:[1]} + +gtk2_PKGNAMESUFFIX= 2 +gtk3_PKGNAMESUFFIX= 3 +gtk4_PKGNAMESUFFIX= 4 USES= compiler:c++17-lang gettext-tools cmake gnome kde:5 pkgconfig xorg @@ -20,10 +28,24 @@ USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= fcitx -USE_GNOME= introspection glib20 gtk20 gtk30 +USE_GNOME= cairo gdkpixbuf2 glib20 introspection USE_KDE= ecm USE_XORG= x11 -CMAKE_OFF= ENABLE_GTK4_IM_MODULE +CMAKE_ON?= BUILD_ONLY_PLUGIN + +.if ${FLAVOR} == gtk3 +CMAKE_OFF+= ENABLE_GTK2_IM_MODULE ENABLE_GTK4_IM_MODULE +USE_GNOME+= gtk30 +.elif ${FLAVOR} == gtk2 +CMAKE_OFF+= ENABLE_GTK3_IM_MODULE ENABLE_GTK4_IM_MODULE +USE_GNOME+= gtk20 +.elif ${FLAVOR} == gtk4 +CMAKE_OFF+= ENABLE_GTK2_IM_MODULE ENABLE_GTK3_IM_MODULE +USE_GNOME+= gtk40 +.endif + +PLIST?= ${PKGDIR}/pkg-plist.${FLAVOR} +PLIST_SUB= VER=${PORTVERSION} .include diff --git a/textproc/fcitx5-gtk/pkg-plist b/textproc/fcitx5-gtk/pkg-plist.common similarity index 58% rename from textproc/fcitx5-gtk/pkg-plist rename to textproc/fcitx5-gtk/pkg-plist.common index 89fa71e9cb30..5668dd9548d9 100644 --- a/textproc/fcitx5-gtk/pkg-plist +++ b/textproc/fcitx5-gtk/pkg-plist.common @@ -5,14 +5,8 @@ lib/cmake/Fcitx5GClient/Fcitx5GClientConfigVersion.cmake lib/cmake/Fcitx5GClient/Fcitx5GClientTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/Fcitx5GClient/Fcitx5GClientTargets.cmake lib/girepository-1.0/FcitxG-1.0.typelib -lib/gtk-2.0/%%GTK2_VERSION%%/immodules/im-fcitx5.so -lib/gtk-3.0/%%GTK3_VERSION%%/immodules/im-fcitx5.so lib/libFcitx5GClient.so lib/libFcitx5GClient.so.2 lib/libFcitx5GClient.so.%%VER%% libdata/pkgconfig/Fcitx5GClient.pc share/gir-1.0/FcitxG-1.0.gir -@postexec %%LOCALBASE%%/bin/gtk-query-immodules-3.0 --update-cache -@postexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 --update-cache -@postunexec %%LOCALBASE%%/bin/gtk-query-immodules-3.0 --update-cache -@postunexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 --update-cache diff --git a/textproc/fcitx5-gtk/pkg-plist.gtk2 b/textproc/fcitx5-gtk/pkg-plist.gtk2 new file mode 100644 index 000000000000..acaefd3e8eef --- /dev/null +++ b/textproc/fcitx5-gtk/pkg-plist.gtk2 @@ -0,0 +1,3 @@ +lib/gtk-2.0/%%GTK2_VERSION%%/immodules/im-fcitx5.so +@postexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 --update-cache +@postunexec %%LOCALBASE%%/bin/gtk-query-immodules-2.0 --update-cache diff --git a/textproc/fcitx5-gtk/pkg-plist.gtk3 b/textproc/fcitx5-gtk/pkg-plist.gtk3 new file mode 100644 index 000000000000..8729fdc04a93 --- /dev/null +++ b/textproc/fcitx5-gtk/pkg-plist.gtk3 @@ -0,0 +1,3 @@ +lib/gtk-3.0/%%GTK3_VERSION%%/immodules/im-fcitx5.so +@postexec %%LOCALBASE%%/bin/gtk-query-immodules-3.0 --update-cache +@postunexec %%LOCALBASE%%/bin/gtk-query-immodules-3.0 --update-cache diff --git a/textproc/fcitx5-gtk/pkg-plist.gtk4 b/textproc/fcitx5-gtk/pkg-plist.gtk4 new file mode 100644 index 000000000000..8fad035ba08a --- /dev/null +++ b/textproc/fcitx5-gtk/pkg-plist.gtk4 @@ -0,0 +1 @@ +lib/gtk-4.0/%%GTK4_VERSION%%/immodules/libim-fcitx5.so