From 2ad0aee032ce94bc343219790233d17181cc9c1f Mon Sep 17 00:00:00 2001 From: jca Date: Mon, 20 Nov 2017 14:27:32 +0000 Subject: [PATCH] Better fix for the symbol conflict that affects our libtool Allows us to run the testsuite again. --- net/knot/Makefile | 9 +++++++-- net/knot/patches/patch-src_contrib_net_c | 14 -------------- net/knot/patches/patch-src_contrib_net_h | 22 ---------------------- 3 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 net/knot/patches/patch-src_contrib_net_c delete mode 100644 net/knot/patches/patch-src_contrib_net_h diff --git a/net/knot/Makefile b/net/knot/Makefile index 09440de7331..17ff31c3837 100644 --- a/net/knot/Makefile +++ b/net/knot/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.21 2017/11/20 14:25:30 jca Exp $ +# $OpenBSD: Makefile,v 1.22 2017/11/20 14:27:32 jca Exp $ COMMENT = authoritative DNS server DISTNAME = knot-2.4.5 -REVISION = 1 +REVISION = 2 SHARED_LIBS += zscanner 1.0 # .1.0 SHARED_LIBS += knot 1.1 # .5.0 @@ -51,6 +51,11 @@ CONFIGURE_ENV = ac_cv_path_PDFLATEX="false" \ CFLAGS += -march=i586 .endif +post-extract: + # Workaround symbol conflict somehow avoided by GNU libtool + sed -i 's/net_send/contrib_&/g' ${WRKSRC}/tests/contrib/test_net.c + sed -i 's/net_send/contrib_&/g' ${WRKSRC}/src/contrib/net.[ch] + post-install: mv ${WRKINST}/etc/knot/ ${PREFIX}/share/examples/knot/ diff --git a/net/knot/patches/patch-src_contrib_net_c b/net/knot/patches/patch-src_contrib_net_c deleted file mode 100644 index f719aea2957..00000000000 --- a/net/knot/patches/patch-src_contrib_net_c +++ /dev/null @@ -1,14 +0,0 @@ -$OpenBSD: patch-src_contrib_net_c,v 1.1 2017/07/23 12:39:37 zhuk Exp $ -make net_send static, avoids conflict with net_send in libknot. - -Index: src/contrib/net.c ---- src/contrib/net.c.orig -+++ src/contrib/net.c -@@ -467,6 +467,7 @@ static ssize_t send_data(int sock, struct msghdr *msg, - - /* -- generic stream and datagram I/O -------------------------------------- */ - -+static - ssize_t net_send(int sock, const uint8_t *buffer, size_t size, - const struct sockaddr *addr, int timeout_ms) - { diff --git a/net/knot/patches/patch-src_contrib_net_h b/net/knot/patches/patch-src_contrib_net_h deleted file mode 100644 index c6349105e32..00000000000 --- a/net/knot/patches/patch-src_contrib_net_h +++ /dev/null @@ -1,22 +0,0 @@ -$OpenBSD: patch-src_contrib_net_h,v 1.1 2017/07/23 12:39:37 zhuk Exp $ -make net_send static, avoids conflict with net_send in libknot. - -Index: src/contrib/net.h ---- src/contrib/net.h.orig -+++ src/contrib/net.h -@@ -100,6 +100,7 @@ bool net_is_stream(int sock); - */ - int net_accept(int sock, struct sockaddr_storage *addr); - -+#if 0 - /*! - * \brief Send a message on a socket. - * -@@ -118,6 +119,7 @@ int net_accept(int sock, struct sockaddr_storage *addr - */ - ssize_t net_send(int sock, const uint8_t *buffer, size_t size, - const struct sockaddr *addr, int timeout_ms); -+#endif - - /*! - * \brief Receive a message from a socket.