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

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

textmate2: update to r9331, closes #37478

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