# -*- 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
PortGroup compiler_blacklist_versions 1.0
maintainers {devans @dbevans} openmaintainer
license GPL-3 LGPL-3 CC-BY-SA
description Library for fixing lens geometry distortion
long_description Provides a database of photographic lenses and a library \
that allows advanced access to the database including \
functions to correct images based on intimate knowledge \
of lens characteristics and calibration data.
homepage http://lensfun.sourceforge.net/
master_sites sourceforge:project/${name}/${version}
checksums rmd160 57322f5b6969c90f5549e20229a01e70606cc742 \
sha256 ae8bcad46614ca47f5bda65b00af4a257a9564a61725df9c74cb260da544d331 \
# With 0.3.0 and gcc-4.2:
# #error "I don't know how to change symbol visibility for your compiler"
compiler.blacklist-append *gcc-3.* *gcc-4.* {clang < 100}
depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \
set python_branch [string range ${python_version} 0 end-1].[string index ${python_version} end]
# installs python3 helper scripts lensfun-add-adapter lensfun-update-data
depends_run port:python${python_version}
patchfiles patch-docs-CMakeLists.txt.diff \
patch-apps-CMakeLists.txt.diff
reinplace "s|^#!.*|#!${prefix}/bin/python${python_branch}|" \
${worksrcpath}/apps/lensfun-add-adapter \
${worksrcpath}/apps/lensfun-update-data
reinplace "s|@@PYTHON_VERSION@@|${python_branch}|" \
${worksrcpath}/docs/CMakeLists.txt \
${worksrcpath}/apps/CMakeLists.txt
-DINSTALL_HELPER_SCRIPTS=ON \
-DSETUP_PY_INSTALL_PREFIX=${destroot}${frameworks_dir}/Python.framework/Versions/${python_branch}