ports/159550: audo/freeswitch-sounds: update to latest version, other changes

Eric F Crist ecrist at secure-computing.net
Sat Aug 6 16:20:09 UTC 2011


>Number:         159550
>Category:       ports
>Synopsis:       audo/freeswitch-sounds: update to latest version, other changes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 06 16:20:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Eric F Crist
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
Secure Computing Networks & ClaimLynx, Inc
>Environment:
FreeBSD cartman.secure-computing.net 9.0-CURRENT FreeBSD 9.0-CURRENT #5: Fri Jan 21 12:06:32 CST 2011     root at cartman.secure-computing.net:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
	Update prot to latest version of sounds.
		* port now has option to download various bitrates from freeswitch servers, saving time on compile/resampling
		* users can set audio scaling in /etc/make.conf with FREESWITCH_VSCALE variable
		* minor changes to plist output during resampling and directory processing
	
>How-To-Repeat:
>Fix:

--- fs.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/audio/freeswitch-sounds/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	10 Jan 2011 19:01:02 -0000	1.4
+++ Makefile	6 Aug 2011 16:15:18 -0000
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	freeswitch-sounds
-PORTVERSION=	1.0.13
-PORTREVISION=	1
+PORTVERSION=	1.0.16
 CATEGORIES=	audio
 MASTER_SITES=	http://files.freeswitch.org/
 DIST_SUBDIR=	freeswitch-sounds
@@ -20,7 +19,8 @@
 
 BASE_PORTNAME=	freeswitch
 
-OPTIONS=	8K           "Compile sounds for 8K" on \
+OPTIONS=	DOWNLOAD     "Don't resample, download all." on \
+		8K           "Compile sounds for 8K" on \
 		16K          "Compile sounds for 16K" on \
 		32K          "Compile sounds for 32K" on \
 		48K          "Compile sounds for 48K" on \
@@ -28,12 +28,42 @@
 		RUSSIAN      "Compile Russian Language Sounds" off
 
 .include <bsd.port.options.mk>
+
+.if ! defined(WITH_DOWNLOAD)
+BUILD_DEPENDS+=	sox:${PORTSDIR}/audio/sox
+.endif
+
+.if defined(WITH_8K)
+BITRATES+=	8000
+.endif
+.if defined(WITH_16K)
+BITRATES+=	16000
+.endif
+.if defined(WITH_32K)
+BITRATES+=	32000
+.endif
+.if defined(WITH_48K)
+BITRATES+=	48000
+.endif
+
 .if defined(WITH_ENGLISH)
+.if defined(WITH_DOWNLOAD)
+.for rate in ${BITRATES}
+DISTFILES+=	${PORTNAME}-en-us-callie-${rate}-${PORTVERSION}${EXTRACT_SUFX}
+.endfor
+.else
 DISTFILES+=	${PORTNAME}-en-us-callie-48000-${PORTVERSION}${EXTRACT_SUFX}
 .endif
+.endif
 .if defined(WITH_RUSSIAN)
+.if defined(WITH_DOWNLOAD)
+.for rate in ${BITRATES}
+DISTFILES+=	${PORTNAME}-ru-RU-elena-${rate}-1.0.12${EXTRACT_SUFX}
+.endfor
+.else
 DISTFILES+=	${PORTNAME}-ru-RU-elena-48000-1.0.12${EXTRACT_SUFX}
 .endif
+.endif
 .if ! defined(WITH_ENGLISH) && ! defined(WITH_RUSSIAN)
 BROKEN=	you must build with either English, Russian, or both
 .endif
@@ -42,63 +72,57 @@
 BROKEN=	you must build with at least one of 8K, 16K, 32K, or 48K sounds
 .endif
 
-.if defined(WITH_8K)
-BUILD_DEPENDS+=	sox:${PORTSDIR}/audio/sox
-BITRATES+=	8000
-.endif
-.if defined(WITH_16K)
-BUILD_DEPENDS+=	sox:${PORTSDIR}/audio/sox
-BITRATES+=	16000
-.endif
-.if defined(WITH_32K)
-BUILD_DEPENDS+=	sox:${PORTSDIR}/audio/sox
-BITRATES+=	32000
-.endif
-.if defined(WITH_48K)
-BITRATES+=	48000
+.if defined(FREESWITCH_VSCALE)
+SCALE=${FREESWITCH_VSCALE}
+.else
+SCALE=0.2
 .endif
 
 do-build:
 	@${ECHO_MSG} "Building for bitrates: ${BITRATES}"
+	@${ECHO_MSG} "Download >>>${WITH_DOWNLOAD}<<<"
+	@${ECHO_MSG} "Scaling audio to ${SCALE}"
 	if [ "${WITH_ENGLISH}" != "" -a ! -e "${WRKDIR}/ENGLISH.done" ]; then \
 		for rate in ${BITRATES}; do \
 			${ECHO_MSG} "WORKING on $${rate}!"; \
-			if [ "$${rate}" -eq "48000" ]; then \
-				${CP} -R ${WRKSRC}/en/us/callie/ ${WRKDIR}/tmp/en/us/callie/; \
-			else \
-				for dir in `ls ${WRKSRC}/en/us/callie/`; do \
-					${MKDIR} ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/; \
-					echo "@rmdir share/${BASE_PORTNAME}/sounds/en/us/callie/$${dir}/$${rate}/" >> ${PLIST}; \
-					for filename in `ls ${WRKSRC}/en/us/callie/$${dir}/48000`; do \
-						echo "share/${BASE_PORTNAME}/sounds/en/us/callie/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
-						if [ ! -e "${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}" ]; then \
-							${ECHO_MSG} "${LOCALBASE}/bin/sox -v 0.2 ${WRKSRC}/en/us/callie/$${dir}/48000/$${filename} -r $${rate} -c 1 ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}"; \
-							${LOCALBASE}/bin/sox -v 0.2 "${WRKSRC}/en/us/callie/$${dir}/48000/$${filename}" -r $${rate} -c 1 "${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}"; \
+			for dir in `ls ${WRKSRC}/en/us/callie/`; do \
+				${MKDIR} ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/; \
+				for filename in `ls ${WRKSRC}/en/us/callie/$${dir}/48000`; do \
+					echo "share/${BASE_PORTNAME}/sounds/en/us/callie/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
+					if [ ! -e "${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}" ]; then \
+						if [ "${WITH_DOWNLOAD}" = "true" ]; then \
+							${ECHO_MSG} "Moving ${WRKSRC}/en/us/callie/$${dir}/$${rate}/$${filename} to ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}" \
+							${MV} ${WRKSRC}/en/us/callie/$${dir}/$${rate}/$${filename} ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename} \
+						else \
+							${ECHO_MSG} "${LOCALBASE}/bin/sox -v ${SCALE} ${WRKSRC}/en/us/callie/$${dir}/48000/$${filename} -r $${rate} -c 1 ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}"; \
+							${LOCALBASE}/bin/sox -v ${SCALE} "${WRKSRC}/en/us/callie/$${dir}/48000/$${filename}" -r $${rate} -c 1 "${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}"; \
 						fi \
-					done; \
+					fi \
 				done; \
-			fi \
+				echo "@rmdir share/${BASE_PORTNAME}/sounds/en/us/callie/$${dir}/$${rate}/" >> ${PLIST}; \
+			done; \
 		done; \
 		${TOUCH} ${WRKDIR}/ENGLISH.done; \
 	fi
-	if [ "${WITH_RUSSIAN}" != "" -a ! -e "${WRKDIR}/RUSSIAN.done" ]; then \
+	if [ "${WITH_DOWNLOAD}" != "true" -a "${WITH_RUSSIAN}" != "" -a ! -e "${WRKDIR}/RUSSIAN.done" ]; then \
 		for rate in ${BITRATES}; do \
 			${ECHO_MSG} "WORKING on $${rate}!"; \
-			if [ "$${rate}" -eq "48000" ]; then \
-				${CP} -R ${WRKSRC}/ru/RU/elena/ ${WRKDIR}/tmp/ru/RU/elena/; \
-			else \
-				for dir in `ls ${WRKSRC}/ru/RU/elena/`; do \
-					${MKDIR} ${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/; \
-					echo "@rmdir share/${BASE_PORTNAME}/sounds/ru/RU/elena/$${dir}/$${rate}/" >> ${PLIST}; \
-					for filename in `ls ${WRKSRC}/ru/RU/elena/$${dir}/48000`; do \
-						echo "share/${BASE_PORTNAME}/sounds/ru/RU/elena/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
-						if [ ! -e "${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}" ]; then \
-							${ECHO_MSG} "${LOCALBASE}/bin/sox -v 0.2 ${WRKSRC}/ru/RU/elena/$${dir}/48000/$${filename} -r $${rate} -c 1 ${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}"; \
-							${LOCALBASE}/bin/sox -v 0.2 "${WRKSRC}/ru/RU/elena/$${dir}/48000/$${filename}" -r $${rate} -c 1 "${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}"; \
+			for dir in `ls ${WRKSRC}/ru/RU/elena/`; do \
+				${MKDIR} ${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/; \
+				for filename in `ls ${WRKSRC}/ru/RU/elena/$${dir}/48000`; do \
+					echo "share/${BASE_PORTNAME}/sounds/ru/RU/elena/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
+					if [ ! -e "${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}" ]; then \
+						if [ "${WITH_DOWNLOAD}" = "true" ]; then \
+							${ECHO_MSG} "Moving ${WRKSRC}/ru/RU/elena/$${dir}/$${rate}/$${filename}" \
+							${MV} ${WRKSRC}/ru/RU/elena/$${dir}/$${rate}/$${filename} ${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename} \
+						else \
+							${ECHO_MSG} "${LOCALBASE}/bin/sox -v ${SCALE} ${WRKSRC}/ru/RU/elena/$${dir}/48000/$${filename} -r $${rate} -c 1 ${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}"; \
+							${LOCALBASE}/bin/sox -v ${SCALE} "${WRKSRC}/ru/RU/elena/$${dir}/48000/$${filename}" -r $${rate} -c 1 "${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}"; \
 						fi \
-					done; \
+					fi \
 				done; \
-			fi \
+				echo "@rmdir share/${BASE_PORTNAME}/sounds/ru/RU/elena/$${dir}/$${rate}/" >> ${PLIST}; \
+			done; \
 		done; \
 		${TOUCH} ${WRKDIR}/RUSSIAN.done; \
 	fi
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/audio/freeswitch-sounds/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo	19 Mar 2011 12:28:06 -0000	1.2
+++ distinfo	6 Aug 2011 14:22:12 -0000
@@ -1,2 +1,16 @@
-SHA256 (freeswitch-sounds/freeswitch-sounds-en-us-callie-48000-1.0.13.tar.gz) = 6920dfdf15b2d089688c1f069e6570a4485eee70eb6bd4f1e3ffe52a6a8e0d7a
-SIZE (freeswitch-sounds/freeswitch-sounds-en-us-callie-48000-1.0.13.tar.gz) = 58647498
+SHA256 (freeswitch-sounds/freeswitch-sounds-en-us-callie-8000-1.0.16.tar.gz) = c88c360f4cf234597ba7ecbb9693be8ed42b31882ffc7ba02d10d180b2369899
+SIZE (freeswitch-sounds/freeswitch-sounds-en-us-callie-8000-1.0.16.tar.gz) = 12910395
+SHA256 (freeswitch-sounds/freeswitch-sounds-en-us-callie-16000-1.0.16.tar.gz) = bf0e3f38ff2e1fd3ba0414f6983ed7ef9871bc86c75775235f6077471a5e8ea1
+SIZE (freeswitch-sounds/freeswitch-sounds-en-us-callie-16000-1.0.16.tar.gz) = 25739233
+SHA256 (freeswitch-sounds/freeswitch-sounds-en-us-callie-32000-1.0.16.tar.gz) = 63eb497b86fa5e6da353970cdf76da17df43f246d3ea9979fa76083eacc9a449
+SIZE (freeswitch-sounds/freeswitch-sounds-en-us-callie-32000-1.0.16.tar.gz) = 50567956
+SHA256 (freeswitch-sounds/freeswitch-sounds-en-us-callie-48000-1.0.16.tar.gz) = 51d84024d6091c13521fea4397e5d8d21c087770aa4984308d7157a10b034505
+SIZE (freeswitch-sounds/freeswitch-sounds-en-us-callie-48000-1.0.16.tar.gz) = 87130408
+SHA256 (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-8000-1.0.12.tar.gz) = 44db35574216af8ccbb48a7f1a08065df253adb4cebed8bc7ece7d0a4da920e7
+SIZE (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-8000-1.0.12.tar.gz) = 9115259
+SHA256 (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-16000-1.0.12.tar.gz) = aef0d3dc7fed657bc9c9d5ebbb458bc28e55c62af0087623ad060f1b4de3c74c
+SIZE (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-16000-1.0.12.tar.gz) = 17952582
+SHA256 (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-32000-1.0.12.tar.gz) = 3be071456c03d8eac191f1a417ffcc48eb7100633cbb8d8cc62fde1c328ede08
+SIZE (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-32000-1.0.12.tar.gz) = 35345749
+SHA256 (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-48000-1.0.12.tar.gz) = 12e164bbc99729a87d9a57bff557b6a190b5349b30cad71dcae458d92288aa3b
+SIZE (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-48000-1.0.12.tar.gz) = 51864057
--- fs.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list