summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Suchan2024-02-29 16:34:38 +0000
committerRoland Suchan2024-02-29 16:34:38 +0000
commit319f6cec233d67c0c7a20b14eb94884eafb4c2e7 (patch)
tree013be883855ddd78e0a36fed5d1bec704d9dfbee
downloadaur-319f6cec233d67c0c7a20b14eb94884eafb4c2e7.tar.gz
version 2.1-1
-rw-r--r--.SRCINFO16
-rw-r--r--0024-fix-gcc13-binutils.patch59
-rw-r--r--PKGBUILD69
3 files changed, 144 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1a4eb42fa8e1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+# Generated by mksrcinfo v8
+# Sun Mar 9 15:34:00 UTC 2020
+pkgbase = ffmpeg2.1
+ pkgdesc = complete solution to record, convert and stream audio and video
+ pkgver = 2.1
+ pkgrel = 1
+ url = https://ffmpeg.org/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ source = https://ffmpeg.org/releases/ffmpeg-2.1.tar.gz
+ source = 0024-fix-gcc13-binutils.patch
+ md5sums = 6dc14b2521eb956b2d3799717d6b0ed1
+
+pkgname = ffmpeg2.1
+
diff --git a/0024-fix-gcc13-binutils.patch b/0024-fix-gcc13-binutils.patch
new file mode 100644
index 000000000000..fd2fcd5792a2
--- /dev/null
+++ b/0024-fix-gcc13-binutils.patch
@@ -0,0 +1,59 @@
+diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
+index 6298f5e..ca7e2df 100644
+--- a/libavcodec/x86/mathops.h
++++ b/libavcodec/x86/mathops.h
+@@ -35,12 +35,20 @@
+ static av_always_inline av_const int MULL(int a, int b, unsigned shift)
+ {
+ int rt, dummy;
++ if (__builtin_constant_p(shift))
+ __asm__ (
+ "imull %3 \n\t"
+ "shrdl %4, %%edx, %%eax \n\t"
+ :"=a"(rt), "=d"(dummy)
+- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
++ :"a"(a), "rm"(b), "i"(shift & 0x1F)
+ );
++ else
++ __asm__ (
++ "imull %3 \n\t"
++ "shrdl %4, %%edx, %%eax \n\t"
++ :"=a"(rt), "=d"(dummy)
++ :"a"(a), "rm"(b), "c"((uint8_t)shift)
++ );
+ return rt;
+ }
+
+@@ -113,19 +121,31 @@ __asm__ volatile(\
+ // avoid +32 for shift optimization (gcc should do that ...)
+ #define NEG_SSR32 NEG_SSR32
+ static inline int32_t NEG_SSR32( int32_t a, int8_t s){
++ if (__builtin_constant_p(s))
+ __asm__ ("sarl %1, %0\n\t"
+ : "+r" (a)
+- : "ic" ((uint8_t)(-s))
++ : "i" (-s & 0x1F)
+ );
++ else
++ __asm__ ("sarl %1, %0\n\t"
++ : "+r" (a)
++ : "c" ((uint8_t)(-s))
++ );
+ return a;
+ }
+
+ #define NEG_USR32 NEG_USR32
+ static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
++ if (__builtin_constant_p(s))
+ __asm__ ("shrl %1, %0\n\t"
+ : "+r" (a)
+- : "ic" ((uint8_t)(-s))
++ : "i" (-s & 0x1F)
+ );
++ else
++ __asm__ ("shrl %1, %0\n\t"
++ : "+r" (a)
++ : "c" ((uint8_t)(-s))
++ );
+ return a;
+ }
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a87fc1bfdc82
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,69 @@
+# Maintainer: Roland Suchan <snrd at arcor dot de>
+
+pkgname=ffmpeg2.1
+pkgver=2.1
+pkgrel=1
+pkgdesc='Complete solution to record, convert and stream audio and video'
+arch=('i586' 'x86_64')
+url='https://ffmpeg.org/'
+license=('GPL2')
+depends=(
+ #x264_152
+)
+provides=(
+
+)
+makedepends=(
+
+)
+options=('staticlibs')
+source=("https://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.gz"
+ '0024-fix-gcc13-binutils.patch'
+ )
+md5sums=('6dc14b2521eb956b2d3799717d6b0ed1'
+ 'aaace471c8fde060fa8bd3ef29bd88d4'
+ )
+
+options=('debug' '!lto')
+
+prepare() {
+ patch -d ffmpeg-2.1 -p1 -i "${srcdir}/0024-fix-gcc13-binutils.patch"
+}
+
+
+build() {
+ cd ffmpeg-${pkgver}/libswresample/x86/
+ sed -i 's@DECLARE_ALIGNED@DECLARE_ASM_CONST@g' resample_mmx.h
+
+ cd ../../../ffmpeg-${pkgver}
+ sed -i 's@-Werror@@g' configure
+
+ ./configure \
+ --prefix=/opt \
+ --libdir=/opt/lib/ffmpeg2.1 \
+ --incdir=/opt/include/ffmpeg2.1 \
+ --shlibdir=/opt/lib/ffmpeg2.1 \
+ --bindir=/opt/bin \
+ --enable-gpl \
+ --enable-static \
+ --enable-shared \
+ --disable-yasm \
+ --disable-doc \
+ --extra-ldflags=-L/opt/lib \
+ --extra-cflags=-I/opt/include
+ #--enable-libx264
+
+ make clean
+ make "-j$(nproc)" || return 1
+}
+
+package() {
+ cd ffmpeg-${pkgver}
+
+ make DESTDIR="$pkgdir" install
+ rm -rf "$pkgdir"/opt/bin/ffprobe
+ rm -rf "$pkgdir"/opt/share/ffmpeg
+
+ find "${pkgdir}"/opt/bin -type f -exec mv {} {}2.1 \;
+}
+