gst1-plugins-base: fix build with no module
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Wed, 25 Nov 2020 18:19:58 +0000 (15:19 -0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 28 Nov 2020 07:08:30 +0000 (09:08 +0200)
gst1-plugins-base might be required only for its libraries, not modules.
However, InstallDev tries to copy them unconditionally, failing when
no modules are selected/compiled.

Fixes #13973

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
multimedia/gst1-plugins-base/Makefile

index 227cc4d0b678eeb9b3e1b30bc908ac41390bb6a0..acdcdb57591cd6267b28cc8a6890312127c7a71f 100644 (file)
@@ -182,11 +182,14 @@ define Build/InstallDev
                ./usr/lib/libgst*-$(GST_VERSION).so* \
                $(1)/usr/lib/ \
        )
-       $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
-       ( cd $(PKG_INSTALL_DIR); $(CP) \
-               ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
-               $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
-       )
+       if [ -d $(PKG_INSTALL_DIR)/usr/lib/gstreamer-$(GST_VERSION)/ ]; then \
+               $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION); \
+               ( cd $(PKG_INSTALL_DIR); $(FIND) \
+                       ./usr/lib/gstreamer-$(GST_VERSION)/ -name libgst*.so -print0 | \
+                       xargs --null --no-run-if-empty $(CP) \
+                       --target-directory=$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
+               ) \
+       fi
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        ( cd $(PKG_INSTALL_DIR); $(CP) \
                ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \