[90617] users/cal/ports/sysutils/collectd
cal at macports.org
cal at macports.org
Fri Mar 9 18:12:53 PST 2012
Revision: 90617
http://trac.macports.org/changeset/90617
Author: cal at macports.org
Date: 2012-03-09 18:12:52 -0800 (Fri, 09 Mar 2012)
Log Message:
-----------
collectd: Move special case handling into generating script, add users, uptime, uuid to default plugins
Modified Paths:
--------------
users/cal/ports/sysutils/collectd/Portfile
users/cal/ports/sysutils/collectd/files/dep-gen.sh
Modified: users/cal/ports/sysutils/collectd/Portfile
===================================================================
--- users/cal/ports/sysutils/collectd/Portfile 2012-03-10 02:08:20 UTC (rev 90616)
+++ users/cal/ports/sysutils/collectd/Portfile 2012-03-10 02:12:52 UTC (rev 90617)
@@ -136,19 +136,6 @@
--disable-xmms \
--disable-zfs_arc
-# Add this block into the perl variant:
-# pre-configure {
-# set perl5bin "${prefix}/bin/perl5"
-# if {[string first "true" [exec ${perl5bin} -V:useshrplib]] == -1} {
-# ui_error "${name} requires perl5 to be installed with the +shared variant."
-# return -code error "perl5 must be +shared"
-# }
-# if {[string first "define" [exec ${perl5bin} -V:usethreads]] == -1} {
-# ui_error "${name} requires perl5 to be installed with the +threads variant."
-# return -code error "perl5 must be +threads"
-# }
-# }
-
#######################################################
# WARNING: This list is generated by files/dep-gen.sh #
# Take care when editing manually! #
@@ -342,11 +329,12 @@
}
variant java description {Embed the Java Virtual Machine} {
+ configure.args-delete --disable-java
+ configure.args-append --enable-java
+
pre-configure {
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"
}
- configure.args-delete --disable-java
- configure.args-append --enable-java
}
variant uuid description {UUID as hostname plugin} {
@@ -596,5 +584,8 @@
+ted \
+threshold \
+unixsock \
+ +uptime \
+ +users \
+ +uuid \
+write_http \
Modified: users/cal/ports/sysutils/collectd/files/dep-gen.sh
===================================================================
--- users/cal/ports/sysutils/collectd/files/dep-gen.sh 2012-03-10 02:08:20 UTC (rev 90616)
+++ users/cal/ports/sysutils/collectd/files/dep-gen.sh 2012-03-10 02:12:52 UTC (rev 90617)
@@ -226,10 +226,42 @@
ted
threshold
unixsock
+ uptime
+ users
+ uuid
write_http
)
+declare -A EXTRA_CODE
+read -r -d '' PERL_EXTRA <<'EOF'
+ pre-configure {
+ set perl5bin "${prefix}/bin/perl5"
+ if {[string first "true" [exec ${perl5bin} -V:useshrplib]] == -1} {
+ ui_error "${name} requires perl5 to be installed with the +shared variant."
+ return -code error "perl5 must be +shared"
+ }
+ if {[string first "define" [exec ${perl5bin} -V:usethreads]] == -1} {
+ ui_error "${name} requires perl5 to be installed with the +threads variant."
+ return -code error "perl5 must be +threads"
+ }
+ }
+EOF
+read -r -d '' JAVA_EXTRA <<'EOF'
+ pre-configure {
+ 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"
+ }
+EOF
+read -r -d '' NETWORK_EXTRA <<'EOF'
+ # silence a deprecation warning
+ configure.cflags-append -D_GCRYPT_IN_LIBGCRYPT=1
+EOF
+EXTRA_CODE=(
+ [perl]="$PERL_EXTRA"
+ [java]="$JAVA_EXTRA"
+ [network]="$NETWORK_EXTRA"
+)
+
echo "#######################################################"
echo "# WARNING: This list is generated by files/dep-gen.sh #"
echo "# Take care when editing manually! #"
@@ -241,6 +273,10 @@
printf "variant %s description {%s} {\n" "$plugin" "${PLUGINS[$plugin]}"
printf " configure.args-delete --disable-$plugin\n"
printf " configure.args-append --enable-$plugin\n"
+ if [ -n "${EXTRA_CODE[$plugin]}" ]; then
+ echo
+ echo " ${EXTRA_CODE[$plugin]}"
+ fi
if [ -n "${PLUGIN_DEPS[$plugin]}" ]; then
printf "\n depends_lib-delete %s\n" "${PLUGIN_DEPS[$plugin]}"
printf " depends_lib-append %s\n" "${PLUGIN_DEPS[$plugin]}"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120309/69483260/attachment.html>
More information about the macports-changes
mailing list