Lines 26-31
Link Here
|
26 |
>=dev-db/sqlite-3.5 |
26 |
>=dev-db/sqlite-3.5 |
27 |
sys-libs/zlib" |
27 |
sys-libs/zlib" |
28 |
|
28 |
|
|
|
29 |
pkg_pretend() { |
30 |
if [ "${ROOT}" != "/" ]; then |
31 |
HOST_SHLIBSIGN=$(which shlibsign) |
32 |
if [ -z "$HOST_SHLIBSIGN" ]; then |
33 |
die "Please install NSS with USE=utils on host system." |
34 |
fi |
35 |
fi |
36 |
} |
37 |
|
29 |
src_setup() { |
38 |
src_setup() { |
30 |
export LC_ALL="C" |
39 |
export LC_ALL="C" |
31 |
} |
40 |
} |
Lines 37-42
Link Here
|
37 |
epatch "${DISTDIR}/${PN}-3.14-add_spi+cacerts_ca_certs.patch" |
46 |
epatch "${DISTDIR}/${PN}-3.14-add_spi+cacerts_ca_certs.patch" |
38 |
epatch "${DISTDIR}/${PN}-3.13.3_pem.support" |
47 |
epatch "${DISTDIR}/${PN}-3.13.3_pem.support" |
39 |
epatch "${FILESDIR}/${PN}-3.13.5-x32.patch" |
48 |
epatch "${FILESDIR}/${PN}-3.13.5-x32.patch" |
|
|
49 |
epatch "${FILESDIR}/${PN}-3.13.6-no-sign.patch" |
40 |
|
50 |
|
41 |
cd "${S}"/mozilla/security/coreconf || die |
51 |
cd "${S}"/mozilla/security/coreconf || die |
42 |
# hack nspr paths |
52 |
# hack nspr paths |
Lines 59-64
Link Here
|
59 |
|
69 |
|
60 |
epatch "${FILESDIR}/nss-3.13.1-solaris-gcc.patch" |
70 |
epatch "${FILESDIR}/nss-3.13.1-solaris-gcc.patch" |
61 |
|
71 |
|
|
|
72 |
if tc-is-cross-compiler; then |
73 |
# use the nsinstall binary we build later |
74 |
epatch "${FILESDIR}/${PN}-3.13.6-nsinstall-path.patch" |
75 |
fi |
76 |
|
62 |
# dirty hack |
77 |
# dirty hack |
63 |
cd "${S}"/mozilla/security/nss || die |
78 |
cd "${S}"/mozilla/security/nss || die |
64 |
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \ |
79 |
sed -i -e "/CRYPTOLIB/s:\$(SOFTOKEN_LIB_DIR):../freebl/\$(OBJDIR):" \ |
Lines 79-86
Link Here
|
79 |
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; |
94 |
*) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; |
80 |
esac |
95 |
esac |
81 |
|
96 |
|
82 |
export NSPR_INCLUDE_DIR=`nspr-config --includedir` |
97 |
export NSPR_INCLUDE_DIR=${ROOT}/$( $(tc-getPKG_CONFIG) --variable includedir nspr ) |
83 |
export NSPR_LIB_DIR=`nspr-config --libdir` |
98 |
export NSPR_LIB_DIR=${ROOT}/$( $(tc-getPKG_CONFIG) --variable libdir nspr ) |
84 |
export BUILD_OPT=1 |
99 |
export BUILD_OPT=1 |
85 |
export NSS_USE_SYSTEM_SQLITE=1 |
100 |
export NSS_USE_SYSTEM_SQLITE=1 |
86 |
export NSDISTMODE=copy |
101 |
export NSDISTMODE=copy |
Lines 89-100
Link Here
|
89 |
export FREEBL_NO_DEPEND=1 |
104 |
export FREEBL_NO_DEPEND=1 |
90 |
export ASFLAGS="" |
105 |
export ASFLAGS="" |
91 |
|
106 |
|
92 |
cd "${S}"/mozilla/security/coreconf || die |
107 |
local make_args |
93 |
emake -j1 CC="$(tc-getCC)" || die "coreconf make failed" |
108 |
|
|
|
109 |
if tc-is-cross-compiler; then |
110 |
# NSS can't figure out anything when cross compiling |
111 |
make_args="OS_TARGET=Linux OS_RELEASE=2.6 OS_TEST=$(tc-arch)" |
112 |
|
113 |
# build a host version of nsinstall |
114 |
$(tc-getBUILD_CC) $BUILD_CFLAGS $BUILD_LDFLAGS \ |
115 |
"${S}"/mozilla/security/coreconf/nsinstall/{nsinstall,pathsub}.c \ |
116 |
-o "${S}"/mozilla/security/build-nsinstall \ |
117 |
|| die "failed to compile build-nsinstall" |
118 |
else |
119 |
cd "${S}"/mozilla/security/coreconf || die |
120 |
emake -j1 CC="$(tc-getCC)" || die "coreconf make failed" |
121 |
fi |
122 |
|
94 |
cd "${S}"/mozilla/security/dbm || die |
123 |
cd "${S}"/mozilla/security/dbm || die |
95 |
emake -j1 CC="$(tc-getCC)" || die "dbm make failed" |
124 |
emake -j1 CC="$(tc-getCC)" ${make_args} || die "dbm make failed" |
96 |
cd "${S}"/mozilla/security/nss || die |
125 |
cd "${S}"/mozilla/security/nss || die |
97 |
emake -j1 CC="$(tc-getCC)" || die "nss make failed" |
126 |
emake -j1 CC="$(tc-getCC)" ${make_args} || die "nss make failed" |
98 |
} |
127 |
} |
99 |
|
128 |
|
100 |
# Altering these 3 libraries breaks the CHK verification. |
129 |
# Altering these 3 libraries breaks the CHK verification. |
Lines 204-210
Link Here
|
204 |
|
233 |
|
205 |
pkg_postinst() { |
234 |
pkg_postinst() { |
206 |
# We must re-sign the libraries AFTER they are stripped. |
235 |
# We must re-sign the libraries AFTER they are stripped. |
207 |
generate_chk "${EROOT}"/usr/bin/shlibsign "${EROOT}"/usr/$(get_libdir) |
236 |
local shlibsign |
|
|
237 |
if [ "${ROOT}" == "/" ]; then |
238 |
shlibsign="${EROOT}"/usr/bin/shlibsign |
239 |
else |
240 |
shlibsign=$(which shlibsign) |
241 |
if [ -z "${shlibsign}" ]; then |
242 |
eerror "Could not sign libraries because shlibsign is not available." |
243 |
eerror "Please install NSS with USE=utils on host and reinstall this" |
244 |
eerror "to get libraries properly signed." |
245 |
return |
246 |
fi |
247 |
fi |
248 |
|
249 |
generate_chk "${shlibsign}" "${EROOT}"/usr/$(get_libdir) |
208 |
} |
250 |
} |
209 |
|
251 |
|
210 |
pkg_postrm() { |
252 |
pkg_postrm() { |