diff --git a/databases/couchdb/Makefile b/databases/couchdb/Makefile index 930dbbeb09cb..5caa0864293f 100644 --- a/databases/couchdb/Makefile +++ b/databases/couchdb/Makefile @@ -3,7 +3,7 @@ PORTNAME= couchdb PORTVERSION= 1.6.1 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 2 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_APACHE} diff --git a/databases/couchdb/files/couchdb.in b/databases/couchdb/files/couchdb.in index 49952f9357bd..25b66e6043c7 100644 --- a/databases/couchdb/files/couchdb.in +++ b/databases/couchdb/files/couchdb.in @@ -19,6 +19,9 @@ # # couchdb_respawn (int): Set to none by default. If CouchDB crashes, # respawn after this many seconds. +# +# couchdb_erl_flags (string): Set to none by default. Additional Erlang flags +# that are appended via ERL_ZFLAGS to the Erlang VM parameters. . /etc/rc.subr @@ -27,11 +30,12 @@ rcvar=couchdb_enable load_rc_config $name -: ${couchdb_enable="NO"} +: ${couchdb_enable:="NO"} couchdb_user="${couchdb_user:-"couchdb"}" couchdb_enablelogs="${couchdb_enablelogs:-"YES"}" couchdb_etcdir="${couchdb_etcdir:-"%%PREFIX%%/etc/couchdb"}" couchdb_respawn="${couchdb_respawn:-"0"}" +couchdb_erl_flags="${couchdb_erl_flags:-""}" command="%%PREFIX%%/bin/${name}" pidfile="/var/run/${name}/${name}.pid" @@ -63,6 +67,11 @@ couchdb_prestart() errfile=/dev/null fi + # couchdb supports passing options through to the erlang vm directly in + # ERL_ZFLAGS which is appended to CouchDB own flags. + ERL_ZFLAGS=${couchdb_erl_flags} + export ERL_ZFLAGS + command_args="-a ${couchdb_etcdir}/default.ini -a ${couchdb_etcdir}/local.ini ${respawn} -o ${logfile} -e ${errfile} ${command_args}" }