# -*- 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 # $Id$ PortSystem 1.0 PortGroup github 1.0 PortGroup xcodeversion 1.0 epoch 4 github.setup textmate textmate 2.0-beta.9.2 v revision 0 maintainers cal openmaintainer name textmate2 categories editors aqua description \ TextMate brings Apple's approach to operating systems into the world of text editors. By \ bridging UNIX underpinnings and GUI, TextMate cherry-picks the best of both worlds to the \ benefit of expert scripters and novice users alike. long_description ${description}\ TextMate is well-known for its large number of bundles adding support, snippets, completions \ and commands for a huge number of file types. platforms darwin supported_archs x86_64 license GPL-3+ minimum_xcodeversions {11 4.4} fetch.type git post-fetch { system -W ${worksrcpath} "${git.cmd} submodule update --init" } patchfiles patch-configure-versionnumber.diff \ patch-target.diff \ patch-frameworks_license_target.diff \ patch-Applications_commit_target.diff # The build will fail with deployment target set to 10.8 macosx_deployment_target 10.7 post-patch { reinplace "s/@VERSION@/${version}/" ${worksrcpath}/configure fs-traverse file ${worksrcpath} { if {[file tail ${file}] == "target"} { reinplace "/TESTS *=/d" ${file} reinplace "/TEST_SOURCES *=/d" ${file} } } } depends_build-append port:ninja \ port:ragel \ port:sparsehash \ port:proctools depends_skip_archcheck ninja ragel proctools depends_lib-append port:boost \ port:multimarkdown \ port:curl \ path:lib/libssl.dylib:openssl \ port:libiconv \ port:zlib \ port:capnproto if {${os.platform} ne "darwin" || ${os.major} < 11} { depends_fetch depends_build depends_lib pre-fetch { ui_error "${name} only works with Mac OS X 10.7 Lion or later." return -code error "incompatible Mac OS X version" } } configure.env-append builddir=${worksrcpath}/build \ capnp_prefix=${prefix} pre-configure { # the textmate build expects this to be present file mkdir $env(HOME)/Library/Caches/com.macromates.TextMate # patch the code to use $HOME from env rather than from getpwent(3) system -W ${worksrcpath} "patch -p0 <${filespath}/patch-Frameworks__io__src__path.cc-use-home-from-env.diff" } post-configure { # revert the patch system -W ${worksrcpath} "patch -R -p0 <${filespath}/patch-Frameworks__io__src__path.cc-use-home-from-env.diff" } build.cmd ninja build.args -v -j ${build.jobs} build.target TextMate mate destroot { copy ${worksrcpath}/build/Applications/TextMate/TextMate.app ${destroot}${applications_dir} xinstall -m 0755 ${worksrcpath}/build/Applications/mate/mate ${destroot}${prefix}/bin } livecheck.type regex livecheck.regex "^(.\*)\$" livecheck.url https://api.textmate.org/releases/release/version livecheck.version $version