package/freescale-imx/imx-gpu-viv: move pkg-config files fixup to the build step
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 5 Aug 2021 21:27:32 +0000 (23:27 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 20 Aug 2021 21:37:35 +0000 (23:37 +0200)
The fixup of the pkg-config files modifies files in the build
directory (@D) but is done in the staging installation step, which
doesn't make much sense, especially since the build step already has
some fixup logic. So we move the fixup logic of the pkg-config files
into the build step.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk

index 103c0341e39fdc7103e6a0a19f92c01666f10419..51b04f82d491bd73f550b435f912ba985df99b26 100644 (file)
@@ -42,16 +42,6 @@ define IMX_GPU_VIV_EXTRACT_CMDS
        $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_GPU_VIV_DL_DIR)/$(IMX_GPU_VIV_SOURCE))
 endef
 
-# Instead of building, we fix up the inconsistencies that exist
-# in the upstream archive here. We also remove unused backend files.
-# Make sure these commands are idempotent.
-define IMX_GPU_VIV_BUILD_CMDS
-       cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_LIB_TARGET)/* $(@D)/gpu-core/usr/lib/
-       for backend in fb x11 wayland; do \
-               $(RM) -r $(@D)/gpu-core/usr/lib/$$backend ; \
-       done
-endef
-
 ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
 define IMX_GPU_VIV_FIXUP_PKGCONFIG
        ln -sf egl_linuxfb.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc
@@ -72,9 +62,19 @@ define IMX_GPU_VIV_FIXUP_PKGCONFIG
 endef
 endif
 
+# Instead of building, we fix up the inconsistencies that exist
+# in the upstream archive here. We also remove unused backend files.
+# Make sure these commands are idempotent.
+define IMX_GPU_VIV_BUILD_CMDS
+       cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_LIB_TARGET)/* $(@D)/gpu-core/usr/lib/
+       for backend in fb x11 wayland; do \
+               $(RM) -r $(@D)/gpu-core/usr/lib/$$backend ; \
+       done
+       $(IMX_GPU_VIV_FIXUP_PKGCONFIG)
+endef
+
 define IMX_GPU_VIV_INSTALL_STAGING_CMDS
        cp -r $(@D)/gpu-core/usr/* $(STAGING_DIR)/usr
-       $(IMX_GPU_VIV_FIXUP_PKGCONFIG)
        for lib in egl gbm glesv1_cm glesv2 vg; do \
                $(INSTALL) -m 0644 -D \
                        $(@D)/gpu-core/usr/lib/pkgconfig/$${lib}.pc \