commit 2b5ffc9a4e7199a380d7a79a0c8ef5ad53e6914a
Author: mprahl <mprahl(a)redhat.com>
Date: Sat Mar 17 21:15:30 2018 -0400
Initial import
.gitignore | 1 +
...-AM_PROG_CC_C_O-for-missing-legacy-source.patch | 24 ++++++++++
0002-replace-deprecated-CODEC_FLAG_GRAY.patch | 52 ++++++++++++++++++++++
...o-be-explicitly-enabled-or-disabled-with-.patch | 52 ++++++++++++++++++++++
comskip.spec | 46 +++++++++++++++++++
sources | 1 +
6 files changed, 176 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..ad60981 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/v0.82.003.tar.gz
diff --git a/0001-Added-AM_PROG_CC_C_O-for-missing-legacy-source.patch
b/0001-Added-AM_PROG_CC_C_O-for-missing-legacy-source.patch
new file mode 100644
index 0000000..d16d367
--- /dev/null
+++ b/0001-Added-AM_PROG_CC_C_O-for-missing-legacy-source.patch
@@ -0,0 +1,24 @@
+From 709c98160dd036369d1cabeba575103939810368 Mon Sep 17 00:00:00 2001
+From: Adrian Gilbert <adrian(a)gilbert.ca>
+Date: Thu, 9 Nov 2017 21:05:59 -0500
+Subject: [PATCH 01/10] Added AM_PROG_CC_C_O for missing legacy source
+
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 0d02a9f..b0eca1e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,6 +51,7 @@ PKG_CHECK_MODULES(sdl, [sdl >= 1.2.0], has_sdl=yes, has_sdl=no)
+ AC_MSG_CHECKING([whether to build the graphical user interface])
+ AC_MSG_RESULT([$has_sdl])
+ AM_CONDITIONAL([BUILD_GUI], [test "x${has_sdl}" = "xyes"])
++AM_PROG_CC_C_O
+
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+--
+2.14.3
+
diff --git a/0002-replace-deprecated-CODEC_FLAG_GRAY.patch
b/0002-replace-deprecated-CODEC_FLAG_GRAY.patch
new file mode 100644
index 0000000..13e79f5
--- /dev/null
+++ b/0002-replace-deprecated-CODEC_FLAG_GRAY.patch
@@ -0,0 +1,52 @@
+From 1d987bde60b09db7dfbc1f0bf3f2096a370a4844 Mon Sep 17 00:00:00 2001
+From: Aman Gupta <aman(a)tmm1.net>
+Date: Sat, 2 Dec 2017 14:24:08 -0800
+Subject: [PATCH 03/10] replace deprecated CODEC_FLAG_GRAY
+
+---
+ mpeg2dec.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/mpeg2dec.c b/mpeg2dec.c
+index c0ab945..27f0f6e 100755
+--- a/mpeg2dec.c
++++ b/mpeg2dec.c
+@@ -1199,7 +1199,7 @@ static int prev_strange_framenum = 0;
+ real_pts = 0.0;
+ pts = 0;
+ //is->video_st->codec.thread_type
+- if (!hardware_decode) is->video_st->codec->flags |= CODEC_FLAG_GRAY;
++ if (!hardware_decode) is->video_st->codec->flags |= AV_CODEC_FLAG_GRAY;
+ // Decode video frame
+ len1 = avcodec_decode_video2(is->video_st->codec, is->pFrame,
&frameFinished,
+ packet);
+@@ -1608,7 +1608,7 @@ int stream_component_open(VideoState *is, int stream_index)
+
+ if (codecCtx->codec_type == AVMEDIA_TYPE_VIDEO)
+ {
+- if (!hardware_decode) codecCtx->flags |= CODEC_FLAG_GRAY;
++ if (!hardware_decode) codecCtx->flags |= AV_CODEC_FLAG_GRAY;
+ is->dec_ctx = codecCtx;
+ #ifdef HARDWARE_DECODE
+ ist->dec_ctx = codecCtx;
+@@ -1732,7 +1732,7 @@ int stream_component_open(VideoState *is, int stream_index)
+ // is->video_current_pts_time = av_gettime();
+
+ is->pFrame = av_frame_alloc();
+- if (!hardware_decode) codecCtx->flags |= CODEC_FLAG_GRAY;
++ if (!hardware_decode) codecCtx->flags |= AV_CODEC_FLAG_GRAY;
+ // codecCtx->thread_type = 1; // Frame based threading
+ codecCtx->lowres = min(av_codec_get_max_lowres(codecCtx->codec),lowres);
+ if (codecCtx->codec_id == AV_CODEC_ID_H264)
+@@ -1848,7 +1848,7 @@ void file_open()
+
+ // av_dict_set_int(&opts, "lowres", stream_lowres, 0);
+ if (!hardware_decode) {
+-// codecCtx->flags |= CODEC_FLAG_GRAY;
++// codecCtx->flags |= AV_CODEC_FLAG_GRAY;
+ av_dict_set_int(&myoptions, "gray", 1, 0);
+ }
+ #ifdef DONATOR
+--
+2.14.3
+
diff --git a/0003-Allow-GUI-to-be-explicitly-enabled-or-disabled-with-.patch
b/0003-Allow-GUI-to-be-explicitly-enabled-or-disabled-with-.patch
new file mode 100644
index 0000000..d305ffd
--- /dev/null
+++ b/0003-Allow-GUI-to-be-explicitly-enabled-or-disabled-with-.patch
@@ -0,0 +1,52 @@
+From 93fe4fc92050214dcd43ae12613f8d41f8e7d178 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi(a)gentoo.org>
+Date: Wed, 27 Dec 2017 11:31:58 +0000
+Subject: [PATCH 05/10] Allow GUI to be explicitly enabled or disabled with
+ configure
+
+Linux distributions hate automagic dependencies. :)
+---
+ configure.ac | 20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b0eca1e..d57dcae 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,6 +30,10 @@ AC_MSG_CHECKING([whether to enable donator features])
+ AS_IF([test "x${enable_donator}" = "xno"], AC_MSG_RESULT([no]),
AC_MSG_RESULT([yes]))
+ AM_CONDITIONAL([ENABLE_DONATOR], [test "x${enable_donator}" !=
"xno"])
+
++AC_ARG_ENABLE([gui], AS_HELP_STRING([--disable-gui], [build without the graphical user
interface]))
++AC_MSG_CHECKING([whether to enable the graphical user interface])
++AS_CASE([x${enable_gui}], [xno], [AC_MSG_RESULT([no])], [x?*], [AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([if possible])])
++
+ AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static], [build a statically linked
binary])])
+ AC_MSG_CHECKING([whether to build a statically linked binary])
+ AS_IF([test "x${enable_static}" = "xyes"], AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no]))
+@@ -47,9 +51,19 @@ AS_IF([test "x${enable_static}" = "xyes"],
PKG_CONFIG="$PKG_CONFIG --static")
+ PKG_CHECK_MODULES(argtable2, [argtable2 >= 2.12])
+ PKG_CHECK_MODULES(ffmpeg, [libavutil >= 54.7 libavformat >= 56.4 libavcodec >=
56.1])
+
+-PKG_CHECK_MODULES(sdl, [sdl >= 1.2.0], has_sdl=yes, has_sdl=no)
+-AC_MSG_CHECKING([whether to build the graphical user interface])
+-AC_MSG_RESULT([$has_sdl])
++AS_IF([test "x${enable_gui}" = "xno"], [
++ has_sdl=no
++], [
++ AS_IF([test "x${enable_gui}" != "x"], [
++ PKG_CHECK_MODULES(sdl, [sdl >= 1.2.0], has_sdl=yes)
++ ], [
++ PKG_CHECK_MODULES(sdl, [sdl >= 1.2.0], has_sdl=yes, has_sdl=no)
++ ])
++
++ AC_MSG_CHECKING([whether we can build the graphical user interface])
++ AC_MSG_RESULT([$has_sdl])
++])
++
+ AM_CONDITIONAL([BUILD_GUI], [test "x${has_sdl}" = "xyes"])
+ AM_PROG_CC_C_O
+
+--
+2.14.3
+
diff --git a/comskip.spec b/comskip.spec
new file mode 100644
index 0000000..216bbe0
--- /dev/null
+++ b/comskip.spec
@@ -0,0 +1,46 @@
+Name: comskip
+Version: 0.82.003
+Release: 3%{?dist}
+Summary: A free commercial detector
+License: GPLv2+
+URL:
https://github.com/erikkaashoek/Comskip
+Source0: %{url}/archive/v%{version}.tar.gz
+Patch0: 0001-Added-AM_PROG_CC_C_O-for-missing-legacy-source.patch
+Patch1: 0002-replace-deprecated-CODEC_FLAG_GRAY.patch
+Patch2: 0003-Allow-GUI-to-be-explicitly-enabled-or-disabled-with-.patch
+
+BuildRequires: libtool
+BuildRequires: argtable-devel
+BuildRequires: ffmpeg-devel
+
+%description
+Comskip is a free commercial detector written by erikkaashoek
+
+%prep
+%autosetup -p1 -n Comskip-%{version}
+
+%build
+# The version wasn't updated in the configure.ac file
+sed -i "s/0.81.098/%{version}/" configure.ac
+./autogen.sh
+%configure --disable-gui
+%make_build
+
+%install
+%make_install
+
+%files
+%license LICENSE
+%{_bindir}/comskip
+
+%changelog
+* Sat Mar 17 2018 mprahl <mprahl(a)redhat.com> - 0.82.003-3
+- Explicitly disable the GUI
+- Fix compilation errors with newer ffmpeg versions
+
+* Sat Jan 27 2018 mprahl <mprahl(a)redhat.com> - 0.82.003-2
+- Removed unneeded dependencies
+
+* Tue Dec 12 2017 Matt Prahl <mprahl(a)redhat.com> - 0.82.003-1
+- Initial release
+
diff --git a/sources b/sources
index e69de29..c360e7d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+09fce09b31ae83228f1a91e9f2855a51 v0.82.003.tar.gz