From 9bd3861cd268c31026d6d4eb20ef0951cfc9f026 Mon Sep 17 00:00:00 2001
From: andy <a.heather@opencfd.co.uk>
Date: Fri, 13 Jun 2008 16:27:15 +0100
Subject: [PATCH] applying Mark's patch to update sed statements

---
 bin/tools/buildParaViewFunctions | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/tools/buildParaViewFunctions b/bin/tools/buildParaViewFunctions
index f6a09c18864..6bbd747555b 100644
--- a/bin/tools/buildParaViewFunctions
+++ b/bin/tools/buildParaViewFunctions
@@ -90,8 +90,8 @@ addPythonSupport ()
         else
             # Try to obtain $PYTHON_LIBRARY if not set
             # - assumes dynamically linked
-            PYTHON_LIBRARY=`ldd $WHICH_PYTHON | grep libpython | \
-                sed 's/.* => \(.*\) (.*/\1/'`
+            PYTHON_LIBRARY=`ldd $WHICH_PYTHON | \
+                sed -ne '/libpython/s/.* => \(.*\) (.*/\1/p'`
         fi
 
         if [ ! -n "$PYTHON_LIBRARY" ]; then
@@ -102,7 +102,7 @@ addPythonSupport ()
             exit 1
         fi
         PYTHON_MAJOR_VERSION=`echo $PYTHON_LIBRARY | \
-            sed 's/.*libpython\(.*\).so.*/\1/'`
+            sed 's/.*libpython\(.*\)\.so.*/\1/'`
         PYTHON_INCLUDE_DIR=/usr/include/python$PYTHON_MAJOR_VERSION
 
         addCMakeVariable "PARAVIEW_ENABLE_PYTHON=ON"
-- 
GitLab