summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarlson2k (Evgeny Grin) <k2k@narod.ru>2020-07-26 19:26:27 +0300
committerCraig Andrews <candrews@gentoo.org>2020-07-27 11:09:36 -0400
commitb6767c946a0c6ec20d4cc46977f7d76b412b2618 (patch)
tree777bde20eb0eaf863686c0ce79e1874ac06142e2
parentsys-fs/dislocker: various fixes, bug 700784 & 732204 (diff)
downloadgentoo-b6767c946a0c6ec20d4cc46977f7d76b412b2618.tar.gz
gentoo-b6767c946a0c6ec20d4cc46977f7d76b412b2618.tar.bz2
gentoo-b6767c946a0c6ec20d4cc46977f7d76b412b2618.zip
media-libs/libde265: bump to 1.0.5 and ebuild fixes
Dropped unneeded QT5 dependencies Required only for sherlock256 which cannot be built without libswscale Fixed usage of CPU_FLAGS_X86 Added usage of CPU_FLAGS_ARM Added USE flags for building enc265 and dec265 tools Added USE flags for other binary tools Prevented installation of useless "tests" and other unneeded/unfinished tools Added missing RDEPEND for virtual/pkgconfig Described USE flags in metadata.xml Closes: https://bugs.gentoo.org/734062 Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru> Closes: https://github.com/gentoo/gentoo/pull/16836 Signed-off-by: Craig Andrews <candrews@gentoo.org>
-rw-r--r--media-libs/libde265/Manifest1
-rw-r--r--media-libs/libde265/libde265-1.0.5.ebuild99
-rw-r--r--media-libs/libde265/libde265-9999.ebuild67
-rw-r--r--media-libs/libde265/metadata.xml7
4 files changed, 154 insertions, 20 deletions
diff --git a/media-libs/libde265/Manifest b/media-libs/libde265/Manifest
index e40b275b4d49..b1a63c115849 100644
--- a/media-libs/libde265/Manifest
+++ b/media-libs/libde265/Manifest
@@ -1 +1,2 @@
DIST libde265-1.0.3.tar.gz 399996 BLAKE2B 988b21085f82d3b33b0480542677be96db5219c1b767aae3674f89862fdaf3355dcfea3fa99699798a4fcc6b72a63a3a6f61a3fd8d2ea8483231205cd6d87175 SHA512 0153632afcc9733950e8354997ccd93eddad90e8e0f7362bfe49b93b11cb1756cf803d0ba5c07042aee80e18227613af768ca82baf7891c687edf5e253a129c4
+DIST libde265-1.0.5.tar.gz 381041 BLAKE2B d561a0e5f308bed557237b88317985912537f76701783bc30d81305cf9026a853746449ece5b3092534466ea13d67bac10b3258580c8de07489844bbef0395db SHA512 3ff7310fc4621cac0ef1cb9bbc4df61724f8943d57f5263a3663a77f4d90d84716b2a708ee9fec306e909dc8b5e7fe645a641b6a6db795a89a01799be910831e
diff --git a/media-libs/libde265/libde265-1.0.5.ebuild b/media-libs/libde265/libde265-1.0.5.ebuild
new file mode 100644
index 000000000000..1b591f16c364
--- /dev/null
+++ b/media-libs/libde265/libde265-1.0.5.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools multilib-minimal
+
+PATCHES=( "${FILESDIR}/${PN}-1.0.2-qtbindir.patch" )
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/strukturag/${PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/strukturag/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+fi
+
+DESCRIPTION="Open h.265 video codec implementation"
+HOMEPAGE="https://github.com/strukturag/libde265"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="enc265 dec265 sdl tools debug static-libs cpu_flags_x86_sse4_1 cpu_flags_arm_neon cpu_flags_arm_thumb"
+# IUSE+=" sherlock265" # Require libvideogfx or libswscale
+
+RDEPEND="
+ dec265? (
+ sdl? ( media-libs/libsdl )
+ )
+"
+# Sherlock265 require libvideogfx or libswscale
+#RDEPEND+="
+# sherlock265? (
+# media-libs/libsdl
+# dev-qt/qtcore:5
+# dev-qt/qtgui:5
+# dev-qt/qtwidgets:5
+# media-libs/libswscale
+# )
+#"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="dec265? ( virtual/pkgconfig )"
+
+# Sherlock265 require libvideogfx or libswscale
+#BDEPEND+=" sherlock265? ( virtual/pkgconfig )"
+
+src_prepare() {
+ default
+
+ eautoreconf
+
+ # without this, headers would be missing and make would fail
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ ax_cv_check_cflags___msse4_1=$(usex cpu_flags_x86_sse4_1)
+ ax_cv_check_cflags___mfpu_neon=$(usex cpu_flags_arm_neon)
+ $(use_enable cpu_flags_arm_thumb thumb)
+ $(use_enable static-libs static)
+ $(use_enable debug log-info)
+ $(use_enable debug log-debug)
+ $(use_enable debug log-trace)
+ $(multilib_native_use_enable enc265 encoder)
+ $(multilib_native_use_enable dec265)
+ --enable-log-error
+ )
+
+ # myeconfargs+=( $(multilib_native_use_enable sherlock265) ) # Require libvideogfx or libswscale
+ myeconfargs+=( --disable-sherlock265 )
+
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi; then
+ # Remove useless, unready and test tools (Why package ever tried to install them??)
+ rm -f "${ED}/usr/bin/"{tests,gen-enc-table,yuv-distortion} || die
+ if ! use tools; then
+ rm -f "${ED}/usr/bin/"{bjoentegaard,block-rate-estim,rd-curves} || die
+ rm -f "${ED}/usr/bin/acceleration_speed" || die
+ fi
+ else
+ # Remove all non-native binary tools
+ rm -f "${ED}/usr/bin/"* || die
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name '*.la' -delete || die
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
diff --git a/media-libs/libde265/libde265-9999.ebuild b/media-libs/libde265/libde265-9999.ebuild
index 7f4f73fb81e2..1b591f16c364 100644
--- a/media-libs/libde265/libde265-9999.ebuild
+++ b/media-libs/libde265/libde265-9999.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3
else
SRC_URI="https://github.com/strukturag/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~ppc64 ~x86"
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
fi
DESCRIPTION="Open h.265 video codec implementation"
@@ -20,18 +20,31 @@ HOMEPAGE="https://github.com/strukturag/libde265"
LICENSE="GPL-3"
SLOT="0"
-IUSE="cpu_flags_x86_sse debug qt5 static-libs"
-
-DEPEND="
- media-libs/libsdl[${MULTILIB_USEDEP}]
- media-video/ffmpeg:=[${MULTILIB_USEDEP}]
- qt5? (
- dev-qt/qtcore:5
- dev-qt/qtgui:5
- dev-qt/qtwidgets:5
+IUSE="enc265 dec265 sdl tools debug static-libs cpu_flags_x86_sse4_1 cpu_flags_arm_neon cpu_flags_arm_thumb"
+# IUSE+=" sherlock265" # Require libvideogfx or libswscale
+
+RDEPEND="
+ dec265? (
+ sdl? ( media-libs/libsdl )
)
"
-RDEPEND="${DEPEND}"
+# Sherlock265 require libvideogfx or libswscale
+#RDEPEND+="
+# sherlock265? (
+# media-libs/libsdl
+# dev-qt/qtcore:5
+# dev-qt/qtgui:5
+# dev-qt/qtwidgets:5
+# media-libs/libswscale
+# )
+#"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="dec265? ( virtual/pkgconfig )"
+
+# Sherlock265 require libvideogfx or libswscale
+#BDEPEND+=" sherlock265? ( virtual/pkgconfig )"
src_prepare() {
default
@@ -44,26 +57,40 @@ src_prepare() {
multilib_src_configure() {
local myeconfargs=(
- $(use_enable cpu_flags_x86_sse sse)
+ ax_cv_check_cflags___msse4_1=$(usex cpu_flags_x86_sse4_1)
+ ax_cv_check_cflags___mfpu_neon=$(usex cpu_flags_arm_neon)
+ $(use_enable cpu_flags_arm_thumb thumb)
$(use_enable static-libs static)
$(use_enable debug log-info)
$(use_enable debug log-debug)
$(use_enable debug log-trace)
+ $(multilib_native_use_enable enc265 encoder)
+ $(multilib_native_use_enable dec265)
--enable-log-error
)
- if ! multilib_is_native_abi; then
- myeconfargs+=( --disable-dec265 --disable-sherlock265 )
- else
- myeconfargs+=(
- $(use_enable qt5 dec265)
- $(use_enable qt5 sherlock265)
- )
- fi
+ # myeconfargs+=( $(multilib_native_use_enable sherlock265) ) # Require libvideogfx or libswscale
+ myeconfargs+=( --disable-sherlock265 )
econf "${myeconfargs[@]}"
}
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi; then
+ # Remove useless, unready and test tools (Why package ever tried to install them??)
+ rm -f "${ED}/usr/bin/"{tests,gen-enc-table,yuv-distortion} || die
+ if ! use tools; then
+ rm -f "${ED}/usr/bin/"{bjoentegaard,block-rate-estim,rd-curves} || die
+ rm -f "${ED}/usr/bin/acceleration_speed" || die
+ fi
+ else
+ # Remove all non-native binary tools
+ rm -f "${ED}/usr/bin/"* || die
+ fi
+}
+
multilib_src_install_all() {
find "${ED}" -name '*.la' -delete || die
if ! use static-libs ; then
diff --git a/media-libs/libde265/metadata.xml b/media-libs/libde265/metadata.xml
index 37489247c5ca..524e76641f5f 100644
--- a/media-libs/libde265/metadata.xml
+++ b/media-libs/libde265/metadata.xml
@@ -4,6 +4,13 @@
<maintainer type="project">
<email>media-video@gentoo.org</email>
</maintainer>
+ <use>
+ <flag name="enc265">Enable build of enc265 tool</flag>
+ <flag name="dec265">Enable build of dec265 example program</flag>
+ <flag name="sdl">Enable video output of dec265 example program with <pkg>media-libs/libsdl</pkg></flag>
+ <flag name="tools">Enable installation of varous binary tools</flag>
+ <flag name="static-libs">Enable build of static libraries</flag>
+ </use>
<upstream>
<remote-id type="github">strukturag/libde265</remote-id>
</upstream>