source: trunk/dports/editors/textmate2/Portfile @ 101461

Last change on this file since 101461 was 101461, checked in by cal@…, 7 years ago

textmate2: revert r101427 and use conflicts_build instead.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
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 101461 2013-01-11 12:53:55Z cal@macports.org $
3
4PortSystem              1.0
5PortGroup               github 1.0
6PortGroup               xcodeversion 1.0
7PortGroup               conflicts_build 1.0
8
9github.setup            textmate textmate 9339 r
10epoch                   1
11version                 2.0.${github.version}
12
13maintainers             cal openmaintainer
14name                    textmate2
15
16categories              editors aqua
17description             \
18    TextMate brings Apple's approach to operating systems into the world of text editors. By \
19    bridging UNIX underpinnings and GUI, TextMate cherry-picks the best of both worlds to the \
20    benefit of expert scripters and novice users alike.
21long_description        ${description}\
22    TextMate is well-known for its large number of bundles adding support, snippets, completions \
23    and commands for a huge number of file types.
24
25conflicts_build         libc-headers
26platforms               darwin
27supported_archs         x86_64
28license                 GPL-3+
29
30fetch.type              git
31post-fetch {
32    system -W ${worksrcpath} "git submodule update --init"
33}
34
35patchfiles              patch-configure-versionnumber.diff \
36                        patch-create_default_bundles_tbz-verbose.diff \
37                        patch-configure-mdt.diff \
38                        patch-bin-gen_credits.rb-use-mp-ruby.diff \
39                        patch-bin-gen_html-use-mp-ruby.diff
40
41post-patch {
42    reinplace "s/@REVISION@/${github.version}/" ${worksrcpath}/configure
43    reinplace "s/__MACOSX_DEPLOYMENT_TARGET__/${macosx_deployment_target}/" ${worksrcpath}/configure
44    reinplace "s#@PREFIX@#${prefix}#" ${worksrcpath}/bin/gen_credits.rb ${worksrcpath}/bin/gen_html
45    fs-traverse file ${worksrcpath} {
46        if {[file tail ${file}] == "target"} {
47            reinplace "/TEST_SOURCES =/d" ${file}
48        }
49    }
50}
51
52depends_build-append    port:ninja \
53                        port:ragel \
54                        port:proctools \
55                        port:ruby \
56                        port:rb-json
57
58depends_skip_archcheck  ninja ragel proctools
59
60minimum_xcodeversions   {11 4.4}
61
62depends_lib-append      port:boost \
63                        port:multimarkdown \
64                        port:curl \
65                        port:openssl \
66                        port:libiconv \
67                        port:zlib
68
69if {${os.platform} != "darwin" || ${os.major} < 11} {
70    depends_fetch
71    depends_build
72    depends_lib
73    pre-fetch {
74        ui_error "${name} only works with Mac OS X 10.7 Lion or later."
75        return -code error "incompatible Mac OS X version"
76    }
77}
78
79configure.env-append    builddir=${worksrcpath}/build \
80                        tag=-macports
81
82pre-build {
83    # the textmate build expects this to be present
84    file mkdir $env(HOME)/Library/Caches/com.macromates.TextMate
85}
86build.cmd               ninja
87build.args              -v -j ${build.jobs}
88build.target            TextMate mate
89
90destroot {
91    copy ${worksrcpath}/build/Applications/TextMate/TextMate.app ${destroot}${applications_dir}
92    xinstall -m 0755 ${worksrcpath}/build/Applications/mate/mate ${destroot}${prefix}/bin
93    xinstall -m 0755 ${worksrcpath}/rmate/rmate ${destroot}${prefix}/bin
94}
Note: See TracBrowser for help on using the repository browser.