From e02bf8f90dba7cd7ac8874d7ee1baf782397784f Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 23 Apr 2012 14:00:25 -0400
Subject: [PATCH] add dictionaries to the Hunspell.cmake so that it gets
 installed

---
 build.sh                   | 27 +++++++++++++--------------
 indra/cmake/Hunspell.cmake |  1 +
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/build.sh b/build.sh
index 90818009c39..c14fdc006fc 100755
--- a/build.sh
+++ b/build.sh
@@ -15,6 +15,12 @@
 # * The basic convention is that the build name can be mapped onto a mercurial URL,
 #   which is also used as the "branch" name.
 
+check_for()
+{
+    if [ -e "$2" ]; then found_dict='FOUND'; else found_dict='MISSING'; fi
+    echo "$1 ${found_dict} '$2' " 1>&2
+}
+
 build_dir_Darwin()
 {
   echo build-darwin-i386
@@ -59,8 +65,7 @@ pre_build()
     && [ -r "$master_message_template_checkout/message_template.msg" ] \
     && template_verifier_master_url="-DTEMPLATE_VERIFIER_MASTER_URL=file://$master_message_template_checkout/message_template.msg"
 
-    echo -n "Before 'autobuild configure' ${build_dir}/packages/dictionaries " 1>&2
-    (test -d "${build_dir}/packages/dictionaries" && 'found' || echo 'missing' ) 1>&2
+    check_for "Before 'autobuild configure'" ${build_dir}/packages/dictionaries
 
     "$AUTOBUILD" configure -c $variant -- \
      -DPACKAGE:BOOL=ON \
@@ -71,10 +76,9 @@ pre_build()
      -DLL_TESTS:BOOL="$run_tests" \
      -DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url
 
-    echo -n "After 'autobuild configure' ${build_dir}/packages/dictionaries " 1>&2
-    (test -d "${build_dir}/packages/dictionaries" && 'found' || echo 'missing' ) 1>&2
+    check_for "After 'autobuild configure'" ${build_dir}/packages/dictionaries
 
- end_section "Pre$variant"
+  end_section "Pre$variant"
 }
 
 build()
@@ -84,8 +88,7 @@ build()
   then
     begin_section "Viewer$variant"
 
-    echo -n "Before 'autobuild build' ${build_dir}/packages/dictionaries " 1>&2
-    (test -d "${build_dir}/packages/dictionaries" && 'found' || echo 'missing' ) 1>&2
+    check_for "Before 'autobuild build'" ${build_dir}/packages/dictionaries
 
     if "$AUTOBUILD" build --no-configure -c $variant
     then
@@ -93,8 +96,7 @@ build()
     else
       echo false >"$build_dir"/build_ok
     fi
-    echo -n "After 'autobuild build' ${build_dir}/packages/dictionaries " 1>&2
-    (test -d "${build_dir}/packages/dictionaries" && 'found' || echo 'missing' ) 1>&2
+    check_for "After 'autobuild configure'" ${build_dir}/packages/dictionaries
 
     end_section "Viewer$variant"
   fi
@@ -190,15 +192,12 @@ eval "$("$AUTOBUILD" source_environment)"
 # dump environment variables for debugging
 env|sort
 
-
-echo -n "Before 'autobuild install' ${build_dir}/packages/dictionaries " 1>&2
-(test -d "${build_dir}/packages/dictionaries" && 'found' || echo 'missing' ) 1>&2
+check_for "Before 'autobuild install'" ${build_dir}/packages/dictionaries
 
 # Install packages.
 "$AUTOBUILD" install --skip-license-check
 
-echo -n "After 'autobuild install' ${build_dir}/packages/dictionaries " 1>&2
-(test -d "${build_dir}/packages/dictionaries" && 'found' || echo 'missing' ) 1>&2
+check_for "After 'autobuild install'" ${build_dir}/packages/dictionaries
 
 # Now run the build
 succeeded=true
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index def2198c936..24cf41f4e4a 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -8,6 +8,7 @@ if (STANDALONE)
   include(FindHUNSPELL)
 else (STANDALONE)
   use_prebuilt_binary(libhunspell)
+  use_prebuilt_binary(dictionaries)
   if (WINDOWS)
     set(HUNSPELL_LIBRARY libhunspell)
     set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell)
-- 
GitLab