From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3026015817D for ; Sun, 23 Jun 2024 17:38:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8424EE2A6D; Sun, 23 Jun 2024 17:36:57 +0000 (UTC) Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2B7B5E2A5D for ; Sun, 23 Jun 2024 17:36:57 +0000 (UTC) Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3d22378c59eso2055961b6e.1 for ; Sun, 23 Jun 2024 10:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719164216; x=1719769016; darn=lists.gentoo.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jMW+pdVHETBz+/pOaPJPQyEzKUfQxlaIjtN/LpWkcE8=; b=IawDj0KCfDoF8ADqgOp2/K40cmru/4vaHn1Mh7pVb066el9L1t+VwL7VzsrEVpfeNk zmdzC7gbTPvymHzpkJusYGSa9R6pPn2EEwDaXXNKVRBHLSCeO9Lyt2PgdCOKPrdnZ6Ra qYlcOSmq1PASHe94OtrSF8tsj2Wf5AmFDPXiWfXqnm1Ci0HMBcRT+zI4I11zrnXxzss8 Zm3J3s5cuFrlpev3neHJcKeMbS2+bFLihkMxbTqQ+mfZJ5+tJtJSaOZGcDdslSauH1V0 tVH3i/uL8r+xFbix/fQmIwTjCizsoWkpnrYud7l3Cs0XuPIwF/oFy1joxFv1GouL2Pfj DZYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719164216; x=1719769016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jMW+pdVHETBz+/pOaPJPQyEzKUfQxlaIjtN/LpWkcE8=; b=TANbU/Hmfkwwt4cshc7gIdsQrDovVpj0GBXCbDh93418hfl6zYekU5OTFiOYADQN2f gkGEWeCgM6Ko1BeNvKkeZNhMCjWLYRNdJtCHtMeonxzJ0LtH7N7Tie95ktk+riHaEPSV eB/xYHCFD8HqEBgA42t4EQ6VRtDC0QqlKD2Frd4Cmtf7p2Moc+tvJgA1jHxDxghmjne+ bVHKtLAzeU3G5C9KhlJgyKDkrvsgUxXuUl6Ez5VfMMep84tr8Xw1xIhbaQYys8kr3mJ9 g5RbIWAbi3/4RSS0xCSBhAi9tizqOTwsZFaAZD+IBg5QDqxA7xDs7WZ4k9dgMNsEdoaD Bbtg== X-Gm-Message-State: AOJu0YxouGw4a6A8uC0kvY32HbHGnLz3gXR+L2eZMEqN6cwYo/ubepCl /w1sRDoIyOK1OTjGbUTnv9AkYHZIr67MEC+yKDxV4ZgJZkilTErv4g3wAl26 X-Google-Smtp-Source: AGHT+IGz7RyTGu6jVEnD83/qzFzmPL78bF3Es2dHRD/aYVYpqsL+CQ5YhZZNEkdq1AlbaDm6JYYUVw== X-Received: by 2002:a05:6808:d50:b0:3d2:21a7:8629 with SMTP id 5614622812f47-3d545a7c4efmr3514980b6e.41.1719164215536; Sun, 23 Jun 2024 10:36:55 -0700 (PDT) Received: from acleverhostname.lan ([2603:6011:3f0:69d0::12ac]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-444c2c88de3sm33620671cf.87.2024.06.23.10.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:36:55 -0700 (PDT) From: Eli Schwartz To: gentoo-dev@lists.gentoo.org Cc: gnome@gentoo.org, xfce@gentoo.org, binhost@gentoo.org Subject: [gentoo-dev] [PATCH 5/5] dev-libs/libportal: prevent automagically building against gtk[X,wayland] Date: Sun, 23 Jun 2024 13:35:51 -0400 Message-ID: <20240623173646.3368935-6-eschwartz93@gmail.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240623173646.3368935-1-eschwartz93@gmail.com> References: <20240623173646.3368935-1-eschwartz93@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 0f758a20-46dd-4055-9429-a8fe858b0e08 X-Archives-Hash: 1a734cd3d401b754f40a27403c273cc3 e.g. the upstream code checks whether GDK_WINDOWING_WAYLAND is defined by the gtk headers, and if so will compile against the wayland symbols it provides. This means that libportal built on a system with gtk+[-wayland] will be compatible with anything, but when built on a system with gtk+[wayland], requires that at runtime. This cannot be expressed with USE flags. We could bind tightly to whether gtk was built with wayland (and X), and in the process, arbitrarily restrict libportal[-wayland] to only build and install on a system with gtk+[-wayland]. But we recently added a hack to gtk itself which allows hiding the automagic macros entirely. Inject this via append-cflags if the USE flags aren't set, to simulate building on a system with more minimal gtk packages. Signed-off-by: Eli Schwartz --- ...rtal-0.7.1.ebuild => libportal-0.7.1-r1.ebuild} | 14 +++++++++----- profiles/features/big-endian/package.use.mask | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) copy dev-libs/libportal/{libportal-0.7.1.ebuild => libportal-0.7.1-r1.ebuild} (83%) diff --git a/dev-libs/libportal/libportal-0.7.1.ebuild b/dev-libs/libportal/libportal-0.7.1-r1.ebuild similarity index 83% copy from dev-libs/libportal/libportal-0.7.1.ebuild copy to dev-libs/libportal/libportal-0.7.1-r1.ebuild index 38a05311150b..af3e04a1f256 100644 --- a/dev-libs/libportal/libportal-0.7.1.ebuild +++ b/dev-libs/libportal/libportal-0.7.1-r1.ebuild @@ -4,7 +4,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..12} ) -inherit meson python-any-r1 vala virtualx +inherit flag-o-matic meson python-any-r1 vala virtualx DESCRIPTION="Flatpak portal library" HOMEPAGE="https://github.com/flatpak/libportal" @@ -12,8 +12,8 @@ SRC_URI="https://github.com/flatpak/libportal/releases/download/${PV}/${P}.tar.x LICENSE="LGPL-3" SLOT="0/1-1-1-1" # soname of libportal{,-gtk3,-gtk4,-qt5}.so -KEYWORDS="~alpha amd64 ~arm arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86" -IUSE="gtk gtk-doc +introspection qt5 test +vala" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="gtk gtk-doc +introspection qt5 test +vala wayland X" RESTRICT="!test? ( test )" REQUIRED_USE=" gtk-doc? ( introspection ) @@ -24,8 +24,8 @@ RDEPEND=" >=dev-libs/glib-2.58:2 introspection? ( dev-libs/gobject-introspection:= ) gtk? ( - x11-libs/gtk+:3 - gui-libs/gtk:4 + x11-libs/gtk+:3[X?,wayland?] + gui-libs/gtk:4[X?,wayland?] ) qt5? ( dev-qt/qtcore:= @@ -76,6 +76,10 @@ src_prepare() { } src_configure() { + # defang automagic dependencies + use wayland || append-cflags -DGENTOO_GTK_HIDE_WAYLAND + use X || append-cflags -DGENTOO_GTK_HIDE_X11 + local emesonargs=( $(meson_feature gtk backend-gtk3) $(meson_feature gtk backend-gtk4) diff --git a/profiles/features/big-endian/package.use.mask b/profiles/features/big-endian/package.use.mask index 71906122232a..bbde951452d2 100644 --- a/profiles/features/big-endian/package.use.mask +++ b/profiles/features/big-endian/package.use.mask @@ -45,6 +45,7 @@ gui-libs/gtk wayland gnome-base/gnome-control-center wayland sys-apps/xdg-desktop-portal-gnome wayland net-libs/webkit-gtk:6 wayland +dev-libs/libportal wayland # matoro (2023-04-10) # media-libs/libldac casualties (#80238) -- 2.44.2