summaryrefslogtreecommitdiff
path: root/media-libs/libyuv
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libyuv')
-rw-r--r--media-libs/libyuv/Manifest7
-rw-r--r--media-libs/libyuv/files/0001-fix-install-dirs.patch42
-rw-r--r--media-libs/libyuv/files/0002-disable-static-library.patch61
-rw-r--r--media-libs/libyuv/files/0003-disable-test-tools.patch43
-rw-r--r--media-libs/libyuv/libyuv-1904.ebuild42
-rw-r--r--media-libs/libyuv/libyuv-9999.ebuild42
-rw-r--r--media-libs/libyuv/metadata.xml12
7 files changed, 249 insertions, 0 deletions
diff --git a/media-libs/libyuv/Manifest b/media-libs/libyuv/Manifest
new file mode 100644
index 000000000000..9778173142dd
--- /dev/null
+++ b/media-libs/libyuv/Manifest
@@ -0,0 +1,7 @@
+AUX 0001-fix-install-dirs.patch 1612 BLAKE2B be05b32216c43a6640d2657b258a465265eb209815f527a16a375461a0306e55477b2f8cdb0bbe843411c8f7141e9b51409718eb5a11daae0a3cb93d882c422a SHA512 d4a7e87bb844eb3d97b490233ca2e4874744fb12d4fde211f05ce45ba3fdb4fab603a66f2a1df28c6213c5d7d92d28ecdde788171846fdfa0fbe604e0228c2ad
+AUX 0002-disable-static-library.patch 2267 BLAKE2B 0ab47e0e2795aba0eef1d002e4fffb76132c7e14b4ab6afca556e49e896663096f02fac342c14473dbecd30282208517ca96cd7bdf7ac15d95ba45139cdb5628 SHA512 d706337bc5569785f00dbbbd714c89f8342ddcd9af47806b29e067a6a8ee810186bb4b802bdbfae1e80a4323bf0a24ab344bfa872ed8aa66017f347c29a4ee99
+AUX 0003-disable-test-tools.patch 1470 BLAKE2B 4008cec8ae52a0fd43f5f44ec35cfac94eb963388cd12a3bc08bb04bf72484a142e9b2f337298e7aea93d59bbf427adb17f55e45dbdfea94b6a8fc5c1bed0244 SHA512 d31bb7a4919835aaf3bc208de0f37ee79d6499827ba3ac25edc3c561b5c58b032056df71fe504851b1919c6c00c5fb8590e39cb0c0bbab85408b374c5d8f14a6
+DIST libyuv-1904.tar.bz2 462619 BLAKE2B 088da4134a89822202fb38e87295f968936d9cb6fcc4701843f8bf1086ad2422ed26d371623d3eeca01c4ed22bdd5f9c61db5e96f8060e4b99f09771f3d1d65c SHA512 c24f4ce10a7cfa05d6d7f13b004c4721ec92d53a2535fec100683da6a660b2fca7f90d9c2905f9e05b85d6e6473043d209d0ce2519b39af21cfbb1260054d172
+EBUILD libyuv-1904.ebuild 1111 BLAKE2B 43129cf22d3d46289f0ea506fb92d560c07cb64d7bc63e97f23e7931ddaf4afa9a78f2dfe373ac1b4f317acddde6ff80d5f8f97c7f28b1a309772a45d841cc1d SHA512 5dea668212c2a5e166b8674f5d2245ad989255f92b55d211f810a6a3d7dbe846c2ebdf3376ca2e42b0d52976ff6d2789e78d2cb6767e0c2161f4c69a21728773
+EBUILD libyuv-9999.ebuild 1111 BLAKE2B 43129cf22d3d46289f0ea506fb92d560c07cb64d7bc63e97f23e7931ddaf4afa9a78f2dfe373ac1b4f317acddde6ff80d5f8f97c7f28b1a309772a45d841cc1d SHA512 5dea668212c2a5e166b8674f5d2245ad989255f92b55d211f810a6a3d7dbe846c2ebdf3376ca2e42b0d52976ff6d2789e78d2cb6767e0c2161f4c69a21728773
+MISC metadata.xml 382 BLAKE2B c310a5203e455240f249774f9a007c4dd48ecf6bea43e6292af08e32650303aa30cf444f446bc7711a1192aaad5f3002d2c6253df59110c0a2069af02c361bbc SHA512 860e2a87de6fc027142ce9f72caa445114b6853d3e293466775b298e792f20ccf340091a78bdf4a077d0f1a02d6a3f31e56d4c7bd7ac57e54c6a8176ca90bde0
diff --git a/media-libs/libyuv/files/0001-fix-install-dirs.patch b/media-libs/libyuv/files/0001-fix-install-dirs.patch
new file mode 100644
index 000000000000..e0419b1c5030
--- /dev/null
+++ b/media-libs/libyuv/files/0001-fix-install-dirs.patch
@@ -0,0 +1,42 @@
+From 7cbd908e3e4f63615c6d1da655eee6968526a229 Mon Sep 17 00:00:00 2001
+From: NRK <nrk@disroot.org>
+Date: Fri, 7 Mar 2025 21:06:23 +0000
+Subject: [PATCH 1/3] fix install dirs
+
+---
+ CMakeLists.txt | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5df7685..8c064a7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,8 +5,9 @@
+ include(CheckCSourceCompiles)
+
+ project ( YUV C CXX ) # "C" is required even for C++ projects
+-cmake_minimum_required( VERSION 2.8.12 )
++cmake_minimum_required( VERSION 3.2 )
+ option( UNIT_TEST "Built unit tests" OFF )
++include(GNUInstallDirs)
+
+ set ( ly_base_dir ${PROJECT_SOURCE_DIR} )
+ set ( ly_src_dir ${ly_base_dir}/source )
+@@ -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/files/0002-disable-static-library.patch b/media-libs/libyuv/files/0002-disable-static-library.patch
new file mode 100644
index 000000000000..427e463c52ea
--- /dev/null
+++ b/media-libs/libyuv/files/0002-disable-static-library.patch
@@ -0,0 +1,61 @@
+From f69772741e89fca8d3b98629bc79469e2d55864c Mon Sep 17 00:00:00 2001
+From: NRK <nrk@disroot.org>
+Date: Fri, 7 Mar 2025 21:06:56 +0000
+Subject: [PATCH 2/3] disable static library
+
+---
+ CMakeLists.txt | 11 +++--------
+ 1 file changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8c064a7..d21c6cb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -14,7 +14,6 @@ set ( ly_src_dir ${ly_base_dir}/source )
+ set ( ly_inc_dir ${ly_base_dir}/include )
+ set ( ly_tst_dir ${ly_base_dir}/unit_test )
+ set ( ly_lib_name yuv )
+-set ( ly_lib_static ${ly_lib_name} )
+ set ( ly_lib_shared ${ly_lib_name}_shared )
+
+ # We cannot use GLOB here since we want to be able to separate out files that
+@@ -174,9 +173,6 @@ if(LOONGARCH64)
+ endif()
+ endif()
+
+-# this creates the static library (.a)
+-add_library( ${ly_lib_static} STATIC ${ly_lib_parts})
+-
+ # this creates the shared library (.so)
+ add_library( ${ly_lib_shared} SHARED ${ly_lib_parts})
+ set_target_properties( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" )
+@@ -187,15 +183,15 @@ endif()
+
+ # this creates the cpuid tool
+ add_executable ( cpuid ${ly_base_dir}/util/cpuid.c )
+-target_link_libraries ( cpuid ${ly_lib_static} )
++target_link_libraries ( cpuid ${ly_lib_shared} )
+
+ # this creates the conversion tool
+ add_executable ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
+-target_link_libraries ( yuvconvert ${ly_lib_static} )
++target_link_libraries ( yuvconvert ${ly_lib_shared} )
+
+ # this creates the yuvconstants tool
+ add_executable ( yuvconstants ${ly_base_dir}/util/yuvconstants.c )
+-target_link_libraries ( yuvconstants ${ly_lib_static} )
++target_link_libraries ( yuvconstants ${ly_lib_shared} )
+
+ find_package ( JPEG )
+ if (JPEG_FOUND)
+@@ -248,7 +244,6 @@ endif()
+
+ # install the conversion tool, .so, .a, and all the header files
+ 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} )
+
+--
+2.48.1
+
diff --git a/media-libs/libyuv/files/0003-disable-test-tools.patch b/media-libs/libyuv/files/0003-disable-test-tools.patch
new file mode 100644
index 000000000000..d22860be8224
--- /dev/null
+++ b/media-libs/libyuv/files/0003-disable-test-tools.patch
@@ -0,0 +1,43 @@
+From c84dbf12267cf873b4d1ab2f49ad627d05cc45ff Mon Sep 17 00:00:00 2001
+From: NRK <nrk@disroot.org>
+Date: Fri, 7 Mar 2025 21:07:20 +0000
+Subject: [PATCH 3/3] disable test tools
+
+---
+ CMakeLists.txt | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d21c6cb..b2fa08a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -181,18 +181,6 @@ if(WIN32)
+ set_target_properties( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" )
+ endif()
+
+-# this creates the cpuid tool
+-add_executable ( cpuid ${ly_base_dir}/util/cpuid.c )
+-target_link_libraries ( cpuid ${ly_lib_shared} )
+-
+-# this creates the conversion tool
+-add_executable ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
+-target_link_libraries ( yuvconvert ${ly_lib_shared} )
+-
+-# this creates the yuvconstants tool
+-add_executable ( yuvconstants ${ly_base_dir}/util/yuvconstants.c )
+-target_link_libraries ( yuvconstants ${ly_lib_shared} )
+-
+ find_package ( JPEG )
+ if (JPEG_FOUND)
+ include_directories( ${JPEG_INCLUDE_DIR} )
+@@ -243,7 +231,6 @@ endif()
+
+
+ # install the conversion tool, .so, .a, and all the header files
+-install ( TARGETS yuvconvert DESTINATION ${CMAKE_INSTALL_BINDIR} )
+ 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} )
+
+--
+2.48.1
+
diff --git a/media-libs/libyuv/libyuv-1904.ebuild b/media-libs/libyuv/libyuv-1904.ebuild
new file mode 100644
index 000000000000..b4210853ab36
--- /dev/null
+++ b/media-libs/libyuv/libyuv-1904.ebuild
@@ -0,0 +1,42 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+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
+ MYTAG="0.0.1904.20250204"
+ SRC_URI="https://salsa.debian.org/debian/libyuv/-/archive/upstream/${MYTAG}/libyuv-upstream-${MYTAG}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/libyuv-upstream-${MYTAG}"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+# TODO(NRK): enable tests
+RESTRICT="test"
+
+RDEPEND=">=media-libs/libjpeg-turbo-3.0.0"
+BDEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/0001-fix-install-dirs.patch"
+ "${FILESDIR}/0002-disable-static-library.patch"
+ "${FILESDIR}/0003-disable-test-tools.patch"
+)
+
+src_configure() {
+ mycmakeargs=(
+ -DUNIT_TEST=OFF
+ )
+ cmake_src_configure
+}
diff --git a/media-libs/libyuv/libyuv-9999.ebuild b/media-libs/libyuv/libyuv-9999.ebuild
new file mode 100644
index 000000000000..b4210853ab36
--- /dev/null
+++ b/media-libs/libyuv/libyuv-9999.ebuild
@@ -0,0 +1,42 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+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
+ MYTAG="0.0.1904.20250204"
+ SRC_URI="https://salsa.debian.org/debian/libyuv/-/archive/upstream/${MYTAG}/libyuv-upstream-${MYTAG}.tar.bz2 -> ${P}.tar.bz2"
+ S="${WORKDIR}/libyuv-upstream-${MYTAG}"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+# TODO(NRK): enable tests
+RESTRICT="test"
+
+RDEPEND=">=media-libs/libjpeg-turbo-3.0.0"
+BDEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/0001-fix-install-dirs.patch"
+ "${FILESDIR}/0002-disable-static-library.patch"
+ "${FILESDIR}/0003-disable-test-tools.patch"
+)
+
+src_configure() {
+ mycmakeargs=(
+ -DUNIT_TEST=OFF
+ )
+ cmake_src_configure
+}
diff --git a/media-libs/libyuv/metadata.xml b/media-libs/libyuv/metadata.xml
new file mode 100644
index 000000000000..e11cf2251bd6
--- /dev/null
+++ b/media-libs/libyuv/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>nrk@disroot.org</email>
+ <name>NRK</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>