* [gentoo-commits] repo/gentoo:master commit in: media-libs/libyuv/files/, media-libs/libyuv/
@ 2025-03-19 3:03 Yixun Lan
0 siblings, 0 replies; 2+ messages in thread
From: Yixun Lan @ 2025-03-19 3:03 UTC (permalink / raw
To: gentoo-commits
commit: d04db36e81fca13db1b2c3fb8575ad589be1a5a4
Author: NRK <nrk <AT> disroot <DOT> org>
AuthorDate: Fri Mar 7 15:19:01 2025 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Mar 19 02:55:18 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d04db36e
media-libs/libyuv: add new package
used by libavif and imlib2
Signed-off-by: NRK <nrk <AT> disroot.org>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
media-libs/libyuv/Manifest | 1 +
.../libyuv/files/0001-fix-install-dirs.patch | 42 +++++++++++++++
.../libyuv/files/0002-disable-static-library.patch | 61 ++++++++++++++++++++++
.../libyuv/files/0003-disable-test-tools.patch | 43 +++++++++++++++
media-libs/libyuv/libyuv-1904.ebuild | 42 +++++++++++++++
media-libs/libyuv/libyuv-9999.ebuild | 42 +++++++++++++++
media-libs/libyuv/metadata.xml | 12 +++++
7 files changed, 243 insertions(+)
diff --git a/media-libs/libyuv/Manifest b/media-libs/libyuv/Manifest
new file mode 100644
index 000000000000..f0f9e272937b
--- /dev/null
+++ b/media-libs/libyuv/Manifest
@@ -0,0 +1 @@
+DIST libyuv-1904.tar.bz2 462619 BLAKE2B 088da4134a89822202fb38e87295f968936d9cb6fcc4701843f8bf1086ad2422ed26d371623d3eeca01c4ed22bdd5f9c61db5e96f8060e4b99f09771f3d1d65c SHA512 c24f4ce10a7cfa05d6d7f13b004c4721ec92d53a2535fec100683da6a660b2fca7f90d9c2905f9e05b85d6e6473043d209d0ce2519b39af21cfbb1260054d172
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>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/libyuv/files/, media-libs/libyuv/
@ 2025-05-11 0:35 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-05-11 0:35 UTC (permalink / raw
To: gentoo-commits
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 <nrk@disroot.org>
+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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-11 0:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-11 0:35 [gentoo-commits] repo/gentoo:master commit in: media-libs/libyuv/files/, media-libs/libyuv/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2025-03-19 3:03 Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox