qt5base-0008-configure-Parse-device-option-value-correctly.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 4723f3fd04edf1aad6750ca91fd4648216d8b408 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= <fatih.asici@gmail.com>
  3. Date: Sat, 21 Sep 2013 00:14:39 +0300
  4. Subject: [PATCH] configure: Parse -device-option value correctly
  5. The regular expression does not parse correctly when a device option value
  6. contains the character '=' (e.g. QMAKE_CFLAGS="-D_FILE_OFFSET_BITS=64").
  7. In order to break string at the first equal sign and to simplify code,
  8. use "cut" command as in other places in configure script.
  9. Task-number: QTBUG-33584
  10. Change-Id: I05b474d2ba6bff84c1e40d00475963bab36d94b6
  11. Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
  12. Signed-off-by: Fatih Aşıcı <fatih.asici@gmail.com>
  13. ---
  14. configure | 4 ++--
  15. 1 file changed, 2 insertions(+), 2 deletions(-)
  16. diff --git a/configure b/configure
  17. index 64568dd..388899e 100755
  18. --- a/configure
  19. +++ b/configure
  20. @@ -1609,8 +1609,8 @@ while [ "$#" -gt 0 ]; do
  21. [ "$XPLATFORM" = "undefined" ] && exit 101
  22. ;;
  23. device-option)
  24. - DEV_VAR=`echo $VAL | sed "s,^\(.*\)=.*,\1,"`
  25. - DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
  26. + DEV_VAR=`echo $VAL | cut -d '=' -f 1`
  27. + DEV_VAL=`echo $VAL | cut -d '=' -f 2-`
  28. DeviceVar set $DEV_VAR "$DEV_VAL"
  29. ;;
  30. qpa)
  31. --
  32. 1.8.4.rc3