Ticket #15948: Portfile-nginx.diff

File Portfile-nginx.diff, 4.6 KB (added by richard@…, 16 years ago)

portfile diff

  • Portfile

    old new  
    1 # $Id: Portfile 32369 2007-12-28 05:55:15Z boeyms@macports.org $
     1# $Id$
    22
    33PortSystem 1.0
    44
    55name            nginx
    6 version         0.5.34
     6version         0.6.32
    77categories      www mail
    88platforms       darwin
    99maintainers     boeyms openmaintainer
     
    1919                    consumption.
    2020homepage        http://nginx.net/
    2121master_sites    http://sysoev.ru/nginx
    22 checksums       md5     8f7d3efcd7caaf1f06e4d95dfaeac238 \
    23                 sha1    f76f6cb1ac0a316f20958bf7dc6a03723fb58edf \
    24                 rmd160  a057651eb9065b1e491ce38c73bc9e4897c982c7
     22checksums       md5     c09a2ace3c91f45dabbb608b11e48ed1 \
     23                sha1    346166171477c3e78759bdbbc8461107d8475269 \
     24                rmd160  06749c5bf834a3f7e82ad3122a5db457c193d117
    2525
    2626depends_lib     port:pcre port:zlib
    2727
    28 patchfiles      patch-auto__install.diff patch-conf__nginx.conf.diff
    29 post-patch {
    30     reinplace "s|__DESTROOT__|${destroot}|g" \
    31         ${worksrcpath}/auto/install
    32 }
     28patchfiles      patch-auto-install.diff patch-conf-nginx.conf.diff
    3329
    3430set pidfile     ${prefix}/var/run/${name}.pid
    3531
     
    4844build.target        build
    4945destroot.keepdirs   ${destroot}${prefix}/var/log/${name} \
    5046                    ${destroot}${prefix}/var/run/${name}
     47
    5148post-destroot {
    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 ""
    7560}
    7661
    7762startupitem.create      yes
     
    10691# This variant has been labelled "perl5" so as to allow users to easily stick
    10792# with perl 5.x once perl 6.x is released; a "perl6" variant will also be added
    10893# at that time.
    109 variant perl5 description {Add perl support to the server} {
     94variant perl5 description {Add perl support to the server, directly within\
     95        nginx and call perl via SSI} {
    11096    depends_run-append      port:perl5.8
    11197    configure.args-append   --with-http_perl_module
    11298}
     99
     100variant realip description {Using nginx as a backend} {
     101    configure.args-append   --with-http_realip_module
     102}
     103
     104variant addition description {Append text to pages} {
     105    configure.args-append   --with-http_addition_module
     106}
     107
     108variant substitution description {Replace text in pages} {
     109    configure.args-append   --with-http_sub_module
     110}
     111
     112variant 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
     117variant 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}