1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
Author: Agustin Martin Domingo <agmartin@debian.org>
Description: Allow setting of dictionary path independently from libdir and datadir.
This is needed for multiarch, see http://bugs.debian.org/667592
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,15 @@
AC_SUBST(pkglibdir)
+dnl Explicit dict dir selection for Debian
+
+AC_ARG_ENABLE(debian-dict-dir,
+ AS_HELP_STRING([--enable-debian-dict-dir=DIR],[dictionaries dir PKGLIBDIR]),
+ debdictdir=$enable_debian_dict_dir,
+ debdictdir=$pkglibdir)
+
+AC_SUBST(debdictdir)
+
dnl optional features
AC_ARG_ENABLE(win32-relocatable,
--- a/Makefile.am
+++ b/Makefile.am
@@ -285,7 +285,7 @@
common/config.cpp: gen/dirs.h
gen/dirs.h: gen/mk-dirs_h.pl
- cd gen; perl mk-dirs_h.pl ${prefix} ${pkgdatadir} ${pkglibdir} ${sysconfdir} > dirs.h
+ cd gen; perl mk-dirs_h.pl ${prefix} ${pkgdatadir} ${pkglibdir} ${sysconfdir} ${debdictdir} > dirs.h
EXTRA_DIST += gen/mk-dirs_h.pl
CLEANFILES += gen/dirs.h
--- a/gen/mk-dirs_h.pl
+++ b/gen/mk-dirs_h.pl
@@ -1,7 +1,7 @@
foreach (@ARGV) {s|/+|/|g; s|/$||;}
-($prefix, $data, $lib, $conf) = @ARGV;
+($prefix, $data, $lib, $conf,$debdictdir) = @ARGV;
sub def ( $ ) {
return qq|"<prefix:$1>"| if $_[0] =~ m|^$prefix/?(.+)$|;
@@ -13,4 +13,4 @@
print qq|#define DICT_DIR "<data-dir>"\n| if $lib eq $data;
printf qq|#define DICT_DIR %s\n|, def($lib) if $lib ne $data;
printf qq|#define CONF_DIR %s\n|, def($conf);
-
+printf qq|#define DEBIAN_DICT_DIR %s\n|, def($debdictdir);
--- a/common/config.cpp
+++ b/common/config.cpp
@@ -1365,7 +1365,7 @@
N_("location of language data files")}
, {"dict-alias", KeyInfoList, "",
N_("create dictionary aliases")}
- , {"dict-dir", KeyInfoString, DICT_DIR,
+ , {"dict-dir", KeyInfoString, DEBIAN_DICT_DIR,
N_("location of the main word list")}
, {"encoding", KeyInfoString, "!encoding",
N_("encoding to expect data to be in"), KEYINFO_COMMON}
@@ -1522,4 +1522,3 @@
}
}
-
|