Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / liblangtag / liblangtag-0.2-datadir.patch
blob061f530f69db05569b414fb4a45e9b73f05573cb
1 --- misc/liblangtag-0.2/liblangtag/lt-xml.c 2012-02-02 09:54:51.000000000 +0100
2 +++ misc/build/liblangtag-0.2/liblangtag/lt-xml.c 2012-06-04 17:39:32.010299830 +0200
3 @@ -45,6 +45,14 @@
5 G_LOCK_DEFINE_STATIC (lt_xml);
7 +static const char* get_datadir()
8 +{
9 + const char* pEnv = getenv( "LIBO_LANGTAG_DATADIR");
10 + if (pEnv && *pEnv)
11 + return pEnv;
12 + return REGDATADIR;
15 /*< private >*/
16 static gboolean
17 lt_xml_read_subtag_registry(lt_xml_t *xml,
18 @@ -62,7 +70,7 @@
19 if (!g_file_test(regfile, G_FILE_TEST_EXISTS)) {
20 g_free(regfile);
21 #endif
22 - regfile = g_build_filename(REGDATADIR, "language-subtag-registry.xml", NULL);
23 + regfile = g_build_filename(get_datadir(), "language-subtag-registry.xml", NULL);
24 #ifdef GNOME_ENABLE_DEBUG
26 #endif
27 @@ -120,7 +128,7 @@
28 if (!g_file_test(regfile, G_FILE_TEST_EXISTS)) {
29 g_free(regfile);
30 #endif
31 - regfile = g_build_filename(REGDATADIR, "common", "bcp47", filename, NULL);
32 + regfile = g_build_filename(get_datadir(), "common", "bcp47", filename, NULL);
33 #ifdef GNOME_ENABLE_DEBUG
35 #endif