diff options
author | lioux <lioux@FreeBSD.org> | 2005-12-14 22:00:58 +0800 |
---|---|---|
committer | lioux <lioux@FreeBSD.org> | 2005-12-14 22:00:58 +0800 |
commit | 9a27e9e377dca2489ad1eed419fa28177d5b3320 (patch) | |
tree | 28b8f1959ed65a92d4ab9ce36c4800fcb4a69ce1 /multimedia | |
parent | 42ff0e673a392374a68d0228fdd3285161fe22f5 (diff) | |
download | freebsd-ports-gnome-9a27e9e377dca2489ad1eed419fa28177d5b3320.tar.gz freebsd-ports-gnome-9a27e9e377dca2489ad1eed419fa28177d5b3320.tar.zst freebsd-ports-gnome-9a27e9e377dca2489ad1eed419fa28177d5b3320.zip |
o Another round of patches:
1) Fix linuxisms regarding usage of test(1) and tr(1)
2) Emulate linux seq(1) utility using misc/seq2 and a wrapper
script (dvdwizard_seq)
3) Use misc/gnuls instead of ls(1) since the application
assumes a specific output format
4) Use multimedia/y4mscaler to convert ppmtoy4m 4:4:4 output
to 4:2:0 required by multimedia/mjpegtools
5) Install README
o Bump PORTREVISION
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/dvdwizard/Makefile | 25 | ||||
-rw-r--r-- | multimedia/dvdwizard/files/dvdwizard_seq | 24 | ||||
-rw-r--r-- | multimedia/dvdwizard/files/patch-chaptercheck | 20 | ||||
-rw-r--r-- | multimedia/dvdwizard/files/patch-dvdtguess | 24 | ||||
-rw-r--r-- | multimedia/dvdwizard/files/patch-mk_vmgm | 10 | ||||
-rw-r--r-- | multimedia/dvdwizard/files/patch-mk_vtsm | 22 | ||||
-rw-r--r-- | multimedia/dvdwizard/files/patch-mk_vtsm_audio | 10 |
7 files changed, 133 insertions, 2 deletions
diff --git a/multimedia/dvdwizard/Makefile b/multimedia/dvdwizard/Makefile index 2cdcda5c09d1..3ec160814432 100644 --- a/multimedia/dvdwizard/Makefile +++ b/multimedia/dvdwizard/Makefile @@ -7,6 +7,7 @@ PORTNAME= dvdwizard PORTVERSION= 0.4.1 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} MASTER_SITE_SUBDIR= udrecsuite @@ -18,12 +19,14 @@ COMMENT= Automated creation of DVDs with chapters and menus RUN_DEPENDS= \ toolame:${PORTSDIR}/audio/toolame \ convert:${PORTSDIR}/graphics/ImageMagick \ + gnuls:${PORTSDIR}/misc/gnuls \ seq2:${PORTSDIR}/misc/seq2 \ dvdauthor:${PORTSDIR}/multimedia/dvdauthor \ spumux:${PORTSDIR}/multimedia/dvdauthor \ mpeg2enc:${PORTSDIR}/multimedia/mjpegtools \ ppmtoy4m:${PORTSDIR}/multimedia/mjpegtools \ transcode:${PORTSDIR}/multimedia/transcode \ + y4mscaler:${PORTSDIR}/multimedia/y4mscaler \ bash:${PORTSDIR}/shells/bash USE_REINPLACE= yes @@ -45,15 +48,24 @@ PLIST_DIR= \ %%EXAMPLESDIR%% PLIST_FILES= \ ${SCRIPT_FILES:S,^,bin/,} \ + bin/dvdwizard_seq \ %%DATADIR%%/dvdwizardrc \ %%EXAMPLESDIR%%/dvdwizard.conf.sample +.ifndef(NOPORTDOCS) +PORTDOCS= README +.endif + post-patch: @${REINPLACE_CMD} -E \ -e 's|/bin/bash|${LOCALBASE}/bin/bash|' \ -e 's|^(rcfile[[:space:]]*=).*$$|\1"${DATADIR}/dvdwizardrc"|' \ - -e 's|\(seq |(${LOCALBASE}/bin/seq2 |' \ - -e 's|`seq |`${LOCALBASE}/bin/seq2 |' \ + -e 's|`seq[[:space:]]+(.+)`|`dvdwizard_seq \1`|' \ + -e 's|\(seq[[:space:]]+(.+)\)|(dvdwizard_seq \1)|' \ + -e 's|==|=|' \ + -e 's|ls -QS|gnuls -QS|' \ + -e 's|ls -S|gnuls -S|' \ + -e 's|sed[[:space:]]+-i[[:space:]]|sed -i \"\" |' \ ${WRKSRC}/* do-install: @@ -69,5 +81,14 @@ do-install: @${MKDIR} ${DATADIR} @${INSTALL_DATA} ${WRKSRC}/dvdwizardrc \ ${DATADIR} +# emulation + @${INSTALL_SCRIPT} ${FILESDIR}/dvdwizard_seq \ + ${PREFIX}/bin +# docs +.ifndef(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/README \ + ${DOCSDIR} +.endif .include <bsd.port.mk> diff --git a/multimedia/dvdwizard/files/dvdwizard_seq b/multimedia/dvdwizard/files/dvdwizard_seq new file mode 100644 index 000000000000..e8f97cdb361e --- /dev/null +++ b/multimedia/dvdwizard/files/dvdwizard_seq @@ -0,0 +1,24 @@ +#!/bin/sh + +if [ ${#} -le 3 ]; then + if [ ${#} -eq 2 ]; then + start="${1}" + increment="1" + end="${2}" + elif [ ${#} -eq 3 ]; then + start="${1}" + increment="${2}" + end="${3}" + fi + + if [ ${start} -eq ${end} ]; then + echo "${start}" + return 0 + elif [ ${start} -lt ${end} ]; then + exec seq2 -s ${start} -e ${end} -i ${increment} + else + exec seq2 -s ${end} -e ${start} -i ${increment} | sort -n -r + fi +else + return 1 +fi diff --git a/multimedia/dvdwizard/files/patch-chaptercheck b/multimedia/dvdwizard/files/patch-chaptercheck new file mode 100644 index 000000000000..f5e93a00f4ef --- /dev/null +++ b/multimedia/dvdwizard/files/patch-chaptercheck @@ -0,0 +1,20 @@ +--- chaptercheck.orig Wed Dec 14 09:55:38 2005 ++++ chaptercheck Wed Dec 14 09:56:47 2005 +@@ -100,7 +100,7 @@ + echo "Invalid interval specified, $cSpec is not numeric. Aborting" >&2 + usage + fi +- chapterList=`seq -s, 0 $interval $maxlen` ++ chapterList=`seq2 -s 0 -i $interval -e $maxlen | tr " " ","` + else + mode="string" + chapterList="$cSpec" +@@ -152,7 +152,7 @@ + + if [ $checkfrac -ne $frac ]; then + echo $chapter: fractions not a multiple of $fracInt >&2 +- let "errors+=1" ++# let "errors+=1" + fi + fi + fi diff --git a/multimedia/dvdwizard/files/patch-dvdtguess b/multimedia/dvdwizard/files/patch-dvdtguess new file mode 100644 index 000000000000..f2cd24faf49f --- /dev/null +++ b/multimedia/dvdwizard/files/patch-dvdtguess @@ -0,0 +1,24 @@ +--- dvdtguess.orig Wed Dec 14 08:49:13 2005 ++++ dvdtguess Wed Dec 14 08:49:58 2005 +@@ -37,17 +37,17 @@ + # + fext=."${tfile##*.}" + fBase=$(basename "$tfile" "$fext") +-spacename=`echo "$fBase" | tr '_' ' ' | tr --squeeze-repeats ' '` ++spacename=`echo "$fBase" | tr '_' ' ' | tr -s ' '` + words=`echo "$spacename" | wc -w` + for i in `seq 1 $words`; do + actword=`echo "$spacename" | cut -d' ' -f$i` + if [ -z "$tstring" ]; then # if we're at the beginning +- if [ "$(echo $actword | tr --squeeze-repeats [A-Z] ' ')" != " " ]; then # if the word is not complete upper-case +- if [ "$(echo $actword | tr --squeeze-repeats [0-9] ' ')" != " " -o ${#actword} -gt 1 ]; then # and not one numeric digit (e.g. PREMIERE 1, SAT 1, PRO 7) ++ if [ "$(echo $actword | tr -s [A-Z] | tr -s ' ')" != " " ]; then # if the word is not complete upper-case ++ if [ "$(echo $actword | tr -s [0-9] | tr -s ' ')" != " " -o ${#actword} -gt 1 ]; then # and not one numeric digit (e.g. PREMIERE 1, SAT 1, PRO 7) + tstring=$actword # then begin writing the title + fi + fi +- elif [ "$(echo $actword | tr --squeeze-repeats [0-9] ' ')" != " " ] || [ ${#actword} -lt 6 ]; then # append words to title ++ elif [ "$(echo $actword | tr -s [0-9] | tr -s ' ')" != " " ] || [ ${#actword} -lt 6 ]; then # append words to title + tstring="$tstring $actword" # if they are not numeric or have less the 6 digits + fi + done diff --git a/multimedia/dvdwizard/files/patch-mk_vmgm b/multimedia/dvdwizard/files/patch-mk_vmgm new file mode 100644 index 000000000000..76c64953a76c --- /dev/null +++ b/multimedia/dvdwizard/files/patch-mk_vmgm @@ -0,0 +1,10 @@ +--- mk_vmgm.orig Wed Dec 14 10:10:24 2005 ++++ mk_vmgm Wed Dec 14 10:09:27 2005 +@@ -655,6 +655,7 @@ + encNorm="p" + fi + ppmtoy4m -n 10 -F "$encFrameRate" -r "$workbg" | \ ++ y4mscaler -O chromass=420MPEG2 -O size=SRC -O sar=SRC | \ + mpeg2enc -a 2 -n "$encNorm" -f 8 -o "$videotrack" || error_out + mplex -f 8 -o /dev/stdout "$videotrack" "$audiotrack" | \ + spumux -v4 "$spuxml" > "$menumpeg" || error_out diff --git a/multimedia/dvdwizard/files/patch-mk_vtsm b/multimedia/dvdwizard/files/patch-mk_vtsm new file mode 100644 index 000000000000..0bf8ea7a094b --- /dev/null +++ b/multimedia/dvdwizard/files/patch-mk_vtsm @@ -0,0 +1,22 @@ +--- mk_vtsm.orig Wed Dec 14 11:16:44 2005 ++++ mk_vtsm Wed Dec 14 11:17:57 2005 +@@ -217,9 +217,9 @@ + convert -size $patchsize xc:transparent -density "$normDensity" -units PixelsPerInch "$emptybutton" || error_out + for i in 0 1 2; do + bmask[i]="$workDir"/tmp_bmask_"${suffix[i]}".png +- convert -size $thumbsize xc:transparent -density "$normDensity" -units PixelsPerInch \ ++ convert +antialias -size $thumbsize xc:green -density "$normDensity" -units PixelsPerInch \ + -bordercolor "${color[i]}" -border $bordersize \ +- -bordercolor transparent -border $borderspace "${bmask[i]}" || error_out ++ -bordercolor green -border $borderspace -transparent green "${bmask[i]}" || error_out + done + + # +@@ -528,6 +528,7 @@ + encNorm="p" + fi + ppmtoy4m -n 10 -F "$encFrameRate" -r "$vtsmBG" | \ ++ y4mscaler -O chromass=420MPEG2 -O size=SRC -O sar=SRC | \ + mpeg2enc -a 2 -n "$encNorm" -f 8 -o "$videotrack" || error_out + mplex -f 8 -o /dev/stdout "$videotrack" "$audiotrack" | \ + spumux -v4 "$spuxml" > "$menumpeg" || error_out diff --git a/multimedia/dvdwizard/files/patch-mk_vtsm_audio b/multimedia/dvdwizard/files/patch-mk_vtsm_audio new file mode 100644 index 000000000000..41f1cca26422 --- /dev/null +++ b/multimedia/dvdwizard/files/patch-mk_vtsm_audio @@ -0,0 +1,10 @@ +--- mk_vtsm_audio.orig Wed Dec 14 10:27:12 2005 ++++ mk_vtsm_audio Wed Dec 14 10:27:04 2005 +@@ -384,6 +384,7 @@ + encNorm="p" + fi + ppmtoy4m -n 10 -F "$encFrameRate" -r "$vtsmBG" | \ ++ y4mscaler -O chromass=420MPEG2 -O size=SRC -O sar=SRC | \ + mpeg2enc -a 2 -n "$encNorm" -f 8 -o "$videotrack" || error_out + mplex -f 8 -o /dev/stdout "$videotrack" "$audiotrack" | \ + spumux -v4 "$spuxml" > "$menumpeg" || error_out |