| 52 | | set nginx_conf ${prefix}/etc/${name}/${name}.conf |
| 53 | | move ${destroot}${nginx_conf} ${destroot}${nginx_conf}.example |
| 54 | | # Try to cover for the fact that, in earlier revisions of this port, the |
| 55 | | # configuration file was installed live instead of an example, in which case an |
| 56 | | # upgrade will clobber any customisations that a user might have made :( |
| 57 | | catch "exec port provides ${nginx_conf}" provides_output |
| 58 | | set nginx_conf_is_registered_to_nginx \ |
| 59 | | [regexp "${nginx_conf} is provided by: ${name}" ${provides_output}] |
| 60 | | set nginx_conf_differs \ |
| 61 | | [catch {exec cmp ${nginx_conf} ${worksrcpath}/conf/${name}.conf}] |
| 62 | | if { ${nginx_conf_is_registered_to_nginx} && ${nginx_conf_differs} } { |
| 63 | | copy ${nginx_conf} ${nginx_conf}.altered |
| 64 | | ui_msg "" |
| 65 | | ui_msg "###############################################################" |
| 66 | | ui_msg "# It appears that you have altered ${nginx_conf}," |
| 67 | | ui_msg "# and that upgrading or uninstalling your previous installation" |
| 68 | | ui_msg "# of ${name} will clobber your copy. It has been copied to" |
| 69 | | ui_msg "# ${nginx_conf}.altered for preservation when you upgrade or" |
| 70 | | ui_msg "# uninstall ${name}. This problem should not occur with future" |
| 71 | | ui_msg "# upgrades or installations of this port.\n" |
| 72 | | ui_msg "###############################################################" |
| 73 | | ui_msg "" |
| 74 | | } |
| | 49 | ui_msg "" |
| | 50 | ui_msg "###############################################################" |
| | 51 | ui_msg "# If it doesn't already exist, you'll need to create a config" |
| | 52 | ui_msg "# file at the location, ${prefix}/etc/${name}/${name}.conf" |
| | 53 | ui_msg "# This is the default file nginx will look for without using" |
| | 54 | ui_msg "# the -c flag" |
| | 55 | ui_msg "#" |
| | 56 | ui_msg "# New example files are also provided at ${prefix}/etc/${name}" |
| | 57 | ui_msg "# they are those ending in .example, you are advised to look." |
| | 58 | ui_msg "###############################################################" |
| | 59 | ui_msg "" |
| | 99 | |
| | 100 | variant realip description {Using nginx as a backend} { |
| | 101 | configure.args-append --with-http_realip_module |
| | 102 | } |
| | 103 | |
| | 104 | variant addition description {Append text to pages} { |
| | 105 | configure.args-append --with-http_addition_module |
| | 106 | } |
| | 107 | |
| | 108 | variant substitution description {Replace text in pages} { |
| | 109 | configure.args-append --with-http_sub_module |
| | 110 | } |
| | 111 | |
| | 112 | variant gzip_static description {Avoids compressing the same file each\ |
| | 113 | time it is requested} { |
| | 114 | configure.args-append --with-http_gzip_static_module |
| | 115 | } |
| | 116 | |
| | 117 | variant google_perftools description {Enable Google Performance Tools\ |
| | 118 | profiling for workers} { |
| | 119 | depends_lib-append port:google-perftools |
| | 120 | configure.args-append --with-google_perftools_module |
| | 121 | } |