xmlrpc-c: install dev files only with 1st variant

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>
This commit is contained in:
Eneas U de Queiroz 2024-02-04 17:35:53 -03:00 committed by Rosen Penev
parent 71c34f85bd
commit fb3d67801e
1 changed files with 5 additions and 2 deletions

View 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) \