commit:     a405a2ba129c350542d4bf9ccc6bbe4a817a3861
Author:     NRK <nrk <AT> disroot <DOT> org>
AuthorDate: Thu May  1 07:28:28 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 11 00:21:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a405a2ba

media-libs/libyuv: add v1909

the debian repo isn't up to date. make the tarball myself and
host it in github. only change compard to upstream tarball was
recompressing the tarball with bz2 instead of gzip.

Closes: https://bugs.gentoo.org/953859
Signed-off-by: NRK <nrk <AT> disroot.org>
Part-of: https://github.com/gentoo/gentoo/pull/41875
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/libyuv/Manifest                         |  1 +
 .../libyuv/files/0001-fix-install-dirs-1909.patch  | 39 ++++++++++++++
 media-libs/libyuv/libyuv-1909.ebuild               | 61 ++++++++++++++++++++++
 3 files changed, 101 insertions(+)

diff --git a/media-libs/libyuv/Manifest b/media-libs/libyuv/Manifest
index f0f9e272937b..7204a1eb10b3 100644
--- a/media-libs/libyuv/Manifest
+++ b/media-libs/libyuv/Manifest
@@ -1 +1,2 @@
 DIST libyuv-1904.tar.bz2 462619 BLAKE2B 
088da4134a89822202fb38e87295f968936d9cb6fcc4701843f8bf1086ad2422ed26d371623d3eeca01c4ed22bdd5f9c61db5e96f8060e4b99f09771f3d1d65c
 SHA512 
c24f4ce10a7cfa05d6d7f13b004c4721ec92d53a2535fec100683da6a660b2fca7f90d9c2905f9e05b85d6e6473043d209d0ce2519b39af21cfbb1260054d172
+DIST libyuv-1909.tar.bz2 466464 BLAKE2B 
e2f79c77293a3d2635f18e04be4ca55842da5d2bd0c06a1453fcb22f5ee54c715f9bd5e75f1a65996dff3f93276617a93e6b35914123c9a19b7750ca1ecb2ce6
 SHA512 
451abb4a515e97954b48c84091f23c59614061237a52d1cb8f929adb384ad07a1e8d1ef91e3c9845187ea21df37e959252bb6cbd5107ed37f6342201d8bd1daf

diff --git a/media-libs/libyuv/files/0001-fix-install-dirs-1909.patch 
b/media-libs/libyuv/files/0001-fix-install-dirs-1909.patch
new file mode 100644
index 000000000000..4c180ec4e740
--- /dev/null
+++ b/media-libs/libyuv/files/0001-fix-install-dirs-1909.patch
@@ -0,0 +1,39 @@
+From c89c2523d9215fbe684b8eb3500fab60c1a4bf50 Mon Sep 17 00:00:00 2001
+From: NRK <[email protected]>
+Date: Thu, 1 May 2025 06:58:03 +0000
+Subject: [PATCH] fix install dirs
+
+---
+ CMakeLists.txt | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7aa1549..11c9c3c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,6 +5,7 @@
+ cmake_minimum_required( VERSION 3.16 )
+ project ( YUV C CXX ) # "C" is required even for C++ projects
+ option( UNIT_TEST "Built unit tests" OFF )
++include(GNUInstallDirs)
+ 
+ include(CheckCSourceCompiles)
+ 
+@@ -246,10 +247,10 @@ endif()
+ 
+ 
+ # install the conversion tool, .so, .a, and all the header files
+-install ( TARGETS yuvconvert DESTINATION bin )
+-install ( TARGETS ${ly_lib_static}                                            
DESTINATION lib )
+-install ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME 
DESTINATION bin ARCHIVE DESTINATION lib )
+-install ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/            DESTINATION 
include )
++install ( TARGETS yuvconvert DESTINATION ${CMAKE_INSTALL_BINDIR} )
++install ( TARGETS ${ly_lib_static}                                            
DESTINATION ${CMAKE_INSTALL_LIBDIR} )
++install ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION 
${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION bin ARCHIVE DESTINATION 
${CMAKE_INSTALL_LIBDIR} )
++install ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/            DESTINATION 
${CMAKE_INSTALL_INCLUDEDIR} )
+ 
+ # create the .deb and .rpm packages using cpack
+ include ( CM_linux_packages.cmake )
+-- 
+2.48.1
+

diff --git a/media-libs/libyuv/libyuv-1909.ebuild 
b/media-libs/libyuv/libyuv-1909.ebuild
new file mode 100644
index 000000000000..bc9a5a4290d5
--- /dev/null
+++ b/media-libs/libyuv/libyuv-1909.ebuild
@@ -0,0 +1,61 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake edo
+
+DESCRIPTION="Open source project that includes YUV scaling and conversion 
functionality."
+HOMEPAGE="https://chromium.googlesource.com/libyuv/libyuv";
+
+if [[ ${PV} == "9999" ]] ; then
+       EGIT_REPO_URI="https://chromium.googlesource.com/libyuv/libyuv.git";
+       inherit git-r3
+else
+       # to diff against upstream (apparently not stable):
+       # 
https://chromium.googlesource.com/libyuv/libyuv.git/+archive/${commit}.tar.gz
+       
SRC_URI="https://github.com/N-R-K/stable-tarball-host/releases/download/0/libyuv-${PV}.tar.bz2";
+       KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~riscv ~x86"
+fi
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+# !<net-libs/pjproject-2.15.1-r1[libyuv]: bug 955077
+RDEPEND="
+       !<net-libs/pjproject-2.15.1-r1[libyuv]
+       >=media-libs/libjpeg-turbo-3.0.0:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="test? ( dev-cpp/gtest )"
+
+PATCHES=(
+       "${FILESDIR}/0001-fix-install-dirs-1909.patch"
+       "${FILESDIR}/0002-disable-static-library.patch"
+       "${FILESDIR}/0003-disable-test-tools.patch"
+)
+
+src_unpack() {
+       if [[ ${PV} == "9999" ]] ; then
+               git-r3_src_unpack
+       else
+               # S=${WORKDIR} is deprecated in cmake eclass
+               mkdir "${P}" || die
+               pushd "${P}" || die
+               unpack ${A}
+               popd || die
+       fi
+}
+
+src_configure() {
+       mycmakeargs=(
+               -DUNIT_TEST=$(usex test)
+       )
+       cmake_src_configure
+}
+
+src_test() {
+       edo "${BUILD_DIR}"/libyuv_unittest
+}

Reply via email to