$OpenBSD: patch-src_dirdef_cpp,v 1.5 2016/11/12 20:50:41 jca Exp $
--- src/dirdef.cpp.orig	Sun Sep  4 19:06:42 2016
+++ src/dirdef.cpp	Mon Sep 12 07:52:20 2016
@@ -86,10 +86,16 @@ void DirDef::sort()
 
 static QCString encodeDirName(const QCString &anchor)
 {
+  char *name, *prefix;
   // convert to md5 hash
   uchar md5_sig[16];
   QCString sigStr(33);
-  MD5Buffer((const unsigned char *)anchor.data(),anchor.length(),md5_sig);
+  name = (char*)anchor.data();
+  prefix = getenv("DOXYGEN_ENCODE_PATH_STRIP");
+  if(prefix != NULL)
+    if (strstr(name, prefix) == name)
+      name += strlen(prefix);
+  MD5Buffer((const unsigned char*)name,strlen(name),md5_sig);
   MD5SigToString(md5_sig,sigStr.rawData(),33);
   return sigStr;
 
