mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
media-video/mpeg-tools: port to EAPI 7
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--- work/convert/eyuvtojpeg.c
|
||||
+++ work/convert/eyuvtojpeg.c
|
||||
--- a/convert/eyuvtojpeg.c
|
||||
+++ b/convert/eyuvtojpeg.c
|
||||
@@ -22,6 +22,7 @@
|
||||
/*==============*
|
||||
* HEADER FILES *
|
||||
@@ -25,8 +25,8 @@
|
||||
}
|
||||
|
||||
|
||||
--- work/convert/eyuvtoppm.c
|
||||
+++ work/convert/eyuvtoppm.c
|
||||
--- a/convert/eyuvtoppm.c
|
||||
+++ b/convert/eyuvtoppm.c
|
||||
@@ -22,6 +22,7 @@
|
||||
/*==============*
|
||||
* HEADER FILES *
|
||||
@@ -53,8 +53,8 @@
|
||||
}
|
||||
|
||||
void Usage(void)
|
||||
--- work/convert/mtv/archdep.h
|
||||
+++ work/convert/mtv/archdep.h
|
||||
--- a/convert/mtv/archdep.h
|
||||
+++ b/convert/mtv/archdep.h
|
||||
@@ -45,16 +45,46 @@
|
||||
((char *)(to))[5] = ((char *)(from))[2]; \
|
||||
((char *)(to))[6] = ((char *)(from))[1]; \
|
||||
@@ -104,8 +104,8 @@
|
||||
/* Define types of specific length */
|
||||
typedef char i_8;
|
||||
typedef short i_16;
|
||||
--- work/convert/mtv/movieToVid.c
|
||||
+++ work/convert/mtv/movieToVid.c
|
||||
--- a/convert/mtv/movieToVid.c
|
||||
+++ b/convert/mtv/movieToVid.c
|
||||
@@ -295,7 +295,7 @@
|
||||
exit (0);
|
||||
}
|
||||
@@ -121,8 +121,8 @@
|
||||
fprintf (stderr, "done\n");
|
||||
+ return 0;
|
||||
}
|
||||
--- work/convert/ppmtoeyuv.c
|
||||
+++ work/convert/ppmtoeyuv.c
|
||||
--- a/convert/ppmtoeyuv.c
|
||||
+++ b/convert/ppmtoeyuv.c
|
||||
@@ -39,6 +39,11 @@
|
||||
* HEADER FILES *
|
||||
*==============*/
|
||||
@@ -152,8 +152,8 @@
|
||||
}
|
||||
|
||||
|
||||
--- work/mpeg_encode/bitio.c
|
||||
+++ work/mpeg_encode/bitio.c
|
||||
--- a/mpeg_encode/bitio.c
|
||||
+++ b/mpeg_encode/bitio.c
|
||||
@@ -79,6 +79,8 @@
|
||||
* HEADER FILES *
|
||||
*==============*/
|
||||
@@ -163,8 +163,8 @@
|
||||
#include <assert.h>
|
||||
#include "all.h"
|
||||
#include "byteorder.h"
|
||||
--- work/mpeg_encode/jpeg.c
|
||||
+++ work/mpeg_encode/jpeg.c
|
||||
--- a/mpeg_encode/jpeg.c
|
||||
+++ b/mpeg_encode/jpeg.c
|
||||
@@ -65,6 +65,8 @@
|
||||
*==============*/
|
||||
|
||||
@@ -174,8 +174,8 @@
|
||||
#include "all.h"
|
||||
#include "mtypes.h"
|
||||
#include "frames.h"
|
||||
--- work/mpeg_encode/headers/libpnmrw.h
|
||||
+++ work/mpeg_encode/headers/libpnmrw.h
|
||||
--- a/mpeg_encode/headers/libpnmrw.h
|
||||
+++ b/mpeg_encode/headers/libpnmrw.h
|
||||
@@ -20,9 +20,6 @@
|
||||
** that point here, feel free to tweak or remove these declarations.
|
||||
*/
|
||||
@@ -186,8 +186,8 @@
|
||||
/* End of configurable definitions. */
|
||||
|
||||
|
||||
--- work/mpeg_encode/libpnmrw.c
|
||||
+++ work/mpeg_encode/libpnmrw.c
|
||||
--- a/mpeg_encode/libpnmrw.c
|
||||
+++ b/mpeg_encode/libpnmrw.c
|
||||
@@ -27,6 +27,9 @@
|
||||
/* #define MSDOS */
|
||||
#endif
|
||||
@@ -220,8 +220,8 @@
|
||||
register bit* bP;
|
||||
|
||||
switch ( format )
|
||||
--- work/mpeg_encode/opts.c
|
||||
+++ work/mpeg_encode/opts.c
|
||||
--- a/mpeg_encode/opts.c
|
||||
+++ b/mpeg_encode/opts.c
|
||||
@@ -35,6 +35,7 @@
|
||||
* HEADER FILES *
|
||||
*==============*/
|
||||
@@ -230,8 +230,8 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "opts.h"
|
||||
--- work/mpeg_encode/iframe.c
|
||||
+++ work/mpeg_encode/iframe.c
|
||||
--- a/mpeg_encode/iframe.c
|
||||
+++ b/mpeg_encode/iframe.c
|
||||
@@ -235,6 +235,8 @@
|
||||
int SetFCodeHelper _ANSI_ARGS_((int sr));
|
||||
void CalcDistortion _ANSI_ARGS_((MpegFrame *current, int y, int x));
|
||||
@@ -241,8 +241,8 @@
|
||||
int
|
||||
SetFCodeHelper(SR)
|
||||
int SR;
|
||||
--- work/convert/jmovie2jpeg.c
|
||||
+++ work/convert/jmovie2jpeg.c
|
||||
--- a/convert/jmovie2jpeg.c
|
||||
+++ b/convert/jmovie2jpeg.c
|
||||
@@ -33,6 +33,9 @@
|
||||
************************************************************************/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- convert/Makefile 2009-08-25 21:19:42.000000000 +0200
|
||||
+++ convert/Makefile.new 2009-08-25 21:22:54.000000000 +0200
|
||||
--- a/convert/Makefile 2009-08-25 21:19:42.000000000 +0200
|
||||
+++ b/convert/Makefile 2009-08-25 21:22:54.000000000 +0200
|
||||
@@ -53,13 +53,13 @@
|
||||
all: $(TARGETS)
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
wc:; wc -l *.[ch] *.pl *.table
|
||||
clean:; rm -f *.o core *~ gmon.out $(TARGETS)
|
||||
--- convert/mtv/Makefile 2009-08-25 21:19:42.000000000 +0200
|
||||
+++ convert/mtv/Makefile.new 2009-08-25 21:24:31.000000000 +0200
|
||||
--- a/convert/mtv/Makefile 2009-08-25 21:19:42.000000000 +0200
|
||||
+++ b/convert/mtv/Makefile 2009-08-25 21:24:31.000000000 +0200
|
||||
@@ -15,12 +15,12 @@
|
||||
default: movieToVid
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
- $(PURIFY) $(CC) $(OBJ) -o movieToVid.purify
|
||||
+ $(PURIFY) $(CC) $(LDFLAGS) $(OBJ) -o movieToVid.purify
|
||||
|
||||
--- mpeg_encode//Makefile 2009-08-25 21:19:43.000000000 +0200
|
||||
+++ mpeg_encode//Makefile.new 2009-08-25 21:27:12.000000000 +0200
|
||||
--- a/mpeg_encode/Makefile 2009-08-25 21:19:43.000000000 +0200
|
||||
+++ b/mpeg_encode/Makefile 2009-08-25 21:27:12.000000000 +0200
|
||||
@@ -203,7 +203,6 @@
|
||||
############
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- convert/Makefile
|
||||
+++ convert/Makefile
|
||||
--- a/convert/Makefile
|
||||
+++ b/convert/Makefile
|
||||
@@ -24,7 +24,7 @@
|
||||
#CC = cc
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
vidtoppm: vidtoppm.c
|
||||
$(CC) -lXvid -lX11 $(INCLUDE) -o vidtoppm vidtoppm.c
|
||||
|
||||
--- convert/mtv/Makefile
|
||||
+++ convert/mtv/Makefile
|
||||
--- a/convert/mtv/Makefile
|
||||
+++ b/convert/mtv/Makefile
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
PURIFY = $(PURIFYHOME)/purify
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
clean:
|
||||
rm -f core lintout makeout tags Makefile.bak *.o \
|
||||
--- mpeg_encode/Makefile.orig 2005-09-26 16:01:51.000000000 -0400
|
||||
+++ mpeg_encode/Makefile 2005-09-26 16:02:11.000000000 -0400
|
||||
--- a/mpeg_encode/Makefile
|
||||
+++ b/mpeg_encode/Makefile
|
||||
@@ -97,5 +97,5 @@
|
||||
|
||||
# gcc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- jpeg.c
|
||||
+++ jpeg.c
|
||||
--- a/mpeg_encode/jpeg.c
|
||||
+++ b/mpeg_encode/jpeg.c
|
||||
@@ -77,13 +77,10 @@
|
||||
|
||||
/* make it happier.... */
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
for(cp=0,compptr = cinfo.comp_info;cp<cinfo.num_components;
|
||||
cp++,compptr++) {
|
||||
--- Makefile
|
||||
+++ Makefile
|
||||
--- a/mpeg_encode/Makefile
|
||||
+++ b/mpeg_encode/Makefile
|
||||
@@ -36,9 +36,9 @@
|
||||
##############
|
||||
# JPEG STUFF #
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- convert/mtv/archdep.h 2010-03-11 04:35:04.596642403 +0000
|
||||
+++ convert/mtv/archdep.h 2010-03-11 04:34:38.949974604 +0000
|
||||
--- a/convert/mtv/archdep.h
|
||||
+++ b/convert/mtv/archdep.h
|
||||
@@ -17,7 +17,7 @@
|
||||
* Note that these macros *do not* work for in-place transformations.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- convert/eyuvtojpeg.c
|
||||
+++ convert/eyuvtojpeg.c
|
||||
--- a/convert/eyuvtojpeg.c
|
||||
+++ b/convert/eyuvtojpeg.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
@@ -41,8 +41,8 @@
|
||||
}
|
||||
|
||||
|
||||
--- convert/vidtoeyuv.c
|
||||
+++ convert/vidtoeyuv.c
|
||||
--- a/convert/vidtoeyuv.c
|
||||
+++ b/convert/vidtoeyuv.c
|
||||
@@ -125,9 +125,9 @@
|
||||
XImage *ximage;
|
||||
char *tdata;
|
||||
@@ -81,8 +81,8 @@
|
||||
|
||||
for (j=0; j<nth-1; j++) {
|
||||
if (read (fd, &image, sizeof(image)) != sizeof(image)) {
|
||||
--- convert/vidtojpeg.c
|
||||
+++ convert/vidtojpeg.c
|
||||
--- a/convert/vidtojpeg.c
|
||||
+++ b/convert/vidtojpeg.c
|
||||
@@ -123,9 +123,9 @@
|
||||
XImage *ximage;
|
||||
char *tdata;
|
||||
@@ -121,8 +121,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
--- convert/vidtoppm.c
|
||||
+++ convert/vidtoppm.c
|
||||
--- a/convert/vidtoppm.c
|
||||
+++ b/convert/vidtoppm.c
|
||||
@@ -220,9 +220,11 @@
|
||||
|
||||
|
||||
@@ -148,8 +148,8 @@
|
||||
+ unlink(tempfile);
|
||||
}
|
||||
}
|
||||
--- convert/eyuvtoppm.c
|
||||
+++ convert/eyuvtoppm.c
|
||||
--- a/convert/eyuvtoppm.c
|
||||
+++ b/convert/eyuvtoppm.c
|
||||
@@ -100,13 +100,9 @@
|
||||
fpointer = fopen(dest, "w");
|
||||
if (fpointer == NULL) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- mpeg_encode/parallel.c
|
||||
+++ mpeg_encode/parallel.c
|
||||
--- a/mpeg_encode/parallel.c
|
||||
+++ b/mpeg_encode/parallel.c
|
||||
@@ -586,6 +586,8 @@
|
||||
* SIDE EFFECTS: none
|
||||
*
|
||||
@@ -40,8 +40,8 @@
|
||||
} else {
|
||||
Frame_AllocYCC(frame);
|
||||
|
||||
--- mpeg_encode/readframe.c
|
||||
+++ mpeg_encode/readframe.c
|
||||
--- a/mpeg_encode/readframe.c
|
||||
+++ b/mpeg_encode/readframe.c
|
||||
@@ -227,14 +227,22 @@
|
||||
* SIDE EFFECTS: none
|
||||
*
|
||||
|
||||
@@ -2,8 +2,8 @@ When running tests, don't use /tmp for obvious reasons
|
||||
|
||||
Also rewrite the diffscript in sh since csh isnt always available
|
||||
|
||||
--- mepg_encode/Makefile
|
||||
+++ mepg_encode/Makefile
|
||||
--- a/mpeg_encode/Makefile
|
||||
+++ b/mpeg_encode/Makefile
|
||||
@@ -187,16 +187,16 @@
|
||||
#########
|
||||
|
||||
@@ -28,8 +28,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
|
||||
############
|
||||
# BINARIES #
|
||||
--- mepg_encode/tst/diffscript.sh
|
||||
+++ mepg_encode/tst/diffscript.sh
|
||||
--- a/mpeg_encode/tst/diffscript.sh
|
||||
+++ b/mpeg_encode/tst/diffscript.sh
|
||||
@@ -0,0 +1,16 @@
|
||||
+diff $1 $2 > ./foobar
|
||||
+egrep Blocks ./foobar > ./blockbar
|
||||
@@ -47,8 +47,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
+ echo "FAILURE! (different exection). Please send bug report."
|
||||
+ exit 1
|
||||
+fi
|
||||
--- mpeg_encode/tst/test_all
|
||||
+++ mpeg_encode/tst/test_all
|
||||
--- a/mpeg_encode/tst/test_all
|
||||
+++ b/mpeg_encode/tst/test_all
|
||||
@@ -1,19 +1,19 @@
|
||||
-#!/bin/csh -f
|
||||
+#!/bin/sh
|
||||
@@ -78,8 +78,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
-csh diffscript /tmp/tsd.stat tsd.stat /tmp/tsd.mpg tsd.mpg
|
||||
+sh diffscript.sh ./tsd.stat.new tsd.stat ./tsd.mpg.new tsd.mpg
|
||||
|
||||
--- mpeg_encode/tst/diffscript
|
||||
+++ mpeg_encode/tst/diffscript
|
||||
--- a/mpeg_encode/tst/diffscript
|
||||
+++ b/mpeg_encode/tst/diffscript
|
||||
@@ -3,23 +3,23 @@
|
||||
#
|
||||
# NOTE: if this script doesn't work, then basically all you need to know
|
||||
@@ -114,8 +114,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
echo "SUCCESS."
|
||||
else
|
||||
echo "FAILURE! (different output -- probably endian bug). Please send bug report."
|
||||
--- mpeg_encode/tst/ts.param
|
||||
+++ mpeg_encode/tst/ts.param
|
||||
--- a/mpeg_encode/tst/ts.param
|
||||
+++ b/mpeg_encode/tst/ts.param
|
||||
@@ -1,7 +1,7 @@
|
||||
# test suite parameter file
|
||||
|
||||
@@ -125,8 +125,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
|
||||
YUV_SIZE 352x240
|
||||
|
||||
--- mpeg_encode/tst/tsd.param
|
||||
+++ mpeg_encode/tst/tsd.param
|
||||
--- a/mpeg_encode/tst/tsd.param
|
||||
+++ b/mpeg_encode/tst/tsd.param
|
||||
@@ -1,7 +1,7 @@
|
||||
# test suite parameter file
|
||||
|
||||
@@ -136,8 +136,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
|
||||
YUV_SIZE 352x240
|
||||
|
||||
--- mpeg_encode/tst/gop.param
|
||||
+++ mpeg_encode/tst/gop.param
|
||||
--- a/mpeg_encode/tst/gop.param
|
||||
+++ b/mpeg_encode/tst/gop.param
|
||||
@@ -1,7 +1,7 @@
|
||||
# test suite parameter file
|
||||
|
||||
@@ -147,8 +147,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
|
||||
YUV_SIZE 352x240
|
||||
|
||||
--- mpeg_encode/tst/short.param
|
||||
+++ mpeg_encode/tst/short.param
|
||||
--- a/mpeg_encode/tst/short.param
|
||||
+++ b/mpeg_encode/tst/short.param
|
||||
@@ -1,7 +1,7 @@
|
||||
# test suite parameter file
|
||||
|
||||
@@ -158,8 +158,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
|
||||
YUV_SIZE 352x240
|
||||
|
||||
--- mpeg_encode/tst/ts2.param
|
||||
+++ mpeg_encode/tst/ts2.param
|
||||
--- a/mpeg_encode/tst/ts2.param
|
||||
+++ b/mpeg_encode/tst/ts2.param
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
PATTERN IBBPBBPBB
|
||||
@@ -169,8 +169,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
|
||||
YUV_SIZE 352x240
|
||||
|
||||
--- mpeg_encode/tst/ts3.param
|
||||
+++ mpeg_encode/tst/ts3.param
|
||||
--- a/mpeg_encode/tst/ts3.param
|
||||
+++ b/mpeg_encode/tst/ts3.param
|
||||
@@ -1,7 +1,7 @@
|
||||
# test suite parameter file
|
||||
|
||||
@@ -180,8 +180,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
|
||||
YUV_SIZE 352x240
|
||||
|
||||
--- mpeg_encode/tst/ts4.param
|
||||
+++ mpeg_encode/tst/ts4.param
|
||||
--- a/mpeg_encode/tst/ts4.param
|
||||
+++ b/mpeg_encode/tst/ts4.param
|
||||
@@ -1,7 +1,7 @@
|
||||
# test suite parameter file
|
||||
|
||||
@@ -191,8 +191,8 @@ Also rewrite the diffscript in sh since csh isnt always available
|
||||
|
||||
YUV_SIZE 352x240
|
||||
|
||||
--- mpeg_encode/tst/tstl.param
|
||||
+++ mpeg_encode/tst/tstl.param
|
||||
--- a/mpeg_encode/tst/tstl.param
|
||||
+++ b/mpeg_encode/tst/tstl.param
|
||||
@@ -1,7 +1,7 @@
|
||||
# test suite parameter file
|
||||
|
||||
|
||||
@@ -1,37 +1,42 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit epatch toolchain-funcs
|
||||
EAPI=7
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
MY_PN=mpeg_encode
|
||||
DESCRIPTION="Tools for MPEG video"
|
||||
HOMEPAGE="http://bmrc.berkeley.edu/research/mpeg/mpeg_encode.html"
|
||||
SRC_URI="ftp://mm-ftp.cs.berkeley.edu/pub/multimedia/mpeg/encode/${MY_PN}-${PV}-src.tar.gz"
|
||||
S="${WORKDIR}"/${MY_PN}
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="x11-libs/libX11
|
||||
virtual/jpeg:0"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S=${WORKDIR}/${MY_PN}
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-build.patch
|
||||
"${FILESDIR}"/${P}-64bit_fixes.patch
|
||||
"${FILESDIR}"/${P}-tempfile-convert.patch
|
||||
"${FILESDIR}"/${P}-as-needed.patch
|
||||
"${FILESDIR}"/${P}-powerpc.patch
|
||||
"${FILESDIR}"/${P}-jpeg.patch
|
||||
"${FILESDIR}"/${P}-tempfile-mpeg-encode.patch
|
||||
"${FILESDIR}"/${P}-tempfile-tests.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cd "${WORKDIR}"
|
||||
epatch "${FILESDIR}"/${P}-build.patch
|
||||
epatch "${FILESDIR}"/${P}-64bit_fixes.patch
|
||||
epatch "${FILESDIR}"/${P}-tempfile-convert.patch
|
||||
epatch "${FILESDIR}"/${P}-as-needed.patch
|
||||
epatch "${FILESDIR}"/${P}-powerpc.patch
|
||||
cd "${S}"
|
||||
rm -r jpeg
|
||||
epatch "${FILESDIR}"/${P}-jpeg.patch
|
||||
epatch "${FILESDIR}"/${P}-tempfile-mpeg-encode.patch
|
||||
epatch "${FILESDIR}"/${P}-tempfile-tests.patch
|
||||
cd .. || die
|
||||
default
|
||||
cd "${S}" || die
|
||||
|
||||
rm -r jpeg || die
|
||||
|
||||
# don't include malloc.h, but use stdlib.h instead
|
||||
sed -i -e 's:#include <malloc.h>:#include <stdlib.h>:' \
|
||||
convert/*.c convert/mtv/*.c *.c headers/*.h || die
|
||||
@@ -51,7 +56,7 @@ src_install() {
|
||||
docinto examples
|
||||
dodoc examples/*
|
||||
|
||||
cd ../convert
|
||||
cd ../convert || die
|
||||
dobin eyuvtojpeg jmovie2jpeg mpeg_demux mtv/movieToVid
|
||||
newdoc README README.convert
|
||||
newdoc mtv/README README.mtv
|
||||
|
||||
Reference in New Issue
Block a user