Ticket #22993: patch-dovecot-sieve.diff

File patch-dovecot-sieve.diff, 4.6 KB (added by raimue (Rainer Müller), 14 years ago)

Adding a +sieve variant to dovecot

  • files/patch-sieve-0.1.15-extern.diff

     
     1
     2# HG changeset patch
     3# User Stephan Bosch <stephan@rename-it.nl>
     4# Date 1264449560 -3600
     5# Node ID fe0b2ff5032670a84f3bc30b1ef1daa6142a4dac
     6# Parent  939eb4311735179853a44f8d69098a0aae07ef2f
     7Omitted 'extern' in two declarations of global variables in header files, causing compile failures on certain systems.
     8
     9--- a/src/lib-sieve-tool/sieve-tool.h   Mon Jan 25 18:42:30 2010 +0100
     10+++ b/src/lib-sieve-tool/sieve-tool.h   Mon Jan 25 20:59:20 2010 +0100
     11@@ -10,12 +10,12 @@
     12  * Sieve instance
     13  */
     14 
     15-struct sieve_instance *sieve_instance;
     16+extern struct sieve_instance *sieve_instance;
     17 
     18 const char *sieve_tool_get_setting(void *context, const char *identifier);
     19 const char *sieve_tool_get_homedir(void *context);
     20 
     21-const struct sieve_environment sieve_tool_environment;
     22+extern const struct sieve_environment sieve_tool_environment;
     23 
     24 /*
     25  * Initialization
     26--- a/src/lib-sieve/plugins/notify/ext-notify-common.h  Mon Jan 25 18:42:30 2010 +0100
     27+++ b/src/lib-sieve/plugins/notify/ext-notify-common.h  Mon Jan 25 20:59:20 2010 +0100
     28@@ -41,7 +41,7 @@
     29  * Actions
     30  */
     31 
     32-const struct sieve_action_def act_notify_old;
     33+extern const struct sieve_action_def act_notify_old;
     34 
     35 struct ext_notify_recipient {
     36        const char *full;
     37
  • Portfile

     
    1919
    2020homepage            http://dovecot.org/
    2121
    22 master_sites        ${homepage}releases/${branch}
    23 checksums           md5     b7d0081b17ff6afae85e8dc14157fa57 \
     22master_sites        ${homepage}releases/${branch}:dovecot
     23distfiles           ${distname}${extract.suffix}:dovecot
     24checksums           ${distname}${extract.suffix} \
     25                    md5     b7d0081b17ff6afae85e8dc14157fa57 \
    2426                    sha1    b717de1ab63f3d521c93385cbd20c49293921079 \
    2527                    rmd160  0b508502b7c2e9aecd274bf15f1ec5adbb1843a7
    2628
     
    103105    depends_lib-append          port:openldap
    104106}
    105107
     108variant sieve description {Enable LDA sieve extension} {
     109    global sieve_version sieve_distname sieve_worksrcpath
     110
     111    set sieve_version           0.1.15
     112    master_sites-append         http://www.rename-it.nl/dovecot/${branch}:sieve
     113    set sieve_distname          ${name}-${branch}-sieve-${sieve_version}
     114    distfiles-append            ${sieve_distname}${extract.suffix}:sieve
     115
     116    checksums-append            ${sieve_distname}${extract.suffix} \
     117                                md5     2246fbbcf304d3ec1df0db2d091fe05a \
     118                                sha1    2827df60028639ec15422a86f48a1c9b2a78431a \
     119                                rmd160  7fd3d23d5ef93d443cdedc8512dab649b2a99694
     120
     121    set sieve_worksrcpath ${workpath}/${sieve_distname}
     122
     123    # There has been a compile problem with sieve 0.1.15, remove this on next version increment
     124    post-patch {
     125        system "cd ${sieve_worksrcpath} && patch -p1 < ${filespath}/patch-sieve-0.1.15-extern.diff"
     126    }
     127
     128    post-configure {
     129        global sieve_worksrcpath
     130
     131        # dovecot-sieve needs dovecot-config
     132        system "cd ${worksrcpath} && make dovecot-config"
     133
     134        set configure_dir_save  ${configure.dir}
     135        set configure_args_save ${configure.args}
     136        configure.dir           ${sieve_worksrcpath}
     137        configure.args          --with-dovecot=${worksrcpath}
     138
     139        if {[catch {command_exec configure} result]} {
     140            return -code error "configure sieve failed: $result"
     141        }
     142
     143        configure.dir           ${configure_dir_save}
     144        configure.args          ${configure_args_save}
     145    }
     146
     147    post-build {
     148        global sieve_worksrcpath
     149
     150        set build_dir_save  ${build.dir}
     151        build.dir           ${sieve_worksrcpath}
     152
     153        if {[catch {command_exec build} result]} {
     154            return -code error "build sieve failed: $result"
     155        }
     156
     157        build.dir           ${build_dir_save}
     158    }
     159
     160    post-destroot {
     161        global sieve_worksrcpath
     162
     163        set destroot_dir_save  ${destroot.dir}
     164        destroot.dir           ${sieve_worksrcpath}
     165
     166        if {[catch {command_exec destroot} result]} {
     167            return -code error "destroot sieve failed: $result"
     168        }
     169
     170        destroot.dir           ${destroot_dir_save}
     171    }
     172}
     173
    106174startupitem.create      yes
    107175startupitem.executable  ${prefix}/sbin/dovecot
    108176startupitem.pidfile     auto ${prefix}/var/run/dovecot/master.pid