ports/184132: multimedia/dvd-slideshow: cleanups and fixes to make 0.8.4 work without errors

Phil Oleson oz at nixil.net
Thu Nov 21 01:10:00 UTC 2013


>Number:         184132
>Category:       ports
>Synopsis:       multimedia/dvd-slideshow: cleanups and fixes to make 0.8.4 work without errors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 21 01:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Phil Oleson
>Release:        FreeBSD 9.2-STABLE amd64
>Organization:
N/A
>Environment:
System: FreeBSD nixil.net 9.2-STABLE FreeBSD 9.2-STABLE #3 r258289M: Sun Nov 17 18:41:56 MST 2013     root at home.nixil.net:/usr/obj/usr/src/sys/GENERIC  amd64


>Description:
	User reported problems with the existing version of the script.
        This is the resulting patch that addressed those bugs.

>How-To-Repeat:
	N/A/
>Fix:

--- dvd-slideshow.patch begins here ---
diff -ruN dvd-slideshow.orig/Makefile dvd-slideshow/Makefile
--- dvd-slideshow.orig/Makefile	2013-11-17 19:12:52.000000000 -0700
+++ dvd-slideshow/Makefile	2013-11-18 22:27:19.000000000 -0700
@@ -3,6 +3,7 @@
 
 PORTNAME=	dvd-slideshow
 PORTVERSION=	0.8.4
+PORTREVISION=	1
 CATEGORIES=	multimedia
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}-2:main \
 		SF/${PORTNAME}/${PORTNAME}-themes/${THEMEVERSION}-1:themes
@@ -14,13 +15,14 @@
 
 RUN_DEPENDS=	bash:${PORTSDIR}/shells/bash \
 		identify:${PORTSDIR}/graphics/ImageMagick \
+		gm:${PORTSDIR}/graphics/GraphicsMagick \
 		mpeg2enc:${PORTSDIR}/multimedia/mjpegtools \
 		ffmpeg:${PORTSDIR}/multimedia/ffmpeg \
 		sox:${PORTSDIR}/audio/sox \
 		dvdauthor:${PORTSDIR}/multimedia/dvdauthor \
 		jhead:${PORTSDIR}/graphics/jhead \
 		flvtool2:${PORTSDIR}/multimedia/ruby-flvtool2 \
-		${LOCALBASE}/lib/X11/fonts/urwfonts-ttf/README:${PORTSDIR}/x11-fonts/urwfonts-ttf \
+		${LOCALBASE}/lib/X11/fonts/URW/n019004l.pfb:${PORTSDIR}/x11-fonts/urwfonts \
 		cdrecord:${PORTSDIR}/sysutils/cdrtools
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}-2
@@ -44,7 +46,7 @@
 .if ${PORT_OPTIONS:MLAME}
 RUN_DEPENDS+=	lame:${PORTSDIR}/audio/lame
 .endif
-.if ${PORT_OPTIONS:MVORBISTOOLS}
+.if ${PORT_OPTIONS:MVORBIS}
 RUN_DEPENDS+=	oggdec:${PORTSDIR}/audio/vorbis-tools
 .endif
 .if ${PORT_OPTIONS:MTOOLAME}
diff -ruN dvd-slideshow.orig/files/patch-dvd-slideshow dvd-slideshow/files/patch-dvd-slideshow
--- dvd-slideshow.orig/files/patch-dvd-slideshow	2013-11-17 19:12:52.000000000 -0700
+++ dvd-slideshow/files/patch-dvd-slideshow	2013-11-18 22:23:58.000000000 -0700
@@ -1,5 +1,214 @@
 --- dvd-slideshow.orig	2011-08-22 11:48:52.000000000 -0600
-+++ dvd-slideshow	2013-05-28 15:26:51.000000000 -0600
++++ dvd-slideshow	2013-11-18 21:40:15.000000000 -0700
+@@ -188,7 +188,7 @@ Options: 
+ 	scroll effect. Only applied when needed; the output will explain. 
+  [-theme <themefile>]
+  	Use the given theme when setting variables/colors/etc.
+-	Themes are installed in /opt/dvd-slideshow/themes or
++	Themes are installed in /usr/local/share/apps/dvd-slideshow/themes or
+ 	in a local directory ~/.dvd-slideshow/themes
+  [-border N]
+  	Make a border of N pixels around each image. 
+@@ -412,15 +412,15 @@ Options: 
+ 
+ #	  font_dir="/usr/share/fonts"
+ #	  font_name="n019004l.pfb" # helvetica bold URW font is default
+-	  font=/usr/share/fonts/default/Type1/n019004l.pfb # Helvetical bold URW font
+-#	  font=/usr/share/fonts/default/Type1/n0190241.pfb # Helvetical bold oblique
+-#	  font=/usr/share/fonts/default/Type1/a0100151.pfb # AvantGarde DemiBold
+-#	  font=/usr/share/fonts/default/Type1/n0220041.pfb # Courier Bold
++	  font=/usr/local/lib/X11/fonts/default/Type1/n019004l.pfb # Helvetical bold URW font
++#	  font=/usr/local/lib/X11/fonts/default/Type1/n0190241.pfb # Helvetical bold oblique
++#	  font=/usr/local/lib/X11/fonts/default/Type1/a0100151.pfb # AvantGarde DemiBold
++#	  font=/usr/local/lib/X11/fonts/default/Type1/n0220041.pfb # Courier Bold
+ 
+ 	  ## Subtitle:
+ 	  subtitle_type="dvd"  # use "render" to force rendering of text.
+ 	  subtitle_font_size=24
+-	  subtitle_font="/usr/share/fonts/default/Type1/n019004l.pfb" # Helvetical bold URW font
++	  subtitle_font="/usr/local/lib/X11/fonts/default/Type1/n019004l.pfb" # Helvetical bold URW font
+ 	  subtitle_color="white"
+ 	  subtitle_outline_color="black"
+ 	  subtitle_location="bottom"
+@@ -430,7 +430,7 @@ Options: 
+ 	  ## Title:
+ 	  title_font_size=48
+ 	  title_font_color="black"  # or use hex "#RRGGBB"
+-	  title_font="/usr/share/fonts/default/Type1/n019004l.pfb" # Helvetical bold URW font
++	  title_font="/usr/local/lib/X11/fonts/default/Type1/n019004l.pfb" # Helvetical bold URW font
+ 
+ 	  ## top title:
+ 	  toptitle_font_size=48
+@@ -499,7 +499,7 @@ border=0  
+ sharpen=''
+ #subtitle_type="render"	# force subtitles to be rendered as graphics on the images.
+ subtitle_type="dvd"	# or, use empty for default.
+-font_dir="/usr/share/fonts/"
++font_dir="/usr/local/lib/X11/fonts/"
+ font_dir2="/usr/X11R6/lib/X11/fonts/"
+ font_dir3="/usr/local/share/fonts/"
+ default_fontname1='n019004l.pfb' # helvetica bold URW fonts
+@@ -532,7 +532,7 @@ bottomtitle_bar_height=55  # 0 for no 50
+ bottomtitle_text_location_x=0
+ bottomtitle_text_location_y=155
+ 
+-themedir='/opt/dvd-slideshow/themes'  # LSB/FHS compliant. see: http://www.pathname.com/fhs/pub/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES
++themedir='/usr/local/share/apps/dvd-slideshow/themes'  # LSB/FHS compliant. see: http://www.pathname.com/fhs/pub/fhs-2.3.html#OPTADDONAPPLICATIONSOFTWAREPACKAGES
+ local_themedir=~/.dvd-slideshow/themes  # local theme directory
+ 
+ logo=""
+@@ -577,7 +577,7 @@ output_format='mpeg2' # or flv, mpg, mp4
+ ignore_seq_end='-M'
+ 
+ # set smp option if more than 1 processor core:
+-cores="$( grep -i 'cpu cores' /proc/cpuinfo | head -n 1 | cut -d: -f 2 | tr -d \[:blank:\] )"
++cores=`sysctl -n hw.ncpu`
+ if [ -n "$cores" ] && [ "$cores" -ge 2 ] ; then
+ 	smp=1
+ else
+@@ -747,7 +747,7 @@ checkfor_oggdec ()
+                 myecho "[dvd-slideshow] ERROR: oggdec not found! "
+                 myecho "[dvd-slideshow] You need to download the vorbis-tools package"
+ 		myecho "[dvd-slideshow] in order to use .ogg audio files."
+-		myecho "[dvd-slideshow] Debian/Ubuntu: sudo apt-get install vorbis-tools"
++		myecho "[dvd-slideshow] FreeBSD: sudo pkg_add -r vorbis-tools"
+                 exit 1
+         fi
+ }
+@@ -759,7 +759,7 @@ checkfor_lame ()
+                 myecho "[dvd-slideshow] ERROR: lame not found! "
+                 myecho "[dvd-slideshow] You need to download the lame package"
+ 		myecho "[dvd-slideshow] in order to use .mp3 audio files."
+-		myecho "[dvd-slideshow] Debian/Ubuntu: sudo apt-get install lame"
++		myecho "[dvd-slideshow] FreeBSD: sudo pkg_add -r lame"
+                 exit 1
+         fi
+ }
+@@ -771,7 +771,7 @@ checkfor_faad ()
+                 myecho "[dvd-slideshow] ERROR: faad not found! "
+                 myecho "[dvd-slideshow] You need to download the faad package"
+ 		myecho "[dvd-slideshow] in order to use .m4a audio files."
+-		myecho "[dvd-slideshow] Debian/Ubuntu: sudo apt-get install faad"
++		myecho "[dvd-slideshow] FreeBSD: sudo pkg_add -r faad"
+                 exit 1
+         fi
+ }
+@@ -955,19 +955,19 @@ waitforfile ()
+ 	## wait for the file to exist...
+ 	while [ ! -f "$1" ] 
+ 	do
+-		sleep 0.05s
++		sleep 0.05
+ 	done
+ 	# now, make sure it's not increasing in size, just to be sure:
+-	initial_size=$( du -b "$1" | awk '{print $1}' )
+-	sleep 0.05s
+-	new_size=$( du -b "$1" | awk '{print $1}' )
++	initial_size=$( du -A -B 1 "$1" | awk '{print $1}' )
++	sleep 0.05
++	new_size=$( du -A -B 1 "$1" | awk '{print $1}' )
+ 	while [ $initial_size -ne $new_size ]
+ 	do
+-		sleep 0.05s
++		sleep 0.05
+ 		if [ -f "$1" ]; then   # needed in case we kill the program
+ #			# tha creates the file during the while loop
+ 			initial_size=$new_size
+-			new_size=$( du -b "$1" | awk '{print $1}' )
++			new_size=$( du -A -B 1 "$1" | awk '{print $1}' )
+ 		else	
+ 			break
+ 		fi
+@@ -993,7 +993,7 @@ waitforfiles ()  # WAITFORFILES
+ 		[ $debug -ge 2 ] && logecho "waiting for file $newfile_tmp"
+ 		while [ ! -e "$newfile_tmp" ] 
+ 		do
+-			sleep 0.01s
++			sleep 0.01
+ 		done
+ 	done
+ }
+@@ -3405,7 +3405,7 @@ if [ -f "${HOME}/.dvd-slideshow/dvd-slid
+ 	  set_system_variables "${thisline}" 1
+ 	  it=`set_system_variables "${thisline}" 0`
+ 	  if [ -n "$it" ] ; then
+-		mymyecho "[dvd-slideshow] Set system variable $it"
++		myecho "[dvd-slideshow] Set system variable $it"
+ 		continue
+ 	  fi
+ 
+@@ -3456,7 +3456,7 @@ else
+ fi
+ 
+ # version of "find"
+-findutils_version=`find --version | head -1 |  awk '{print $4}'`
++findutils_version=4
+ if [ -n "$findutils_version" ] ; then
+ 	logecho "[dvd-slideshow] Found findutils version $findutils_version"
+ 	v1="$( echo $findutils_version | cut -d. -f1 )"
+@@ -3485,7 +3485,7 @@ if [ -z "$it" ] ; then # no ppmtoy4m
+                myecho "[dvd-slideshow] ERROR:  no mjpegtools found for audio processing"
+                myecho "[dvd-slideshow]         You need to download and install mjpegtools."
+                myecho "[dvd-slideshow]         http://mjpegtools.sourceforge.net"
+-               myecho "[dvd-slideshow]         Debian/Ubuntu: sudo apt-get install mjpegtools"
++               myecho "[dvd-slideshow]         FreeBSD: sudo pkg_add -r mjpegtools"
+ 		program_needed=1
+ #		cleanup ; exit 0
+ else
+@@ -3509,7 +3509,7 @@ if [ -z "$it" ] ; then # no sox
+                myecho "[dvd-slideshow] ERROR:  no sox found for audio processing"
+                myecho "[dvd-slideshow]         You need to download and install sox."
+                myecho "[dvd-slideshow]         http://sox.sourceforge.net"
+-               myecho "[dvd-slideshow]         Debian/Ubuntu: sudo apt-get install sox"
++               myecho "[dvd-slideshow]         FreeBSD: sudo pkg_add -r sox"
+ 		program_needed=1
+ #		cleanup ; exit 0
+ else
+@@ -3534,7 +3534,7 @@ if [ -z "$it" ] ; then # no convert
+                myecho "[dvd-slideshow] ERROR:  no ImageMagick found for audio processing"
+                myecho "[dvd-slideshow]         You need to download and install ImageMagick."
+                myecho "[dvd-slideshow]         http://ImageMagick.sourceforge.net"
+-               myecho "[dvd-slideshow]         Debian/Ubuntu: sudo apt-get install imagemagick"
++               myecho "[dvd-slideshow]         FreeBSD: sudo pkg_add -r imagemagick"
+ 		program_needed=1
+ #		cleanup ; exit 0
+ else
+@@ -3548,7 +3548,7 @@ if [ -z "$it" ] && [ "$commandline_gm" -
+         myecho "[dvd-slideshow] WARNING: no GraphicsMagick found."
+         myecho "[dvd-slideshow]         You need to download and install GraphicsMagick."
+         myecho "[dvd-slideshow]         http://GraphicsMagick.sourceforge.net"
+-	myecho "[dvd-slideshow]         Debian/Ubuntu: sudo apt-get install graphicsmagick"
++	myecho "[dvd-slideshow]         FreeBSD: sudo pkg_add -r graphicsmagick"
+ 	myecho "[dvd-slideshow]		Reverting to ImageMagick commands"
+ 	graphicsmagick=0
+ 	gm_cmd=''
+@@ -3577,7 +3577,7 @@ if [ -z "$it" ] ; then # no dvdauthor
+                myecho "[dvd-slideshow] ERROR:  no dvdauthor found for audio processing"
+                myecho "[dvd-slideshow]         You need to download and install dvdauthor."
+                myecho "[dvd-slideshow]         http://dvdauthor.sourceforge.net"
+-		myecho "[dvd-slideshow]         Debian/Ubuntu: sudo apt-get install dvdauthor"
++		myecho "[dvd-slideshow]         FreeBSD: sudo pkg_add -r dvdauthor"
+ 		program_needed=1
+ #		cleanup ; exit 0
+ else
+@@ -3595,7 +3595,7 @@ if [ "$mpeg_encoder" == 'ffmpeg' ] ; the
+ 	        myecho "[dvd-slideshow]         MP2 audio is less compatible with DVD player hardware."
+ 	        myecho "[dvd-slideshow]         TIP: Install ffmpeg for faster video encoding also!"
+ 		myecho "[dvd-slideshow]		http://ffmpeg.sourceforge.net"
+-		myecho "[dvd-slideshow]         Debian/Ubuntu: sudo apt-get install ffmpeg"
++		myecho "[dvd-slideshow]         FreeBSD: sudo pkg_add -r ffmpeg"
+ 	        ac3=0
+ 		mpeg_encoder='mpeg2enc'
+ 	else
+@@ -3862,7 +3862,7 @@ do
+ 		#######################################################################
+ 		## Roate?
+ 		## rotate image first, then apply other effects?
+-#		for e in `seq 2 -1 1`; do
++#		for e in `seq2 2 -1 1`; do
+ 		for (( e=2; e>=1 ; e-- )) ; do
+ 			if [ "$e" -eq 1 ] ; then
+ 				this_effect="${effect1[$i]}"
 @@ -3996,7 +3996,7 @@ do
  			mkdir -p "$outdir/$newname"_pics
  		fi
@@ -9,6 +218,33 @@
  		fi
  		moviefiles=$(( $moviefiles + 1 ))
  	elif [ "${filetype[$i]}" == 'ogg' ] || [ "${filetype[$i]}" == 'mp3' ] || [ "${filetype[$i]}" == 'wav' ] || [ "${image[$i]}" == 'silence' ] || [ "${filetype[$i]}" == 'm4a' ] || [ "${filetype[$i]}" == 'aac' ] ; then
+@@ -6893,7 +6893,7 @@ if [ -n "${passed_audio[0]}" ] ; then  #
+ 		else
+ 			myecho "[dvd-slideshow] using mp2enc for mpeg2 audio encoding"
+ 			myecho "[dvd-slideshow] TIP:  install toolame for faster mp2 audio encoding!"
+-			myecho "[dvd-slideshow]	Debian/Ubuntu: sudo apt-get install toolame"
++			myecho "[dvd-slideshow]	FreeBSD: sudo pkg_add -r toolame"
+ 			mp2enc -v $verbosity -b $audio_bitrate -r $audio_sample_rate -s -o "$tmpdir/audio1.mp2" < "$tmpdir/audio1.wav"
+ 		fi
+ 	fi
+@@ -7142,7 +7142,7 @@ if [ -n "${audio_1[0]}" ] ; then   ## au
+ 			else
+ 				myecho "[dvd-slideshow] Creating mp2 audio using mp2enc"
+ 				myecho "[dvd-slideshow] TIP:  install toolame for faster mp2 audio encoding!"
+-				myecho "[dvd-slideshow]	Debian/Ubuntu: sudo apt-get install toolame"
++				myecho "[dvd-slideshow]	FreeBSD: sudo pkg_add -r toolame"
+ 				mp2enc -v $verbosity -b $audio_bitrate -r $audio_sample_rate -s -o "$tmpdir/audio1.mp2" < "$tmpdir/audio1.wav"
+ 			fi
+ 		fi  # end if we're using a mpeg2 video format
+@@ -7372,7 +7372,7 @@ if [ -n "${audio_2[0]}" ] ; then   ## au
+ 		else
+ 			myecho "[dvd-slideshow] Creating mp2 audio using mp2enc"
+ 			myecho "[dvd-slideshow] TIP:  install toolame for faster mp2 audio encoding!"
+-			myecho "[dvd-slideshow]	Debian/Ubuntu: sudo apt-get install toolame"
++			myecho "[dvd-slideshow]	FreeBSD: sudo pkg_add -r toolame"
+ 			mp2enc -v $verbosity -b $audio_bitrate -r $audio_sample_rate -s -o "$tmpdir/audio2.mp2" < "$tmpdir/audio2.wav"
+ 		fi
+ 	fi
 @@ -7407,9 +7407,9 @@ if [ "$output_format" == 'flv' ] ; then 
  	fi
  #	myecho "[dvd-slideshow] Generating video thumbnail..."
--- dvd-slideshow.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list