commit:     78cc1323c1b1885b04bfb451a0416a6c1a048c05
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 24 11:30:24 2015 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Sat Oct 24 11:32:30 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78cc1323

media-video/nvenc: Initial import. Ebuild by me.

Package-Manager: portage-2.2.23

 media-video/nvenc/Manifest           |  1 +
 media-video/nvenc/metadata.xml       | 12 ++++++++
 media-video/nvenc/nvenc-5.0.1.ebuild | 57 ++++++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+)

diff --git a/media-video/nvenc/Manifest b/media-video/nvenc/Manifest
new file mode 100644
index 0000000..51661d5
--- /dev/null
+++ b/media-video/nvenc/Manifest
@@ -0,0 +1 @@
+DIST nvenc_5.0.1_sdk.zip 96524757 SHA256 
0e9c575b4cf94bda3ae22cfaa4ce9eb931e566cc2046c3db63b92cbda5edf22d SHA512 
ba6b61a2dad97c206ac0f7f72395b0ca0fc52ee2b82b0e662cb3dcf983af8c3b43f7d369d77e7c974fa310346d73620332fa3d1251e7aa503da66f2ba5654417
 WHIRLPOOL 
ce012b578942d8494923b3189e34c34bd3e2ec54543aed3b6d5978729c7c892061268a5dfff47222e64d0ba9c806dd2b04033a98f20dbc89814012ab9d6366d8

diff --git a/media-video/nvenc/metadata.xml b/media-video/nvenc/metadata.xml
new file mode 100644
index 0000000..4e01343
--- /dev/null
+++ b/media-video/nvenc/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <herd>video</herd>
+  <maintainer>
+    <email>[email protected]</email>
+  </maintainer>
+  <use>
+       <flag name="tools">Build and install example tools.</flag>
+       <flag name="samples">Install video samples to use with the tools.</flag>
+  </use>
+</pkgmetadata>

diff --git a/media-video/nvenc/nvenc-5.0.1.ebuild 
b/media-video/nvenc/nvenc-5.0.1.ebuild
new file mode 100644
index 0000000..22d16cb
--- /dev/null
+++ b/media-video/nvenc/nvenc-5.0.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator toolchain-funcs
+
+MY_P="${PN}_${PV}_sdk"
+
+DESCRIPTION="NVIDIA Encoder (NVENC) API"
+HOMEPAGE="https://developer.nvidia.com/nvidia-video-codec-sdk";
+SRC_URI="http://developer.download.nvidia.com/compute/nvenc/v$(get_version_component_range
 "1-2")/${MY_P}.zip"
+
+LICENSE="NVIDIA-CODEC-SDK"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+tools samples"
+
+RDEPEND=">=dev-util/nvidia-cuda-toolkit-6.5"
+DEPEND="${RDEPEND}
+       app-arch/unzip"
+
+S="${WORKDIR}/${MY_P}"
+
+TOOLS="NvEncoder NvEncoderPerf NvTranscoder"
+
+src_compile() {
+       if use tools ; then
+               export CUDA_PATH=/opt/cuda
+               export EXTRA_LDFLAGS="${LDFLAGS}"
+               for i in ${TOOLS} ; do
+                       pushd "${S}/Samples/${i}" || die
+                       emake GCC="$(tc-getCXX)" CCFLAGS="${CXXFLAGS}"
+                       popd
+               done
+       fi
+}
+
+src_install() {
+       if use tools ; then
+               for i in ${TOOLS}; do
+                       dobin "${S}/Samples/${i}/${i}"
+               done
+       fi
+
+       dodoc doc/*.pdf
+
+       if use samples ; then
+               dodoc Samples/NVENC_Samples_Guide.pdf
+               insinto /usr/share/${PN}
+               doins -r Samples/YUV
+       fi
+
+       insinto /usr/include
+       doins Samples/common/inc/nv*.h
+}

Reply via email to