[OE-core] [PATCH] nspr: set correct version in pkg-config file

Andreas Müller schnitzeltony at googlemail.com
Wed Dec 14 22:28:24 UTC 2016


while we are at it clean up sed

Signed-off-by: Andreas Müller <schnitzeltony at googlemail.com>
---
 meta/recipes-support/nspr/nspr/nspr.pc.in |  2 +-
 meta/recipes-support/nspr/nspr_4.13.1.bb  | 11 +++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-support/nspr/nspr/nspr.pc.in b/meta/recipes-support/nspr/nspr/nspr.pc.in
index c37d0bc..d74caab 100644
--- a/meta/recipes-support/nspr/nspr/nspr.pc.in
+++ b/meta/recipes-support/nspr/nspr/nspr.pc.in
@@ -6,6 +6,6 @@ includedir=OEINCDIR
 
 Name: NSPR
 Description: The Netscape Portable Runtime
-Version: 4.9.5
+Version: NSPRVERSION
 Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
 Cflags:
diff --git a/meta/recipes-support/nspr/nspr_4.13.1.bb b/meta/recipes-support/nspr/nspr_4.13.1.bb
index 4a13f39..23f8944 100644
--- a/meta/recipes-support/nspr/nspr_4.13.1.bb
+++ b/meta/recipes-support/nspr/nspr_4.13.1.bb
@@ -160,10 +160,13 @@ do_compile_append() {
 
 do_install_append() {
     install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
-    sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
-    sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nspr.pc
-    sed -i s:OEINCDIR:${includedir}:g ${D}${libdir}/pkgconfig/nspr.pc
-    sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
+    sed -i  \
+    -e 's:NSPRVERSION:${PV}:g' \
+    -e 's:OEPREFIX:${prefix}:g' \
+    -e 's:OELIBDIR:${libdir}:g' \
+    -e 's:OEINCDIR:${includedir}:g' \
+    -e 's:OEEXECPREFIX:${exec_prefix}:g' \
+    ${D}${libdir}/pkgconfig/nspr.pc
 
     mkdir -p ${D}${libdir}/nspr/tests
     install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
-- 
2.5.5




More information about the Openembedded-core mailing list