python-pyasn: bump to version 1.6.0b1
[buildroot-gz.git] / package / libnspr / libnspr.mk
blobd95f970988a0b48c4e05d4a59b4cff233cbb51fc
1 ################################################################################
3 # libnspr
5 ################################################################################
7 LIBNSPR_VERSION = 4.13.1
8 LIBNSPR_SOURCE = nspr-$(LIBNSPR_VERSION).tar.gz
9 LIBNSPR_SITE = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$(LIBNSPR_VERSION)/src
10 LIBNSPR_SUBDIR = nspr
11 LIBNSPR_INSTALL_STAGING = YES
12 LIBNSPR_CONFIG_SCRIPTS = nspr-config
13 LIBNSPR_LICENSE = MPLv2.0
14 LIBNSPR_LICENSE_FILES = nspr/LICENSE
16 # Set the host CFLAGS and LDFLAGS so NSPR does not guess wrongly
17 LIBNSPR_CONF_ENV = \
18 HOST_CFLAGS="-g -O2" \
19 HOST_LDFLAGS="-lc"
20 # NSPR mixes up --build and --host
21 LIBNSPR_CONF_OPTS = --host=$(GNU_HOST_NAME)
22 LIBNSPR_CONF_OPTS += --$(if $(BR2_ARCH_IS_64),en,dis)able-64bit
24 # ./nspr/pr/include/md/_linux.h tests only __GLIBC__ version to detect
25 # c-library features, list musl features here for now (taken from
26 # Alpine Linux).
27 ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
28 LIBNSPR_CFLAGS += \
29 -D_PR_POLL_AVAILABLE \
30 -D_PR_HAVE_OFF64_T \
31 -D_PR_INET6 \
32 -D_PR_HAVE_INET_NTOP \
33 -D_PR_HAVE_GETHOSTBYNAME2 \
34 -D_PR_HAVE_GETADDRINFO \
35 -D_PR_INET6_PROBE
36 endif
38 LIBNSPR_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) $(LIBNSPR_CFLAGS)"
40 ifeq ($(BR2_STATIC_LIBS),y)
41 LIBNSPR_MAKE_OPTS = SHARED_LIBRARY=
42 LIBNSPR_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) SHARED_LIBRARY= install
43 LIBNSPR_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) SHARED_LIBRARY= install
44 endif
46 ifeq ($(BR2_SHARED_LIBS),y)
47 LIBNSPR_MAKE_OPTS = LIBRARY=
48 LIBNSPR_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) LIBRARY= install
49 LIBNSPR_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LIBRARY= install
50 endif
52 $(eval $(autotools-package))