# -*- 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        vxl vxl 3.5.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0

categories          devel
maintainers         nomaintainer
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            https://vxl.github.io

checksums           rmd160  525f017bb6b3ff5c15c6b4203b29162259171fb7 \
                    sha256  1fcdc2f284a301beefcef2e59c495d322dd5765be5c7118c2d2607a25a3c4457 \
                    size    44264490

# licenses in vxl:
# (see also: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/vxl/trunk/debian/copyright?revision=10688&view=markup)
# BSD       for core
# GPL-2+    for v3p/Qv/*
# zlib      for v3p/zlib/*
# GPL-2+    for v3p/mpeg2/libmpeg2/*
# MIT       for v3p/geotiff/*
# Boost     for core/vul/vul_ios_state.h
# Boost     for contrib/rpl/rgrl/*
# MIT/X11   for contrib/brl/b3p/shapelib/* (or LGPL-something)
# zlib      for contrib/brl/b3p/minizip/*
# GPL-2+    for vidl_vil1/vidl_vil1_mpegcodec.cxx and vidl1/vidl1_mpegcodec.cxx
# Boost     for vcl_atomic_count.h and vcl/internal/*
license             BSD GPL-2+ zlib MIT Boost

compiler.cxx_standard 2011

set libdir          lib/${github.project}

depends_lib-append  \
                    port:bzip2 \
                    port:libgeotiff \
                    path:include/turbojpeg.h:libjpeg-turbo \
                    port:libpng \
                    port:tiff \
                    port:zlib

configure.args-append \
                    -DBUILD_SHARED_LIBS=YES \
                    -DCMAKE_INSTALL_NAME_DIR=${prefix}/${libdir} \
                    -DVXL_BUILD_CONTRIB=OFF \
                    -DVXL_BUILD_CORE_VIDEO=OFF \
                    -DVXL_BUILD_VGUI:BOOL=OFF \
                    -DVXL_FORCE_V3P_OPENJPEG2=ON \
                    -DVXL_INSTALL_LIBRARY_DIR=${libdir} \
                    -DVXL_USE_DCMTK:BOOL=OFF
