[oe-commits] [openembedded-core] 05/09: nspr, nss: use ${includedir}/nspr like e.g. ubuntu does

git at git.openembedded.org git at git.openembedded.org
Tue Jan 28 11:51:37 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 274128830a9d52bdd2827cc0a323d575025ce62f
Author: Martin Jansa <martin.jansa at gmail.com>
AuthorDate: Mon Jan 27 16:43:30 2020 +0100

    nspr, nss: use ${includedir}/nspr like e.g. ubuntu does
    
    * 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 at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-support/nspr/nspr/nspr.pc.in | 2 +-
 meta/recipes-support/nspr/nspr_4.24.bb    | 4 ++++
 meta/recipes-support/nss/nss/nss.pc.in    | 2 +-
 meta/recipes-support/nss/nss_3.49.1.bb    | 4 +++-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-support/nspr/nspr/nspr.pc.in b/meta/recipes-support/nspr/nspr/nspr.pc.in
index d74caab..1f15d19 100644
--- a/meta/recipes-support/nspr/nspr/nspr.pc.in
+++ b/meta/recipes-support/nspr/nspr/nspr.pc.in
@@ -8,4 +8,4 @@ Name: NSPR
 Description: The Netscape Portable Runtime
 Version: NSPRVERSION
 Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
-Cflags:
+Cflags: -I${includedir}/nspr
diff --git a/meta/recipes-support/nspr/nspr_4.24.bb b/meta/recipes-support/nspr/nspr_4.24.bb
index 5f823f8..e98fe83 100644
--- a/meta/recipes-support/nspr/nspr_4.24.bb
+++ b/meta/recipes-support/nspr/nspr_4.24.bb
@@ -156,6 +156,10 @@ MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/nspr-config"
 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
 }
diff --git a/meta/recipes-support/nss/nss/nss.pc.in b/meta/recipes-support/nss/nss/nss.pc.in
index 200f635..402b4ec 100644
--- a/meta/recipes-support/nss/nss/nss.pc.in
+++ b/meta/recipes-support/nss/nss/nss.pc.in
@@ -7,5 +7,5 @@ Name: NSS
 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
diff --git a/meta/recipes-support/nss/nss_3.49.1.bb b/meta/recipes-support/nss/nss_3.49.1.bb
index 94f4b88..b16ade9 100644
--- a/meta/recipes-support/nss/nss_3.49.1.bb
+++ b/meta/recipes-support/nss/nss_3.49.1.bb
@@ -52,7 +52,7 @@ do_configure_prepend_libc-musl () {
 }
 
 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
 }
@@ -67,6 +67,8 @@ do_compile_prepend_class-native() {
 }
 
 do_compile() {
+    export NSPR_INCLUDE_DIR=${STAGING_INCDIR}/nspr
+
     export CROSS_COMPILE=1
     export NATIVE_CC="${BUILD_CC}"
     # Additional defines needed on Centos 7

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list