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

Last change on this file since 127935 was 127935, checked in by and.damore@…, 5 years ago

port textmate2: upgrade to 2.0-beta.6, fix livecheck URL since mainstream dropped usage of revision, fix #45504; openmaintainer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 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 127935 2014-11-08 11:19:58Z and.damore@macports.org $
3
4PortSystem              1.0
5PortGroup               github 1.0
6PortGroup               xcodeversion 1.0
7PortGroup               conflicts_build 1.0
8
9set app_revision        6
10github.setup            textmate textmate 2.0-beta.${app_revision} v
11epoch                   4
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
30minimum_xcodeversions   {11 4.4}
31
32fetch.type              git
33post-fetch {
34    system -W ${worksrcpath} "${git.cmd} submodule update --init"
35}
36
37patchfiles              patch-configure-versionnumber.diff \
38                        patch-create_default_bundles_tbz-verbose.diff \
39                        patch-bin__gen_build-avoid-ninja-pool-console.diff \
40                        patch-target-isystem.diff
41
42# The build will fail with deployment target set to 10.8
43macosx_deployment_target 10.7
44
45post-patch {
46    reinplace "s/@VERSION@/${version}/" ${worksrcpath}/configure
47    fs-traverse file ${worksrcpath} {
48        if {[file tail ${file}] == "target"} {
49            reinplace "/TESTS *=/d" ${file}
50            reinplace "/TEST_SOURCES *=/d" ${file}
51        }
52    }
53}
54
55depends_build-append    port:ninja \
56                        port:ragel \
57                        port:proctools
58
59depends_skip_archcheck  ninja ragel proctools
60
61depends_lib-append      port:boost \
62                        port:multimarkdown \
63                        port:curl \
64                        port:openssl \
65                        port:libiconv \
66                        port:zlib \
67                        port:capnproto
68
69if {${os.platform} ne "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                        capnp_prefix=${prefix} \
81                        APP_REVISION=${app_revision}
82
83pre-configure {
84    # the textmate build expects this to be present
85    file mkdir $env(HOME)/Library/Caches/com.macromates.TextMate
86    # patch the code to use $HOME from env rather than from getpwent(3)
87    system -W ${worksrcpath} "patch -p0 <${filespath}/patch-Frameworks__io__src__path.cc-use-home-from-env.diff"
88}
89post-configure {
90    # revert the patch
91    system -W ${worksrcpath} "patch -R -p0 <${filespath}/patch-Frameworks__io__src__path.cc-use-home-from-env.diff"
92}
93
94build.cmd               ninja
95build.args              -v -j ${build.jobs}
96build.target            TextMate mate
97
98destroot {
99    copy ${worksrcpath}/build/Applications/TextMate/TextMate.app ${destroot}${applications_dir}
100    xinstall -m 0755 ${worksrcpath}/build/Applications/mate/mate ${destroot}${prefix}/bin
101}
102
103livecheck.type          regex
104livecheck.regex         "^(.\*)\$"
105livecheck.url           https://api.textmate.org/releases/release/version
106livecheck.version       $version
Note: See TracBrowser for help on using the repository browser.