nbd: fix gnutls dependency 5014/head
authorMarcin Jurkowski <marcin1j@gmail.com>
Wed, 25 Oct 2017 14:52:28 +0000 (16:52 +0200)
committerMarcin Jurkowski <marcin1j@gmail.com>
Wed, 25 Oct 2017 14:52:28 +0000 (16:52 +0200)
Get rid of gnutls dependency introduced in 5bca84b. Needs patching
configure script to make gnutls existence test optional.

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
net/nbd/Makefile
net/nbd/patches/100-fix-build-without-gnutls.patch [deleted file]
net/nbd/patches/100-make-gnutls-test-optional.patch [new file with mode: 0644]
net/nbd/patches/101-fix-build-without-gnutls.patch [new file with mode: 0644]

index 6177f399acc1d0a89b78af85fb61d53fdee114ba..8107891b5c4e4d3dc1d9ba3d9fa39fa2ba5938db 100644 (file)
@@ -51,7 +51,8 @@ define Package/nbd-server/description
 endef
 
 CONFIGURE_ARGS += \
-       --disable-glibtest
+       --disable-glibtest \
+       --without-gnutls
 
 TARGET_CFLAGS += --std=gnu99 -DNODAEMON
 
diff --git a/net/nbd/patches/100-fix-build-without-gnutls.patch b/net/nbd/patches/100-fix-build-without-gnutls.patch
deleted file mode 100644 (file)
index 44cbf4e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -35,7 +35,7 @@ nbd_client_CFLAGS = $(client_flags) @Gnu
- nbd_client_LDADD = $(client_libs) @GnuTLS_LIBS@
- else
- nbd_client_SOURCES = $(client_srcs)
--nbd_client_CFLAGS = $(client_flags)
-+nbd_client_CFLAGS = $(client_flags) -DNOTLS -DPROG_NAME='"nbd-client"'
- nbd_client_LDADD = $(client_libs)
- endif
- endif
diff --git a/net/nbd/patches/100-make-gnutls-test-optional.patch b/net/nbd/patches/100-make-gnutls-test-optional.patch
new file mode 100644 (file)
index 0000000..29586ea
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -210,7 +210,11 @@ dnl               ;;
+ dnl   esac
+ dnl fi
+-PKG_CHECK_MODULES(GnuTLS, [gnutls >= 2.12.0],[HAVE_GNUTLS=1],[HAVE_GNUTLS=0])
++AC_ARG_WITH([gnutls], AS_HELP_STRING([--with-gnutls], [Build with GnuTLS]))
++AS_IF([test "x$with_gnutls" = "xyes"], [
++      PKG_CHECK_MODULES(GnuTLS, [gnutls >= 2.12.0],[HAVE_GNUTLS=1],[HAVE_GNUTLS=0])
++])
++
+ if test x$HAVE_GNUTLS = x1; then
+       AC_DEFINE(HAVE_GNUTLS, 1, [Define to 1 if you have a GnuTLS version of 2.12 or above])
+ else
diff --git a/net/nbd/patches/101-fix-build-without-gnutls.patch b/net/nbd/patches/101-fix-build-without-gnutls.patch
new file mode 100644 (file)
index 0000000..44cbf4e
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -35,7 +35,7 @@ nbd_client_CFLAGS = $(client_flags) @Gnu
+ nbd_client_LDADD = $(client_libs) @GnuTLS_LIBS@
+ else
+ nbd_client_SOURCES = $(client_srcs)
+-nbd_client_CFLAGS = $(client_flags)
++nbd_client_CFLAGS = $(client_flags) -DNOTLS -DPROG_NAME='"nbd-client"'
+ nbd_client_LDADD = $(client_libs)
+ endif
+ endif