summaryrefslogtreecommitdiffstats
path: root/source/ap
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap')
-rwxr-xr-xsource/ap/diffstat/diffstat.SlackBuild2
-rw-r--r--source/ap/moc/0005-avcodec-include.patch25
-rw-r--r--source/ap/moc/0006-uncast-warnings.patch44
-rw-r--r--source/ap/moc/0007-cur-dts.patch39
-rw-r--r--source/ap/moc/moc-ffmpeg4.patch33
-rwxr-xr-xsource/ap/moc/moc.SlackBuild15
-rwxr-xr-xsource/ap/moc/svn-checkout.sh14
7 files changed, 135 insertions, 37 deletions
diff --git a/source/ap/diffstat/diffstat.SlackBuild b/source/ap/diffstat/diffstat.SlackBuild
index 0b27a6c05..fa5c4428e 100755
--- a/source/ap/diffstat/diffstat.SlackBuild
+++ b/source/ap/diffstat/diffstat.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=diffstat
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/ap/moc/0005-avcodec-include.patch b/source/ap/moc/0005-avcodec-include.patch
new file mode 100644
index 000000000..5606df445
--- /dev/null
+++ b/source/ap/moc/0005-avcodec-include.patch
@@ -0,0 +1,25 @@
+From d75ef5832592c796b45018e81c939c375c1326b4 Mon Sep 17 00:00:00 2001
+From: John Fitzgerald <mocmaint@daper.net>
+Date: Sat, 25 Jun 2022 13:15:37 +0300
+Subject: [PATCH 1/3] avcodec include
+
+Signed-off-by: Elimar Riesebieter <riesebie@lxtec.de>
+---
+ decoder_plugins/ffmpeg/ffmpeg.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c
+index c043b5a..f5ea484 100644
+--- a/decoder_plugins/ffmpeg/ffmpeg.c
++++ b/decoder_plugins/ffmpeg/ffmpeg.c
+@@ -32,6 +32,7 @@
+ #include <stdint.h>
+ #include <errno.h>
+
++#include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+ #include <libavutil/mathematics.h>
+ #if HAVE_LIBAVUTIL_CHANNEL_LAYOUT_H
+--
+2.36.1
+
diff --git a/source/ap/moc/0006-uncast-warnings.patch b/source/ap/moc/0006-uncast-warnings.patch
new file mode 100644
index 000000000..204742058
--- /dev/null
+++ b/source/ap/moc/0006-uncast-warnings.patch
@@ -0,0 +1,44 @@
+From 27fa391c6b3361ef781dbf0a045445ceabfaa07f Mon Sep 17 00:00:00 2001
+From: John Fitzgerald <mocmaint@daper.net>
+Date: Sat, 25 Jun 2022 13:18:08 +0300
+Subject: [PATCH 2/3] uncast warnings
+
+Signed-off-by: Elimar Riesebieter <riesebie@lxtec.de>
+---
+ decoder_plugins/ffmpeg/ffmpeg.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c
+index f5ea484..fd4582f 100644
+--- a/decoder_plugins/ffmpeg/ffmpeg.c
++++ b/decoder_plugins/ffmpeg/ffmpeg.c
+@@ -79,7 +79,7 @@ struct ffmpeg_data
+ AVIOContext *pb;
+ AVStream *stream;
+ AVCodecContext *enc;
+- AVCodec *codec;
++ const AVCodec *codec;
+
+ char *remain_buf;
+ int remain_buf_len;
+@@ -848,7 +848,7 @@ static int ffmpeg_can_decode (struct io_stream *stream)
+ {
+ int res;
+ AVProbeData probe_data;
+- AVInputFormat *fmt;
++ const AVInputFormat *fmt;
+ char buf[8096 + AVPROBE_PADDING_SIZE] = {0};
+
+ res = io_peek (stream, buf, sizeof (buf));
+@@ -1411,7 +1411,7 @@ static int ffmpeg_our_format_ext (const char *ext)
+
+ static int ffmpeg_our_format_mime (const char *mime_type)
+ {
+- AVOutputFormat *fmt;
++ const AVOutputFormat *fmt;
+
+ fmt = av_guess_format (NULL, NULL, mime_type);
+ return fmt ? 1 : 0;
+--
+2.36.1
+
diff --git a/source/ap/moc/0007-cur-dts.patch b/source/ap/moc/0007-cur-dts.patch
new file mode 100644
index 000000000..cf65c5084
--- /dev/null
+++ b/source/ap/moc/0007-cur-dts.patch
@@ -0,0 +1,39 @@
+From dba3b4262b6187f688152126b4ca743f88e93c82 Mon Sep 17 00:00:00 2001
+From: John Fitzgerald <mocmaint@daper.net>
+Date: Sat, 25 Jun 2022 13:20:46 +0300
+Subject: [PATCH 3/3] cur dts
+
+Signed-off-by: Elimar Riesebieter <riesebie@lxtec.de>
+---
+ decoder_plugins/ffmpeg/ffmpeg.c | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c
+index fd4582f..64afe04 100644
+--- a/decoder_plugins/ffmpeg/ffmpeg.c
++++ b/decoder_plugins/ffmpeg/ffmpeg.c
+@@ -1172,7 +1172,7 @@ static bool seek_in_stream (struct ffmpeg_data *data)
+ static bool seek_in_stream (struct ffmpeg_data *data, int sec)
+ #endif
+ {
+- int rc, flags = AVSEEK_FLAG_ANY;
++ int rc;
+ int64_t seek_ts;
+
+ #if SEEK_IN_DECODER
+@@ -1198,10 +1198,8 @@ static bool seek_in_stream (struct ffmpeg_data *data, int sec)
+ seek_ts += data->stream->start_time;
+ }
+
+- if (data->stream->cur_dts > seek_ts)
+- flags |= AVSEEK_FLAG_BACKWARD;
+-
+- rc = av_seek_frame (data->ic, data->stream->index, seek_ts, flags);
++ rc = av_seek_frame (data->ic, data->stream->index, seek_ts,
++ AVSEEK_FLAG_BACKWARD);
+ if (rc < 0) {
+ log_errno ("Seek error", rc);
+ return false;
+--
+2.36.1
+
diff --git a/source/ap/moc/moc-ffmpeg4.patch b/source/ap/moc/moc-ffmpeg4.patch
deleted file mode 100644
index c1e43a7c2..000000000
--- a/source/ap/moc/moc-ffmpeg4.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Index: decoder_plugins/ffmpeg/ffmpeg.c
-===================================================================
---- decoder_plugins/ffmpeg/ffmpeg.c (revisiĆ³n: 2963)
-+++ decoder_plugins/ffmpeg/ffmpeg.c (copia de trabajo)
-@@ -697,7 +697,7 @@
- * FFmpeg/LibAV in use. For some versions this will be caught in
- * *_find_stream_info() above and misreported as an unfound codec
- * parameters error. */
-- if (data->codec->capabilities & CODEC_CAP_EXPERIMENTAL) {
-+ if (data->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) {
- decoder_error (&data->error, ERROR_FATAL, 0,
- "The codec is experimental and may damage MOC: %s",
- data->codec->name);
-@@ -705,8 +705,8 @@
- }
-
- set_downmixing (data);
-- if (data->codec->capabilities & CODEC_CAP_TRUNCATED)
-- data->enc->flags |= CODEC_FLAG_TRUNCATED;
-+ if (data->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
-+ data->enc->flags |= AV_CODEC_FLAG_TRUNCATED;
-
- if (avcodec_open2 (data->enc, data->codec, NULL) < 0)
- {
-@@ -725,7 +725,7 @@
-
- data->sample_width = sfmt_Bps (data->fmt);
-
-- if (data->codec->capabilities & CODEC_CAP_DELAY)
-+ if (data->codec->capabilities & AV_CODEC_CAP_DELAY)
- data->delay = true;
- data->seek_broken = is_seek_broken (data);
- data->timing_broken = is_timing_broken (data->ic);
diff --git a/source/ap/moc/moc.SlackBuild b/source/ap/moc/moc.SlackBuild
index 547687838..af49333e7 100755
--- a/source/ap/moc/moc.SlackBuild
+++ b/source/ap/moc/moc.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2011, 2013, 2018, 2019 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2011, 2013, 2018, 2019, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=moc
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | rev | cut -f 2- -d -)}
-BUILD=${BUILD:-8}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -78,9 +78,18 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-zcat $CWD/moc-ffmpeg4.patch.gz | patch -p0 --verbose || exit 1
+zcat $CWD/0005-avcodec-include.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0006-uncast-warnings.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0007-cur-dts.patch.gz | patch -p1 --verbose || exit 1
# Configure:
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+fi
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/source/ap/moc/svn-checkout.sh b/source/ap/moc/svn-checkout.sh
new file mode 100755
index 000000000..a2f9a8084
--- /dev/null
+++ b/source/ap/moc/svn-checkout.sh
@@ -0,0 +1,14 @@
+# Clear the download area:
+rm -rf moc
+
+svn checkout svn://svn.daper.net/moc/trunk moc
+
+( cd moc && find -name "\.svn" -type d -print0 | xargs -0 rm -rf )
+
+# Tar it up:
+VERSION="$(grep PROJECT_NUMBER moc/Doxyfile | cut -f 2 -d = | tr -d ' ' | tr - _)"
+mv moc moc-${VERSION}
+tar cf moc-${VERSION}.tar moc-${VERSION}
+rm -f moc-${VERSION}.tar.lz
+plzip -9 moc-${VERSION}.tar
+rm -r moc-${VERSION}