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

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

textmate2: update to a9455

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 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 109232 2013-08-10 21:52:37Z cal@macports.org $
3
4PortSystem              1.0
5PortGroup               github 1.0
6PortGroup               xcodeversion 1.0
7PortGroup               conflicts_build 1.0
8
9github.setup            textmate textmate 9455 a
10epoch                   1
11version                 2.0.${github.version}
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 submodule update --init"
35}
36
37patchfiles              patch-configure-versionnumber.diff \
38                        patch-create_default_bundles_tbz-verbose.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/@REVISION@/${github.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
66if {${os.platform} != "darwin" || ${os.major} < 11} {
67    depends_fetch
68    depends_build
69    depends_lib
70    pre-fetch {
71        ui_error "${name} only works with Mac OS X 10.7 Lion or later."
72        return -code error "incompatible Mac OS X version"
73    }
74}
75
76configure.env-append    builddir=${worksrcpath}/build \
77                        tag=-macports
78
79pre-configure {
80    # the textmate build expects this to be present
81    file mkdir $env(HOME)/Library/Caches/com.macromates.TextMate
82    # patch the code to use $HOME from env rather than from getpwent(3)
83    system -W ${worksrcpath} "patch -p0 <${filespath}/patch-Frameworks__io__src__path.cc-use-home-from-env.diff"
84}
85post-configure {
86    # revert the patch
87    system -W ${worksrcpath} "patch -R -p0 <${filespath}/patch-Frameworks__io__src__path.cc-use-home-from-env.diff"
88}
89
90build.cmd               ninja
91build.args              -v -j ${build.jobs}
92build.target            TextMate mate
93
94destroot {
95    copy ${worksrcpath}/build/Applications/TextMate/TextMate.app ${destroot}${applications_dir}
96    xinstall -m 0755 ${worksrcpath}/build/Applications/mate/mate ${destroot}${prefix}/bin
97}
Note: See TracBrowser for help on using the repository browser.