* instead of installing all 51 nspr header files directly in ${includedir}
* ubuntu uses /usr/include/nspr as well as shown in:
https://packages.ubuntu.com/xenial/amd64/libnspr4-dev/filelist
and some components assume the same path
* update nss configure to find them, similar change might be needed in
mozjs and ecryptfs-utils
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Description: The Netscape Portable Runtime
Version: NSPRVERSION
Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
-Cflags:
+Cflags: -I${includedir}/nspr
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+# Do not install nspr in usr/include, but in usr/include/nspr, the
+# preferred path upstream.
+EXTRA_OECONF += "--includedir=${includedir}/nspr"
+
do_compile_prepend() {
oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export
}
Description: Network Security Services
Version: %NSS_VERSION%
Requires: nspr >= %NSPR_VERSION%
-Libs: -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3
+Libs: -L${libdir} -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3
Cflags: -IOEINCDIR
}
do_compile_prepend_class-native() {
- export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
+ export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}/nspr
export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
export NSS_ENABLE_WERROR=0
}
}
do_compile() {
+ export NSPR_INCLUDE_DIR=${STAGING_INCDIR}/nspr
+
export CROSS_COMPILE=1
export NATIVE_CC="${BUILD_CC}"
# Additional defines needed on Centos 7