qcacld-3.0: remove realpath dependency

Android build system is using toybox “realpath” which doesn’t have
“—relative-to” option as in GNU tools. Use more generic python API.

Change-Id: Ib129bd721056e2fcb563817ac61cc6811568f68d
CRs-Fixed: 2676451
diff --git a/Kbuild b/Kbuild
index 6869ad9..48eb306 100644
--- a/Kbuild
+++ b/Kbuild
@@ -25,9 +25,10 @@
 
 ifeq ($(KERNEL_BUILD), n)
 ifneq ($(ANDROID_BUILD_TOP),)
-      override WLAN_ROOT := $(shell realpath --relative-to $(CURDIR) $(ANDROID_BUILD_TOP)/$(WLAN_ROOT))
-      override WLAN_COMMON_INC := $(shell realpath --relative-to $(CURDIR) $(ANDROID_BUILD_TOP)/$(WLAN_COMMON_INC))
-      override WLAN_FW_API := $(shell realpath --relative-to $(CURDIR) $(ANDROID_BUILD_TOP)/$(WLAN_FW_API))
+      ANDROID_BUILD_TOP_REL := $(shell python -c "import os.path; print(os.path.relpath('$(ANDROID_BUILD_TOP)'))")
+      override WLAN_ROOT := $(ANDROID_BUILD_TOP_REL)/$(WLAN_ROOT)
+      override WLAN_COMMON_INC := $(ANDROID_BUILD_TOP_REL)/$(WLAN_COMMON_INC)
+      override WLAN_FW_API := $(ANDROID_BUILD_TOP_REL)/$(WLAN_FW_API)
 endif
 endif