Patchwork [1/3] nspr: Integrate version 4.8.9

login
register
mail settings
Submitter Andrei Gherzan
Date Feb. 7, 2012, 11:24 a.m.
Message ID <1328613869-19250-1-git-send-email-andrei@gherzan.ro>
Download mbox | patch
Permalink /patch/20817/
State New
Headers show

Comments

Andrei Gherzan - Feb. 7, 2012, 11:24 a.m.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
---
 meta/recipes-support/nspr/files/nspr.pc |   11 +++++++++
 meta/recipes-support/nspr/nspr_4.8.9.bb |   36 +++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-support/nspr/files/nspr.pc
 create mode 100644 meta/recipes-support/nspr/nspr_4.8.9.bb
Koen Kooi - Feb. 7, 2012, 12:12 p.m.
Op 7 feb. 2012, om 12:24 heeft Andrei Gherzan het volgende geschreven:

> Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
> Signed-off-by: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
> ---
> meta/recipes-support/nspr/files/nspr.pc |   11 +++++++++
> meta/recipes-support/nspr/nspr_4.8.9.bb |   36 +++++++++++++++++++++++++++++++
> 2 files changed, 47 insertions(+), 0 deletions(-)
> create mode 100644 meta/recipes-support/nspr/files/nspr.pc
> create mode 100644 meta/recipes-support/nspr/nspr_4.8.9.bb
> 
> diff --git a/meta/recipes-support/nspr/files/nspr.pc b/meta/recipes-support/nspr/files/nspr.pc
> new file mode 100644
> index 0000000..c3aed84
> --- /dev/null
> +++ b/meta/recipes-support/nspr/files/nspr.pc
> @@ -0,0 +1,11 @@
> +os_libs=-lpthread -ldl
> +prefix=/usr
> +exec_prefix=/usr
> +libdir=/usr/lib
> +includedir=/usr/include

The above hardcodes an fs layout that isn't true for e.g. micro

> +
> +Name: NSPR
> +Description: The Netscape Portable Runtime
> +Version: 4.8.9
> +Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
> +Cflags: 
> diff --git a/meta/recipes-support/nspr/nspr_4.8.9.bb b/meta/recipes-support/nspr/nspr_4.8.9.bb
> new file mode 100644
> index 0000000..a2fcc64
> --- /dev/null
> +++ b/meta/recipes-support/nspr/nspr_4.8.9.bb

Does nspr belong in OE-core?

regards,

Koen
Andrei Gherzan - Feb. 7, 2012, 1:04 p.m.
On Tue, Feb 7, 2012 at 14:12, Koen Kooi <koen@dominion.thruhere.net> wrote:

>
> Op 7 feb. 2012, om 12:24 heeft Andrei Gherzan het volgende geschreven:
>
> > Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
> > Signed-off-by: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
> > ---
> > meta/recipes-support/nspr/files/nspr.pc |   11 +++++++++
> > meta/recipes-support/nspr/nspr_4.8.9.bb |   36
> +++++++++++++++++++++++++++++++
> > 2 files changed, 47 insertions(+), 0 deletions(-)
> > create mode 100644 meta/recipes-support/nspr/files/nspr.pc
> > create mode 100644 meta/recipes-support/nspr/nspr_4.8.9.bb
> >
> > diff --git a/meta/recipes-support/nspr/files/nspr.pc
> b/meta/recipes-support/nspr/files/nspr.pc
> > new file mode 100644
> > index 0000000..c3aed84
> > --- /dev/null
> > +++ b/meta/recipes-support/nspr/files/nspr.pc
> > @@ -0,0 +1,11 @@
> > +os_libs=-lpthread -ldl
> > +prefix=/usr
> > +exec_prefix=/usr
> > +libdir=/usr/lib
> > +includedir=/usr/include
>
> The above hardcodes an fs layout that isn't true for e.g. micro
>
>
A pc was the only way to make js "see" nspr.  Actually it was Jin's idea
and i found it accurate for my use-case.
Koen, on micro how these hardcodes should look like?
Koen Kooi - Feb. 7, 2012, 1:06 p.m.
Op 7 feb. 2012, om 14:04 heeft Andrei Gherzan het volgende geschreven:

> On Tue, Feb 7, 2012 at 14:12, Koen Kooi <koen@dominion.thruhere.net> wrote:
> 
> Op 7 feb. 2012, om 12:24 heeft Andrei Gherzan het volgende geschreven:
> 
> > Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
> > Signed-off-by: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
> > ---
> > meta/recipes-support/nspr/files/nspr.pc |   11 +++++++++
> > meta/recipes-support/nspr/nspr_4.8.9.bb |   36 +++++++++++++++++++++++++++++++
> > 2 files changed, 47 insertions(+), 0 deletions(-)
> > create mode 100644 meta/recipes-support/nspr/files/nspr.pc
> > create mode 100644 meta/recipes-support/nspr/nspr_4.8.9.bb
> >
> > diff --git a/meta/recipes-support/nspr/files/nspr.pc b/meta/recipes-support/nspr/files/nspr.pc
> > new file mode 100644
> > index 0000000..c3aed84
> > --- /dev/null
> > +++ b/meta/recipes-support/nspr/files/nspr.pc
> > @@ -0,0 +1,11 @@
> > +os_libs=-lpthread -ldl
> > +prefix=/usr
> > +exec_prefix=/usr
> > +libdir=/usr/lib
> > +includedir=/usr/include
> 
> The above hardcodes an fs layout that isn't true for e.g. micro
> 
> 
> A pc was the only way to make js "see" nspr.  Actually it was Jin's idea and i found it accurate for my use-case. 
> Koen, on micro how these hardcodes should look like?

You will problably need to replace them with OEPREFIX/OELIBDIR and do sed -i s:OEPREFIX:${prefix}:g *.pc in do_install_append.

regards,

Koen

Patch

diff --git a/meta/recipes-support/nspr/files/nspr.pc b/meta/recipes-support/nspr/files/nspr.pc
new file mode 100644
index 0000000..c3aed84
--- /dev/null
+++ b/meta/recipes-support/nspr/files/nspr.pc
@@ -0,0 +1,11 @@ 
+os_libs=-lpthread -ldl
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/lib
+includedir=/usr/include
+
+Name: NSPR
+Description: The Netscape Portable Runtime
+Version: 4.8.9
+Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
+Cflags: 
diff --git a/meta/recipes-support/nspr/nspr_4.8.9.bb b/meta/recipes-support/nspr/nspr_4.8.9.bb
new file mode 100644
index 0000000..a2fcc64
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr_4.8.9.bb
@@ -0,0 +1,36 @@ 
+DESCRIPTION = "Netscape Portable Runtime Library"
+HOMEPAGE =  "http://www.mozilla.org/projects/nspr/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+SECTION = "libs/network"
+
+PR = "r0"
+
+SRC_URI = "ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz"
+
+SRC_URI += "file://nspr.pc "
+
+SRC_URI[md5sum] = "60770d45dc08c0f181b22cdfce5be3e8"
+SRC_URI[sha256sum] = "ff43c7c819e72f03bb908e7652c5d5f59a5d31ee86c333e692650207103d1cce"
+
+S = "${WORKDIR}/nspr-${PV}/mozilla/nsprpub"
+
+inherit autotools 
+
+do_configure() {
+	oe_runconf
+}
+
+do_compile_prepend() {
+	oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -C config export
+}
+
+do_install_append() {
+    install -D ${WORKDIR}/nspr.pc ${D}${libdir}/pkgconfig/nspr.pc
+}
+
+FILES_${PN} = "/usr/lib/*.so"
+FILES_${PN}-dev = "/usr/bin/* /usr/include/* /usr/share/aclocal/* /usr/lib/pkgconfig/*"
+FILES_${PN}-dbg = "/usr/bin/.debug/* /usr/lib/.debug/* /usr/src/debug/*"
+FILE_${PN}-staticdev= "/usr/lib/*.a"
+