# -*- 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 72617 2010-10-21 12:51:52Z michaelld@macports.org $

PortSystem          1.0
PortGroup           qt4 1.0

categories          graphics
platforms           darwin

name                GLC_lib
version             1.2.0
revision            3
maintainers         lilalinux.net:macports
description         C++ class library that enables the quick creation of an OpenGL application based on QT4.
long_description    C++ class library that enables the quick creation of an OpenGL application based on QT4.

homepage            http://www.glc-lib.net/

master_sites        sourceforge:glc-lib
distname            ${name}_src_${version}

checksums           md5     2c05978bd719f3dded08ac778b1854bf \
                    sha1    b109895b34940789470dcd3a2748913035a0e576 \
                    rmd160  127b6eadfb3b5ae8eb9c26583d63065c1ee6db40

use_zip             yes

patchfiles          patch-GLC_lib.pro.diff
post-patch {
    reinplace       s|@@PREFIX@@|${prefix}|g ${worksrcpath}/glc_lib/GLC_lib.pro
}

configure.pre_args  INSTALLDIR=${prefix}/lib
configure.cmd       ${qt_qmake_cmd} glc_lib/GLC_lib.pro PREFIX=${prefix}

use_parallel_build  yes

build.args          CC=${configure.cc}
build.env-append    PREFIX=${prefix}

post-build {
	system "install_name_tool -id	\
		${qt_dir}/lib/libGLC_lib.dylib	\
		${worksrcpath}/libGLC_lib.dylib"
}

livecheck.type      regex
livecheck.url       http://sourceforge.net/api/file/index/project-id/153150/mtime/desc/rss?path=%2Fglc-lib
livecheck.regex     ${name}_(\\d+(\\.\\d+)+)
