Ticket #35701: patch-mail-dspam-improve-storage-drivers.diff

File patch-mail-dspam-improve-storage-drivers.diff, 3.4 KB (added by pixilla (Bradley Giesbrecht), 12 years ago)
  • mail/dspam/Portfile

     
    55
    66name            dspam
    77version         3.10.2
     8revision        1
    89categories      mail net
    910license         AGPL-3
    1011maintainers     yahoo.com:compconsultant
     
    2728
    2829destroot.keepdirs       ${destroot}${prefix}/var/log/dspam
    2930
     31set storage-driver "hash_drv"
     32if {[variant_isset mysql5]} {
     33    set storage-driver   "${storage-driver},mysql_drv"
     34}
     35if {[variant_isset sqlite]} {
     36    set storage-driver   "${storage-driver},sqlite3_drv"
     37}
     38if {[variant_isset postgres]} {
     39    set storage-driver   "${storage-driver},pgsql_drv"
     40}
     41configure.args-append \
     42                    --with-storage-driver=${storage-driver}
     43if {[variant_isset mysql5] || [variant_isset postgres]} {
     44
     45    configure.args-append \
     46                    --enable-preferences-extension \
     47                    --enable-virtual-users
     48}
     49
    3050variant vpopmail description {Configure dspam to work with vpopmail} {
    3151                configure.args-append --with-dspam-home-owner=vpopmail \
    3252                                      --with-dspam-home-group=vchkpw \
     
    3555                depends_lib     port:vpopmail
    3656}
    3757
    38 variant mysql5 conflicts postgres sqlite description {Configure dspam to work with mysql5} {
     58variant mysql5 description {Configure dspam to work with mysql5} {
    3959                depends_lib     path:bin/mysql_config5:mysql5
    40                 configure.args-append --with-storage-driver=mysql_drv \
    41                                       --with-mysql-includes=${prefix}/include/mysql5/mysql \
    42                                       --with-mysql-libraries=${prefix}/lib/mysql5/mysql \
    43                                       --enable-preferences-extension \
    44                                       --enable-virtual-users
     60                configure.args-append --with-mysql-includes=${prefix}/include/mysql5/mysql \
     61                                      --with-mysql-libraries=${prefix}/lib/mysql5/mysql
    4562}
    4663
    47 variant sqlite conflicts postgres mysql5 description {Configure dspam to work with sqlite} {
     64variant sqlite description {Configure dspam to work with sqlite} {
    4865                depends_lib     port:sqlite3
    49                 configure.args-append --with-sqlite-libaries=${prefix}/lib
     66                configure.args-append --with-sqlite-libraries=${prefix}/lib
    5067}
    51 variant postgres conflicts sqlite mysql5 description {Configure dspam to work with postgresql80} {
     68variant postgres description {Configure dspam to work with postgresql80} {
    5269                depends_lib     port:postgresql80
    53                 configure.args-append --with-storage-driver=pgsql_drv \
    54                                       --with-pgsql-includes=${prefix}/include/pgsql8 \
    55                                       --with-pgsql-libraries=${prefix}/lib/pgsql8
     70                configure.args-append --with-pgsql-includes=${prefix}/include/postgresql80 \
     71                                      --with-pgsql-libraries=${prefix}/lib/postgresql80
    5672}
    5773
     74variant debug description {add debug capabilities} {
     75                configure.args-append --enable-debug \
     76                                      --enable-verbose-debug
     77}
     78
    5879post-destroot {
    5980        file rename ${destroot}${prefix}/etc/dspam.conf ${destroot}${prefix}/etc/dspam.conf.sample
    6081        file mkdir ${destroot}${prefix}/var/dspam/samples