Skip to contentSkip to conversation

ruli: Fix install step and build samples too

PATCH Superseded Khem Raj 1 participant 1 message Nov 20, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 ruli: Fix install step and build samples too

do_install never executed as a result it was empty install Create ruli-bin package for utilities, so libraries can be packages granularily

Drop the makefile patch which is no longer needed, set the make variables to get the needed bits set

---
 ...-Fix-build-with-format-string-checks.patch |  29 ++++-
 .../recipes-support/ruli/files/Makefile.patch | 122 ------------------
 .../recipes-support/ruli/ruli_0.36.bb         |  22 +++-
 3 files changed, 38 insertions(+), 135 deletions(-)
 delete mode 100644 meta-networking/recipes-support/ruli/files/Makefile.patch
meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch +23 -6
index f8eb3ae67a..8ca26b51bb 100644
@@ -15,11 +15,9 @@ Signed-off-by: Khem Raj <[email protected]>
  src/ruli_addr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/src/ruli_addr.c b/src/ruli_addr.c
-index 00d5d0d..f1eabae 100644
 --- a/src/ruli_addr.c
 +++ b/src/ruli_addr.c
-@@ -415,7 +415,7 @@ int ruli_in_print(FILE *out, const _ruli_addr *addr, int family)
+@@ -415,7 +415,7 @@ int ruli_in_print(FILE *out, const _ruli
  {
    switch (family) {
    case PF_INET:
@@ -28,6 +26,25 @@ index 00d5d0d..f1eabae 100644
  
    case PF_INET6:
      return ruli_inet6_print(out, &addr->ipv6);
--- 
-2.13.1
-
+--- a/sample/getaddrinfo.c
++++ b/sample/getaddrinfo.c
+@@ -174,7 +174,7 @@ static void solve(const char *fullname)
+ 
+       for (ai = ai_res; ai; ai = ai->ai_next) {
+ 
+-	printf(fullname);
++	printf("%s", fullname);
+ 
+ 	switch (ai->ai_family) {
+ 	case PF_INET:
+--- a/sample/ruli-getaddrinfo.c
++++ b/sample/ruli-getaddrinfo.c
+@@ -176,7 +176,7 @@ static void solve(const char *fullname)
+ 
+       for (ai = ai_res; ai; ai = ai->ai_next) {
+ 
+-	printf(fullname);
++	printf("%s", fullname);
+ 
+ 	switch (ai->ai_family) {
+ 	case PF_INET:
meta-networking/recipes-support/ruli/files/Makefile.patch deleted +0 -122

122 lines not on this page · raw message

meta-networking/recipes-support/ruli/ruli_0.36.bb +15 -7
index 885796d2a5..a56ce45f93 100644
@@ -8,7 +8,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
 DEPENDS = "liboop"
 
 SRC_URI = "http://download.savannah.gnu.org/releases/ruli/ruli_${PV}.orig.tar.gz \
-           file://Makefile.patch \
            file://0001-Fix-build-with-format-string-checks.patch \
            file://0001-src-ruli_addr.c-Add-missing-format-string.patch \
            "
@@ -16,10 +15,19 @@ SRC_URI = "http://download.savannah.gnu.org/releases/ruli/ruli_${PV}.orig.tar.gz
 SRC_URI[md5sum] = "e73fbfdeadddb68a703a70cea5271468"
 SRC_URI[sha256sum] = "11d32def5b514748fbd9ea8c88049ae99e1bb358efc74eb91a4d268a3999dbfa"
 
-do_install1() {
-    install -d ${D}${includedir}/ruli
-    install -d ${D}${libdir}
-    install -m 0644 ${S}/src/ruli*.h ${D}${includedir}/ruli
-    install -m 0644 ${S}/src/libruli.so ${D}${libdir}
-    install -m 0644 ${S}/src/libruli.so.4 ${D}${libdir}
+B = "${S}"
+
+EXTRA_OEMAKE = 'CC="${CC}" OOP_BASE_DIR="${STAGING_EXECPREFIXDIR}" INSTALL_BASE_DIR="${D}${exec_prefix}"'
+
+do_configure() {
+    touch configure-stamp
+}
+
+do_install() {
+    oe_runmake install
 }
+
+PACKAGES =+ "${PN}-bin"
+
+FILES_${PN} =+ "${bindir}"
+
Signature · 1 line
2.24.0