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

name                    evas
epoch                   2
version                 1.7.10
revision                1

categories              devel x11
maintainers             nomaintainer
license                 BSD

description             Evas is a hardware-accelerated canvas API for X11.

long_description        Evas is a hardware-accelerated canvas API for \
                        X-Windows that can draw anti-aliased text, smooth \
                        super and sub-sampled images, alpha-blend, as well \
                        as drop down to using normal X11 primitives such as \
                        pixmaps, lines and rectangles for speed if your CPU \
                        or graphics hardware are too slow.

checksums               rmd160  54201a7a577a956dcfad9c3943b9726a77ad7333 \
                        sha256  0f2a30b4f2dcd0d39507aca51399fa5574723b0bd031d3cec66181810bb4e70d \
                        size    9463058

homepage                http://trac.enlightenment.org/e/wiki/Evas
master_sites            http://download.enlightenment.org/releases/
use_bzip2               yes

# possible fix of https://trac.macports.org/ticket/39344
configure.cflags-append -Wno-error=implicit-function-declaration
configure.ldflags-append    {-framework OpenGL}

depends_build           port:mesa \
                        port:pkgconfig

depends_lib             port:eet \
                        port:fribidi \
                        port:giflib \
                        port:libpng \
                        path:lib/pkgconfig/librsvg-2.0.pc:librsvg \
                        port:tiff

configure.args          --disable-doc \
                        --disable-silent-rules \
                        --disable-valgrind \
                        --enable-buffer

platform darwin powerpc {
    # Cocoa backend fails to build on powerpc.
    configure.args-append \
                        --disable-gl-cocoa \
                        --enable-cpu-altivec

    configure.ldflags-delete \
                        {-framework OpenGL}

    if {[catch {sysctl hw.vectorunit} result] || $result == 0} {
        configure.args-replace \
                        --enable-cpu-altivec --disable-cpu-altivec
        archive_sites
    }
}

# http://trac.enlightenment.org/e/ticket/942
if {[lsearch [get_canonical_archs] i386] != -1} {
    compiler.blacklist-append \
                        *gcc-4.2
}

livecheck.type          regex
livecheck.url           [lindex ${master_sites} 0]
livecheck.regex         ${name}-(\[0-9a-z.\]+)${extract.suffix}
