1 ################################################################################
5 ################################################################################
7 LIBNSS_VERSION
= 3.27.2
8 LIBNSS_SOURCE
= nss-
$(LIBNSS_VERSION
).
tar.gz
9 LIBNSS_SITE
= https
://ftp.mozilla.org
/pub
/mozilla.org
/security
/nss
/releases
/NSS_
$(subst .
,_
,$(LIBNSS_VERSION
))_RTM
/src
11 LIBNSS_INSTALL_STAGING
= YES
12 LIBNSS_DEPENDENCIES
= libnspr sqlite zlib
13 LIBNSS_LICENSE
= MPLv2.0
14 LIBNSS_LICENSE_FILES
= nss
/COPYING
18 NSPR_INCLUDE_DIR
=$(STAGING_DIR
)/usr
/include/nspr \
19 NSPR_LIB_DIR
=$(STAGING_DIR
)/usr
/lib \
22 NSS_DISABLE_GTESTS
=1 \
23 NSS_USE_SYSTEM_SQLITE
=1 \
25 NATIVE_CC
="$(HOSTCC)" \
26 TARGETCC
="$(TARGET_CC)" \
27 TARGETCCC
="$(TARGET_CXX)" \
28 TARGETRANLIB
="$(TARGET_RANLIB)" \
33 # #pragma usage needs gcc >= 4.8
34 # See https://bugzilla.mozilla.org/show_bug.cgi?id=1226179
35 ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
),)
36 LIBNSS_BUILD_VARS
+= NSS_ENABLE_WERROR
=0
39 ifeq ($(BR2_ARCH_IS_64
),y
)
40 # MIPS64 n32 is treated as a 32-bit architecture by libnss.
41 # See: https://bugzilla.mozilla.org/show_bug.cgi?id=1010730
42 ifeq ($(BR2_MIPS_NABI32
),)
43 LIBNSS_BUILD_VARS
+= USE_64
=1
47 define LIBNSS_BUILD_CMDS
48 $(TARGET_MAKE_ENV
) $(MAKE1
) -C
$(@D
)/nss coreconf \
49 SOURCE_MD_DIR
=$(@D
)/$(LIBNSS_DISTDIR
) \
50 DIST
=$(@D
)/$(LIBNSS_DISTDIR
) \
53 $(TARGET_MAKE_ENV
) $(MAKE1
) -C
$(@D
)/nss lib
/dbm
all \
54 SOURCE_MD_DIR
=$(@D
)/$(LIBNSS_DISTDIR
) \
55 DIST
=$(@D
)/$(LIBNSS_DISTDIR
) \
57 $(LIBNSS_BUILD_VARS
) TARGET_OPTIMIZER
="$(TARGET_CFLAGS)" \
58 NATIVE_FLAGS
="$(HOST_CFLAGS)"
61 define LIBNSS_INSTALL_STAGING_CMDS
62 $(INSTALL
) -m
755 -t
$(STAGING_DIR
)/usr
/lib
/ \
63 $(@D
)/$(LIBNSS_DISTDIR
)/lib
/*.so
64 $(INSTALL
) -m
755 -d
$(STAGING_DIR
)/usr
/include/nss
65 $(INSTALL
) -m
644 -t
$(STAGING_DIR
)/usr
/include/nss \
66 $(@D
)/$(LIBNSS_DISTDIR
)/public
/nss
/*
67 $(INSTALL
) -m
755 -t
$(STAGING_DIR
)/usr
/lib
/ \
68 $(@D
)/$(LIBNSS_DISTDIR
)/lib
/*.a
69 $(INSTALL
) -D
-m
0644 $(TOPDIR
)/package
/libnss
/nss.
pc.in \
70 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/nss.
pc
71 $(SED
) 's/@VERSION@/$(LIBNSS_VERSION)/g;' \
72 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/nss.
pc
75 define LIBNSS_INSTALL_TARGET_CMDS
76 $(INSTALL
) -m
755 -t
$(TARGET_DIR
)/usr
/lib
/ \
77 $(@D
)/$(LIBNSS_DISTDIR
)/lib
/*.so
78 $(INSTALL
) -m
755 -d
$(TARGET_DIR
)/usr
/include/nss
79 $(INSTALL
) -m
644 -t
$(TARGET_DIR
)/usr
/include/nss \
80 $(@D
)/$(LIBNSS_DISTDIR
)/public
/nss
/*
81 $(INSTALL
) -m
755 -t
$(TARGET_DIR
)/usr
/lib
/ \
82 $(@D
)/$(LIBNSS_DISTDIR
)/lib
/*.a
83 $(INSTALL
) -D
-m
0644 $(TOPDIR
)/package
/libnss
/nss.
pc.in \
84 $(TARGET_DIR
)/usr
/lib
/pkgconfig
/nss.
pc
85 $(SED
) 's/@VERSION@/$(LIBNSS_VERSION)/g;' \
86 $(TARGET_DIR
)/usr
/lib
/pkgconfig
/nss.
pc
89 $(eval
$(generic-package
))