| 1 | # $Id: $ |
| 2 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
| 3 | |
| 4 | PortSystem 1.0 |
| 5 | PortGroup python 1.0 |
| 6 | |
| 7 | name py-weasyprint |
| 8 | set my_name WeasyPrint |
| 9 | version 0.9 |
| 10 | set branch [join [lrange [split ${version} .] 0 1] .] |
| 11 | categories python pdf |
| 12 | license BSD |
| 13 | maintainers openmaintainer |
| 14 | platforms darwin |
| 15 | description A Python HTML to PDF converter |
| 16 | |
| 17 | long_description \ |
| 18 | WeasyPrint is a visual rendering engine for HTML and CSS that can export \ |
| 19 | to PDF. It aims to support web standards for printing. |
| 20 | |
| 21 | homepage http://weasyprint.org/ |
| 22 | master_sites http://pypi.python.org/packages/source/W/WeasyPrint |
| 23 | distname ${my_name}-${version} |
| 24 | |
| 25 | checksums sha256 6c93c9f41f21b7bc09205d04d0c16f5aab09993035f4e853f9e13d0e86366c4b \ |
| 26 | rmd160 35a100dd417d584cbebb2faf64a432d1f5be3d8c |
| 27 | |
| 28 | python.versions 27 |
| 29 | |
| 30 | if {$subport != $name} { |
| 31 | depends_build-append port:pkgconfig |
| 32 | depends_lib-append port:py${python.version}-gobject3 \ |
| 33 | port:pango \ |
| 34 | port:py${python.version}-lxml \ |
| 35 | port:ImageMagick |
| 36 | |
| 37 | build.type python |
| 38 | |
| 39 | destroot.cmd ${build.cmd} |
| 40 | destroot.target install |
| 41 | |
| 42 | test.run yes |
| 43 | test.env PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*] |
| 44 | test.target check |
| 45 | |
| 46 | |
| 47 | } else { |
| 48 | livecheck.type regex |
| 49 | livecheck.url http://pypi.python.org/packages/source/W/${my_name}/${branch}/ |
| 50 | livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)} |
| 51 | } |