1 | # -*- 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 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | PortGroup github 1.0 |
---|
7 | |
---|
8 | #PortGroup python 1.0 |
---|
9 | |
---|
10 | #github.setup wkhtmltopdf wkhtmltopdf 0.12.0 |
---|
11 | github.setup wkhtmltopdf wkhtmltopdf 0.12.1.1 |
---|
12 | #name wkhtmltopdf |
---|
13 | #version 0.12.1 |
---|
14 | categories sysutils |
---|
15 | platforms darwin |
---|
16 | maintainers nomaintainer |
---|
17 | license LGPL-3+ |
---|
18 | |
---|
19 | description Convert HTML to PDF using Webkit (QtWebKit) |
---|
20 | long_description ${description} |
---|
21 | |
---|
22 | # https://github.com/wkhtmltopdf/wkhtmltopdf |
---|
23 | # https://code.google.com/p/wkhtmltopdf/ |
---|
24 | homepage http://wkhtmltopdf.org/ |
---|
25 | |
---|
26 | #depends_lib path:bin/qmake:qt4 |
---|
27 | |
---|
28 | ## FIXME! 0.12.1 depends on https://github.com/jordansissel/fpm |
---|
29 | |
---|
30 | ## NOK, inspired from https://github.com/Homebrew/homebrew/blob/3e3972e12a71e9f4463bb7518eb8f874ecd08816/Library/Formula/wkhtmltopdf.rb |
---|
31 | #if {![variant_isset internalqt]} { |
---|
32 | # |
---|
33 | # post-patch { |
---|
34 | # #reinplace 's|TEMP \= \$\$\[QT_INSTALL_LIBS\] libQtGui.prl||;s|include(\$\$join(TEMP, "/"))||' ${worksrcpath}/common.pri |
---|
35 | # reinplace "s|TEMP = \$\$\[QT_INSTALL_LIBS\] libQtGui.prl||;s|include(\$\$join(TEMP, \"/\"))||" ${worksrcpath}/common.pri |
---|
36 | # } |
---|
37 | # |
---|
38 | # if {${os.platform} == "darwin" && ${os.major} == 13} { |
---|
39 | # set spec unsupported/macx-clang-libc++ |
---|
40 | # } else { |
---|
41 | # set spec macx-g++ |
---|
42 | # } |
---|
43 | # |
---|
44 | # ## what the script do? |
---|
45 | # configure.env QTDIR=${prefix} |
---|
46 | # configure.cmd qmake |
---|
47 | # configure.pre_args |
---|
48 | # configure.args |
---|
49 | # configure.post_args -spec ${spec} |
---|
50 | # |
---|
51 | # ## ./pdfconverter_p.hh:97:50: error: member initializer 'headerReserveHeight' does not name a non-static data member or base class |
---|
52 | # ## ../lib/pdfconverter.cc:246:5: error: use of undeclared identifier 'QWebPrinter'; did you mean 'webPrinter'? |
---|
53 | # ## ../lib/pdfconverter.cc:171:19: error: no member named 'measuringHeader' in 'wkhtmltopdf::PageObject' |
---|
54 | # |
---|
55 | # #pre-destroot { |
---|
56 | # ## system "cd ${worksrcpath}/examples && make" |
---|
57 | # # system -W ${worksrcpath}/examples "make" |
---|
58 | # #} |
---|
59 | # |
---|
60 | #} # ![variant_isset internalqt] |
---|
61 | |
---|
62 | variant internalqt { |
---|
63 | ### FIXME! this is downloading qt and adding a patch ... it works but. |
---|
64 | use_configure no |
---|
65 | build.cmd ./build_osx.sh |
---|
66 | build.target |
---|
67 | destroot.env INSTALL_ROOT=${destroot}${prefix} |
---|
68 | destroot.cmd make |
---|
69 | destroot.target install |
---|
70 | } |
---|
71 | |
---|
72 | variant universal { |
---|
73 | build.env-append OPTARG=universal |
---|
74 | } |
---|
75 | |
---|
76 | if {${subport} eq ${name}} { |
---|
77 | |
---|
78 | # checksums rmd160 54e5072969c912067ee00924105498977d24b6e0 \ |
---|
79 | # sha256 47b35536ca60220c402113c9ceee9b1f68bd7ca0dc831e3242e26684a9fd4baf |
---|
80 | checksums rmd160 0bc7c9c93aa5d1bae53f60e824be422a20a11048 \ |
---|
81 | sha256 436f1dbbfd79544dd0e53d7c6c60c5c78373688f0237c39867a3f7cb98d20f19 |
---|
82 | default_variants +internalqt |
---|
83 | } |
---|
84 | |
---|
85 | subport ${name}-devel { |
---|
86 | version 20140928 |
---|
87 | #fetch.type git |
---|
88 | #git.url https://github.com/wkhtmltopdf/wkhtmltopdf.git |
---|
89 | #git.branch 7058a0405ca3b2747e10113b2891016197bc2e1a |
---|
90 | master_sites https://github.com/wkhtmltopdf/wkhtmltopdf/archive/ |
---|
91 | distname 2b18ad3521ae2a60ed5567aed251d83f15218983 |
---|
92 | use_zip yes |
---|
93 | worksrcdir wkhtmltopdf-${distname} |
---|
94 | |
---|
95 | checksums rmd160 9b8312f03707d5a0dea6842a2aec73e9372229e8 \ |
---|
96 | sha256 db751b4bc2adbc0890494e69002dbaa3b8f5b8fd8abc034134d2546a923a2918 |
---|
97 | |
---|
98 | ## FIXME! needs gem fpm |
---|
99 | |
---|
100 | use_configure no |
---|
101 | build { |
---|
102 | system -W ${worksrcpath} "scripts/build.py osx-cocoa-x86-64" |
---|
103 | } |
---|
104 | } |
---|
105 | |
---|