diff --git a/.gitignore b/.gitignore index df632f4..d6b1a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1 @@ -x264-0.144-20150225-c8a773e.tar.bz2 -x264-0.148-20160118-5c65704.tar.bz2 -/x264-0.148-20160614-a5e06b9.tar.bz2 -/x264-0.148-20160924-86b7198.tar.bz2 -/x264-0.148-20161201-4d5c8b0.tar.bz2 -/x264-0.148-20170121-97eaef2.tar.bz2 -/x264-0.148-20170519-d32d7bf.tar.bz2 -/x264-0.148-20170521-aaa9aa8.tar.bz2 -/x264-0.152-20171224-e9a5903.tar.bz2 -/x264-0.155-20180806-0a84d98.tar.bz2 -/x264-0.157-20190303-72db437.tar.bz2 -/x264-0.157-20190717-34c06d1.tar.bz2 -/x264-0.159-20191127git1771b55.tar.bz2 -/x264-0.159-20200409git296494a.tar.bz2 -/x264-0.160-20200702gitcde9a93.tar.bz2 -/x264-0.161-20200912gitd198931.tar.bz2 -/x264-0.161-20210124git544c61f.tar.bz2 -/x264-0.161-20210412git55d517b.tar.bz2 -/x264-0.163-20210613git5db6aa6.tar.bz2 +SOURCES/x264-0.164-20231001git31e19f92.tar.bz2 diff --git a/.x264.metadata b/.x264.metadata new file mode 100644 index 0000000..2df4394 --- /dev/null +++ b/.x264.metadata @@ -0,0 +1 @@ +864d5c233ee78ba507de47d68c2a5e396855934e SOURCES/x264-0.164-20231001git31e19f92.tar.bz2 diff --git a/SOURCES/version.h b/SOURCES/version.h new file mode 100644 index 0000000..fb2120e --- /dev/null +++ b/SOURCES/version.h @@ -0,0 +1,4 @@ +#define X264_REV 3108 +#define X264_REV_DIFF 0 +#define X264_VERSION " r3108 31e19f9" +#define X264_POINTVER "0.164.3108 31e19f9" diff --git a/x264-10b.patch b/SOURCES/x264-10b.patch similarity index 100% rename from x264-10b.patch rename to SOURCES/x264-10b.patch diff --git a/SOURCES/x264-altivec-incompatible-pointer-type.patch b/SOURCES/x264-altivec-incompatible-pointer-type.patch new file mode 100644 index 0000000..949e2aa --- /dev/null +++ b/SOURCES/x264-altivec-incompatible-pointer-type.patch @@ -0,0 +1,21 @@ +diff -up generic/common/ppc/pixel.c.orig generic/common/ppc/pixel.c +--- generic/common/ppc/pixel.c.orig 2023-10-01 16:28:26.000000000 +0200 ++++ generic/common/ppc/pixel.c 2024-03-10 22:23:23.415298686 +0100 +@@ -855,7 +855,7 @@ static void pixel_sad_x4_16x8_altivec( u + sum2v = (vec_s32_t) vec_sum4s( vec_absd( fencv, pix2v ), (vec_u32_t) sum2v ); + + #define PIXEL_SAD_X3_ALTIVEC( name, ly ) \ +-static int name( uint8_t *fenc, uint8_t *pix0, \ ++static void name( uint8_t *fenc, uint8_t *pix0, \ + uint8_t *pix1, uint8_t *pix2, \ + intptr_t i_stride, int scores[3] ) \ + { \ +@@ -965,7 +965,7 @@ static void pixel_sad_x3_16x8_altivec( u + } + + #define PIXEL_SAD_X4_ALTIVEC( name, ly ) \ +-static int name( uint8_t *fenc, \ ++static void name( uint8_t *fenc, \ + uint8_t *pix0, uint8_t *pix1, \ + uint8_t *pix2, uint8_t *pix3, \ + intptr_t i_stride, int scores[4] ) \ diff --git a/x264-nover.patch b/SOURCES/x264-nover.patch similarity index 100% rename from x264-nover.patch rename to SOURCES/x264-nover.patch diff --git a/x264-opencl.patch b/SOURCES/x264-opencl.patch similarity index 100% rename from x264-opencl.patch rename to SOURCES/x264-opencl.patch diff --git a/SOURCES/x264-snapshot.sh b/SOURCES/x264-snapshot.sh new file mode 100755 index 0000000..883255a --- /dev/null +++ b/SOURCES/x264-snapshot.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +set -e + +tmp=$(mktemp -d) + +trap cleanup EXIT +cleanup() { + set +e + [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp" +} + +unset CDPATH +pwd=$(pwd) +package=x264 +branch=stable +commit=HEAD + +pushd "$tmp" +git clone https://code.videolan.org/videolan/x264.git -b ${branch} + +cd ${package} +tag=$(git rev-list HEAD -n 1 | cut -c 1-8) +git checkout ${commit} +./version.sh > "$pwd"/version.h +API="$(grep '#define X264_BUILD' < x264.h | sed 's/^.* \([1-9][0-9]*\).*$/\1/')" +date=$(git log -1 --format=%cd --date=short | tr -d \-) +git archive --prefix="${package}-0.$API-${date}git${tag}/" --format=tar ${branch} | bzip2 > "$pwd"/${package}-0.$API-${date}git${tag}.tar.bz2 +popd >/dev/null + +echo \# globals for x264-0.$API-${date}git${tag}.tar.bz2 +echo %global api $API +echo %global gitdate ${date} +echo %global gitversion ${tag} +echo +echo rpmdev-bumpspec -c \"Update to x264-0.$API-${date}git${tag} \(stable branch\)\" x264.spec +echo rfpkg scratch-build --srpm --arches x86_64 +echo rfpkg new-sources x264-0.$API-${date}git${tag}.tar.bz2 +echo rfpkg ci -c + diff --git a/x264.spec b/SPECS/x264.spec similarity index 90% rename from x264.spec rename to SPECS/x264.spec index 1d8b5d9..fe06ab4 100644 --- a/x264.spec +++ b/SPECS/x264.spec @@ -1,7 +1,7 @@ -# globals for x264-0.163-20210613git5db6aa6.tar.bz2 -%global api 163 -%global gitdate 20210613 -%global gitversion 5db6aa6 +# globals for x264-0.164-20231001git31e19f92.tar.bz2 +%global api 164 +%global gitdate 20231001 +%global gitversion 31e19f92 %global snapshot %{gitdate}git%{gitversion} %global gver .%{gitdate}git%{gitversion} @@ -33,16 +33,19 @@ Summary: H264/AVC video streams encoder Name: x264 Version: 0.%{api} -Release: 6%{?gver}%{?_with_bootstrap:_bootstrap}%{?dist} +Release: 15%{?gver}%{?_with_bootstrap:_bootstrap}%{?dist} License: GPLv2+ URL: https://www.videolan.org/developers/x264.html Source0: %{name}-0.%{api}-%{snapshot}.tar.bz2 Source1: x264-snapshot.sh +Source2: version.h # don't remove config.h and don't re-run version.sh Patch0: x264-nover.patch # add 10b suffix to high bit depth build Patch1: x264-10b.patch +# fix assignment from incompatible pointer type errors +Patch2: x264-altivec-incompatible-pointer-type.patch Patch11: x264-opencl.patch BuildRequires: gcc @@ -56,8 +59,10 @@ BuildRequires: execstack %ifarch %{asmarch} BuildRequires: nasm %endif +BuildRequires: pkgconfig(bash-completion) # we need to enforce the exact EVR for an ISA - not only the same ABI Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: ffmpeg-libs%{?_isa} %description x264 is a free library for encoding H264/AVC video streams, written from @@ -103,9 +108,11 @@ This package contains the development files. %prep %setup -q -c -n %{name}-0.%{api}-%{snapshot} pushd %{name}-0.%{api}-%{snapshot} -%patch0 -p1 -b .nover -%patch1 -p1 -b .10b -%patch11 -p1 -b .opencl +cp %{SOURCE2} . +%patch -P0 -p1 -b .nover +%patch -P1 -p1 -b .10b +%patch -P2 -p1 -b .ptr +%patch -P11 -p1 -b .opencl popd for variant in generic generic10 ; do @@ -158,6 +165,9 @@ install -pm644 generic/{AUTHORS,COPYING} %{buildroot}%{_pkgdocdir}/ %files %{_bindir}/x264 +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/x264 %files libs %dir %{_pkgdocdir} @@ -175,6 +185,56 @@ install -pm644 generic/{AUTHORS,COPYING} %{buildroot}%{_pkgdocdir}/ %{_libdir}/pkgconfig/%{name}.pc %changelog +* Wed Dec 25 2024 Arkady L. Shane - 0.164-15.20231001git31e19f92 +- Rebuilt for MSVSphere 10 + +* Tue Oct 08 2024 Nicolas Chauvet - 0.164-15.20231001git31e19f92 +- Rebuilt + +* Fri Aug 02 2024 RPM Fusion Release Engineering - 0.164-14.20231001git31e19f92 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sun Mar 10 2024 Dominik Mierzejewski - 0.164-13.20231001git31e19f92 +- Fix "assignment from incompatible pointer type" errors on ppc64le +- Use correct build dependency on bash-completion + +* Sun Feb 04 2024 RPM Fusion Release Engineering - 0.164-12.20231001git31e19f92 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Nov 12 2023 Leigh Scott - 0.164-11.20231001git31e19f92 +- Rebuild for new ffmpeg version + +* Sun Oct 01 2023 Sérgio Basto - 0.164-10.20231001git31e19f92 +- Update to x264-0.164-20231001git31e19f92 (stable branch) + +* Wed Sep 27 2023 Sérgio Basto - 0.164-9.20220602gitbaee400f +- [Bug 6769] Include bash completion definitions for x264 + +* Wed Aug 02 2023 RPM Fusion Release Engineering - 0.164-8.20220602gitbaee400f +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Mar 13 2023 Leigh Scott - 0.164-7.20220602gitbaee400f +- Rebuild for gpac + +* Tue Feb 28 2023 Sérgio Basto - 0.164-6.20220602gitbaee400f +- Disable build with gpac until we can build gapc with ffmepg-6 + +* Tue Feb 28 2023 Leigh Scott - 0.164-5.20220602gitbaee400f +- Rebuilt for new ffmpeg + +* Sun Feb 19 2023 Leigh Scott - 0.164-4.20220602gitbaee400f +- rebuilt + +* Sun Sep 04 2022 Leigh Scott - 0.164-3.20220602gitbaee400f +- Add requires ffmpeg-libs + +* Mon Aug 08 2022 RPM Fusion Release Engineering - 0.164-2.20220602gitbaee400f +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg + 5.1 + +* Mon Jun 06 2022 Sérgio Basto - 0.164-1.20220602gitbaee400f +- Update to x264-0.164-20220602gitbaee400f (stable branch) + * Sat Mar 05 2022 Sérgio Basto - 0.163-6.20210613git5db6aa6 - Rebuild for new gpac on F36 diff --git a/sources b/sources deleted file mode 100644 index 7c2a0ab..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (x264-0.163-20210613git5db6aa6.tar.bz2) = 6707b99df2d7232083b3fe4c24d67b42a53c5a0bc7ee739cdc48e6a6442c720d408514ce34d321bb1bbf82b0372e01a878116846665561e59d648ee8ca545733