# -*- 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           xcode 1.0

github.setup        anthonygelibert QLColorCode 3242bf6bc7
version             2.0.4
categories          sysutils

platforms           darwin
license             GPL-2
maintainers         sean openmaintainer

description         Quick Look plugin that renders source code with syntax highlighting
long_description    ${description}

checksums           rmd160  e7175b6d4498cedca4e46e47f21905951aa521c9 \
                    sha256  15ac6982a6a816e60092c425dfee412244e7443fc2389517a265a1e1ce859f7c

depends_lib         port:highlight
destroot.violate_mtree  yes

post-extract {
    reinplace -W ${worksrcpath} "s,open \$PROJECT_DIR/release,," QLColorCode.xcodeproj/project.pbxproj
}

destroot {
    xinstall -d ${destroot}/Library/QuickLook
    file copy ${worksrcpath}/build/Release/${name}.qlgenerator ${destroot}/Library/QuickLook
}

# force quicklook to reload plugins
post-activate {
    system "qlmanage -r"
}

post-deactivate {
    system "qlmanage -r"
}
