public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/colord/
Date: Mon, 18 Jan 2021 21:10:10 +0000 (UTC)	[thread overview]
Message-ID: <1611004193.b5b8aa6d19de6653bf4c9e063f8ccfa2cc11cc46.mattst88@gentoo> (raw)

commit:     b5b8aa6d19de6653bf4c9e063f8ccfa2cc11cc46
Author:     David Michael <fedora.dm0 <AT> gmail <DOT> com>
AuthorDate: Sat Dec 26 02:20:56 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Jan 18 21:09:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5b8aa6d

x11-misc/colord: GLEP 81, EAPI 7, support cross-compiling

This package needs to compile two programs that are executable at
build time, but its build system doesn't understand this.  As a
workaround, it starts a native build that overrides pkg-config
results to skip having to add deps to BDEPEND for configure.  The
target build then specifies paths to the native build so everything
executes as expected.

Signed-off-by: David Michael <fedora.dm0 <AT> gmail.com>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 x11-misc/colord/colord-1.3.5.ebuild | 50 +++++++++++++++++++++++++++----------
 1 file changed, 37 insertions(+), 13 deletions(-)

diff --git a/x11-misc/colord/colord-1.3.5.ebuild b/x11-misc/colord/colord-1.3.5.ebuild
index ad4394daeb7..a58726ebee6 100644
--- a/x11-misc/colord/colord-1.3.5.ebuild
+++ b/x11-misc/colord/colord-1.3.5.ebuild
@@ -1,11 +1,11 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-GNOME2_LA_PUNT="yes"
+EAPI=7
+GNOME2_EAUTORECONF="yes"
 VALA_USE_DEPEND="vapigen"
 
-inherit autotools bash-completion-r1 check-reqs gnome2 user systemd udev vala multilib-minimal
+inherit bash-completion-r1 check-reqs gnome2 systemd udev vala multilib-minimal toolchain-funcs
 
 DESCRIPTION="System service to accurately color manage input and output devices"
 HOMEPAGE="https://www.freedesktop.org/software/colord/"
@@ -23,7 +23,7 @@ REQUIRED_USE="
 	vala? ( introspection )
 "
 
-COMMON_DEPEND="
+DEPEND="
 	dev-db/sqlite:3=[${MULTILIB_USEDEP}]
 	>=dev-libs/glib-2.44.0:2[${MULTILIB_USEDEP}]
 	>=media-libs/lcms-2.6:2=[${MULTILIB_USEDEP}]
@@ -33,19 +33,24 @@ COMMON_DEPEND="
 	policykit? ( >=sys-auth/polkit-0.104 )
 	scanner? (
 		media-gfx/sane-backends
-		sys-apps/dbus )
+		sys-apps/dbus
+	)
 	systemd? ( >=sys-apps/systemd-44:0= )
 	udev? (
 		dev-libs/libgudev:=[${MULTILIB_USEDEP}]
-		virtual/udev
 		virtual/libudev:=[${MULTILIB_USEDEP}]
+		virtual/udev
 	)
 "
-RDEPEND="${COMMON_DEPEND}
-	!media-gfx/shared-color-profiles
+RDEPEND="${DEPEND}
+	acct-group/colord
+	acct-user/colord
 	!<=media-gfx/colorhug-client-0.1.13
+	!media-gfx/shared-color-profiles
 "
-DEPEND="${COMMON_DEPEND}
+BDEPEND="
+	acct-group/colord
+	acct-user/colord
 	dev-libs/libxslt
 	>=dev-util/gtk-doc-am-1.9
 	>=dev-util/intltool-0.35
@@ -54,6 +59,11 @@ DEPEND="${COMMON_DEPEND}
 	extra-print-profiles? ( media-gfx/argyllcms )
 	vala? ( $(vala_depend) )
 "
+# These dependencies are required to build native build-time programs.
+BDEPEND="${BDEPEND}
+	dev-libs/glib:2
+	media-libs/lcms
+"
 
 # FIXME: needs pre-installed dbus service files
 RESTRICT="test"
@@ -68,8 +78,6 @@ pkg_pretend() {
 
 pkg_setup() {
 	use extra-print-profiles && check-reqs_pkg_setup
-	enewgroup colord
-	enewuser colord -1 -1 /var/lib/colord colord
 }
 
 src_prepare() {
@@ -78,13 +86,21 @@ src_prepare() {
 		src/sensors/cd-sensor-argyll.c \
 		configure.ac || die
 
-	eautoreconf
 	use vala && vala_src_prepare
 	gnome2_src_prepare
 	multilib_copy_sources
 }
 
 multilib_src_configure() {
+	if multilib_is_native_abi && tc-is-cross-compiler; then
+		mkdir -p "${S}-native"
+		pushd "${S}-native" >/dev/null 2>&1 || die
+		ECONF_SOURCE="${S}" econf_build --enable-static \
+			--disable-{argyllcms-sensor,print-profiles,shared,udev} \
+			{BASH_COMPLETION,GUDEV,GUSB,POLKIT,SQLITE,UDEV}_{CFLAG,LIB}S=-DSKIP
+		popd >/dev/null 2>&1 || die
+	fi
+
 	# Reverse tools require gusb
 	# bash-completion test does not work on gentoo
 	local myconf=(
@@ -115,7 +131,15 @@ multilib_src_configure() {
 
 multilib_src_compile() {
 	if multilib_is_native_abi; then
-		gnome2_src_compile
+		if tc-is-cross-compiler; then
+			emake -C "${S}-native/lib/colord" libcolord.la
+			emake -C "${S}-native/client" cd-create-profile cd-it8
+			emake \
+				CD_CREATE_PROFILE="${S}-native/client/cd-create-profile" \
+				CD_IT8="${S}-native/client/cd-it8"
+		else
+			emake
+		fi
 	else
 		emake -C lib/colord
 		use gusb && emake -C lib/colorhug


             reply	other threads:[~2021-01-18 21:10 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18 21:10 Matt Turner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-09 22:46 [gentoo-commits] repo/gentoo:master commit in: x11-misc/colord/ Sam James
2024-04-07 10:11 Arthur Zamarin
2024-04-07 10:11 Arthur Zamarin
2024-04-07  7:25 Arthur Zamarin
2024-04-06 21:07 Arthur Zamarin
2024-03-13 22:55 Mart Raudsepp
2024-03-12 21:50 Arthur Zamarin
2024-03-12 21:49 Arthur Zamarin
2024-02-22 20:47 Arthur Zamarin
2024-02-22 20:47 Arthur Zamarin
2024-02-10 18:53 Arthur Zamarin
2024-02-10 18:53 Arthur Zamarin
2024-01-22 13:24 Sam James
2023-12-02 21:29 Sam James
2022-08-19  3:38 Sam James
2022-06-17 17:45 Matt Turner
2022-05-26  9:44 Pacho Ramos
2022-05-17 13:07 WANG Xuerui
2022-04-09 22:05 Jason Zaman
2022-03-25  2:03 Sam James
2022-03-18 19:24 Matt Turner
2022-02-17  4:33 Matt Turner
2022-01-24 22:43 Matt Turner
2022-01-24 14:49 Sam James
2022-01-24 14:45 Sam James
2022-01-20  9:42 Arthur Zamarin
2021-12-26  0:24 Georgy Yakovlev
2021-12-19 18:15 Mart Raudsepp
2021-11-18 20:38 Mike Gilbert
2021-11-18 20:38 Mike Gilbert
2021-08-02 12:33 Marek Szuba
2021-06-04  1:14 Matt Turner
2021-06-02 23:53 Matt Turner
2021-05-31  2:00 Matt Turner
2021-05-29 15:27 Sam James
2021-05-28 19:20 Sam James
2021-05-28 19:11 Sam James
2021-04-27 14:39 Matt Turner
2021-04-20  1:53 Matt Turner
2021-01-25  0:43 Sam James
2020-12-13 12:16 Sergei Trofimovich
2020-04-11 10:20 Sergei Trofimovich
2019-07-23 18:34 Mart Raudsepp
2019-07-22 21:24 Sergei Trofimovich
2019-06-17 10:07 Mikle Kolyada
2019-05-10 21:36 Aaron Bauman
2019-05-10 17:49 Mikle Kolyada
2019-05-08  9:33 Mikle Kolyada
2019-02-08 16:51 Dennis Lamm
2017-10-30 22:26 Mart Raudsepp
2017-03-16 13:24 Jeroen Roovers
2017-02-21  9:16 Tobias Klausmann
2017-02-11 18:31 Pacho Ramos
2016-11-26 21:50 Lars Wendler
2016-11-26 21:50 Lars Wendler
2016-09-17 13:51 Pacho Ramos
2016-08-10 19:06 Pacho Ramos
2016-07-03 17:01 Pacho Ramos
2016-01-11 14:26 Pacho Ramos
2015-09-20  6:11 Jeroen Roovers
2015-09-16  8:43 Tobias Klausmann
2015-09-12  9:11 Agostino Sarubbo
2015-09-05 17:31 Pacho Ramos
2015-09-05 17:31 Pacho Ramos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1611004193.b5b8aa6d19de6653bf4c9e063f8ccfa2cc11cc46.mattst88@gentoo \
    --to=mattst88@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox