summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO50
-rw-r--r--PKGBUILD85
-rw-r--r--ffmpeg-openjpeg2.2.patch95
3 files changed, 230 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e9942cf60cdd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,50 @@
+pkgbase = ffmpeg-compat-57
+ pkgdesc = Compatibility package for ffmpeg to provide versions 57 of libavcodec, libavdevice and libavformat, not anymore provided by the ffmpeg package
+ pkgver = 3.3.4
+ pkgrel = 2
+ url = http://ffmpeg.org/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = yasm
+ depends = bzip2
+ depends = fribidi
+ depends = glibc
+ depends = gmp
+ depends = gnutls
+ depends = gsm
+ depends = lame
+ depends = libmodplug
+ depends = libtheora
+ depends = libva
+ depends = libwebp
+ depends = opencore-amr
+ depends = openjpeg2
+ depends = opus
+ depends = schroedinger
+ depends = speex
+ depends = v4l-utils
+ depends = xz
+ depends = zlib
+ depends = libbluray.so>=2-64
+ depends = libvorbisenc.so>=2-64
+ depends = libvorbis.so>=0-64
+ depends = libvpx.so>=5-64
+ depends = libx264.so>=152-64
+ depends = libx265.so>=146-64
+ depends = libxvidcore.so>=4-64
+ depends = rtmpdump
+ provides = libavcodec.so=57
+ provides = libavdevice.so=57
+ provides = libavformat.so=57
+ provides = libavutils.so=55
+ source = http://ffmpeg.org/releases/ffmpeg-3.3.4.tar.xz
+ source = http://ffmpeg.org/releases/ffmpeg-3.3.4.tar.xz.asc
+ source = ffmpeg-openjpeg2.2.patch
+ validpgpkeys = FCF986EA15E6E293A5644F10B4322F04D67658D8
+ sha256sums = 98b97e1b908dfeb6aeb6d407e5a5eacdfc253a40c2d195f5867ed2d1d46ea957
+ sha256sums = SKIP
+ sha256sums = 490598f78d7879af8ef5b8d7f92ada83d0ee64f9609f6c7b989eb331c2539f68
+
+pkgname = ffmpeg-compat-57
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..52322a3bf22c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,85 @@
+# Maintainer: Muflone http://www.muflone.com/contacts/english/
+
+pkgname=ffmpeg-compat-57
+pkgver=3.3.4
+pkgrel=2
+pkgdesc="Compatibility package for ffmpeg to provide versions 57 of libavcodec, libavdevice and libavformat, not anymore provided by the ffmpeg package"
+arch=('i686' 'x86_64')
+url="http://ffmpeg.org/"
+license=('GPL')
+depends=('bzip2' 'fribidi' 'glibc' 'gmp' 'gnutls' 'gsm'
+ 'lame' 'libmodplug'
+ 'libtheora' 'libva'
+ 'libwebp' 'opencore-amr' 'openjpeg2' 'opus'
+ 'schroedinger' 'speex' 'v4l-utils' 'xz' 'zlib'
+ 'libbluray.so>=2-64'
+ 'libvorbisenc.so>=2-64' 'libvorbis.so>=0-64' 'libvpx.so>=5-64'
+ 'libx264.so>=152-64' 'libx265.so>=146-64' 'libxvidcore.so>=4-64'
+ 'rtmpdump')
+makedepends=('yasm')
+provides=('libavcodec.so=57' 'libavdevice.so=57' 'libavformat.so=57' 'libavutils.so=55')
+source=("http://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz"{,.asc}
+ "ffmpeg-openjpeg2.2.patch")
+sha256sums=('98b97e1b908dfeb6aeb6d407e5a5eacdfc253a40c2d195f5867ed2d1d46ea957'
+ 'SKIP'
+ '490598f78d7879af8ef5b8d7f92ada83d0ee64f9609f6c7b989eb331c2539f68')
+validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8')
+
+prepare() {
+ cd "ffmpeg-${pkgver}"
+ patch -Np1 -i ../ffmpeg-openjpeg2.2.patch
+}
+
+build() {
+ cd "ffmpeg-${pkgver}"
+ ./configure \
+ --prefix=/usr \
+ --incdir="/usr/include" \
+ --shlibdir="/usr/lib" \
+ --libdir="/usr/lib" \
+ --disable-debug \
+ --disable-static \
+ --disable-fontconfig \
+ --enable-gpl \
+ --enable-libass \
+ --enable-libbluray \
+ --enable-libfreetype \
+ --enable-libgsm \
+ --enable-libmodplug \
+ --enable-libmp3lame \
+ --enable-libopencore_amrnb \
+ --enable-libopencore_amrwb \
+ --enable-libopenjpeg \
+ --enable-libopus \
+ --enable-libpulse \
+ --enable-librtmp \
+ --enable-libschroedinger \
+ --enable-libspeex \
+ --enable-libtheora \
+ --enable-libv4l2 \
+ --enable-libvorbis \
+ --enable-libvpx \
+ --enable-libx264 \
+ --enable-libx265 \
+ --enable-libxvid \
+ --enable-runtime-cpudetect \
+ --enable-shared \
+ --enable-vdpau \
+ --enable-version3 \
+ --disable-doc \
+ --disable-programs \
+ --disable-avresample \
+ --disable-avfilter \
+ --disable-postproc \
+ --disable-swresample \
+ --disable-swscale
+ make
+}
+
+package() {
+ cd "ffmpeg-${pkgver}"
+ make DESTDIR="${pkgdir}" install-libs
+ cd "${pkgdir}/usr/lib"
+ rm -f *.so
+}
+
diff --git a/ffmpeg-openjpeg2.2.patch b/ffmpeg-openjpeg2.2.patch
new file mode 100644
index 000000000000..d23c91453dc3
--- /dev/null
+++ b/ffmpeg-openjpeg2.2.patch
@@ -0,0 +1,95 @@
+diff -rupN ffmpeg-3.3.3.orig/configure ffmpeg-3.3.3/configure
+--- ffmpeg-3.3.3.orig/configure 2017-07-29 19:49:29.000000000 +0200
++++ ffmpeg-3.3.3/configure 2017-08-15 13:21:28.782566614 +0200
+@@ -1875,6 +1875,7 @@ HEADERS_LIST="
+ machine_ioctl_meteor_h
+ malloc_h
+ opencv2_core_core_c_h
++ openjpeg_2_2_openjpeg_h
+ openjpeg_2_1_openjpeg_h
+ openjpeg_2_0_openjpeg_h
+ openjpeg_1_5_openjpeg_h
+@@ -5805,7 +5806,9 @@ enabled libopencv && { check_hea
+ require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
+ require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader; }
+ enabled libopenh264 && require_pkg_config openh264 wels/codec_api.h WelsGetCodecVersion
+-enabled libopenjpeg && { { check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
++enabled libopenjpeg && { { check_lib openjpeg-2.2/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
++ check_lib openjpeg-2.2/openjpeg.h opj_version -lopenjp2 ||
++ { check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+ check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 ||
+ { check_lib openjpeg-2.0/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+ { check_lib openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
+diff -rupN ffmpeg-3.3.3.orig/libavcodec/libopenjpegdec.c ffmpeg-3.3.3/libavcodec/libopenjpegdec.c
+--- ffmpeg-3.3.3.orig/libavcodec/libopenjpegdec.c 2017-07-29 19:49:30.000000000 +0200
++++ ffmpeg-3.3.3/libavcodec/libopenjpegdec.c 2017-08-15 13:21:28.869233484 +0200
+@@ -34,7 +34,9 @@
+ #include "internal.h"
+ #include "thread.h"
+
+-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_2_OPENJPEG_H
++# include <openjpeg-2.2/openjpeg.h>
++#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
+ # include <openjpeg-2.1/openjpeg.h>
+ #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
+ # include <openjpeg-2.0/openjpeg.h>
+@@ -44,7 +46,7 @@
+ # include <openjpeg.h>
+ #endif
+
+-#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
++#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+ # define OPENJPEG_MAJOR_VERSION 2
+ # define OPJ(x) OPJ_##x
+ #else
+@@ -429,7 +431,7 @@ static int libopenjpeg_decode_frame(AVCo
+ opj_stream_set_read_function(stream, stream_read);
+ opj_stream_set_skip_function(stream, stream_skip);
+ opj_stream_set_seek_function(stream, stream_seek);
+-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
+ opj_stream_set_user_data(stream, &reader, NULL);
+ #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
+ opj_stream_set_user_data(stream, &reader);
+diff -rupN ffmpeg-3.3.3.orig/libavcodec/libopenjpegenc.c ffmpeg-3.3.3/libavcodec/libopenjpegenc.c
+--- ffmpeg-3.3.3.orig/libavcodec/libopenjpegenc.c 2017-07-29 19:49:30.000000000 +0200
++++ ffmpeg-3.3.3/libavcodec/libopenjpegenc.c 2017-08-15 13:21:28.869233484 +0200
+@@ -32,7 +32,9 @@
+ #include "avcodec.h"
+ #include "internal.h"
+
+-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_2_OPENJPEG_H
++# include <openjpeg-2.2/openjpeg.h>
++#elif HAVE_OPENJPEG_2_1_OPENJPEG_H
+ # include <openjpeg-2.1/openjpeg.h>
+ #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
+ # include <openjpeg-2.0/openjpeg.h>
+@@ -42,7 +44,7 @@
+ # include <openjpeg.h>
+ #endif
+
+-#if HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
++#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H || HAVE_OPENJPEG_2_0_OPENJPEG_H
+ # define OPENJPEG_MAJOR_VERSION 2
+ # define OPJ(x) OPJ_##x
+ #else
+@@ -305,7 +307,7 @@ static av_cold int libopenjpeg_encode_in
+
+ opj_set_default_encoder_parameters(&ctx->enc_params);
+
+-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
+ switch (ctx->cinema_mode) {
+ case OPJ_CINEMA2K_24:
+ ctx->enc_params.rsiz = OPJ_PROFILE_CINEMA_2K;
+@@ -769,7 +771,7 @@ static int libopenjpeg_encode_frame(AVCo
+ opj_stream_set_write_function(stream, stream_write);
+ opj_stream_set_skip_function(stream, stream_skip);
+ opj_stream_set_seek_function(stream, stream_seek);
+-#if HAVE_OPENJPEG_2_1_OPENJPEG_H
++#if HAVE_OPENJPEG_2_2_OPENJPEG_H || HAVE_OPENJPEG_2_1_OPENJPEG_H
+ opj_stream_set_user_data(stream, &writer, NULL);
+ #elif HAVE_OPENJPEG_2_0_OPENJPEG_H
+ opj_stream_set_user_data(stream, &writer);