diff mbox series

[oe,meta-networking] netkit-rusers: Fix cross-build after glibc dropped rpc

Message ID 20190812161152.15643-1-raj.khem@gmail.com
State Accepted
Commit 28ae6b2cea0d940d66764b102595f0fe5447e93a
Headers show
Series [oe,meta-networking] netkit-rusers: Fix cross-build after glibc dropped rpc | expand

Commit Message

Khem Raj Aug. 12, 2019, 4:11 p.m. UTC
Remove runtime checks from configure script which wont run correctly

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../0001-Link-with-libtirpc.patch             | 71 +++++++++++++++----
 .../netkit-rusers/netkit-rusers_0.17.bb       | 17 ++---
 2 files changed, 61 insertions(+), 27 deletions(-)

-- 
2.22.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch b/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch
index 55926468d9..3655a57162 100644
--- a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch
+++ b/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch
@@ -13,21 +13,69 @@  Upstream-Status: Pending
  rup/rup.c                 | 2 +-
  4 files changed, 4 insertions(+), 13 deletions(-)
 
-diff --git a/configure b/configure
-index 85f6ca6..2d2d4b7 100755
 --- a/configure
 +++ b/configure
-@@ -147,7 +147,7 @@ else
+@@ -92,7 +92,6 @@ else
+     echo -n 'Checking if C compiler works... '
+     if (
+           $CC __conftest.c -o __conftest || exit 1
+-          ./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+          echo 'yes'
+      else
+@@ -146,8 +145,7 @@ else
+ 
  fi
  
- LDFLAGS=
+-LDFLAGS=
 -LIBS=
-+LIBS="-ltirpc"
++LIBS="$LIBS -ltirpc"
  
  rm -f __conftest*
  
-diff --git a/rpc.rusersd/rusers_proc.c b/rpc.rusersd/rusers_proc.c
-index 9ae6306..f9e237c 100644
+@@ -172,13 +170,11 @@ int main() {
+ EOF
+ if (
+       $CC $CFLAGS  __conftest.c  -o __conftest || exit 1
+-      ./__conftest || exit 1
+    ) >/dev/null 2>&1; then
+     echo 'yes'
+ else
+     if (
+           $CC $CFLAGS -D__USE_BSD_SIGNAL __conftest.c  -o __conftest || exit 1
+-          ./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+         echo '-D__USE_BSD_SIGNAL'
+         CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
+@@ -231,7 +227,6 @@ if (
+ else
+     if (
+           $CC $CFLAGS -D_GNU_SOURCE __conftest.c  -o __conftest || exit 1
+-          ./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+         echo '-D_GNU_SOURCE'
+         CFLAGS="$CFLAGS -D_GNU_SOURCE"
+@@ -262,20 +257,17 @@ int main() {
+ EOF
+ if (
+       $CC $CFLAGS  __conftest.c $LIBBSD -o __conftest || exit 1
+-      ./__conftest || exit 1
+    ) >/dev/null 2>&1; then
+     echo 'ok'
+ else
+     if (
+           $CC $CFLAGS  __conftest.c -lsnprintf $LIBBSD -o __conftest || exit 1
+-          ./__conftest || exit 1
+        ) >/dev/null 2>&1; then
+         echo '-lsnprintf'
+         LIBS="$LIBS -lsnprintf"
+     else
+         if (
+               $CC $CFLAGS  __conftest.c -ldb $LIBBSD -o __conftest || exit 1
+-              ./__conftest || exit 1
+            ) >/dev/null 2>&1; then
+             echo '-ldb'
+             LIBS="$LIBS -ldb"
 --- a/rpc.rusersd/rusers_proc.c
 +++ b/rpc.rusersd/rusers_proc.c
 @@ -57,12 +57,7 @@ char rp_rcsid[] =
@@ -44,8 +92,6 @@  index 9ae6306..f9e237c 100644
  
  void rusers_service(struct svc_req *rqstp, SVCXPRT *transp);
  
-diff --git a/rpc.rusersd/rusersd.c b/rpc.rusersd/rusersd.c
-index 762be9b..dd355ac 100644
 --- a/rpc.rusersd/rusersd.c
 +++ b/rpc.rusersd/rusersd.c
 @@ -38,11 +38,7 @@ char rusersd_rcsid[] =
@@ -61,11 +107,9 @@  index 762be9b..dd355ac 100644
  
  #include "../version.h"
  
-diff --git a/rup/rup.c b/rup/rup.c
-index e5669ff..887f89d 100644
 --- a/rup/rup.c
 +++ b/rup/rup.c
-@@ -48,7 +48,7 @@ char rcsid[] = "$Id: rup.c,v 1.8 2000/07/22 19:51:40 dholland Exp $";
+@@ -48,7 +48,7 @@ char rcsid[] = "$Id: rup.c,v 1.8 2000/07
  
  #undef FSHIFT			/* Use protocol's shift and scale values */
  #undef FSCALE
@@ -74,6 +118,3 @@  index e5669ff..887f89d 100644
  
  #include "../version.h"
  
--- 
-2.17.0
-
diff --git a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb b/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb
index 77d739d722..296ebcad29 100644
--- a/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb
+++ b/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb
@@ -4,7 +4,7 @@  HOMEPAGE = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
 SECTION = "net"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://rusers/rusers.c;beginline=2;endline=3;md5=f4fc634a4ce8c569911196b72b10770e"
-DEPENDS = " tcp-wrappers libtirpc rpcbind rpcsvc-proto-native"
+DEPENDS = " tcp-wrappers libtirpc rpcbind rpcsvc-proto rpcsvc-proto-native"
 
 SRC_URI = "http://http.debian.net/debian/pool/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \
            http://http.debian.net/debian/pool/main/n/${BPN}/${BPN}_${PV}-8.diff.gz;name=patch8 \
@@ -17,16 +17,12 @@  SRC_URI[archive.sha256sum] = "f00138651865ad2dcfec5dedda0cda403cb80c4ab68efcc3bb
 SRC_URI[patch8.md5sum] = "1ff498113e0f920d92088092e5570bdc"
 SRC_URI[patch8.sha256sum] = "14882dbdda4e37baa84d55b54b46c7e063a20fc9e04d1be1a2807643cd0f3067"
 
-inherit autotools-brokensep
-
 CFLAGS += "-I${STAGING_INCDIR}/tirpc"
-LIBS += "-ltirpc"
+
+EXTRA_OEMAKE = "RUSERSX=${STAGING_INCDIR}/rpcsvc/rusers.x"
 
 do_configure () {
-    ./configure --prefix=${prefix}
-    echo "LDFLAGS=${LDFLAGS}" >> MCONFIG
-    echo "USE_GLIBC=1" >> MCONFIG
-    echo "LIBS=${LIBS}" >> MCONFIG
+    ./configure --prefix=${prefix} --installroot=${D} --with-c-compiler="${CC}"
 }
 
 do_install () {
@@ -62,9 +58,6 @@  EOF
     install rusersd.conf ${D}/${sysconfdir}/xinetd.d/rusersd
 }
 
-
-INSANE_SKIP_${PN} = "already-stripped"
-
 PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
 FILES_${PN}-client = "${bindir}/*"
 FILES_${PN}-server = "${sbindir}/* ${sysconfdir}"
@@ -72,7 +65,7 @@  FILES_${PN}-doc = "${mandir}"
 FILES_${PN}-dbg = "${prefix}/src/debug \
             ${bindir}/.debug ${sbindir}/.debug"
 
-RDEPENDS_${PN}-server = "tcp-wrappers xinetd rpcbind"
+RDEPENDS_${PN}-server += "tcp-wrappers xinetd rpcbind"
 
 # http://errors.yoctoproject.org/Errors/Details/186962/
 EXCLUDE_FROM_WORLD_libc-musl = "1"