mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
111 lines
3.7 KiB
Tcl
111 lines
3.7 KiB
Tcl
# -*- 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 fmtlib fmt 11.2.0
|
|
name libfmt11
|
|
revision 1
|
|
checksums rmd160 9e17d2ad6f25a38aac2941fda9ac27c2c3c6c6d8 \
|
|
sha256 bc23066d87ab3168f27cef3e97d545fa63314f5c79df5ea444d41d56f962c6af \
|
|
size 705327
|
|
|
|
categories devel
|
|
license MIT
|
|
maintainers {mascguy @mascguy} openmaintainer
|
|
|
|
description An open-source formatting library
|
|
long_description fmt (formerly cppformat) is an open-source formatting library. \
|
|
It can be used as a safe alternative to printf or as a fast \
|
|
alternative to C++ IOStreams.
|
|
homepage https://fmt.dev
|
|
|
|
github.tarball_from archive
|
|
|
|
set port_ver_major [lindex [split ${version} .] 0]
|
|
|
|
patchfiles-append include-stdlib.h-in-format.h.patch
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Path-Related Variables - START
|
|
#------------------------------------------------------------------------------
|
|
|
|
# The "install name," meaning, the subdirectory name for this port.
|
|
# Should correspond to the major version.
|
|
set port_install_name \
|
|
${subport}
|
|
|
|
# Define all of our base paths up-front
|
|
set port_install_include \
|
|
${prefix}/include/${port_install_name}
|
|
set port_install_lib \
|
|
${prefix}/lib/${port_install_name}
|
|
|
|
# Populate CMake options currently available
|
|
cmake.install_rpath \
|
|
${port_install_lib}
|
|
|
|
configure.args-append \
|
|
-DCMAKE_INSTALL_INCLUDEDIR=${port_install_include} \
|
|
-DCMAKE_INSTALL_LIBDIR=${port_install_lib} \
|
|
-DCMAKE_INSTALL_NAME_DIR=${port_install_lib}
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Path-Related Variables - END
|
|
#------------------------------------------------------------------------------
|
|
|
|
cmake.generator Ninja
|
|
|
|
# Clear optflags; controlled by project, via cmake build type
|
|
configure.optflags
|
|
|
|
if {[variant_isset debug]} {
|
|
cmake.build_type Debug
|
|
} else {
|
|
cmake.build_type RelWithDebInfo
|
|
}
|
|
|
|
compiler.cxx_standard 2011
|
|
|
|
# error: default initialization of an object of const type 'const Answer' without a user-provided default constructor
|
|
# error would be valid except Answer is empty
|
|
compiler.blacklist-append \
|
|
{clang < 801}
|
|
|
|
configure.args-append \
|
|
-DBUILD_SHARED_LIBS:BOOL=ON \
|
|
-DFMT_DOC:BOOL=OFF \
|
|
-DFMT_TEST:BOOL=OFF
|
|
|
|
# Obsolete port 'libfmt' causes clashes, so deactivate if installed
|
|
pre-activate {
|
|
if {![catch {set installed [lindex [registry_active libfmt] 0]}]} {
|
|
registry_deactivate_composite libfmt "" [list ports_nodepcheck 1]
|
|
}
|
|
}
|
|
|
|
variant tests description {Enable test support} {
|
|
PortGroup conflicts_build 1.0
|
|
|
|
# If gtest is active, build failures occur; let port use the internal version
|
|
conflicts_build-append \
|
|
gtest
|
|
|
|
configure.pre_args-replace \
|
|
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
|
|
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
|
|
|
|
configure.args-replace \
|
|
-DFMT_TEST:BOOL=OFF \
|
|
-DFMT_TEST:BOOL=ON
|
|
|
|
test.run yes
|
|
}
|
|
|
|
# TODO: Update pg 'github' to use this API
|
|
livecheck.url https://api.github.com/repos/${github.author}/${github.project}/tags?per_page=200
|
|
livecheck.curloptions
|
|
livecheck.regex "\"name\": \"(${port_ver_major}\.\[0-9\.\]+)\","
|