libfmt: add 11.0.1 (#7362)

* libfmt: bump to 9.1.0

Signed-off-by: Han Pengfei <pengphei@qq.com>

* libfmt, bump to 11.0.1, fix conflict

---------

Signed-off-by: Han Pengfei <pengphei@qq.com>
Co-authored-by: Schrijvers Luc <begasus@gmail.com>
This commit is contained in:
Han Pengfei
2024-07-12 19:15:22 +08:00
committed by GitHub
parent a88b8e2abc
commit cba1e06b75

View File

@@ -0,0 +1,80 @@
SUMMARY="Small, safe and fast formatting library"
DESCRIPTION="fmt is an open-source formatting library for C++. It can be used \
as a safe and fast alternative to (s)printf and IOStreams."
HOMEPAGE="https://github.com/fmtlib/fmt"
COPYRIGHT="2012-2022 Victor Zverovich"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://github.com/fmtlib/fmt/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="7d009f7f89ac84c0a83f79ed602463d092fbf66763766a907c97fd02b100f5e9"
SOURCE_FILENAME="fmt-$portVersion.tar.gz"
SOURCE_DIR="fmt-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libfmt11$secondaryArchSuffix = $portVersion
lib:libfmt$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libfmt11${secondaryArchSuffix}_devel = $portVersion
devel:libfmt$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libfmt11$secondaryArchSuffix == $portVersion base
"
CONFLICTS_devel="
libfmt${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage libfmt11$secondaryArchSuffix \
"$libDir"/libfmt.so.$portVersion
BUILD()
{
cmake -B build -S . \
$cmakeDirArgs \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_SHARED_LIBS=ON \
-DFMT_TEST=ON \
-DFMT_INC_DIR=$includeDir
make -C build $jobArgs
}
INSTALL()
{
make -C build install
# prepare develop/lib
prepareInstalledDevelLib libfmt
fixPkgconfig
# devel package
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
# enable test in BUILD()
ctest --test-dir build --output-on-failure
}