1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 01:20:40 +00:00
nixpkgs/pkgs/development/libraries/poppler/datadir_env.patch

14 lines
659 B
Diff
Raw Normal View History

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;