# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup meson 1.0 name gexiv2 version 0.14.2 revision 0 categories gnome graphics license GPL-2+ maintainers {devans @dbevans} {mascguy @mascguy} openmaintainer description gexiv2 is a GObject-based wrapper around the exiv2 library. long_description ${description} \ It makes the basic features of exiv2 available to GNOME applications. \ Thanks to GObject Introspection support, gexiv2 has excellent support \ for Python, and can also be accessed by any other programming \ language that supports GI. homepage https://wiki.gnome.org/Projects/gexiv2 set branch [join [lrange [split ${version} .] 0 1] .] master_sites gnome:sources/${name}/${branch}/ use_xz yes checksums rmd160 47043f0df1037bb6105e40db8b8a6922ea46722f \ sha256 2a0c9cf48fbe8b3435008866ffd40b8eddb0667d2212b42396fdf688e93ce0be \ size 389488 set py_major 3 set py_minor_min 7 set py_minor_max 12 compiler.blacklist-append \ {clang < 900} # Needs Cxx14 as of v0.14.x compiler.cxx_standard 2014 # Be sure to specify Cxx14, as Cxx17 compilation fails for v0.14.1 configure.cxxflags-append \ -std=c++14 if { [string match *clang* ${configure.compiler}] } { # Quiet warnings configure.cxxflags-append \ -Wno-deprecated-declarations \ -Wno-error=unknown-warning-option \ -Wno-unknown-warning-option } depends_build-append \ port:gi-docgen \ port:gtk-doc \ port:pkgconfig depends_lib-append \ port:exiv2 \ path:lib/pkgconfig/glib-2.0.pc:glib2 \ path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection \ path:bin/vala:vala configure.args-append \ -Dgtk_doc=true proc py_ver_set {} { global py_major py_minor_min py_minor_max for {set v ${py_minor_min}} {${v} <= ${py_minor_max}} {incr v} { set pv ${py_major}.${v} set pv_nodot [string map {. {}} ${pv}] set pv_variant python${pv_nodot} if {[variant_isset ${pv_variant}]} { return ${pv} } } return "" } proc py_setup {p_py_ver} { global py_ver py_ver_nodot set py_ver ${p_py_ver} set py_ver_nodot [string map {. {}} ${py_ver}] patchfiles-append \ patch-python-bins.diff post-patch { reinplace "s|@@PYTHON3_BIN@@|${prefix}/bin/python${py_ver}|" \ meson.build } depends_lib-append \ port:py${py_ver_nodot}-gobject3 } # TODO: Generate these dynamically, since we define min/max supported versions variant python37 conflicts python38 python39 python310 python311 python312 \ description {Build Python3 bindings using Python 3.7} {} variant python38 conflicts python37 python39 python310 python311 python312 \ description {Build Python3 bindings using Python 3.8} {} variant python39 conflicts python37 python38 python310 python311 python312 \ description {Build Python3 bindings using Python 3.9} {} variant python310 conflicts python37 python38 python39 python311 python312 \ description {Build Python3 bindings using Python 3.10} {} variant python311 conflicts python37 python38 python39 python310 python312 \ description {Build Python3 bindings using Python 3.11} {} variant python312 conflicts python37 python38 python39 python310 python311 \ description {Build Python3 bindings using Python 3.12} {} if {[py_ver_set] eq ""} { default_variants +python312 } set py_ver [py_ver_set] if {${py_ver} ne ""} { py_setup ${py_ver} } pre-configure { if {${py_ver} eq ""} { error "This port requires that one python variant be enabled" } } # uses g-ir-scanner, which uses $CC from env if {${universal_possible} && [variant_isset universal]} { foreach arch ${configure.universal_archs} { lappend merger_build_env(${arch}) \ "CC=${configure.cc} -arch ${arch}" lappend merger_destroot_env(${arch}) \ "CC=${configure.cc} -arch ${arch}" } } else { build.env-append \ "CC=${configure.cc} ${configure.cc_archflags}" destroot.env-append \ "CC=${configure.cc} ${configure.cc_archflags}" } platform darwin 8 { # Tiger lacks @rpath, apply the usual gtk-doc workaround destroot.env-append \ "DYLD_LIBRARY_PATH=${build_dir}/${name}" } livecheck.type gnome