summaryrefslogtreecommitdiffstats
path: root/media/sphinxbase/update.sh
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /media/sphinxbase/update.sh
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/sphinxbase/update.sh')
-rwxr-xr-xmedia/sphinxbase/update.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/media/sphinxbase/update.sh b/media/sphinxbase/update.sh
new file mode 100755
index 000000000..e0188b3ff
--- /dev/null
+++ b/media/sphinxbase/update.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#
+# Usage: ./update.sh <sphinxbase_directory>
+#
+# Copies the needed files from a directory containing the original
+# sphinxbase source, and applies any local patches we're carrying.
+
+
+# Create config.h
+echo "#if ( defined(_WIN32) || defined(__CYGWIN__) )" > config.h
+cat $1/include/win32/config.h >> config.h
+echo "#else" >> config.h
+cat $1/include/android/config.h >> config.h
+echo "#endif" >> config.h
+
+# Create sphinx_config.h
+echo "#if ( defined(_WIN32) || defined(__CYGWIN__) )" > sphinx_config.h
+cat $1/include/win32/sphinx_config.h >> sphinx_config.h
+echo "#else" >> sphinx_config.h
+cat $1/include/android/sphinx_config.h >> sphinx_config.h
+echo "#endif" >> sphinx_config.h
+sed -i '' -e 's/#define HAVE_LONG_LONG 1/\/*#define HAVE_LONG_LONG 1*\//g' sphinx_config.h
+
+# Copy created file
+cp sphinx_config.h sphinxbase/sphinx_config.h
+
+# Copy source files
+cp $1/include/sphinxbase/*.h sphinxbase/
+cp $1/src/libsphinxbase/fe/*.c src/libsphinxbase/fe/
+cp $1/src/libsphinxbase/fe/*.h src/libsphinxbase/fe/
+cp $1/src/libsphinxbase/feat/*.c src/libsphinxbase/feat/
+cp $1/src/libsphinxbase/lm/*.c src/libsphinxbase/lm/
+cp $1/src/libsphinxbase/lm/*.h src/libsphinxbase/lm/
+cp $1/src/libsphinxbase/util/*.c src/libsphinxbase/util/
+
+# Apply any patches against upstream here.
+patch -l -p1 < sbthread.patch