net-dns/dnsdist: drop readline support
authorbgo <bgo@9dt.de>
Tue, 13 Jun 2017 13:14:27 +0000 (15:14 +0200)
committerMichał Górny <mgorny@gentoo.org>
Wed, 14 Jun 2017 07:48:43 +0000 (09:48 +0200)
Closes: https://github.com/gentoo/gentoo/pull/4921

net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild [moved from net-dns/dnsdist/dnsdist-1.1.0.ebuild with 77% similarity]
net-dns/dnsdist/dnsdist-9999.ebuild
net-dns/dnsdist/files/dnsdist-readline.patch [deleted file]

similarity index 77%
rename from net-dns/dnsdist/dnsdist-1.1.0.ebuild
rename to net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild
index 4b025151e37fbe510299bcd926fa75762550e956..074be54e64589afc7564eaec897a2c479664fec8 100644 (file)
@@ -24,17 +24,15 @@ fi
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="dnscrypt luajit readline regex remote-logging +ssl test"
-RESTRICT="readline? ( bindist )"
+IUSE="dnscrypt luajit regex remote-logging +ssl test"
 REQUIRED_USE="dnscrypt? ( ssl )"
 
 DEPEND="
        >=dev-libs/boost-1.35:=
+       dev-libs/libedit:=
        luajit? ( dev-lang/luajit:= )
        !luajit? ( >=dev-lang/lua-5.1:= )
        remote-logging? ( dev-libs/protobuf:= )
-       readline? ( sys-libs/readline:0= )
-       !readline? ( dev-libs/libedit:= )
        regex? ( dev-libs/re2:= )
        ssl? ( dev-libs/libsodium:= )
 "
@@ -47,19 +45,11 @@ RDEPEND="${DEPEND}"
 "
 
 src_prepare() {
-       eapply "${FILESDIR}/${PN}-readline.patch"
-       eapply_user
-
+       default
        [[ ${PV} == 9999 ]] && eautoreconf
 }
 
 src_configure() {
-       if use readline ; then
-               local -x LIBEDIT_CFLAGS="-I/usr/include/readline"
-               local -x LIBEDIT_LIBS="-lreadline -lcurses"
-               append-cxxflags -DREADLINE
-       fi
-
        econf \
                --sysconfdir=/etc/dnsdist \
                $(use_enable ssl libsodium) \
@@ -91,9 +81,4 @@ pkg_postinst() {
        elog
        elog "The name must be in the format dnsdist.<suffix> and dnsdist will use the"
        elog "/etc/dnsdist/dnsdist-<suffix>.conf configuration file instead of the default."
-
-       if use readline ; then
-               ewarn "dnsdist (GPLv2) was linked against readline (GPLv3)."
-               ewarn "A binary distribution should therefore not happen."
-       fi
 }
index a0571422096148111a03c0f3e8ce22d7ce9e4f9a..10e8fc265847f893a83db62165ffbe4ec2a7eebf 100644 (file)
@@ -24,17 +24,15 @@ fi
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="dnscrypt luajit readline regex remote-logging snmp +ssl test"
-RESTRICT="readline? ( bindist )"
+IUSE="dnscrypt luajit regex remote-logging snmp +ssl test"
 REQUIRED_USE="dnscrypt? ( ssl )"
 
 DEPEND="
        >=dev-libs/boost-1.35:=
+       dev-libs/libedit:=
        luajit? ( dev-lang/luajit:= )
        !luajit? ( >=dev-lang/lua-5.1:= )
        remote-logging? ( dev-libs/protobuf:= )
-       readline? ( sys-libs/readline:0= )
-       !readline? ( dev-libs/libedit:= )
        regex? ( dev-libs/re2:= )
        snmp? ( net-analyzer/net-snmp:= )
        ssl? ( dev-libs/libsodium:= )
@@ -48,19 +46,11 @@ RDEPEND="${DEPEND}"
 "
 
 src_prepare() {
-       eapply "${FILESDIR}/${PN}-readline.patch"
-       eapply_user
-
+       default
        [[ ${PV} == 9999 ]] && eautoreconf
 }
 
 src_configure() {
-       if use readline ; then
-               local -x LIBEDIT_CFLAGS="-I/usr/include/readline"
-               local -x LIBEDIT_LIBS="-lreadline -lcurses"
-               append-cxxflags -DREADLINE
-       fi
-
        econf \
                --sysconfdir=/etc/dnsdist \
                $(use_enable ssl libsodium) \
@@ -93,9 +83,4 @@ pkg_postinst() {
        elog
        elog "The name must be in the format dnsdist.<suffix> and dnsdist will use the"
        elog "/etc/dnsdist/dnsdist-<suffix>.conf configuration file instead of the default."
-
-       if use readline ; then
-               ewarn "dnsdist (GPLv2) was linked against readline (GPLv3)."
-               ewarn "A binary distribution should therefore not happen."
-       fi
 }
diff --git a/net-dns/dnsdist/files/dnsdist-readline.patch b/net-dns/dnsdist/files/dnsdist-readline.patch
deleted file mode 100644 (file)
index d6e031f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Naur dnsdist-1.1.0/dnsdist.cc dnsdist-1.1.0-gentoo/dnsdist.cc
---- dnsdist-1.1.0/dnsdist.cc   2016-12-29 13:45:46.000000000 +0100
-+++ dnsdist-1.1.0-gentoo/dnsdist.cc    2017-05-21 15:09:10.414951426 +0200
-@@ -29,6 +29,8 @@
- #if defined (__OpenBSD__)
- #include <readline/readline.h>
-+#elif defined READLINE
-+#include <readline/readline.h>
- #else
- #include <editline/readline.h>
- #endif
-diff -Naur dnsdist-1.1.0/dnsdist-console.cc dnsdist-1.1.0-gentoo/dnsdist-console.cc
---- dnsdist-1.1.0/dnsdist-console.cc   2016-12-29 13:45:46.000000000 +0100
-+++ dnsdist-1.1.0-gentoo/dnsdist-console.cc    2017-05-21 15:09:24.758950947 +0200
-@@ -25,6 +25,9 @@
- #if defined (__OpenBSD__)
- #include <readline/readline.h>
- #include <readline/history.h>
-+#elif defined READLINE
-+#include <readline/readline.h>
-+#include <readline/history.h>
- #else
- #include <editline/readline.h>
- #endif