diff --git a/multimedia/replex/Makefile b/multimedia/replex/Makefile index bb0ba2da6b6b..4659b8b770c9 100644 --- a/multimedia/replex/Makefile +++ b/multimedia/replex/Makefile @@ -1,38 +1,37 @@ PORTNAME= replex PORTVERSION= 0.1.6.8 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= multimedia MASTER_SITES= LOCAL/dinoex MAINTAINER= dinoex@FreeBSD.org COMMENT= Remultiplex an MPEG2 TS into a PS for DVD USES= gmake MAKE_ARGS= CFLAGS="${CFLAGS}" DEFINES="${CPPFLAGS} -DO_LARGEFILE=0 \ -DVERSION=\\\"${PORTVERSION}\\\"" LIBS="${LDFLAGS}" PLIST_FILES= bin/replex OPTIONS_DEFINE= DOCS .include .if ${PORT_OPTIONS:MDOCS} PORTDOCS= CHANGES README TODO .endif post-patch: - @${GREP} -lR "" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \ - 's|||g' @${REINPLACE_CMD} -e 's|-m32||' -e \ 's|-L. -lreplex|libreplex.a $${LIBS}|g' ${WRKSRC}/Makefile do-install: ${INSTALL_PROGRAM} ${WRKSRC}/replex ${STAGEDIR}${PREFIX}/bin/ .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/CHANGES ${STAGEDIR}${DOCSDIR}/ ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/ ${INSTALL_DATA} ${WRKSRC}/TODO ${STAGEDIR}${DOCSDIR}/ .endif .include diff --git a/multimedia/replex/files/patch-mpg_common.c b/multimedia/replex/files/patch-mpg_common.c new file mode 100644 index 000000000000..9308c2ec3108 --- /dev/null +++ b/multimedia/replex/files/patch-mpg_common.c @@ -0,0 +1,15 @@ +--- mpg_common.c.orig 2007-06-19 09:30:08 UTC ++++ mpg_common.c +@@ -73,8 +73,10 @@ void show_buf(uint8_t *buf, int length) + else if (Data[i+2+offset]==0 && Data[i+3+offset]==1) \ + return i+1+offset; \ + } \ +- else if (x==1 && Data[i-1+offset]==0 && Data[i+offset]==0 && (i+offset)>0) \ +- return i-1+offset; \ ++ else if (x==1 && (i+offset)>0) { \ ++ if (Data[i-1+offset]==0 && Data[i+offset]==0) \ ++ return i-1+offset; \ ++ } \ + } + + int FindPacketHeader(const uint8_t *Data, int s, int l) diff --git a/multimedia/replex/files/patch-pes.c b/multimedia/replex/files/patch-pes.c index 4c95f268a38b..a5f51d86cd95 100644 --- a/multimedia/replex/files/patch-pes.c +++ b/multimedia/replex/files/patch-pes.c @@ -1,10 +1,10 @@ ---- pes.c.orig Sun Dec 28 17:57:19 2003 -+++ pes.c Tue Jan 20 05:15:09 2004 -@@ -26,6 +26,7 @@ +--- pes.c.orig 2007-06-19 09:30:08 UTC ++++ pes.c +@@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/multimedia/replex/files/patch-replex.c b/multimedia/replex/files/patch-replex.c new file mode 100644 index 000000000000..add60e554f9d --- /dev/null +++ b/multimedia/replex/files/patch-replex.c @@ -0,0 +1,38 @@ +--- replex.c.orig 2007-06-19 09:30:08 UTC ++++ replex.c +@@ -442,7 +442,7 @@ static int analyze_audio_loop( pes_in_t *p, struct rep + } + + if( iu->err!= JUMP_ERR && !rx->keep_pts && diff > 40*CLOCK_MS){ +- if (!rx->allow_jump || abs((int)diff) > rx->allow_jump){ ++ if (!rx->allow_jump || labs((int)diff) > rx->allow_jump){ + fprintf(stderr,"audio PTS inconsistent: "); + printpts(dpts); + printpts(iu->pts); +@@ -698,7 +698,7 @@ void analyze_video( pes_in_t *p, struct replex *rx, in + + newpts); + + if (rx->allow_jump && +- abs(diff) > rx->allow_jump) ++ labs(diff) > rx->allow_jump) + { + if (audio_jump(rx)){ + fprintf(stderr,"AUDIO JUMPED\n"); +@@ -716,7 +716,7 @@ void analyze_video( pes_in_t *p, struct replex *rx, in + } + + if (!rx->keep_pts && +- abs((int)(diff)) > 3*SEC_PER/2){ ++ labs((int)(diff)) > 3*SEC_PER/2){ + fprintf(stderr,"video PTS inconsistent: "); + printpts(trans_pts_dts(p->pts)); + printpts(iu->pts); +@@ -735,7 +735,7 @@ void analyze_video( pes_in_t *p, struct replex *rx, in + newdts + + rx->first_vpts); + if (!rx->keep_pts && !keep_now && +- abs((int)diff) > 3*SEC_PER/2){ ++ labs((int)diff) > 3*SEC_PER/2){ + fprintf(stderr,"video DTS inconsistent: "); + printpts(trans_pts_dts(p->dts)); + printpts(iu->dts);