diff options
Diffstat (limited to 'meta/recipes-support')
-rw-r--r-- | meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch | 71 | ||||
-rw-r--r-- | meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch | 26 | ||||
-rw-r--r-- | meta/recipes-support/nss/files/nss.pc.in | 11 | ||||
-rw-r--r-- | meta/recipes-support/nss/nss.inc | 170 | ||||
-rw-r--r-- | meta/recipes-support/nss/nss_3.15.1.bb | 9 |
5 files changed, 287 insertions, 0 deletions
diff --git a/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch b/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch new file mode 100644 index 0000000000..f0b3550bff --- /dev/null +++ b/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch | |||
@@ -0,0 +1,71 @@ | |||
1 | nss: fix support cross compiling | ||
2 | |||
3 | Let some make variables be assigned from outside makefile. | ||
4 | |||
5 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | --- | ||
8 | nss/coreconf/Linux.mk | 12 +++++++++++- | ||
9 | nss/coreconf/arch.mk | 2 +- | ||
10 | nss/lib/freebl/Makefile | 6 ++++++ | ||
11 | 3 files changed, 18 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk | ||
14 | --- a/nss/coreconf/Linux.mk | ||
15 | +++ b/nss/coreconf/Linux.mk | ||
16 | @@ -16,11 +16,21 @@ ifeq ($(USE_PTHREADS),1) | ||
17 | IMPL_STRATEGY = _PTH | ||
18 | endif | ||
19 | |||
20 | +ifndef CC | ||
21 | CC = gcc | ||
22 | +endif | ||
23 | + | ||
24 | +ifdef CXX | ||
25 | +CCC = $(CXX) | ||
26 | +else | ||
27 | CCC = g++ | ||
28 | +endif | ||
29 | + | ||
30 | +ifndef RANLIB | ||
31 | RANLIB = ranlib | ||
32 | +endif | ||
33 | |||
34 | -DEFAULT_COMPILER = gcc | ||
35 | +DEFAULT_COMPILER = $(CC) | ||
36 | |||
37 | ifeq ($(OS_TARGET),Android) | ||
38 | ifndef ANDROID_NDK | ||
39 | diff --git a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk | ||
40 | index 6557348..b722412 100644 | ||
41 | --- a/nss/coreconf/arch.mk | ||
42 | +++ b/nss/coreconf/arch.mk | ||
43 | @@ -37,7 +37,7 @@ OS_TEST := $(shell uname -m) | ||
44 | ifeq ($(OS_TEST),i86pc) | ||
45 | OS_RELEASE := $(shell uname -r)_$(OS_TEST) | ||
46 | else | ||
47 | - OS_RELEASE := $(shell uname -r) | ||
48 | + OS_RELEASE ?= $(shell uname -r) | ||
49 | endif | ||
50 | |||
51 | # | ||
52 | diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile | ||
53 | index 0d293f1..678f506 100644 | ||
54 | --- a/nss/lib/freebl/Makefile | ||
55 | +++ b/nss/lib/freebl/Makefile | ||
56 | @@ -36,6 +36,12 @@ ifdef USE_64 | ||
57 | DEFINES += -DNSS_USE_64 | ||
58 | endif | ||
59 | |||
60 | +ifeq ($(OS_TEST),mips) | ||
61 | +ifndef USE_64 | ||
62 | + DEFINES += -DNS_PTR_LE_32 | ||
63 | +endif | ||
64 | +endif | ||
65 | + | ||
66 | ifdef USE_ABI32_FPU | ||
67 | DEFINES += -DNSS_USE_ABI32_FPU | ||
68 | endif | ||
69 | -- | ||
70 | 1.8.1.2 | ||
71 | |||
diff --git a/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch b/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch new file mode 100644 index 0000000000..7661dc93a0 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | nss:no rpath for cross compiling | ||
2 | |||
3 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
4 | Upstream-Status: Inappropriate [configuration] | ||
5 | --- | ||
6 | nss/cmd/platlibs.mk | 4 ++-- | ||
7 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
8 | |||
9 | diff --git a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk | ||
10 | --- a/nss/cmd/platlibs.mk | ||
11 | +++ b/nss/cmd/platlibs.mk | ||
12 | @@ -18,9 +18,9 @@ endif | ||
13 | |||
14 | ifeq ($(OS_ARCH), Linux) | ||
15 | ifeq ($(USE_64), 1) | ||
16 | -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' | ||
17 | +#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' | ||
18 | else | ||
19 | -EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' | ||
20 | +#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' | ||
21 | endif | ||
22 | endif | ||
23 | |||
24 | -- | ||
25 | 1.8.1.2 | ||
26 | |||
diff --git a/meta/recipes-support/nss/files/nss.pc.in b/meta/recipes-support/nss/files/nss.pc.in new file mode 100644 index 0000000000..200f635c65 --- /dev/null +++ b/meta/recipes-support/nss/files/nss.pc.in | |||
@@ -0,0 +1,11 @@ | |||
1 | prefix=OEPREFIX | ||
2 | exec_prefix=OEEXECPREFIX | ||
3 | libdir=OELIBDIR | ||
4 | includedir=OEINCDIR | ||
5 | |||
6 | Name: NSS | ||
7 | Description: Network Security Services | ||
8 | Version: %NSS_VERSION% | ||
9 | Requires: nspr >= %NSPR_VERSION% | ||
10 | Libs: -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3 | ||
11 | Cflags: -IOEINCDIR | ||
diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc new file mode 100644 index 0000000000..87cba38bc8 --- /dev/null +++ b/meta/recipes-support/nss/nss.inc | |||
@@ -0,0 +1,170 @@ | |||
1 | SUMMARY = "Mozilla's SSL and TLS implementation" | ||
2 | DESCRIPTION = "Network Security Services (NSS) is a set of libraries \ | ||
3 | designed to support cross-platform development of \ | ||
4 | security-enabled client and server applications. \ | ||
5 | Applications built with NSS can support SSL v2 and v3, \ | ||
6 | TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \ | ||
7 | v3 certificates, and other security standards." | ||
8 | HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/" | ||
9 | SECTION = "libs" | ||
10 | |||
11 | LICENSE = "MPL-1.1 GPL-2.0 LGPL-2.1" | ||
12 | |||
13 | LIC_FILES_CHKSUM = "file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \ | ||
14 | file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=6bf96825e3d7ce4de25621ae886cc859" | ||
15 | SRC_URI = "\ | ||
16 | file://nss-fix-support-cross-compiling.patch \ | ||
17 | file://nss-no-rpath-for-cross-compiling.patch \ | ||
18 | " | ||
19 | SRC_URI_append_class-target += "\ | ||
20 | file://nss.pc.in \ | ||
21 | " | ||
22 | inherit siteinfo | ||
23 | PR = "r0" | ||
24 | DEPENDS = "sqlite3 nspr zlib nss-native" | ||
25 | DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" | ||
26 | RDEPENDS_${PN} = "perl" | ||
27 | |||
28 | TD = "${S}/tentative-dist" | ||
29 | TDS = "${S}/tentative-dist-staging" | ||
30 | |||
31 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
32 | |||
33 | do_compile_prepend_class-native() { | ||
34 | export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} | ||
35 | export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} | ||
36 | } | ||
37 | |||
38 | do_compile() { | ||
39 | export CROSS_COMPILE=1 | ||
40 | export NATIVE_CC="gcc" | ||
41 | export BUILD_OPT=1 | ||
42 | |||
43 | export FREEBL_NO_DEPEND=1 | ||
44 | export FREEBL_LOWHASH=1 | ||
45 | |||
46 | export LIBDIR=${libdir} | ||
47 | export MOZILLA_CLIENT=1 | ||
48 | export NS_USE_GCC=1 | ||
49 | export NSS_USE_SYSTEM_SQLITE=1 | ||
50 | export NSS_ENABLE_ECC=1 | ||
51 | |||
52 | export OS_RELEASE=3.4 | ||
53 | export OS_TARGET=Linux | ||
54 | export OS_ARCH=Linux | ||
55 | |||
56 | if [ "${TARGET_ARCH}" = "powerpc" ]; then | ||
57 | OS_TEST=ppc | ||
58 | elif [ "${TARGET_ARCH}" = "powerpc64" ]; then | ||
59 | OS_TEST=ppc64 | ||
60 | elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then | ||
61 | OS_TEST=mips | ||
62 | else | ||
63 | OS_TEST="${TARGET_ARCH}" | ||
64 | fi | ||
65 | |||
66 | if [ "${SITEINFO_BITS}" = "64" ]; then | ||
67 | export USE_64=1 | ||
68 | fi | ||
69 | |||
70 | make -C ./nss CCC="${CXX}" \ | ||
71 | OS_TEST=${OS_TEST} \ | ||
72 | } | ||
73 | |||
74 | do_install() { | ||
75 | export CROSS_COMPILE=1 | ||
76 | export NATIVE_CC="gcc" | ||
77 | export BUILD_OPT=1 | ||
78 | |||
79 | export FREEBL_NO_DEPEND=1 | ||
80 | |||
81 | export LIBDIR=${libdir} | ||
82 | export MOZILLA_CLIENT=1 | ||
83 | export NS_USE_GCC=1 | ||
84 | export NSS_USE_SYSTEM_SQLITE=1 | ||
85 | export NSS_ENABLE_ECC=1 | ||
86 | |||
87 | export OS_RELEASE=3.4 | ||
88 | export OS_TARGET=Linux | ||
89 | export OS_ARCH=Linux | ||
90 | |||
91 | if [ "${TARGET_ARCH}" = "powerpc" ]; then | ||
92 | OS_TEST=ppc | ||
93 | elif [ "${TARGET_ARCH}" = "powerpc64" ]; then | ||
94 | OS_TEST=ppc64 | ||
95 | elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then | ||
96 | OS_TEST=mips | ||
97 | else | ||
98 | OS_TEST="${TARGET_ARCH}" | ||
99 | fi | ||
100 | if [ "${SITEINFO_BITS}" = "64" ]; then | ||
101 | export USE_64=1 | ||
102 | fi | ||
103 | |||
104 | make -C ./nss \ | ||
105 | CCC="${CXX}" \ | ||
106 | OS_TEST=${OS_TEST} \ | ||
107 | SOURCE_LIB_DIR="${TD}/${libdir}" \ | ||
108 | SOURCE_BIN_DIR="${TD}/${bindir}" \ | ||
109 | install | ||
110 | |||
111 | install -d ${D}/${libdir}/ | ||
112 | for file in ${S}/dist/*.OBJ/lib/*.so; do | ||
113 | echo "Installing `basename $file`..." | ||
114 | cp $file ${D}/${libdir}/ | ||
115 | done | ||
116 | |||
117 | for shared_lib in ${TD}/${libdir}/*.so.*; do | ||
118 | if [ -f $shared_lib ]; then | ||
119 | cp $shared_lib ${D}/${libdir} | ||
120 | ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe) | ||
121 | fi | ||
122 | done | ||
123 | for shared_lib in ${TD}/${libdir}/*.so; do | ||
124 | if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then | ||
125 | cp $shared_lib ${D}/${libdir} | ||
126 | fi | ||
127 | done | ||
128 | |||
129 | install -d ${D}/${includedir}/nss3 | ||
130 | install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/* | ||
131 | |||
132 | install -d ${D}/${bindir} | ||
133 | for binary in ${TD}/${bindir}/*; do | ||
134 | install -m 755 -t ${D}/${bindir} $binary | ||
135 | done | ||
136 | } | ||
137 | |||
138 | do_install_append_class-target() { | ||
139 | install -d ${D}${libdir}/pkgconfig/ | ||
140 | sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc | ||
141 | sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc | ||
142 | sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc | ||
143 | sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc | ||
144 | sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc | ||
145 | |||
146 | # Create a blank certificate | ||
147 | mkdir -p ${D}/etc/pki/nssdb/ | ||
148 | touch ./empty_password | ||
149 | certutil -N -d ${D}/etc/pki/nssdb/ -f ./empty_password | ||
150 | chmod 644 ${D}/etc/pki/nssdb/*.db | ||
151 | rm ./empty_password | ||
152 | } | ||
153 | |||
154 | FILES_${PN} = "\ | ||
155 | ${sysconfdir} \ | ||
156 | ${bindir} \ | ||
157 | ${libdir}/lib*.chk \ | ||
158 | ${libdir}/lib*.so \ | ||
159 | " | ||
160 | FILES_${PN}-dev = "\ | ||
161 | ${libdir}/nss \ | ||
162 | ${libdir}/pkgconfig/* \ | ||
163 | ${includedir}/* \ | ||
164 | " | ||
165 | FILES_${PN}-dbg = "\ | ||
166 | ${bindir}/.debug/* \ | ||
167 | ${libdir}/.debug/* \ | ||
168 | " | ||
169 | |||
170 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-support/nss/nss_3.15.1.bb b/meta/recipes-support/nss/nss_3.15.1.bb new file mode 100644 index 0000000000..7b06f00cde --- /dev/null +++ b/meta/recipes-support/nss/nss_3.15.1.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | require nss.inc | ||
2 | |||
3 | SRC_URI += "\ | ||
4 | http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_1_RTM/src/${BPN}-${PV}.tar.gz \ | ||
5 | " | ||
6 | |||
7 | SRC_URI[md5sum] = "fb68f4d210ac9397dd0d3c39c4f938eb" | ||
8 | SRC_URI[sha256sum] = "f994106a33d1f3210f4151bbb3419a1c28fd1cb545caa7dc9afdebd6da626284" | ||
9 | |||