1 | # -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 103303 2013-02-21 06:52:40Z jmr@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name xxdiff |
---|
7 | version 4.0 |
---|
8 | categories devel |
---|
9 | license GPL-2+ |
---|
10 | platforms darwin |
---|
11 | maintainers nomaintainer |
---|
12 | description xxdiff is a graphical merging tool |
---|
13 | long_description xxdiff is a graphical browser for viewing the \ |
---|
14 | differences between two or three files, or between two \ |
---|
15 | directories, and can be used to produce a merged version. |
---|
16 | |
---|
17 | homepage http://furius.ca/xxdiff/ |
---|
18 | |
---|
19 | fetch.type hg |
---|
20 | hg.url https://bitbucket.org/blais/xxdiff |
---|
21 | hg.tag b193168bad98 |
---|
22 | |
---|
23 | depends_lib port:bison \ |
---|
24 | port:flex |
---|
25 | |
---|
26 | patchfiles-append add-accelerators.patch |
---|
27 | |
---|
28 | subport ${name}-qt5 {} |
---|
29 | |
---|
30 | if {${subport} ne "${name}-qt5"} { |
---|
31 | PortGroup qt4 1.0 |
---|
32 | patchfiles-append patch-xxdiffpro.diff |
---|
33 | conflicts "${name}-qt5" |
---|
34 | } else { |
---|
35 | PortGroup qt5 1.0 |
---|
36 | patchfiles-append qt5/patch-xxdiffpro.diff \ |
---|
37 | qt5/patch-cmdline.diff \ |
---|
38 | qt5/patch-use-qt5.diff \ |
---|
39 | qt5/patch-restore-style.diff |
---|
40 | conflicts ${name} |
---|
41 | post-configure { |
---|
42 | # remove the stubs created in the pre-configure phase |
---|
43 | file delete ${configure.dir}/resParser_lex.cpp ${configure.dir}/resParser_lex.h |
---|
44 | file delete ${configure.dir}/resParser_yacc.cpp ${configure.dir}/resParser_yacc.h |
---|
45 | } |
---|
46 | } |
---|
47 | |
---|
48 | post-patch { |
---|
49 | reinplace "s|@@QT_INCLUDES_DIR@@|${qt_includes_dir}|g" ${worksrcpath}/src/xxdiff.pro |
---|
50 | } |
---|
51 | |
---|
52 | patchfiles-append patch-Makefiles.diff |
---|
53 | configure.dir ${workpath}/build |
---|
54 | configure.cmd make |
---|
55 | configure.pre_args -f ${worksrcpath}/src/Makefile.bootstrap QMAKE=${qt_qmake_cmd} MAKEDIR=${worksrcpath}/src |
---|
56 | build.dir ${configure.dir} |
---|
57 | #use_parallel_build no |
---|
58 | |
---|
59 | pre-configure { |
---|
60 | file mkdir ${configure.dir} |
---|
61 | if {${subport} eq "${name}-qt5"} { |
---|
62 | # this seems to be necessary to ensure both parsers will be generated before their headerfiles are required |
---|
63 | system "touch ${configure.dir}/resParser_lex.cpp ${configure.dir}/resParser_lex.h" |
---|
64 | system "touch ${configure.dir}/resParser_yacc.cpp ${configure.dir}/resParser_yacc.h" |
---|
65 | } |
---|
66 | } |
---|
67 | |
---|
68 | destroot { |
---|
69 | # Destroot xxdiff. |
---|
70 | xinstall -d ${destroot}${qt_apps_dir} |
---|
71 | copy "${build.dir}/bin/xxdiff.app" ${destroot}${qt_apps_dir}/ |
---|
72 | xinstall ${worksrcpath}/src/xxdiff.1 ${destroot}${prefix}/share/man/man1 |
---|
73 | xinstall ${filespath}/xxdiff.sh ${destroot}${prefix}/bin/xxdiff |
---|
74 | reinplace "s|@@QT_APPS_DIR@@|${qt_apps_dir}|g" ${destroot}${prefix}/bin/xxdiff |
---|
75 | } |
---|
76 | |
---|
77 | variant doc description {Install documentation} {} |
---|
78 | if { [variant_isset doc] } { |
---|
79 | # Destroot xxdiff documentation. |
---|
80 | post-destroot { |
---|
81 | xinstall -d ${destroot}${prefix}/share/doc |
---|
82 | copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name} |
---|
83 | delete ${destroot}${prefix}/share/doc/${name}/Makefile |
---|
84 | delete ${destroot}${prefix}/share/doc/${name}/xxdiff-scripts.txt |
---|
85 | delete ${destroot}${prefix}/share/doc/${name}/xxdiff-scripts.html |
---|
86 | } |
---|
87 | } |
---|
88 | |
---|