# -*- 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: Portfile 114892 2013-12-19 11:19:29Z ryandesign@macports.org $

PortSystem              1.0

name                    gpick
version                 0.2.5
categories              graphics
platforms               darwin
maintainers             strasweb.fr:rudloff
license                 BSD

description             Gpick is an advanced color picker.

long_description        Gpick is a program used to pick colors from anywhere \
                        on the screen, mix them to get new colors, generate \
                        shades and tints and export palettes to common file \
                        formats or simply copy them to the clipboard.

homepage                http://code.google.com/p/gpick/
master_sites            googlecode
distname                ${name}_${version}

checksums               sha1    0e2bcdca6aa66fe4f6a3930fe33e0a6950de4588 \
                        rmd160  a7c65539780b1eb74f44538b165dbff923762beb

depends_build-append    port:boost \
                        port:pkgconfig \
                        port:scons

depends_lib-append      port:expat \
                        port:gettext \
                        port:gtk2 \
                        port:lua

use_configure           no

variant universal {}

# https://code.google.com/p/gpick/issues/detail?id=112
configure.ldflags-append -lexpat

build.cmd               ${prefix}/bin/scons
build.target            build
build.env               CC=${configure.cc} \
                        CXX=${configure.cxx} \
                        CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
                        CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
                        LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"

eval destroot.env       ${build.env}

# https://code.google.com/p/gpick/issues/detail?id=109
destroot.destdir        DESTDIR=${destroot}${prefix}
