summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2014-03-12 20:45:18 +0000
committerAlexis Ballier <aballier@gentoo.org>2014-03-12 20:45:18 +0000
commit11609b0adf1cc48dc6c0ca7961fbede4ef50234a (patch)
treeaa9f0f3324f4ce0bd97dd6ae7c2030f6f209f8ec /media-libs/x265
parentinitial version (diff)
downloadgentoo-2-11609b0adf1cc48dc6c0ca7961fbede4ef50234a.tar.gz
gentoo-2-11609b0adf1cc48dc6c0ca7961fbede4ef50234a.tar.bz2
gentoo-2-11609b0adf1cc48dc6c0ca7961fbede4ef50234a.zip
Initial import, bug #485352. Ebuild by Samuli Suominen, Yixun Lan and myself.
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'media-libs/x265')
-rw-r--r--media-libs/x265/ChangeLog12
-rw-r--r--media-libs/x265/files/x265-libdir.patch35
-rw-r--r--media-libs/x265/files/x265-libdir_pkgconfig.patch12
-rw-r--r--media-libs/x265/metadata.xml11
-rw-r--r--media-libs/x265/x265-0.8.ebuild74
-rw-r--r--media-libs/x265/x265-9999.ebuild74
6 files changed, 218 insertions, 0 deletions
diff --git a/media-libs/x265/ChangeLog b/media-libs/x265/ChangeLog
new file mode 100644
index 000000000000..bee227b79d01
--- /dev/null
+++ b/media-libs/x265/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for media-libs/x265
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/x265/ChangeLog,v 1.1 2014/03/12 20:45:18 aballier Exp $
+
+*x265-9999 (12 Mar 2014)
+*x265-0.8 (12 Mar 2014)
+
+ 12 Mar 2014; Alexis Ballier <aballier@gentoo.org> +x265-0.8.ebuild,
+ +x265-9999.ebuild, +files/x265-libdir.patch,
+ +files/x265-libdir_pkgconfig.patch, +metadata.xml:
+ Initial import, bug #485352. Ebuild by Samuli Suominen, Yixun Lan and myself.
+
diff --git a/media-libs/x265/files/x265-libdir.patch b/media-libs/x265/files/x265-libdir.patch
new file mode 100644
index 000000000000..728fad1e9dc5
--- /dev/null
+++ b/media-libs/x265/files/x265-libdir.patch
@@ -0,0 +1,35 @@
+Index: x265-9999/source/CMakeLists.txt
+===================================================================
+--- x265-9999.orig/source/CMakeLists.txt
++++ x265-9999/source/CMakeLists.txt
+@@ -246,8 +246,8 @@ if(NOT MSVC)
+ endif()
+ install(TARGETS x265-static
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
+
+ if(CMAKE_RC_COMPILER)
+@@ -284,8 +284,8 @@ if(ENABLE_SHARED)
+ set_target_properties(x265-shared PROPERTIES VERSION ${X265_LATEST_TAG} SOVERSION ${X265_BUILD})
+ install(TARGETS x265-shared
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ endif()
+ endif()
+
+@@ -305,7 +305,7 @@ if(X265_LATEST_TAG)
+ # Produce a pkg-config file
+ configure_file("x265.pc.in" "x265.pc" @ONLY)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/x265.pc"
+- DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig")
+ endif()
+
+ if(NOT WIN32)
diff --git a/media-libs/x265/files/x265-libdir_pkgconfig.patch b/media-libs/x265/files/x265-libdir_pkgconfig.patch
new file mode 100644
index 000000000000..4159fbadaa9f
--- /dev/null
+++ b/media-libs/x265/files/x265-libdir_pkgconfig.patch
@@ -0,0 +1,12 @@
+Index: x265-9999/source/x265.pc.in
+===================================================================
+--- x265-9999.orig/source/x265.pc.in
++++ x265-9999/source/x265.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+ includedir=${prefix}/include
+
+ Name: @CMAKE_PROJECT_NAME@
diff --git a/media-libs/x265/metadata.xml b/media-libs/x265/metadata.xml
new file mode 100644
index 000000000000..f62a466f1e7b
--- /dev/null
+++ b/media-libs/x265/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="10bit">Set output bit depth to 10.</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-libs/x265/x265-0.8.ebuild b/media-libs/x265/x265-0.8.ebuild
new file mode 100644
index 000000000000..edd2447c3978
--- /dev/null
+++ b/media-libs/x265/x265-0.8.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/x265/x265-0.8.ebuild,v 1.1 2014/03/12 20:45:18 aballier Exp $
+
+EAPI=5
+
+inherit cmake-multilib
+
+if [[ ${PV} = 9999* ]]; then
+ inherit mercurial
+ EHG_REPO_URI="http://bitbucket.org/multicoreware/x265"
+else
+ SRC_URI="https://bitbucket.org/multicoreware/x265/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
+HOMEPAGE="http://x265.org/"
+
+LICENSE="GPL-2"
+# subslot = libx265 soname
+SLOT="0/7"
+IUSE="+10bit test"
+
+ASM_DEPEND=">=dev-lang/yasm-1.2.0"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ abi_x86_32? ( ${ASM_DEPEND} )
+ abi_x86_64? ( ${ASM_DEPEND} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-libdir.patch"
+ "${FILESDIR}/${PN}-libdir_pkgconfig.patch"
+)
+
+src_unpack() {
+ if [[ ${PV} = 9999* ]]; then
+ mercurial_src_unpack
+ # Can't set it at global scope due to mercurial.eclass limitations...
+ export S=${WORKDIR}/${P}/source
+ else
+ unpack ${A}
+ export S=$(echo "${WORKDIR}"/*${PN}*/source)
+ fi
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable test TESTS)
+ $(multilib_build_binaries || echo "-DENABLE_CLI=OFF")
+ -DHIGH_BIT_DEPTH=$(usex 10bit "ON" "OFF")
+ )
+ cmake-utils_src_configure
+}
+
+src_configure() {
+ multilib_parallel_foreach_abi multilib_src_configure
+}
+
+multilib_src_test() {
+ cd "${BUILD_DIR}/test" || die
+ for i in PoolTest TestBench ; do
+ ./${i} || die
+ done
+}
+
+src_test() {
+ multilib_foreach_abi multilib_src_test
+}
+
+src_install() {
+ cmake-multilib_src_install
+ dodoc -r "${S}/../doc/"*
+}
diff --git a/media-libs/x265/x265-9999.ebuild b/media-libs/x265/x265-9999.ebuild
new file mode 100644
index 000000000000..fce836a7006c
--- /dev/null
+++ b/media-libs/x265/x265-9999.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/x265/x265-9999.ebuild,v 1.1 2014/03/12 20:45:18 aballier Exp $
+
+EAPI=5
+
+inherit cmake-multilib
+
+if [[ ${PV} = 9999* ]]; then
+ inherit mercurial
+ EHG_REPO_URI="http://bitbucket.org/multicoreware/x265"
+else
+ SRC_URI="https://bitbucket.org/multicoreware/x265/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Library for encoding video streams into the H.265/HEVC format"
+HOMEPAGE="http://x265.org/"
+
+LICENSE="GPL-2"
+# subslot = libx265 soname
+SLOT="0/9"
+IUSE="+10bit test"
+
+ASM_DEPEND=">=dev-lang/yasm-1.2.0"
+RDEPEND=""
+DEPEND="${RDEPEND}
+ abi_x86_32? ( ${ASM_DEPEND} )
+ abi_x86_64? ( ${ASM_DEPEND} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-libdir.patch"
+ "${FILESDIR}/${PN}-libdir_pkgconfig.patch"
+)
+
+src_unpack() {
+ if [[ ${PV} = 9999* ]]; then
+ mercurial_src_unpack
+ # Can't set it at global scope due to mercurial.eclass limitations...
+ export S=${WORKDIR}/${P}/source
+ else
+ unpack ${A}
+ export S=$(echo "${WORKDIR}"/*${PN}*/source)
+ fi
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_enable test TESTS)
+ $(multilib_build_binaries || echo "-DENABLE_CLI=OFF")
+ -DHIGH_BIT_DEPTH=$(usex 10bit "ON" "OFF")
+ )
+ cmake-utils_src_configure
+}
+
+src_configure() {
+ multilib_parallel_foreach_abi multilib_src_configure
+}
+
+multilib_src_test() {
+ cd "${BUILD_DIR}/test" || die
+ for i in PoolTest TestBench ; do
+ ./${i} || die
+ done
+}
+
+src_test() {
+ multilib_foreach_abi multilib_src_test
+}
+
+src_install() {
+ cmake-multilib_src_install
+ dodoc -r "${S}/../doc/"*
+}