Changeset 90617


Ignore:
Timestamp:
Mar 10, 2012, 2:12:52 AM (6 years ago)
Author:
cal@…
Message:

collectd: Move special case handling into generating script, add users, uptime, uuid to default plugins

Location:
users/cal/ports/sysutils/collectd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • users/cal/ports/sysutils/collectd/Portfile

    r90612 r90617  
    137137    --disable-zfs_arc
    138138
    139 # Add this block into the perl variant:
    140 # pre-configure {
    141 #     set perl5bin "${prefix}/bin/perl5"
    142 #     if {[string first "true" [exec ${perl5bin} -V:useshrplib]] == -1} {
    143 #         ui_error "${name} requires perl5 to be installed with the +shared variant."
    144 #         return -code error "perl5 must be +shared"
    145 #     }
    146 #     if {[string first "define" [exec ${perl5bin} -V:usethreads]] == -1} {
    147 #         ui_error "${name} requires perl5 to be installed with the +threads variant."
    148 #         return -code error "perl5 must be +threads"
    149 #     }
    150 # }
    151 
    152139#######################################################
    153140# WARNING: This list is generated by files/dep-gen.sh #
     
    343330
    344331variant java description {Embed the Java Virtual Machine} {
     332    configure.args-delete --disable-java
     333    configure.args-append --enable-java
     334
    345335    pre-configure {
    346336        ui_warn "Compiling with Java will probably fail; if you want to make it work, read `Configuring with libjvm' in README in the upstream git"
    347337    }
    348     configure.args-delete --disable-java
    349     configure.args-append --enable-java
    350338}
    351339
     
    597585    +threshold \
    598586    +unixsock \
     587    +uptime \
     588    +users \
     589    +uuid \
    599590    +write_http \
    600591
  • users/cal/ports/sysutils/collectd/files/dep-gen.sh

    r90612 r90617  
    227227        threshold
    228228        unixsock
     229        uptime
     230        users
     231        uuid
    229232        write_http
     233)
     234
     235declare -A EXTRA_CODE
     236read -r -d '' PERL_EXTRA <<'EOF'
     237    pre-configure {
     238        set perl5bin "${prefix}/bin/perl5"
     239        if {[string first "true" [exec ${perl5bin} -V:useshrplib]] == -1} {
     240            ui_error "${name} requires perl5 to be installed with the +shared variant."
     241            return -code error "perl5 must be +shared"
     242        }
     243        if {[string first "define" [exec ${perl5bin} -V:usethreads]] == -1} {
     244            ui_error "${name} requires perl5 to be installed with the +threads variant."
     245            return -code error "perl5 must be +threads"
     246        }
     247    }
     248EOF
     249read -r -d '' JAVA_EXTRA <<'EOF'
     250    pre-configure {
     251        ui_warn "Compiling with Java will probably fail; if you want to make it work, read `Configuring with libjvm' in README in the upstream git"
     252    }
     253EOF
     254read -r -d '' NETWORK_EXTRA <<'EOF'
     255    # silence a deprecation warning
     256    configure.cflags-append -D_GCRYPT_IN_LIBGCRYPT=1
     257EOF
     258EXTRA_CODE=(
     259        [perl]="$PERL_EXTRA"
     260        [java]="$JAVA_EXTRA"
     261        [network]="$NETWORK_EXTRA"
    230262)
    231263
     
    242274                printf "    configure.args-delete --disable-$plugin\n"
    243275                printf "    configure.args-append --enable-$plugin\n"
     276                if [ -n "${EXTRA_CODE[$plugin]}" ]; then
     277                        echo
     278                        echo "    ${EXTRA_CODE[$plugin]}"
     279                fi
    244280                if [ -n "${PLUGIN_DEPS[$plugin]}" ]; then
    245281                        printf "\n    depends_lib-delete %s\n" "${PLUGIN_DEPS[$plugin]}"
Note: See TracChangeset for help on using the changeset viewer.