xmlrpc-c: install dev files only with 1st variant
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Sun, 4 Feb 2024 20:35:53 +0000 (17:35 -0300)
committerRosen Penev <rosenp@gmail.com>
Wed, 7 Feb 2024 21:55:27 +0000 (13:55 -0800)
This adds a variant check to run InstallDev only when the first variant
is built.  Otherwise, a dependent package may install the default
version, even though the second variant ends up in the staging dir,
causing downstream packages to miss library dependencies, such as:

Package rtorrent-rpc is missing dependencies for the following libraries:
libxmlrpc_xmlparse.so.3
libxmlrpc_xmltok.so.3

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
libs/xmlrpc-c/Makefile

index 758144a7fe581c50c4b7dc0e3e9799d3d2764b73..86deeb6481894677f324a53f0328ec88cc6cb8e6 100644 (file)
@@ -114,7 +114,9 @@ define Build/Compile
        $(call Build/Compile/Default)
 endef
 
-define Build/InstallDev
+TARGET_VARIANT=$(if $(ALL_VARIANTS),$(if $(VARIANT),$(VARIANT),$(firstword $(ALL_VARIANTS))))
+ifeq ($(if $(TARGET_VARIANT),$(BUILD_VARIANT)),$(TARGET_VARIANT))
+  define Build/InstallDev
        $(INSTALL_DIR) \
                $(1)/usr/include \
                $(1)/usr/lib \
@@ -140,7 +142,8 @@ define Build/InstallDev
        $(INSTALL_DATA) \
                $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
                $(1)/usr/lib/pkgconfig/
-endef
+  endef
+endif
 
 define Package/xmlrpc-c-libxml2/install
        $(INSTALL_DIR) \