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

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

textmate2: update to beta 7.1, fix build with Xcode clang by backporting upstream fix, closes #47820

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 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 136712 2015-05-24 22:26:31Z cal@macports.org $
3
4PortSystem              1.0
5PortGroup               github 1.0
6PortGroup               xcodeversion 1.0
7
8github.setup            textmate textmate 2.0-beta.7.1 v
9epoch                   4
10
11maintainers             cal openmaintainer
12name                    textmate2
13
14categories              editors aqua
15description             \
16    TextMate brings Apple's approach to operating systems into the world of text editors. By \
17    bridging UNIX underpinnings and GUI, TextMate cherry-picks the best of both worlds to the \
18    benefit of expert scripters and novice users alike.
19long_description        ${description}\
20    TextMate is well-known for its large number of bundles adding support, snippets, completions \
21    and commands for a huge number of file types.
22
23platforms               darwin
24supported_archs         x86_64
25license                 GPL-3+
26
27minimum_xcodeversions   {11 4.4}
28
29fetch.type              git
30post-fetch {
31    system -W ${worksrcpath} "${git.cmd} submodule update --init"
32}
33
34patchfiles              patch-configure-versionnumber.diff \
35                        patch-create_default_bundles_tbz-verbose.diff \
36                        patch-bin__gen_build-avoid-ninja-pool-console.diff \
37                        patch-target-isystem.diff \
38                        172ce9d4282e408fe60b699c432390b9f6e3f74a.patch
39
40# The build will fail with deployment target set to 10.8
41macosx_deployment_target 10.7
42
43post-patch {
44    reinplace "s/@VERSION@/${version}/" ${worksrcpath}/configure
45    fs-traverse file ${worksrcpath} {
46        if {[file tail ${file}] == "target"} {
47            reinplace "/TESTS *=/d" ${file}
48            reinplace "/TEST_SOURCES *=/d" ${file}
49        }
50    }
51}
52
53depends_build-append    port:ninja \
54                        port:ragel \
55                        port:proctools
56
57depends_skip_archcheck  ninja ragel proctools
58
59depends_lib-append      port:boost \
60                        port:multimarkdown \
61                        port:curl \
62                        port:openssl \
63                        port:libiconv \
64                        port:zlib \
65                        port:capnproto
66
67if {${os.platform} ne "darwin" || ${os.major} < 11} {
68    depends_fetch
69    depends_build
70    depends_lib
71    pre-fetch {
72        ui_error "${name} only works with Mac OS X 10.7 Lion or later."
73        return -code error "incompatible Mac OS X version"
74    }
75}
76
77configure.env-append    builddir=${worksrcpath}/build \
78                        capnp_prefix=${prefix}
79
80pre-configure {
81    # the textmate build expects this to be present
82    file mkdir $env(HOME)/Library/Caches/com.macromates.TextMate
83    # patch the code to use $HOME from env rather than from getpwent(3)
84    system -W ${worksrcpath} "patch -p0 <${filespath}/patch-Frameworks__io__src__path.cc-use-home-from-env.diff"
85}
86post-configure {
87    # revert the patch
88    system -W ${worksrcpath} "patch -R -p0 <${filespath}/patch-Frameworks__io__src__path.cc-use-home-from-env.diff"
89}
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}
99
100livecheck.type          regex
101livecheck.regex         "^(.\*)\$"
102livecheck.url           https://api.textmate.org/releases/release/version
103livecheck.version       $version
Note: See TracBrowser for help on using the repository browser.