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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3414A138350 for ; Mon, 6 Apr 2020 13:02:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DAD87E0BB6; Mon, 6 Apr 2020 13:02:19 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C5533E0BB6 for ; Mon, 6 Apr 2020 13:02:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 69D2C34F03A for ; Mon, 6 Apr 2020 13:02:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4B4BB1AE for ; Mon, 6 Apr 2020 13:02:16 +0000 (UTC) From: "Luca Barbato" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Luca Barbato" Message-ID: <1586178129.9eb1fe1c84a4da20a6147a16ef5dfca27b2364ef.lu_zero@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/rav1e/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/rav1e/metadata.xml media-video/rav1e/rav1e-9999.ebuild X-VCS-Directories: media-video/rav1e/ X-VCS-Committer: lu_zero X-VCS-Committer-Name: Luca Barbato X-VCS-Revision: 9eb1fe1c84a4da20a6147a16ef5dfca27b2364ef X-VCS-Branch: master Date: Mon, 6 Apr 2020 13:02:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0a7d5ba6-9aeb-4769-bcba-dec167d1bede X-Archives-Hash: 0853ea67dfbfb10756765ef0e4fd194a commit: 9eb1fe1c84a4da20a6147a16ef5dfca27b2364ef Author: Luca Barbato gentoo org> AuthorDate: Mon Apr 6 13:01:39 2020 +0000 Commit: Luca Barbato gentoo org> CommitDate: Mon Apr 6 13:02:09 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9eb1fe1c media-video/rav1e: Add support for the C-API Package-Manager: Portage-2.3.96, Repoman-2.3.22 Signed-off-by: Luca Barbato gentoo.org> media-video/rav1e/metadata.xml | 3 +++ media-video/rav1e/rav1e-9999.ebuild | 35 ++++++++++++++++++++++++++++++----- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/media-video/rav1e/metadata.xml b/media-video/rav1e/metadata.xml index 71e948fffb9..8d7337c607f 100644 --- a/media-video/rav1e/metadata.xml +++ b/media-video/rav1e/metadata.xml @@ -4,4 +4,7 @@ lu_zero@gentoo.org + + Build the C-API library and header file + diff --git a/media-video/rav1e/rav1e-9999.ebuild b/media-video/rav1e/rav1e-9999.ebuild index 131796f9e62..3865291f3be 100644 --- a/media-video/rav1e/rav1e-9999.ebuild +++ b/media-video/rav1e/rav1e-9999.ebuild @@ -1,8 +1,6 @@ -# Copyright 2017-2019 Gentoo Authors +# Copyright 2017-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# Auto-Generated by cargo-ebuild 0.2.0 - EAPI=7 inherit cargo @@ -20,11 +18,11 @@ LICENSE="BSD-2" SLOT="0" KEYWORDS="" -IUSE="" +IUSE="+capi" ASM_DEP=">=dev-lang/nasm-2.14" DEPEND="amd64? ( ${ASM_DEP} )" -RDEPEND="" +RDEPEND="capi? ( dev-util/cargo-c )" src_unpack() { if [[ "${PV}" == *9999* ]]; then @@ -32,3 +30,30 @@ src_unpack() { cargo_live_src_unpack fi } + +src_compile() { + export CARGO_HOME="${ECARGO_HOME}" + local args=$(usex debug "" --release) + + cargo build ${args} \ + || die "cargo build failed" + + if use capi; then + cargo cbuild ${args} \ + --prefix="/usr" --libdir="/usr/$(get_libdir)" --destdir="${ED}" \ + || die "cargo cbuild failed" + fi +} + +src_install() { + export CARGO_HOME="${ECARGO_HOME}" + local args=$(usex debug "" --release) + + if use capi; then + cargo cinstall $args \ + --prefix="/usr" --libdir="/usr/$(get_libdir)" --destdir="${ED}" \ + || die "cargo cinstall failed" + fi + + cargo_src_install +}