From 25fa25f10d6f683c9d580d5b96eea5e0c8cb58de Mon Sep 17 00:00:00 2001
From: "Jose E. Roman" <jroman@dsic.upv.es>
Date: Tue, 6 Mar 2018 08:59:33 +0900
Subject: [PATCH] Set SLEPC_DIR appropriately in slepcconf.h for --prefix
 installs

Fixes Issue #11
Reported-by: Drew Parsons
---
 config/install.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/config/install.py b/config/install.py
index 3edaf3f..f7a25da 100755
--- a/config/install.py
+++ b/config/install.py
@@ -206,6 +206,7 @@ class Installer:
       line = line.replace(os.path.realpath(os.path.join(self.rootDir, 'bin')), self.installBinDir)
       line = line.replace(os.path.join(self.rootDir, 'include'), self.installIncludeDir)
       line = line.replace(os.path.realpath(os.path.join(self.rootDir, 'include')), self.installIncludeDir)
+      line = line.replace(self.rootDir, self.installDir)
       # remove SLEPC_DIR/PETSC_ARCH variables from conf-makefiles. They are no longer necessary
       line = line.replace('${SLEPC_DIR}/${PETSC_ARCH}', self.installDir)
       line = line.replace('PETSC_ARCH=${PETSC_ARCH}', '')
@@ -222,6 +223,7 @@ class Installer:
     for file in ['slepc_rules', 'slepc_variables','slepcrules', 'slepcvariables']:
       self.fixConfFile(os.path.join(self.destConfDir,file))
     self.fixConfFile(os.path.join(self.destLibDir,'pkgconfig','SLEPc.pc'))
+    self.fixConfFile(os.path.join(self.destIncludeDir,'slepcconf.h'))
     return
 
   def createUninstaller(self):
-- 
2.7.4.1.g5468f9e

