-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

I'm having some problems with liveupdate.

The first was to find some documentation about it. I only found it in
"man portfile" and it wasn't very precise (for example regarding the
regex syntax).

The second is even regex of some Portfiles in the repository are not
working. For example the zlib port (and others). It uses this regex:

"<B> *${name} (\\d+(?:\\.\\d+)*)</B>"

But it isn't working and I don't know why; it should match the text on
the webpage.
After I changed it to the following it worked:

"<B> *${name} (\[0-9\]+(?:\\.\[0-9\]+)*)</B>"

Is \d and such special characters allowed or not? I'm not sure about it.

Thanks for your help,
Simon

PS: I attached a patch for zlib to fix this problem. Also added another
patch to fix some whitespace and other minor issues in the zlib
Portfile. CCing one of the maintainers.
- --
+ privacy is necessary
+ using http://gnupg.org
+ public key id: 0x6115F804EFB33229
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFGlPpAYRX4BO+zMikRCiLhAJ9yKH4J3z29zoWoe8vJdKC/erqo0gCeKq+k
1BGeZFTfWwUaikQY+q+fmFI=
=bVyA
-----END PGP SIGNATURE-----
--- 
/opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib/Portfile
    2007-07-11 17:33:56.000000000 +0200
+++ /Users/simonruderich/Portfile       2007-07-11 17:34:04.000000000 +0200
@@ -53,5 +53,4 @@
 }
 
 livecheck.check regex
-livecheck.url   ${homepage}
-livecheck.regex "<B> *${name} (\\d+(?:\\.\\d+)*)</B>"
+livecheck.regex "<B> *${name} (\[0-9\]+(?:\\.\[0-9\]+)*)</B>"
4,25d3
< name          zlib
< version               1.2.3
< revision      1
< categories    archivers
< maintainers   [EMAIL PROTECTED] ryandesign \
<               [EMAIL PROTECTED]
< description   zlib lossless data-compression library
< long_description \
<       zlib is designed to be a free, general-purpose, \
<       legally unencumbered, lossless data-compression \
<       library for use on virtually any computer hardware \
<       and operating system.
< homepage      http://www.zlib.net/
< platforms     darwin freebsd
< 
< master_sites  ${homepage} http://www.gzip.org/zlib/ \
<                               sourceforge:libpng
< 
< use_bzip2     yes
< checksums     md5 dee233bf288ee795ac96a98cc2e369b6 \
<             sha1 967e280f284d02284b0cd8872a8e2e04bfdc7283 \
<             rmd160 cfba9984b354dcc38da49331457e6bfc861c6f51
27c5,26
< patchfiles    patch-Makefile-static
---
> name                zlib
> version             1.2.3
> revision            1
> categories          archivers
> maintainers         [EMAIL PROTECTED] ryandesign \
>                     [EMAIL PROTECTED]
> description         zlib lossless data-compression library
> long_description    zlib is designed to be a free, general-purpose, \
>                     legally unencumbered, lossless data-compression \
>                     library for use on virtually any computer hardware \
>                     and operating system.
> homepage            http://www.zlib.net/
> platforms           darwin freebsd
> master_sites        ${homepage} http://www.gzip.org/zlib/ \
>                     sourceforge:libpng
> 
> use_bzip2           yes
> checksums           md5 dee233bf288ee795ac96a98cc2e369b6 \
>                     sha1 967e280f284d02284b0cd8872a8e2e04bfdc7283 \
>                     rmd160 cfba9984b354dcc38da49331457e6bfc861c6f51
> 
> patchfiles          patch-Makefile-static
29c28
<       patchfiles-append       patch-Makefile-universal
---
>   patchfiles-append patch-Makefile-universal
32,33c31
< configure.args        --shared
< configure.universal_args    
---
> configure.args      --shared
35c33
< test.run      yes
---
> test.run            yes
37c35
< set docdir  ${prefix}/share/doc/${name}-${version}
---
> set docdir ${prefix}/share/doc/${name}-${version}
39c37
< destroot.destdir prefix=${destroot}${prefix}
---
> destroot.destdir    prefix=${destroot}${prefix}
42,43c40,41
<     xinstall -m 0755 -d ${destroot}${docdir}
<     xinstall -m 0644 -W ${worksrcpath} ChangeLog FAQ README 
${destroot}${docdir}
---
>   xinstall -m 0755 -d ${destroot}${docdir}
>   xinstall -m 0644 -W ${worksrcpath} ChangeLog FAQ README ${destroot}${docdir}
47,52c45,50
<     post-destroot {
<         set examplesdir ${docdir}/examples
< 
<         xinstall -m 0755 -d ${destroot}${examplesdir}
<         eval xinstall -m 0644 [glob ${worksrcpath}/example{.c,s/*}] 
${destroot}${examplesdir}
<     }
---
>   post-destroot {
>     set examplesdir ${docdir}/examples
>     
>     xinstall -m 0755 -d ${destroot}${examplesdir}
>     eval xinstall -m 0644 [glob ${worksrcpath}/example{.c,s/*}] 
> ${destroot}${examplesdir}
>   }

Attachment: zlib.diff.sig
Description: Binary data

Attachment: zlib_space.diff.sig
Description: Binary data

_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to