Репозитории ALT
S: | 2.5-alt0.4 |
5.1: | 1.96-alt7 |
4.1: | 1.96-alt5.M41.1 |
4.0: | 1.96-alt2.6 |
3.0: | |
+backports: | 1.96-alt0.M30.1 |
Другие репозитории
Upstream: | 1.96-beta |
Группа :: Звук
Пакет: festival
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: speech-tools_1.2.95-0.4-datadir.diff
Скачать
Скачать
--- speech-tools-1.2.3.orig/lib/siod/siod.scm
+++ speech-tools-1.2.3/lib/siod/siod.scm
@@ -420,19 +420,28 @@
;; will be set automatically on start-up
(defvar libdir '<automatically_set>
"libdir
- The pathname of the run-time libary directory. Note reseting is
- almost definitely not what you want to do. This value is automatically
- set at start up from the value specifed at compile-time or the value
- specifed with --libdir on the command line. A number of other variables
- depend on this value.")
+ The pathname of the architecture-dependent run-time libary directory.
+ Note reseting is almost definitely not what you want to do. This
+ value is automatically set at start up from the value specifed at
+ compile-time or the value specifed with --libdir on the command line.
+ A number of other variables depend on this value.")
+
+(defvar datadir '<automatically_set>
+ "datadir
+ The pathname of the architecture-independent run-time libary
+ directory. Note reseting is almost definitely not what you want to
+ do. This value is automatically set at start up from the value
+ specifed at compile-time or the value specifed with --datadir on the
+ command line. A number of other variables depend on this value.")
-(defvar load-path (list libdir)
+(defvar load-path (list datadir)
"load-path
A list of directories containing .scm files. Used for various functions
such as load_library and require. Follows the same use as EMACS. By
- default it is set up to the compile-time library directory but may be
- changed by the user at run time, by adding a user's own library directory
- or even replacing all of the standard library. [see Site initialization]")
+ default it is set up to the compile-time architecture-independent
+ library directory but may be changed by the user at run time, by
+ adding a user's own library directory or even replacing all of the
+ standard library. [see Site initialization]")
;; will be set automatically on start-up
(defvar *ostype* 'unknown
@@ -441,12 +450,6 @@
on, e.g. SunOS5, FreeBSD, linux etc. The value is taken from the Makefile
variable OSTYPE at compile time.")
-(defvar etc-path (path-append libdir "etc/" *ostype*)
- "etc-path
- A list of directories where binaries specific to Festival may be located.
- This variable is automatically set to LIBDIR/etc/OSTYPE/
- and that path is added to the end of the UNIX PATH environment variable.")
-
(define (library_expand_filename fname)
"(library_expand_filename FILENAME)
Search for filename by appending FILENAME to each member of load-path.
--- speech-tools-1.2.3.orig/main/xml_parser_main.cc
+++ speech-tools-1.2.3/main/xml_parser_main.cc
@@ -165,7 +165,7 @@
al.sval("-sysdir") + "/\\1");
pclass.register_id("//CSTR//EST \\(.*\\)",
- EST_String::cat(est_libdir, "/\\1.dtd"));
+ EST_String::cat(est_datadir, "/\\1.dtd"));
/* An individual parser runs over a single source.
*/
--- speech-tools-1.2.3.orig/main/siod_main.cc
+++ speech-tools-1.2.3/main/siod_main.cc
@@ -180,7 +180,7 @@
EST_Pathname initfile;
// Load library init first
- initfile = EST_Pathname(est_libdir).as_directory();
+ initfile = EST_Pathname(est_datadir).as_directory();
initfile += "siod";
initfile += "init.scm";
@@ -199,9 +199,12 @@
lib = EST_Pathname(est_libdir).as_directory();
lib += "siod";
-
siod_set_lval("libdir",strintern(lib));
+ lib = EST_Pathname(est_datadir).as_directory();
+ lib += "siod";
+ siod_set_lval("datadir",strintern(lib));
+
if (!strcmp(est_ostype,""))
siod_set_lval("*ostype*",rintern(est_ostype));
siod_set_lval("est_version",
@@ -223,19 +226,10 @@
cons(flocons(minor),
cons(flocons(subminor),NIL))));
- EST_Pathname etcdircommon = est_libdir;
- etcdircommon += "etc";
-
- EST_Pathname etcdir = etcdircommon;
- etcdir += est_ostype;
-
// Modify my PATH to include these directories
- siod_set_lval("etc-path",cons(rintern(etcdir),
- cons(rintern(etcdircommon),NIL)));
-
EST_String path = getenv("PATH");
- path += ":" + EST_String(etcdir) + ":" + EST_String(etcdircommon);
+ path += ":" + EST_String(est_libdir);
putenv(wstrdup("PATH=" + path));
--- speech-tools-1.2.3.orig/utils/EST_cutils.c
+++ speech-tools-1.2.3/utils/EST_cutils.c
@@ -54,12 +54,19 @@
#ifdef ESTLIBDIRC
# define ESTLIBDIR STRINGIZE(ESTLIBDIRC)
#endif
-
#ifndef ESTLIBDIR
#define ESTLIBDIR "/usr/local/lib/speech_tools"
#endif
+#ifdef ESTDATADIRC
+# define ESTDATADIR STRINGIZE(ESTDATADIRC)
+#endif
+#ifndef ESTDATADIR
+#define ESTDATADIR "/usr/local/share/speech_tools"
+#endif
+
const char * const est_libdir = ESTLIBDIR;
+const char * const est_datadir = ESTDATADIR;
const char * const est_ostype = STRINGIZE(ESTOSTYPE);
--- speech-tools-1.2.3.orig/include/EST_cutils.h
+++ speech-tools-1.2.3/include/EST_cutils.h
@@ -48,6 +48,7 @@
extern const char * const est_tools_version;
extern const char * const est_name;
extern const char * const est_libdir;
+extern const char * const est_datadir;
extern const char * const est_ostype;
#include "EST_walloc.h"