summaryrefslogtreecommitdiffstats
path: root/media-video
diff options
context:
space:
mode:
Diffstat (limited to 'media-video')
-rw-r--r--media-video/transcode/Manifest3
-rw-r--r--media-video/transcode/files/transcode-1.1.7-gcc10-fno-common.patch48
-rw-r--r--media-video/transcode/files/transcode-1.1.7-glibc-2.32.patch58
-rw-r--r--media-video/transcode/files/transcode-1.1.7-swresample.patch23
-rw-r--r--media-video/transcode/metadata.xml17
-rw-r--r--media-video/transcode/transcode-1.1.7-r6.ebuild149
6 files changed, 298 insertions, 0 deletions
diff --git a/media-video/transcode/Manifest b/media-video/transcode/Manifest
new file mode 100644
index 00000000..8cf471df
--- /dev/null
+++ b/media-video/transcode/Manifest
@@ -0,0 +1,3 @@
+DIST transcode-1.1.7-ffmpeg4.patch.xz 4880 BLAKE2B 92bf63ba3f9cb69aff3cdc0f7250da0452f8bc0977010d024bbd8bbf9f66b86fb31e819ec3d1069e9176fdb58cba6ec510b866ddc44a65fd252f175cc567807a SHA512 8c44fd1b78dbbafbbef090d6115bbe086605f1d5b5286eba83d9c7c0d5457af286cb5d61ab6d260380694b6b3636f751709476915dcab5cc3109dc868785f424
+DIST transcode-1.1.7-patchset.tar.bz2 16379 BLAKE2B fbdc188bffeb8751814abfa7e119a1053e482f194bc1b87a721c48e2b66e107df146d38b3ea11a88d066c49d8862489b88b74f61fa36ce3f8a1a782da3762615 SHA512 bedc82aa4fbc17774e34d8fc24799d70b8460c6c1dd728549bcaa5c387492f56e520674fdf8bb976c0b5fcc9ccefb765f2ee26816e0d2b96a83402a21cee3f6d
+DIST transcode-1.1.7.tar.bz2 2183627 BLAKE2B 25001d4cae83d86e5295917bcd9e2e77dd61637e238394a2d603398baf810201dc61d8b0de5b54a7b8848ac3bcef5fb211e8f2b43ed7da4e56e335b8d4d2fbe1 SHA512 d6f9674f3f5c3346194120585741ca660eb9ee133085cfce9460a14eaa0cf16fdf291761bd1db78e1c784e4d69a9481c7470cf8357dc7638ee3017620500f45f
diff --git a/media-video/transcode/files/transcode-1.1.7-gcc10-fno-common.patch b/media-video/transcode/files/transcode-1.1.7-gcc10-fno-common.patch
new file mode 100644
index 00000000..fcee415d
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-gcc10-fno-common.patch
@@ -0,0 +1,48 @@
+--- a/import/demux_pass.c
++++ b/import/demux_pass.c
+@@ -32,8 +32,6 @@
+ #include "packets.h"
+
+
+-int gop, gop_pts, gop_cnt;
+-
+ /* if you listen carefully, then you can hear the desesperate
+ * whisper of this code calling for a rewrite. Or for a redesign.
+ * Or both. -- FR
+--- a/import/extract_ac3.c
++++ b/import/extract_ac3.c
+@@ -334,7 +334,6 @@
+ FILE *fd;
+
+ #define MAX_BUF 4096
+-char audio[MAX_BUF];
+
+
+ /* from ac3scan.c */
+@@ -472,6 +471,8 @@
+ void extract_ac3(info_t *ipipe)
+ {
+
++ char audio[MAX_BUF];
++
+ int error=0;
+
+ avi_t *avifile;
+--- a/import/extract_mp3.c
++++ b/import/extract_mp3.c
+@@ -243,7 +243,6 @@
+ }
+
+ #define MAX_BUF 4096
+-char audio[MAX_BUF];
+
+ /* ------------------------------------------------------------
+ *
+@@ -258,6 +257,7 @@
+
+ void extract_mp3(info_t *ipipe)
+ {
++ char audio[MAX_BUF];
+
+ int error=0;
+
diff --git a/media-video/transcode/files/transcode-1.1.7-glibc-2.32.patch b/media-video/transcode/files/transcode-1.1.7-glibc-2.32.patch
new file mode 100644
index 00000000..12ef638d
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-glibc-2.32.patch
@@ -0,0 +1,58 @@
+--- a/import/v4l/import_v4l2.c 2020-08-28 08:28:44.311434934 +0000
++++ b/import/v4l/import_v4l2.c 2020-08-28 08:41:19.279323984 +0000
+@@ -455,7 +455,7 @@
+ tc_log_warn(MOD_NAME,
+ "driver does not support cropping"
+ "(ioctl(VIDIOC_CROPCAP) returns \"%s\"), disabled",
+- errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++ strerror(errno));
+ return TC_ERROR;
+ }
+ if (verbose_flag > TC_INFO) {
+@@ -485,7 +485,7 @@
+ tc_log_warn(MOD_NAME,
+ "driver does not support inquiring cropping"
+ " parameters (ioctl(VIDIOC_G_CROP) returns \"%s\")",
+- errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++ strerror(errno));
+ return -1;
+ }
+
+@@ -513,7 +513,7 @@
+ tc_log_warn(MOD_NAME,
+ "driver does not support inquering cropping"
+ " parameters (ioctl(VIDIOC_G_CROP) returns \"%s\")",
+- errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++ strerror(errno));
+ return -1;
+ }
+ if (verbose_flag > TC_INFO) {
+@@ -613,7 +613,7 @@
+ if (err < 0) {
+ if (verbose_flag) {
+ tc_log_warn(MOD_NAME, "driver does not support setting parameters (ioctl(VIDIOC_S_PARM) returns \"%s\")",
+- errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++ strerror(errno));
+ }
+ }
+ return TC_OK;
+@@ -628,7 +628,7 @@
+ err = ioctl(vs->video_fd, VIDIOC_G_STD, &stdid);
+ if (err < 0) {
+ tc_log_warn(MOD_NAME, "driver does not support get std (ioctl(VIDIOC_G_STD) returns \"%s\")",
+- errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++ strerror(errno));
+ memset(&stdid, 0, sizeof(v4l2_std_id));
+ }
+
+--- a/import/v4l/import_v4lcam.c 2020-10-02 13:28:47.215179051 +0700
++++ b/import/v4l/import_v4lcam.c 2020-10-02 13:28:40.132224906 +0700
+@@ -368,7 +368,7 @@ static int tc_v4l2_video_setup_stream_pa
+ if (err < 0) {
+ tc_log_warn(MOD_NAME, "driver does not support setting parameters"
+ " (ioctl(VIDIOC_S_PARM) returns \"%s\")",
+- errno <= sys_nerr ? sys_errlist[errno] : "unknown");
++ strerror(errno));
+ }
+ return TC_OK;
+ }
diff --git a/media-video/transcode/files/transcode-1.1.7-swresample.patch b/media-video/transcode/files/transcode-1.1.7-swresample.patch
new file mode 100644
index 00000000..b9a908d1
--- /dev/null
+++ b/media-video/transcode/files/transcode-1.1.7-swresample.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/722296
+https://git.archlinux.org/svntogit/community.git/tree/trunk/transcode-swresample.patch?h=packages/transcode&id=7fb278671fbd0a201de8d32aefee888fd253db44
+
+--- transcode-1.1.7/filter/filter_resample.c
++++ transcode-1.1.7/filter/filter_resample.c
+@@ -37,7 +37,7 @@
+ #include "libtc/optstr.h"
+ #include "libtc/tcavcodec.h"
+ #include "libtc/tcmodule-plugin.h"
+-#include <libavresample/avresample.h>
++#include <libswresample/swresample.h>
+
+
+ typedef struct {
+@@ -46,7 +46,7 @@
+
+ int bytes_per_sample;
+
+- AVAudioResampleContext *resample_ctx;
++ SwrContext *resample_ctx;
+ } ResamplePrivateData;
+
+ static const char resample_help[] = ""
diff --git a/media-video/transcode/metadata.xml b/media-video/transcode/metadata.xml
new file mode 100644
index 00000000..e51d9e09
--- /dev/null
+++ b/media-video/transcode/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>team-gentoo@trinitydesktop.org</email>
+ <name>Trinity Gentoo ebuilds project</name>
+ </maintainer>
+ <use>
+ <flag name="mjpeg">Enables mjpegtools support</flag>
+ <flag name="nuv">NuppelVideo container format demuxing</flag>
+ <flag name="pic">disable optimized assembly code that is not PIC friendly</flag>
+ <flag name="postproc">Build with ffmpeg libpostproc support</flag>
+ </use>
+ <upstream>
+ <remote-id type="bitbucket">france/transcode-tcforge</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/transcode/transcode-1.1.7-r6.ebuild b/media-video/transcode/transcode-1.1.7-r6.ebuild
new file mode 100644
index 00000000..e3b0d10c
--- /dev/null
+++ b/media-video/transcode/transcode-1.1.7-r6.ebuild
@@ -0,0 +1,149 @@
+# Copyright 2002-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Utilities for transcoding video and audio codecs in different containers"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
+SRC_URI="https://www.bitbucket.org/france/${PN}-tcforge/downloads/${P}.tar.bz2
+ https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2
+ https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-1.1.7-ffmpeg4.patch.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm64 ppc ppc64 ~riscv sparc x86"
+IUSE="cpu_flags_ppc_altivec cpu_flags_x86_3dnow a52 aac alsa dv dvd +iconv imagemagick jpeg lzo mjpeg cpu_flags_x86_mmx mp3 mpeg nuv ogg oss pic postproc quicktime sdl cpu_flags_x86_sse cpu_flags_x86_sse2 theora truetype v4l vorbis X x264 xml xvid"
+
+REQUIRED_USE="
+ cpu_flags_x86_sse? ( cpu_flags_x86_mmx )
+ cpu_flags_x86_sse2? ( cpu_flags_x86_mmx cpu_flags_x86_sse )
+ cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
+ nuv? ( lzo )
+"
+
+# <ffmpeg-5 dep for bug #831482
+RDEPEND="
+ <media-video/ffmpeg-5:=
+ a52? ( media-libs/a52dec )
+ aac? ( media-libs/faac )
+ alsa? ( media-libs/alsa-lib )
+ dv? ( media-libs/libdv )
+ dvd? ( media-libs/libdvdread:0= )
+ iconv? ( virtual/libiconv )
+ imagemagick? ( media-gfx/imagemagick:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ lzo? ( >=dev-libs/lzo-2 )
+ mjpeg? ( media-video/mjpegtools:= )
+ mp3? ( media-sound/lame )
+ mpeg? ( media-libs/libmpeg2 )
+ ogg? ( media-libs/libogg )
+ postproc? ( >=media-video/ffmpeg-0.10 )
+ quicktime? ( >=media-libs/libquicktime-1 )
+ sdl? ( >=media-libs/libsdl-1.2.5[X?] )
+ theora? ( media-libs/libtheora )
+ truetype? ( >=media-libs/freetype-2 )
+ v4l? ( media-libs/libv4l )
+ vorbis? ( media-libs/libvorbis )
+ X? (
+ x11-libs/libXaw
+ x11-libs/libXpm
+ x11-libs/libXv
+ )
+ x264? ( media-libs/x264:= )
+ xml? ( dev-libs/libxml2 )
+ xvid? ( media-libs/xvid )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ virtual/pkgconfig
+ v4l? ( >=sys-kernel/linux-headers-2.6.11 )
+"
+
+PATCHES=(
+ "${WORKDIR}"/${P}-patchset/${P}-ffmpeg.patch
+ "${WORKDIR}"/${P}-patchset/${P}-ffmpeg-0.10.patch
+ "${WORKDIR}"/${P}-patchset/${P}-ffmpeg-0.11.patch
+ "${WORKDIR}"/${P}-patchset/${P}-preset-free.patch
+ "${WORKDIR}"/${P}-patchset/${P}-libav-9.patch
+ "${WORKDIR}"/${P}-patchset/${P}-libav-10.patch
+ "${WORKDIR}"/${P}-patchset/${P}-preset-force.patch
+ "${WORKDIR}"/${P}-patchset/${P}-ffmpeg2.patch
+ "${WORKDIR}"/${P}-patchset/${P}-freetype251.patch
+ "${WORKDIR}"/${P}-patchset/${P}-ffmpeg24.patch
+ "${FILESDIR}"/${P}-swresample.patch # bug 722296
+ "${FILESDIR}"/${P}-gcc10-fno-common.patch
+ "${FILESDIR}"/${P}-glibc-2.32.patch
+)
+
+src_prepare() {
+ if has_version '>=media-video/ffmpeg-2.8'; then
+ PATCHES+=( "${WORKDIR}"/${P}-patchset/${P}-ffmpeg29.patch )
+ fi
+
+ if has_version '>=media-gfx/imagemagick-7.0.1.0' ; then
+ PATCHES+=( "${WORKDIR}"/${P}-patchset/${P}-imagemagick7.patch )
+ fi
+
+ if has_version '>=media-video/ffmpeg-4' ; then
+ PATCHES+=( "${WORKDIR}"/${P}-ffmpeg4.patch )
+ fi
+
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ use x86 && myconf="$(use_enable !pic x86-textrels)" # bug 271476
+
+ local myeconfargs=(
+ $(use_enable cpu_flags_ppc_altivec altivec)
+ $(use_enable cpu_flags_x86_mmx mmx)
+ $(use_enable cpu_flags_x86_3dnow 3dnow)
+ $(use_enable cpu_flags_x86_sse sse)
+ $(use_enable cpu_flags_x86_sse2 sse2)
+ $(use_enable v4l libv4l2)
+ $(use_enable v4l libv4lconvert)
+ $(use_enable mpeg libmpeg2)
+ $(use_enable mpeg libmpeg2convert)
+ --enable-experimental
+ --enable-deprecated
+ $(use_enable v4l)
+ $(use_enable oss)
+ $(use_enable alsa)
+ $(use_enable postproc libpostproc)
+ $(use_enable truetype freetype2)
+ $(use_enable mp3 lame)
+ $(use_enable xvid)
+ $(use_enable x264)
+ $(use_enable ogg)
+ $(use_enable vorbis)
+ $(use_enable theora)
+ $(use_enable dvd libdvdread)
+ $(use_enable dv libdv)
+ $(use_enable quicktime libquicktime)
+ $(use_enable lzo)
+ $(use_enable a52)
+ $(use_enable aac faac)
+ $(use_enable xml libxml2)
+ $(use_enable mjpeg mjpegtools)
+ $(use_enable sdl)
+ $(use_enable imagemagick)
+ $(use_enable jpeg libjpeg)
+ $(use_enable iconv)
+ $(use_enable nuv)
+ $(use_with X x)
+ --with-mod-path=/usr/$(get_libdir)/transcode
+ ${myconf}
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" docsdir=/usr/share/doc/${PF} install
+ dodoc AUTHORS ChangeLog README STYLE TODO
+ find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
+}