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: Portfile 121085 2014-06-17 09:01:41Z mojca@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup app 1.0 |
---|
6 | PortGroup wxWidgets 1.0 |
---|
7 | |
---|
8 | name xchm |
---|
9 | git.branch 5b779c42f8402221e11327813a6923e106d15e4d |
---|
10 | set git_date 20150628 |
---|
11 | set git_sha [string range ${git.branch} 0 6] |
---|
12 | version 1.24-${git_date}-${git_sha} |
---|
13 | |
---|
14 | categories textproc |
---|
15 | maintainers mojca openmaintainer |
---|
16 | platforms darwin |
---|
17 | |
---|
18 | description A cross-platform GUI front-end to chmlib. |
---|
19 | long_description A cross-platform GUI front-end to chmlib, xCHM can \ |
---|
20 | show the content tree if one is available, print pages, \ |
---|
21 | change font face and size, remember bookmarks, display \ |
---|
22 | a searchable index, and search for words in the current \ |
---|
23 | page and the whole book. |
---|
24 | |
---|
25 | homepage http://xchm.sourceforge.net/ |
---|
26 | |
---|
27 | git.url git://git.code.sf.net/p/xchm/code |
---|
28 | |
---|
29 | app.name xCHM |
---|
30 | app.executable xchm |
---|
31 | app.icon ${worksrcpath}/art/xchm-128.png |
---|
32 | |
---|
33 | wxWidgets.use wxWidgets-3.0 |
---|
34 | |
---|
35 | depends_build port:makeicns |
---|
36 | depends_lib port:chmlib \ |
---|
37 | port:${wxWidgets.port} |
---|
38 | |
---|
39 | use_xz yes |
---|
40 | |
---|
41 | checksums rmd160 5e71bfa3f27c7d3d62ecee01377f4639ffc12a88 \ |
---|
42 | sha256 201bae52988d173baddfbe42e1e629d4d2eaad61eef26b92ad9edd14f15054a3 |
---|
43 | |
---|
44 | pre-fetch { |
---|
45 | if {![file exists ${distpath}/${distname}${extract.suffix}]} { |
---|
46 | # set git_dir ${worksrcpath} |
---|
47 | set git_dir ${workpath}/git |
---|
48 | |
---|
49 | # clone the git repository |
---|
50 | set options "-q" |
---|
51 | set cmdstring "${git.cmd} clone $options ${git.url} ${git_dir} 2>&1" |
---|
52 | ui_debug "Executing: $cmdstring" |
---|
53 | if {[catch {system $cmdstring} result]} { |
---|
54 | return -code error [msgcat::mc "Git clone failed"] |
---|
55 | } |
---|
56 | |
---|
57 | # create a tarball |
---|
58 | set xz [findBinary xz ${portutil::autoconf::xz_path}] |
---|
59 | set cmdstring "${git.cmd} archive ${git.branch} --prefix=${distname}/ | ${xz} > ${distpath}/${distname}${extract.suffix}" |
---|
60 | ui_debug "Executing: $cmdstring" |
---|
61 | if {[catch {system -W ${git_dir} ${cmdstring}} result]} { |
---|
62 | return -code error [msgcat::mc "Git archive failed"] |
---|
63 | } |
---|
64 | } |
---|
65 | } |
---|
66 | |
---|
67 | configure.args --with-wxdir=${wxWidgets.wxdir} |
---|