Blame SOURCES/festival-2.5.0-siteinit.patch

71ab7a
diff -u --recursive festival-vanilla/doc/festival.texi festival/doc/festival.texi
71ab7a
--- festival-vanilla/doc/festival.texi	2017-09-04 11:54:08.000000000 -0400
71ab7a
+++ festival/doc/festival.texi	2018-09-09 10:04:50.409877809 -0400
71ab7a
@@ -936,14 +936,15 @@
71ab7a
 @cindex initialization
71ab7a
 @cindex installation initialization
71ab7a
 @cindex @file{init.scm}
71ab7a
-@cindex @file{siteinit.scm}
71ab7a
+@cindex @file{/etc/festival.scm}
71ab7a
+@cindex @file{/etc/festivalvars.scm}
71ab7a
 Once compiled Festival may be further customized for particular sites.
71ab7a
 At start up time Festival loads the file @file{init.scm} from its
71ab7a
 library directory.  This file further loads other necessary files such
71ab7a
 as phoneset descriptions, duration parameters, intonation parameters,
71ab7a
 definitions of voices etc.  It will also load the files
71ab7a
-@file{sitevars.scm} and @file{siteinit.scm} if they exist.  
71ab7a
-@file{sitevars.scm} is loaded after the basic Scheme library functions
71ab7a
+@file{/etc/festivalvars.scm} and @file{/etc/festival.scm} if they exist.
71ab7a
+@file{/etc/festivalvars.scm} is loaded after the basic Scheme library functions
71ab7a
 are loaded but before any of the festival related functions are
71ab7a
 loaded.  This file is intended to set various path names before
71ab7a
 various subsystems are loaded.  Typically variables such
71ab7a
@@ -951,17 +952,17 @@
71ab7a
 @code{voices_dir} (pointing to voice directories) should
71ab7a
 be reset here if necessary.
71ab7a
 
71ab7a
-@cindex change libdir at run-time
71ab7a
+@cindex change libdir or datadir at run-time
71ab7a
 @cindex run-time configuration
71ab7a
 @cindex @code{load-path}
71ab7a
 The default installation will try to find its lexicons and voices
71ab7a
 automatically based on the value of @code{load-path} (this is derived
71ab7a
-from @code{FESTIVAL_HOME} at compilation time or by using the @code{--libdir}
71ab7a
+from @code{FESTIVAL_HOME} at compilation time or by using the @code{--datadir}
71ab7a
 at run-time).  If the voices and lexicons have been unpacked into
71ab7a
 subdirectories of the library directory (the default) then no site
71ab7a
 specific initialization of the above pathnames will be necessary.
71ab7a
 
71ab7a
-The second site specific file is @file{siteinit.scm}.  Typical examples
71ab7a
+The second site specific file is @file{/etc/festival.scm}.  Typical examples
71ab7a
 of local initialization are as follows.  The default audio output method
71ab7a
 is NCD's NAS system if that is supported as that's what we use normally
71ab7a
 in CSTR.  If it is not supported, any hardware specific mode is the
71ab7a
@@ -969,7 +970,7 @@
71ab7a
 But that default is just a setting in @file{init.scm}.  If for example
71ab7a
 in your environment you may wish the default audio output method to be
71ab7a
 8k mulaw through @file{/dev/audio} you should add the following line to
71ab7a
-your @file{siteinit.scm} file
71ab7a
+your @file{/etc/festival.scm} file
71ab7a
 @lisp
71ab7a
 (Parameter.set 'Audio_Method 'sunaudio)
71ab7a
 @end lisp
71ab7a
@@ -990,7 +991,7 @@
71ab7a
 for sample rate and file type.  When playing waveforms, Festival, by
71ab7a
 default, outputs as unheadered waveform in native byte order.  In this
71ab7a
 example you would set up the default audio playing mechanism in
71ab7a
-@file{siteinit.scm} as follows
71ab7a
+@file{/etc/festival.scm} as follows
71ab7a
 @lisp
71ab7a
 (Parameter.set 'Audio_Method 'Audio_Command)
71ab7a
 (Parameter.set 'Audio_Command "adplay -raw -r $SR $FILE")
71ab7a
@@ -1036,12 +1037,12 @@
71ab7a
 depend on many things but due to various licence (and resource)
71ab7a
 restrictions you may only have some diphone/nphone databases available
71ab7a
 in your installation.  The function name that is the value of
71ab7a
-@code{voice_default} is called immediately after @file{siteinit.scm} is
71ab7a
+@code{voice_default} is called immediately after @file{/etc/festival.scm} is
71ab7a
 loaded offering the opportunity for you to change it.  In
71ab7a
 the standard distribution no change should be required.  If you
71ab7a
 download all the distributed voices @code{voice_rab_diphone} is
71ab7a
 the default voice.  You may change this for a site by adding
71ab7a
-the following to @file{siteinit.scm} or per person by changing
71ab7a
+the following to @file{/etc/festival.scm} or per person by changing
71ab7a
 your @file{.festivalrc}.  For example if you wish to
71ab7a
 change the default voice to the American one @code{voice_ked_diphone}
71ab7a
 @lisp
71ab7a
@@ -1085,7 +1086,9 @@
71ab7a
 Copyright (C) University of Edinburgh, 1996-2003. All rights reserved.
71ab7a
 For details type `(festival_warranty)'
71ab7a
 festival> libdir
71ab7a
-"/projects/festival/lib/"
71ab7a
+"/usr/lib/festival"
71ab7a
+festival> datadir
71ab7a
+"/usr/share/festival"
71ab7a
 festival> ^D
71ab7a
 @end example
71ab7a
 This should show the pathname you set in your @file{config/config}.
71ab7a
@@ -1106,7 +1109,7 @@
71ab7a
 You have selected NAS as the audio output but have no server running on
71ab7a
 that machine or your @code{DISPLAY} or @code{AUDIOSERVER} environment
71ab7a
 variable is not set properly for your output device.  Either set these
71ab7a
-properly or change the audio output device in @file{lib/siteinit.scm} as
71ab7a
+properly or change the audio output device in @file{lib/festival.scm} as
71ab7a
 described above.
71ab7a
 
71ab7a
 Ensure your audio device actually works the way you think it does.  On
71ab7a
@@ -1136,7 +1139,7 @@
71ab7a
 @code{voice_rab_diphone} (@file{festvox_rabxxxx.tar.gz}) is the default
71ab7a
 voice and that @code{voice_ked_diphone} and @code{voice_don_diphone}
71ab7a
 (@file{festvox_kedxxxx.tar.gz} and @file{festvox_don.tar.gz}) are
71ab7a
-installed.  Also local settings in your @file{festival/lib/siteinit.scm}
71ab7a
+installed.  Also local settings in your @file{/etc/festival.scm}
71ab7a
 may affect these tests.  However, after installation it may
71ab7a
 be worth trying
71ab7a
 @example
71ab7a
Only in festival/doc: festival.texi.orig
71ab7a
Only in festival-vanilla/: festival
71ab7a
diff -u --recursive festival-vanilla/lib/init.scm festival/lib/init.scm
71ab7a
--- festival-vanilla/lib/init.scm	2017-09-04 11:54:08.000000000 -0400
71ab7a
+++ festival/lib/init.scm	2018-09-09 10:04:50.406877794 -0400
71ab7a
@@ -42,6 +42,10 @@
71ab7a
   "home-directory
71ab7a
    Place looked at for .festivalrc etc.")
71ab7a
 
71ab7a
+;;; system-wide startup initialization
71ab7a
+(if (probe_file (path-append sysconfdir "festivalvars.scm"))
71ab7a
+	(load (path-append sysconfdir "festivalvars.scm")))
71ab7a
+
71ab7a
 ;;;  User startup initialization, can be used to override load-path
71ab7a
 ;;;  to allow alternate basic modules to be loaded.
71ab7a
 (if (probe_file (path-append home-directory ".siodvarsrc"))
71ab7a
@@ -50,11 +54,6 @@
71ab7a
 (if (probe_file (path-append home-directory ".festivalvarsrc"))
71ab7a
     (load (path-append home-directory ".festivalvarsrc")))
71ab7a
 
71ab7a
-;;;  A chance to set various variables to a local setting e.g.
71ab7a
-;;;  lexdir, voices_dir audio etc etc.
71ab7a
-(if (probe_file (path-append libdir "sitevars.scm"))
71ab7a
-    (load (path-append libdir "sitevars.scm")))
71ab7a
-
71ab7a
 ;;; CSTR siod extensions
71ab7a
 (require 'cstr)
71ab7a
 
71ab7a
@@ -135,8 +134,8 @@
71ab7a
 ;;;
71ab7a
 ;;;  Local site initialization, if the file exists load it
71ab7a
 ;;;
71ab7a
-(if (probe_file (path-append libdir "siteinit.scm"))
71ab7a
-    (load (path-append libdir "siteinit.scm")))
71ab7a
+(if (probe_file (path-append sysconfdir "festival.scm"))
71ab7a
+    (load (path-append sysconfdir "festival.scm")))
71ab7a
 
71ab7a
 ;;;  User initialization, if a user has a personal customization
71ab7a
 ;;;  file loaded it
71ab7a
diff -u --recursive festival-vanilla/lib/synthesis.scm festival/lib/synthesis.scm
71ab7a
--- festival-vanilla/lib/synthesis.scm	2017-09-04 11:54:08.000000000 -0400
71ab7a
+++ festival/lib/synthesis.scm	2018-09-09 10:04:50.380877660 -0400
71ab7a
@@ -68,7 +68,7 @@
71ab7a
    The default list of functions to be run on all synthesized utterances
71ab7a
    after Wave_Synth.  This will normally be nil but if for some reason you
71ab7a
    need to change the gain or rescale *all* waveforms you could set the
71ab7a
-   function here, in your siteinit.scm.")
71ab7a
+   function here, in your /etc/festival.scm.")
71ab7a
 
71ab7a
 (defvar after_synth_hooks default_after_synth_hooks
71ab7a
   "after_synth_hooks
71ab7a
Only in festival/src/arch/festival: festival.cc.orig