kumquat-buildroot/package/libidn2/libidn2.mk
Fabrice Fontaine a9e5b0255d package/libidn2: fix build with libunistring
Fix the following build failure with libunistring raised since the
addition of the package in commit
ffb85a4a16:

/home/autobuild/autobuild/instance-2/output-1/per-package/libidn2/host/bin/../lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: warning: libunistring.so.2, needed by ../lib/.libs/libidn2.so, not found (try using -rpath or -rpath-link)
/home/autobuild/autobuild/instance-2/output-1/per-package/libidn2/host/bin/../lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: ../lib/.libs/libidn2.so: undefined reference to `u8_strconv_to_encoding'

[...]

aarch64-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-L/usr/lib'

Fixes:
 - http://autobuild.buildroot.org/results/30ac50512cd4b4cb3ecc97514a72d1f316a1b33a
 - http://autobuild.buildroot.org/results/c225ff4ef007b9a3ca56e6b601687aaa33699675

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-11-03 23:04:21 +01:00

34 lines
987 B
Makefile

################################################################################
#
# libidn2
#
################################################################################
LIBIDN2_VERSION = 2.3.4
LIBIDN2_SITE = $(BR2_GNU_MIRROR)/libidn
LIBIDN2_LICENSE = GPL-2.0+ or LGPL-3.0+ (library)
LIBIDN2_LICENSE_FILES = COPYING COPYINGv2 COPYING.LESSERv3 COPYING.unicode
LIBIDN2_CPE_ID_VENDOR = gnu
LIBIDN2_DEPENDENCIES = \
host-pkgconf \
$(TARGET_NLS_DEPENDENCIES) \
$(if $(BR2_PACKAGE_LIBICONV),libiconv)
LIBIDN2_CONF_OPTS = --without-included-libunistring
LIBIDN2_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_LIBUNISTRING),y)
LIBIDN2_DEPENDENCIES += libunistring
LIBIDN2_CONF_OPTS += --with-libunistring-prefix=$(STAGING_DIR)/usr/lib
endif
ifeq ($(BR2_PACKAGE_LIBIDN2_BINARY),)
define LIBIDN2_REMOVE_BINARY
rm -f $(TARGET_DIR)/usr/bin/idn2
endef
LIBIDN2_POST_INSTALL_TARGET_HOOKS += LIBIDN2_REMOVE_BINARY
else
LIBIDN2_LICENSE += , GPL-3.0+ (program)
endif
$(eval $(autotools-package))