# -*- 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            active_variants 1.1
PortGroup            github 1.0

github.setup         dfandrich gpscorrelate 2.4
revision             0
github.tarball_from  archive
categories           gis graphics
license              GPL-2
maintainers          {@sikmir gmail.com:sikmir} openmaintainer
description          GPS Photo Correlation
long_description     Writes location data to EXIF tags using GPX files.
homepage             https://dfandrich.github.io/gpscorrelate/

checksums            rmd160  946b7217e863df0a1de46fd183f717fa9c992678 \
                     sha256  4039fb7cd3594ca04be2bfdf88946db3078eeaf6d6114993f45d7a932792c760 \
                     size    434413

depends_build-append port:pkgconfig \
                     port:desktop-file-utils

depends_lib-append   port:exiv2 \
                     port:gettext \
                     path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                     port:libxml2

require_active_variants gtk3 x11

compiler.cxx_standard   2011

use_configure          no
build.target           gpscorrelate gpscorrelate-gui

build.args-append      prefix=${prefix} \
                       CFLAGS="-Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1" \
                       CXXFLAGS="-Wall -Wextra -Werror -Wno-error=deprecated-declarations -O3 -DENABLE_NLS=1 -std=c++11" \
                       LDFLAGS="-O3 -lintl"

compiler.cxx_standard  2011

destroot.args-append   prefix=${prefix}
destroot.target        install-gpscorrelate-gui install-po

post-destroot {
    xinstall -d ${destroot}${prefix}/bin
    xinstall -m 0755 ${worksrcpath}/gpscorrelate ${destroot}${prefix}/bin
}
