File pythia-honour-env-cxxflags.patch of Package pythia

Index: pythia8210/configure
===================================================================
--- pythia8210.orig/configure
+++ pythia8210/configure
@@ -208,7 +208,7 @@ if [ "$ARCH" != "LINUX" ] && [ "$ARCH" !
     echo "WARNING: Unknown architecture $ARCH."; fi
 if [ -z "$CXX" ]; then CXX="g++"; fi
 if [ -z "$CXX_COMMON" ]; then
-    CXX_COMMON="${ENABLE_DEBUG}${ENABLE_64BIT}-ansi"
+    CXX_COMMON="${ENABLE_DEBUG}${ENABLE_64BIT}-ansi ${CXXFLAGS}"
     CXX_COMMON="$CXX_COMMON -pedantic -W -Wall -Wshadow -fPIC"; fi
 if [ -z "$CXX_SHARED" ]; then
     if [ "$ARCH" = "LINUX" ];  then CXX_SHARED="-shared"; fi
Index: pythia8210/bin/pythia8-config
===================================================================
--- pythia8210.orig/bin/pythia8-config
+++ pythia8210/bin/pythia8-config
@@ -68,8 +68,8 @@ elif [ ! -f $CFG_FILE ]; then
     echo "Error: cannot find valid configuration for Pythia 8"; exit; fi
 while read LINE; do
     if [[ $LINE != *=* ]]; then continue; fi
-    VAR=${LINE%=*}; VAL=${LINE#$KEY}; VAL=${VAL#*=};
-    eval $VAR=\"$VAL\"; done < $CFG_FILE
+    VAR=${LINE%%=*}; VAL=${LINE#$KEY}; VAL=${VAL#*=};
+    eval $VAR=\"${VAL}\"; done < $CFG_FILE
 
 # Change the prefixes if local version.
 if [ "$CFG_FILE" = "$PREFIX/Makefile.inc" ]; then
openSUSE Build Service is sponsored by