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
RevLine 
[96483]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
[98375]6PortGroup               xcodeversion 1.0
[101461]7PortGroup               conflicts_build 1.0
[96483]8
[127935]9set app_revision        6
10github.setup            textmate textmate 2.0-beta.${app_revision} v
11epoch                   4
[96483]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
[119669]25conflicts_build         libc-headers
[96483]26platforms               darwin
[97453]27supported_archs         x86_64
[96483]28license                 GPL-3+
29
[105298]30minimum_xcodeversions   {11 4.4}
31
[96483]32fetch.type              git
33post-fetch {
[116714]34    system -W ${worksrcpath} "${git.cmd} submodule update --init"
[96483]35}
36
[100114]37patchfiles              patch-configure-versionnumber.diff \
[119669]38                        patch-create_default_bundles_tbz-verbose.diff \
39                        patch-bin__gen_build-avoid-ninja-pool-console.diff \
40                        patch-target-isystem.diff
[97076]41
[105298]42# The build will fail with deployment target set to 10.8
43macosx_deployment_target 10.7
44
[96483]45post-patch {
[127935]46    reinplace "s/@VERSION@/${version}/" ${worksrcpath}/configure
[96483]47    fs-traverse file ${worksrcpath} {
48        if {[file tail ${file}] == "target"} {
[104030]49            reinplace "/TESTS *=/d" ${file}
50            reinplace "/TEST_SOURCES *=/d" ${file}
[96483]51        }
52    }
53}
54
55depends_build-append    port:ninja \
56                        port:ragel \
[101463]57                        port:proctools
[96483]58
[100111]59depends_skip_archcheck  ninja ragel proctools
[96483]60
61depends_lib-append      port:boost \
62                        port:multimarkdown \
63                        port:curl \
64                        port:openssl \
65                        port:libiconv \
[111994]66                        port:zlib \
67                        port:capnproto
[96483]68
[114325]69if {${os.platform} ne "darwin" || ${os.major} < 11} {
[100163]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
[97206]79configure.env-append    builddir=${worksrcpath}/build \
[118452]80                        capnp_prefix=${prefix} \
[109566]81                        APP_REVISION=${app_revision}
[96537]82
[105298]83pre-configure {
[100369]84    # the textmate build expects this to be present
85    file mkdir $env(HOME)/Library/Caches/com.macromates.TextMate
[105298]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"
[100369]88}
[105298]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
[96483]94build.cmd               ninja
[100111]95build.args              -v -j ${build.jobs}
[96483]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}
[117835]102
103livecheck.type          regex
[127935]104livecheck.regex         "^(.\*)\$"
105livecheck.url           https://api.textmate.org/releases/release/version
106livecheck.version       $version
Note: See TracBrowser for help on using the repository browser.