source: trunk/dports/editors/textmate2/Portfile

Last change on this file was 151086, checked in by cal@…, 14 months ago

textmate2: 2.0-beta.9.2

  • 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 151086 2016-08-06 19:10:11Z ryandesign@macports.org $
3
4PortSystem              1.0
5PortGroup               github 1.0
6PortGroup               xcodeversion 1.0
7
8epoch                   4
9github.setup            textmate textmate 2.0-beta.9.2 v
10revision                0
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
28minimum_xcodeversions   {11 4.4}
29
30fetch.type              git
31post-fetch {
32    system -W ${worksrcpath} "${git.cmd} submodule update --init"
33}
34
35patchfiles              patch-configure-versionnumber.diff \
36                        patch-target.diff \
37                        patch-frameworks_license_target.diff \
38                        patch-Applications_commit_target.diff
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:sparsehash \
56                        port:proctools
57
58depends_skip_archcheck  ninja ragel proctools
59
60depends_lib-append      port:boost \
61                        port:multimarkdown \
62                        port:curl \
63                        path:lib/libssl.dylib:openssl \
64                        port:libiconv \
65                        port:zlib \
66                        port:capnproto
67
68if {${os.platform} ne "darwin" || ${os.major} < 11} {
69    depends_fetch
70    depends_build
71    depends_lib
72    pre-fetch {
73        ui_error "${name} only works with Mac OS X 10.7 Lion or later."
74        return -code error "incompatible Mac OS X version"
75    }
76}
77
78configure.env-append    builddir=${worksrcpath}/build \
79                        capnp_prefix=${prefix}
80
81pre-configure {
82    # the textmate build expects this to be present
83    file mkdir $env(HOME)/Library/Caches/com.macromates.TextMate
84    # patch the code to use $HOME from env rather than from getpwent(3)
85    system -W ${worksrcpath} "patch -p0 <${filespath}/patch-Frameworks__io__src__path.cc-use-home-from-env.diff"
86}
87post-configure {
88    # revert the patch
89    system -W ${worksrcpath} "patch -R -p0 <${filespath}/patch-Frameworks__io__src__path.cc-use-home-from-env.diff"
90}
91
92build.cmd               ninja
93build.args              -v -j ${build.jobs}
94build.target            TextMate mate
95
96destroot {
97    copy ${worksrcpath}/build/Applications/TextMate/TextMate.app ${destroot}${applications_dir}
98    xinstall -m 0755 ${worksrcpath}/build/Applications/mate/mate ${destroot}${prefix}/bin
99}
100
101livecheck.type          regex
102livecheck.regex         "^(.\*)\$"
103livecheck.url           https://api.textmate.org/releases/release/version
104livecheck.version       $version
Note: See TracBrowser for help on using the repository browser.