Fix building with -tcpd USE flag (#569066)
authorEray Aslan <eras@gentoo.org>
Thu, 24 Dec 2015 07:38:12 +0000 (09:38 +0200)
committerEray Aslan <eras@gentoo.org>
Thu, 24 Dec 2015 07:38:12 +0000 (09:38 +0200)
Package-Manager: portage-2.2.26

net-mail/mailutils/files/mailutils-tcp_wrappers.patch [new file with mode: 0644]
net-mail/mailutils/mailutils-2.99.99.ebuild

diff --git a/net-mail/mailutils/files/mailutils-tcp_wrappers.patch b/net-mail/mailutils/files/mailutils-tcp_wrappers.patch
new file mode 100644 (file)
index 0000000..81517ca
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/maidag/maidag.c  2015-07-02 22:45:39.000000000 +0300
++++ b/maidag/maidag.c  2015-12-22 11:55:17.000000000 +0200
+@@ -518,7 +518,9 @@
+   
+   mu_gocs_register ("sieve", mu_sieve_module_init);
++#ifdef WITH_LIBWRAP
+   mu_tcpwrapper_cfg_init ();
++#endif
+   mu_acl_cfg_init ();
+   mu_m_server_cfg_init (NULL);
+   maidag_cfg_init ();
+@@ -531,7 +533,9 @@
+   mu_m_server_create (&server, program_version);
+   mu_m_server_set_conn (server, lmtp_connection);
++#ifdef WITH_LIBWRAP
+   mu_m_server_set_prefork (server, mu_tcp_wrapper_prefork);
++#endif
+   mu_m_server_set_mode (server, MODE_INTERACTIVE);
+   mu_m_server_set_max_children (server, 20);
+   mu_m_server_set_timeout (server, 600);
index 16a9fecd7e94baffc07c487a44f8f763882268cd..aac4a572887f4e85aed831a093d1d3644ca4386e 100644 (file)
@@ -48,7 +48,8 @@ RDEPEND="!mail-client/nmh
 DEPEND="${RDEPEND}
        virtual/pkgconfig"
 
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
+       servers? ( tcpd )"
 
 pkg_setup() {
        use python && python-single-r1_pkg_setup
@@ -58,10 +59,11 @@ src_prepare() {
        # Disable bytecompilation of Python modules.
        echo "#!/bin/sh" > build-aux/py-compile
        epatch "${FILESDIR}/${PN}-2.99.98-readline-6.3.patch" #503954
+       epatch "${FILESDIR}/${PN}-tcp_wrappers.patch"
        if use mysql; then
                sed -i -e /^INCLUDES/"s:$:$(mysql_config --include):" \
                        sql/Makefile.am || die
-               eautoreconf
+                       eautoreconf
        fi
 }
 
@@ -90,6 +92,7 @@ src_configure() {
                $(use_enable threads pthread) \
                $(use_with tokyocabinet) \
                $(use_with kyotocabinet) \
+               $(use_with tcpd tcp-wrappers) \
                $(use_enable servers build-servers) \
                $(use_enable clients build-clients) \
                --with-mail-spool=/var/spool/mail \