package/pkg-generic: use readlink instead of realpath
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 1 Dec 2018 21:51:55 +0000 (22:51 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 2 Dec 2018 10:22:11 +0000 (11:22 +0100)
realpath is missing on oldish distributions, like Debian 7, which is
still used in the wild.

Use readlink instead; that has been available since the dawn of ages now
(well, coreutils had it in 2003).

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/pkg-generic.mk

index a27aa1f7fdfccf63b324bef1ddfd685e5c08256d..f5cab2b9c2223a9a997b8b025fa53fe5a4238311 100644 (file)
@@ -280,8 +280,8 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
                                -e "s,^\(exec_\)\?prefix=.*,\1prefix=@STAGING_DIR@/usr,g" \
                                -e "s,-I/usr/,-I@STAGING_DIR@/usr/,g" \
                                -e "s,-L/usr/,-L@STAGING_DIR@/usr/,g" \
-                               -e 's,@STAGING_DIR@,$$(dirname $$(realpath -e $$0))/../..,g' \
-                               -e 's,@HOST_DIR@,$$(dirname $$(realpath -e $$0))/../../../..,g' \
+                               -e 's,@STAGING_DIR@,$$(dirname $$(readlink -e $$0))/../..,g' \
+                               -e 's,@HOST_DIR@,$$(dirname $$(readlink -e $$0))/../../../..,g' \
                                -e "s,@BASE_DIR@,$(BASE_DIR),g" \
                                $(addprefix $(STAGING_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ;\
        fi