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

PortSystem          1.0
PortGroup           cmake 1.1
PortGroup           github 1.0

github.setup        mircomir jxrlib 1.3.9
revision            0
categories          graphics
license             BSD
maintainers         nomaintainer
github.tarball_from archive

description         jxrlib is JPEG XR Image Codec reference implementation library

long_description    {*}${description}

master_sites        ${github.master_sites}:github_${github.author} \
                    https://raw.githubusercontent.com/Gcenx/macports-wine/1b310a17497f9a49cc82789cc5afa2d22bb67c0c/graphics/jxrlib/files:github_Gcenx

distfiles           [lindex ${distfiles} 0]:github_${github.author}

patchfiles          0001-Add-ability-to-build-using-cmake.patch:github_Gcenx

checksums           [lindex [split [lindex ${distfiles} 0] :] 0] \
                    rmd160  4dd43d05de66bd919c4930a02fdc539cc99d3ebc \
                    sha256  123e04fe9e06d55b985d1a2a938761a7f7580743c717594787734e9bc657b9f6 \
                    size    349105

checksums-append    [lindex [split [lindex ${patchfiles} 0] :] 0] \
                    rmd160  b26417c2fc5adbbb8c91aca194826d0d09957ed4 \
                    sha256  beebe13d40bc5b0ce645db26b3c8f8409952d88495bbab8bc3bebc954bdecffe \
                    size    6857

patch.pre_args-replace \
                    -p0 \
                    -p1

post-patch {
    reinplace       s|@VERSION@|${version}|g \
                    ${worksrcpath}/CMakeLists.txt
}

# Exclude beta versions.
livecheck.regex     archive/refs/tags/(\[0-9.\]+)\.tar\.gz
