View | Details | Raw Unified | Return to bug 159550 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-44 / +68 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	freeswitch-sounds
8
PORTNAME=	freeswitch-sounds
9
PORTVERSION=	1.0.13
9
PORTVERSION=	1.0.16
10
PORTREVISION=	1
11
CATEGORIES=	audio
10
CATEGORIES=	audio
12
MASTER_SITES=	http://files.freeswitch.org/
11
MASTER_SITES=	http://files.freeswitch.org/
13
DIST_SUBDIR=	freeswitch-sounds
12
DIST_SUBDIR=	freeswitch-sounds
Lines 20-26 Link Here
20
19
21
BASE_PORTNAME=	freeswitch
20
BASE_PORTNAME=	freeswitch
22
21
23
OPTIONS=	8K           "Compile sounds for 8K" on \
22
OPTIONS=	DOWNLOAD     "Don't resample, download all." on \
23
		8K           "Compile sounds for 8K" on \
24
		16K          "Compile sounds for 16K" on \
24
		16K          "Compile sounds for 16K" on \
25
		32K          "Compile sounds for 32K" on \
25
		32K          "Compile sounds for 32K" on \
26
		48K          "Compile sounds for 48K" on \
26
		48K          "Compile sounds for 48K" on \
Lines 28-39 Link Here
28
		RUSSIAN      "Compile Russian Language Sounds" off
28
		RUSSIAN      "Compile Russian Language Sounds" off
29
29
30
.include <bsd.port.options.mk>
30
.include <bsd.port.options.mk>
31
32
.if ! defined(WITH_DOWNLOAD)
33
BUILD_DEPENDS+=	sox:${PORTSDIR}/audio/sox
34
.endif
35
36
.if defined(WITH_8K)
37
BITRATES+=	8000
38
.endif
39
.if defined(WITH_16K)
40
BITRATES+=	16000
41
.endif
42
.if defined(WITH_32K)
43
BITRATES+=	32000
44
.endif
45
.if defined(WITH_48K)
46
BITRATES+=	48000
47
.endif
48
31
.if defined(WITH_ENGLISH)
49
.if defined(WITH_ENGLISH)
50
.if defined(WITH_DOWNLOAD)
51
.for rate in ${BITRATES}
52
DISTFILES+=	${PORTNAME}-en-us-callie-${rate}-${PORTVERSION}${EXTRACT_SUFX}
53
.endfor
54
.else
32
DISTFILES+=	${PORTNAME}-en-us-callie-48000-${PORTVERSION}${EXTRACT_SUFX}
55
DISTFILES+=	${PORTNAME}-en-us-callie-48000-${PORTVERSION}${EXTRACT_SUFX}
33
.endif
56
.endif
57
.endif
34
.if defined(WITH_RUSSIAN)
58
.if defined(WITH_RUSSIAN)
59
.if defined(WITH_DOWNLOAD)
60
.for rate in ${BITRATES}
61
DISTFILES+=	${PORTNAME}-ru-RU-elena-${rate}-1.0.12${EXTRACT_SUFX}
62
.endfor
63
.else
35
DISTFILES+=	${PORTNAME}-ru-RU-elena-48000-1.0.12${EXTRACT_SUFX}
64
DISTFILES+=	${PORTNAME}-ru-RU-elena-48000-1.0.12${EXTRACT_SUFX}
36
.endif
65
.endif
66
.endif
37
.if ! defined(WITH_ENGLISH) && ! defined(WITH_RUSSIAN)
67
.if ! defined(WITH_ENGLISH) && ! defined(WITH_RUSSIAN)
38
BROKEN=	you must build with either English, Russian, or both
68
BROKEN=	you must build with either English, Russian, or both
39
.endif
69
.endif
Lines 42-104 Link Here
42
BROKEN=	you must build with at least one of 8K, 16K, 32K, or 48K sounds
72
BROKEN=	you must build with at least one of 8K, 16K, 32K, or 48K sounds
43
.endif
73
.endif
44
74
45
.if defined(WITH_8K)
75
.if defined(FREESWITCH_VSCALE)
46
BUILD_DEPENDS+=	sox:${PORTSDIR}/audio/sox
76
SCALE=${FREESWITCH_VSCALE}
47
BITRATES+=	8000
77
.else
48
.endif
78
SCALE=0.2
49
.if defined(WITH_16K)
50
BUILD_DEPENDS+=	sox:${PORTSDIR}/audio/sox
51
BITRATES+=	16000
52
.endif
53
.if defined(WITH_32K)
54
BUILD_DEPENDS+=	sox:${PORTSDIR}/audio/sox
55
BITRATES+=	32000
56
.endif
57
.if defined(WITH_48K)
58
BITRATES+=	48000
59
.endif
79
.endif
60
80
61
do-build:
81
do-build:
62
	@${ECHO_MSG} "Building for bitrates: ${BITRATES}"
82
	@${ECHO_MSG} "Building for bitrates: ${BITRATES}"
83
	@${ECHO_MSG} "Download >>>${WITH_DOWNLOAD}<<<"
84
	@${ECHO_MSG} "Scaling audio to ${SCALE}"
63
	if [ "${WITH_ENGLISH}" != "" -a ! -e "${WRKDIR}/ENGLISH.done" ]; then \
85
	if [ "${WITH_ENGLISH}" != "" -a ! -e "${WRKDIR}/ENGLISH.done" ]; then \
64
		for rate in ${BITRATES}; do \
86
		for rate in ${BITRATES}; do \
65
			${ECHO_MSG} "WORKING on $${rate}!"; \
87
			${ECHO_MSG} "WORKING on $${rate}!"; \
66
			if [ "$${rate}" -eq "48000" ]; then \
88
			for dir in `ls ${WRKSRC}/en/us/callie/`; do \
67
				${CP} -R ${WRKSRC}/en/us/callie/ ${WRKDIR}/tmp/en/us/callie/; \
89
				${MKDIR} ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/; \
68
			else \
90
				for filename in `ls ${WRKSRC}/en/us/callie/$${dir}/48000`; do \
69
				for dir in `ls ${WRKSRC}/en/us/callie/`; do \
91
					echo "share/${BASE_PORTNAME}/sounds/en/us/callie/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
70
					${MKDIR} ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/; \
92
					if [ ! -e "${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}" ]; then \
71
					echo "@rmdir share/${BASE_PORTNAME}/sounds/en/us/callie/$${dir}/$${rate}/" >> ${PLIST}; \
93
						if [ "${WITH_DOWNLOAD}" = "true" ]; then \
72
					for filename in `ls ${WRKSRC}/en/us/callie/$${dir}/48000`; do \
94
							${ECHO_MSG} "Moving ${WRKSRC}/en/us/callie/$${dir}/$${rate}/$${filename} to ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}" \
73
						echo "share/${BASE_PORTNAME}/sounds/en/us/callie/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
95
							${MV} ${WRKSRC}/en/us/callie/$${dir}/$${rate}/$${filename} ${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename} \
74
						if [ ! -e "${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}" ]; then \
96
						else \
75
							${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}"; \
97
							${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}"; \
76
							${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}"; \
98
							${LOCALBASE}/bin/sox -v ${SCALE} "${WRKSRC}/en/us/callie/$${dir}/48000/$${filename}" -r $${rate} -c 1 "${WRKDIR}/tmp/en/us/callie/$${dir}/$${rate}/$${filename}"; \
77
						fi \
99
						fi \
78
					done; \
100
					fi \
79
				done; \
101
				done; \
80
			fi \
102
				echo "@rmdir share/${BASE_PORTNAME}/sounds/en/us/callie/$${dir}/$${rate}/" >> ${PLIST}; \
103
			done; \
81
		done; \
104
		done; \
82
		${TOUCH} ${WRKDIR}/ENGLISH.done; \
105
		${TOUCH} ${WRKDIR}/ENGLISH.done; \
83
	fi
106
	fi
84
	if [ "${WITH_RUSSIAN}" != "" -a ! -e "${WRKDIR}/RUSSIAN.done" ]; then \
107
	if [ "${WITH_DOWNLOAD}" != "true" -a "${WITH_RUSSIAN}" != "" -a ! -e "${WRKDIR}/RUSSIAN.done" ]; then \
85
		for rate in ${BITRATES}; do \
108
		for rate in ${BITRATES}; do \
86
			${ECHO_MSG} "WORKING on $${rate}!"; \
109
			${ECHO_MSG} "WORKING on $${rate}!"; \
87
			if [ "$${rate}" -eq "48000" ]; then \
110
			for dir in `ls ${WRKSRC}/ru/RU/elena/`; do \
88
				${CP} -R ${WRKSRC}/ru/RU/elena/ ${WRKDIR}/tmp/ru/RU/elena/; \
111
				${MKDIR} ${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/; \
89
			else \
112
				for filename in `ls ${WRKSRC}/ru/RU/elena/$${dir}/48000`; do \
90
				for dir in `ls ${WRKSRC}/ru/RU/elena/`; do \
113
					echo "share/${BASE_PORTNAME}/sounds/ru/RU/elena/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
91
					${MKDIR} ${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/; \
114
					if [ ! -e "${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}" ]; then \
92
					echo "@rmdir share/${BASE_PORTNAME}/sounds/ru/RU/elena/$${dir}/$${rate}/" >> ${PLIST}; \
115
						if [ "${WITH_DOWNLOAD}" = "true" ]; then \
93
					for filename in `ls ${WRKSRC}/ru/RU/elena/$${dir}/48000`; do \
116
							${ECHO_MSG} "Moving ${WRKSRC}/ru/RU/elena/$${dir}/$${rate}/$${filename}" \
94
						echo "share/${BASE_PORTNAME}/sounds/ru/RU/elena/$${dir}/$${rate}/$${filename}" >> ${PLIST}; \
117
							${MV} ${WRKSRC}/ru/RU/elena/$${dir}/$${rate}/$${filename} ${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename} \
95
						if [ ! -e "${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}" ]; then \
118
						else \
96
							${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}"; \
119
							${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}"; \
97
							${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}"; \
120
							${LOCALBASE}/bin/sox -v ${SCALE} "${WRKSRC}/ru/RU/elena/$${dir}/48000/$${filename}" -r $${rate} -c 1 "${WRKDIR}/tmp/ru/RU/elena/$${dir}/$${rate}/$${filename}"; \
98
						fi \
121
						fi \
99
					done; \
122
					fi \
100
				done; \
123
				done; \
101
			fi \
124
				echo "@rmdir share/${BASE_PORTNAME}/sounds/ru/RU/elena/$${dir}/$${rate}/" >> ${PLIST}; \
125
			done; \
102
		done; \
126
		done; \
103
		${TOUCH} ${WRKDIR}/RUSSIAN.done; \
127
		${TOUCH} ${WRKDIR}/RUSSIAN.done; \
104
	fi
128
	fi
(-)distinfo (-2 / +16 lines)
Lines 1-2 Link Here
1
SHA256 (freeswitch-sounds/freeswitch-sounds-en-us-callie-48000-1.0.13.tar.gz) = 6920dfdf15b2d089688c1f069e6570a4485eee70eb6bd4f1e3ffe52a6a8e0d7a
1
SHA256 (freeswitch-sounds/freeswitch-sounds-en-us-callie-8000-1.0.16.tar.gz) = c88c360f4cf234597ba7ecbb9693be8ed42b31882ffc7ba02d10d180b2369899
2
SIZE (freeswitch-sounds/freeswitch-sounds-en-us-callie-48000-1.0.13.tar.gz) = 58647498
2
SIZE (freeswitch-sounds/freeswitch-sounds-en-us-callie-8000-1.0.16.tar.gz) = 12910395
3
SHA256 (freeswitch-sounds/freeswitch-sounds-en-us-callie-16000-1.0.16.tar.gz) = bf0e3f38ff2e1fd3ba0414f6983ed7ef9871bc86c75775235f6077471a5e8ea1
4
SIZE (freeswitch-sounds/freeswitch-sounds-en-us-callie-16000-1.0.16.tar.gz) = 25739233
5
SHA256 (freeswitch-sounds/freeswitch-sounds-en-us-callie-32000-1.0.16.tar.gz) = 63eb497b86fa5e6da353970cdf76da17df43f246d3ea9979fa76083eacc9a449
6
SIZE (freeswitch-sounds/freeswitch-sounds-en-us-callie-32000-1.0.16.tar.gz) = 50567956
7
SHA256 (freeswitch-sounds/freeswitch-sounds-en-us-callie-48000-1.0.16.tar.gz) = 51d84024d6091c13521fea4397e5d8d21c087770aa4984308d7157a10b034505
8
SIZE (freeswitch-sounds/freeswitch-sounds-en-us-callie-48000-1.0.16.tar.gz) = 87130408
9
SHA256 (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-8000-1.0.12.tar.gz) = 44db35574216af8ccbb48a7f1a08065df253adb4cebed8bc7ece7d0a4da920e7
10
SIZE (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-8000-1.0.12.tar.gz) = 9115259
11
SHA256 (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-16000-1.0.12.tar.gz) = aef0d3dc7fed657bc9c9d5ebbb458bc28e55c62af0087623ad060f1b4de3c74c
12
SIZE (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-16000-1.0.12.tar.gz) = 17952582
13
SHA256 (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-32000-1.0.12.tar.gz) = 3be071456c03d8eac191f1a417ffcc48eb7100633cbb8d8cc62fde1c328ede08
14
SIZE (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-32000-1.0.12.tar.gz) = 35345749
15
SHA256 (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-48000-1.0.12.tar.gz) = 12e164bbc99729a87d9a57bff557b6a190b5349b30cad71dcae458d92288aa3b
16
SIZE (freeswitch-sounds/freeswitch-sounds-ru-RU-elena-48000-1.0.12.tar.gz) = 51864057

Return to bug 159550