New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 82267


Ignore:
Timestamp:
08/11/11 14:04:45 (4 years ago)
Author:
pixilla@…
Message:

sysutils/logrotate:

  • Fix up variants.
  • Remove unused patches
  • OSX does not have strndup function so add it to config.c
Location:
users/pixilla/dports/sysutils/logrotate
Files:
1 added
6 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • users/pixilla/dports/sysutils/logrotate/Portfile

    r82235 r82267  
    77version             3.8.0 
    88categories          sysutils 
    9 maintainers         markd pixilla.com:brad 
     9maintainers         markd openmaintainer 
    1010platforms           darwin 
    1111 
     
    1919 
    2020homepage            https://fedorahosted.org/logrotate/ 
    21 master_sites        https://fedorahosted.org/releases/l/o/logrotate 
     21master_sites        gentoo 
    2222checksums           sha1    a79c500c4ce45177b47bb473a6bff4021af7121e \ 
    2323                    rmd160  7e1e24f53db5230eee2e1db8d90fe3a33692ca01 
    2424 
    25 livecheck.type      regex 
    26 livecheck.url       ${master_sites} 
    27 livecheck.regex     ${name}-(\\d+\\.\\d+(\\.\\d+)?)${extract.suffix} 
    28  
    29 patchfiles          patch-Makefile.diff \ 
    30                     patch-examples-logrotate-default.diff \ 
    31                     patch-config.c.diff \ 
    32                     patch-config.h.diff \ 
    33                     patch-logrotate.c.diff \ 
    34                     patch-strndup.c.diff \ 
    35                     patch-strndup.h.diff 
    3625patch.pre_args      -p1 
     26patchfiles          patch-config.c.diff 
    3727 
    3828depends_run         port:popt port:gettext port:gzip 
    3929 
     30post-extract { 
     31    touch ${worksrcpath}/.depend 
     32} 
     33 
     34post-patch { 
     35    reinplace "s|@@PREFIX@@|${prefix}|g" \ 
     36        ${worksrcpath}/examples/logrotate-default 
     37} 
     38 
    4039use_configure       no 
    4140 
    42 set prefix_hack     [string trimleft ${destroot}${prefix} /] 
    43  
    44 destroot.env-append BASEDIR="${prefix_hack}" 
    45  
    46 build.env           BASEDIR="${prefix}" \ 
     41build.env-append \ 
     42                    CC="${configure.cc} [get_canonical_archflags]" \ 
     43                    CXX="${configure.cxx} [get_canonical_archflags]" \ 
     44                    CPP="${configure.cpp} [get_canonical_archflags]" \ 
     45                    BASEDIR="${prefix}" \ 
    4746                    POPT_DIR="${prefix}/include" \ 
    4847                    STATEFILE="${prefix}/var/run/logrotate/logrotate.status" \ 
     
    5049                    USEINSTALL="install" 
    5150 
    52 #build.args-append   LDFLAGS="-L${prefix}/lib" 
    53                      
    54 post-patch { 
    55         reinplace "s|@@PREFIX@@|${prefix}|g" \ 
    56                 ${worksrcpath}/examples/logrotate-default 
    57 } 
    58  
     51destroot.env-append BASEDIR=[string trimleft ${destroot}${prefix} /] 
    5952destroot.keepdirs   ${destroot}${prefix}/etc/logrotate.d \ 
    6053                    ${destroot}${prefix}/var/run/logrotate 
    61  
    6254post-destroot { 
    63                 xinstall -m 755 ${worksrcpath}/examples/logrotate-default \ 
    64                         ${destroot}${prefix}/etc/logrotate.conf.sample 
     55        xinstall -m 755 ${worksrcpath}/examples/logrotate-default \ 
     56    ${destroot}${prefix}/etc/logrotate.conf.sample 
    6557    xinstall -d ${destroot}${prefix}/etc/logrotate.d 
    6658    xinstall -d ${destroot}${prefix}/var/run/logrotate 
     
    6860 
    6961post-activate { 
    70     delete  ${prefix}/etc/logrotate.d/.turd_${name} \ 
    71             ${prefix}/var/run/logrotate/.turd_${name} 
     62#    delete  ${prefix}/etc/logrotate.d/.turd_${name} \ 
     63#            ${prefix}/var/run/logrotate/.turd_${name} 
    7264} 
    7365 
    74 variant bzip2 description {change default compression to bzip} { 
     66variant bzip2 conflicts gzip description {Use bzip2 compression by default} { 
    7567    build.env-append    COMPRESS_COMMAND="${prefix}/bin/bzip2" \ 
    7668                        COMPRESS_EXT=".bz2" \ 
     
    8072} 
    8173 
    82 default_variants    bzip2 
     74variant gzip conflicts bzip2 description {Use gzip compression by default} { 
     75    depends_run-append  port:gzip 
     76} 
     77 
     78if {![variant_isset gzip]} { 
     79    default_variants +bzip2 
     80    variant_set bzip2 
     81} 
     82 
     83livecheck.type      regex 
     84livecheck.url       ${master_sites} 
     85livecheck.regex     ${name}-(\\d+\\.\\d+(\\.\\d+)?)${extract.suffix} 
    8386 
    8487notes \ 
    85 "Copy ${prefix}/etc/logrotate.conf.sample to ${prefix}/etc/logrotate.conf for a start. 
     88"Copy ${prefix}/etc/logrotate.conf.sample to ${prefix}/etc/logrotate.conf for a start: 
     89\$ cp ${prefix}/etc/logrotate.conf.sample ${prefix}/etc/logrotate.conf 
    8690Afterwards putting logrotate scripts in ${prefix}/etc/logrotate.d will cause them to  
    8791be executed with the following command: 
Note: See TracChangeset for help on using the changeset viewer.