Ticket #43373: patch-zabbix2-Portfile.diff

File patch-zabbix2-Portfile.diff, 4.3 KB (added by jul_bsd@…, 10 years ago)
  • net/zabbix2/Portfile

    old new  
    44PortSystem          1.0
    55
    66name                zabbix2
    7 version             2.2.1
     7version             2.2.3
    88revision            0
    99categories          net
    10 maintainers         nomaintainer
     10maintainers         yahoo.fr:jul_bsd openmaintainer
    1111platforms           darwin
    1212
    1313license             GPL-2
     
    1818                    performance monitoring solution. Zabbix offers advanced \
    1919                    monitoring, alerting, and visualization features today \
    2020                    which are missing in other monitoring systems, even some \
    21                     of the best commercial ones. 
     21                    of the best commercial ones.
    2222
    2323distname            zabbix-${version}
    2424livecheck.name      zabbix
     
    2828    sourceforge:project/zabbix/ZABBIX%20Latest%20Stable/${version} \
    2929    sourceforge:project/zabbix/ZABBIX%20Release%20Candidates/${version}
    3030
    31 checksums \
    32     rmd160  24cfecc6825245b8a3ae15c23ffe38236cd37cd4 \
    33     sha256  29c9e4cefb527bf929797b26a5a1d8a07c55675bfe6a86ff9ef8e46bd792c7fb
     31checksums           rmd160  c5d4a156b90c50089dd1c8f91bcc3af054d3c97a \
     32                    sha256  12a75762d474227f9af8b44abe48dd2660a76713335a37fc8147aca3c79844c1
    3433
    3534universal_variant   no
    3635
     
    5554
    5655startupitem.create      yes
    5756
     57destroot.asroot         yes
     58install.asroot          yes
     59
    5860if { ${name} ne ${subport} } {
    5961    startupitem.name        zabbix2-agentd
    6062    startupitem.executable  \
     
    6668} else {
    6769    depends_lib-append      port:fping \
    6870                            port:curl \
    69                             port:apache2 \
    70                             port:php5 \
    71                             port:php5-gd \
    72                             port:php5-gettext \
    73                             port:php5-mbstring \
    74                             port:php5-sockets
     71                            port:apache2
    7572
    7673    configure.args-append   --enable-server \
    7774                            --with-libcurl=${prefix}/bin/curl-config \
     
    141138
    142139        eval $variant_line
    143140    }
     141    array set PHPLIST {
     142        php53   {"PHP 5.3"            php53 }
     143        php54   {"PHP 5.4"            php54 }
     144        php55   {"PHP 5.5"            php55 }
     145    }
     146    set PHPLIST_KEYS [lsort [array names PHPLIST]]
     147    foreach dbitem $PHPLIST_KEYS {
     148        set this_key [lsearch -exact $PHPLIST_KEYS $dbitem]
     149        set conf_list [lreplace $PHPLIST_KEYS $this_key $this_key]
     150        set prms $PHPLIST($dbitem)
     151       
     152        set variant_line {variant $dbitem description \
     153          "Use [lindex ${prms} 0] for PHP" }
     154
     155        foreach over ${conf_list} {
     156            append variant_line " conflicts ${over}"
     157        }
     158
     159        append variant_line { "
     160            depends_lib-append      port:[lindex ${prms} 1] \
     161                                    port:[lindex ${prms} 1]-gd \
     162                                    port:[lindex ${prms} 1]-gettext \
     163                                    port:[lindex ${prms} 1]-mbstring \
     164                                    port:[lindex ${prms} 1]-sockets
     165            ## no php configure option
     166            #configure.args-append   --with-[lindex ${prms} 2]
     167
     168        " }
     169
     170        eval $variant_line
     171    }
    144172
    145173    if {![variant_isset mysql51] &&
    146174        ![variant_isset mysql55] &&
     
    152180        ![variant_isset pgsql83] &&
    153181        ![variant_isset pgsql84] &&
    154182        ![variant_isset sqlite3]} {
    155         default_variants +mysql5
     183        default_variants-append +mysql5
     184    }
     185    if {![variant_isset php53] &&
     186        ![variant_isset php54] &&
     187        ![variant_isset php55]} {
     188        default_variants-append +php55
    156189    }
    157190
    158191# Notify anyone with +agent_only installed of new zabbix2-agent port
     
    298331
    2993322) Setup the ZABBIX MySQL database
    300333
    301  For other databases, follow documentation from 
     334 For other databases, follow documentation from
    302335 https://www.zabbix.com/documentation/2.0/manual/appendix/install/db_scripts
    303336
    304337-Create the ZABBIX database
     
    342375
    343376    sudo port load zabbix2
    344377
    345    To start Zabbix manually, use: 
     378   To start Zabbix manually, use:
    346379    ${prefix}/share/zabbix/zabbix_server.init start (stop|status)
    347380
    348381 !! Note: Your shared memory will likely need to be increased  !!