# $Id: Portfile 48747 2009-03-28 07:27:35Z toby@macports.org $

PortSystem 1.0

name             vxl
version          1.12.0
categories       devel
maintainers      toby
description      C++ libraries for computer vision
long_description \
	VXL (the Vision-something-Libraries) is a collection of C++ libraries \
	designed for computer vision research and implementation. It was \
	created from TargetJr and the IUE with the aim of making a light, \
	fast and consistent system. VXL is written in ANSI/ISO C++ and is \
	designed to be portable over many platforms.
homepage         http://vxl.sourceforge.net/
platforms        darwin

master_sites     sourceforge
use_zip          yes
checksums        md5    910b42ff0f0c048015425992d979c8f7 \
                 sha1   679e9d23220c6278c6da0cef35cd5df8eed7f064 \
                 rmd160 aed78aed12e6d90a1406f36e1ea1129993994350

patchfiles       patch-v3p☃mpeg2☃libmpeg2☃idct_altivec.c \
                 patch-v3p☃mpeg2☃libmpeg2☃motion_comp_altivec.c
post-patch {
	file delete ${worksrcpath}/contrib/mul/vil3d/Templates/vil3d_tricub_interp+uint-.cxx
}

depends_build    port:cmake

configure.cmd      ${prefix}/bin/cmake
configure.pre_args -DCMAKE_INSTALL_PREFIX=${prefix}
configure.args     -DBUILD_SHARED_LIBS=YES \
                   -DCMAKE_INSTALL_NAME_DIR=${prefix}/lib/${name} \
                   -DBUILD_BRL=NO \
                   ${worksrcpath}

use_parallel_build no

# shuffle directories around to turn ${prefix}/lib into ${prefix}/lib/${name}
post-destroot {
	file rename ${destroot}${prefix}/lib ${destroot}${prefix}/tmp
	file mkdir ${destroot}${prefix}/lib
	file rename ${destroot}${prefix}/tmp ${destroot}${prefix}/lib/${name}
}

livecheck.check  regex
livecheck.regex  latest official release vxl-(.*)
