nixpkgs/pkgs/development/libraries/poppler/datadir_env.patch
Yury G. Kudryashov 63959f2a5a Let poppler use ${POPPLER_DATADIR}
Also upgrade poppler-data

svn path=/nixpkgs/trunk/; revision=29342
2011-09-19 08:35:30 +00:00

14 lines
659 B
Diff

diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index 2e11bb0..a277ab9 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -748,7 +748,7 @@ GlobalParams::GlobalParams(const char *customPopplerDataDir)
void GlobalParams::scanEncodingDirs() {
GDir *dir;
GDirEntry *entry;
- const char *dataRoot = popplerDataDir ? popplerDataDir : POPPLER_DATADIR;
+ const char *dataRoot = popplerDataDir ? popplerDataDir : ( getenv("POPPLER_DATADIR") ? getenv("POPPLER_DATADIR") : POPPLER_DATADIR );
// allocate buffer large enough to append "/nameToUnicode"
size_t bufSize = strlen(dataRoot) + strlen("/nameToUnicode") + 1;