mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-14 15:50:07 +02:00
75 lines
1.6 KiB
Bash
75 lines
1.6 KiB
Bash
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-present Victor Zverovich"
|
|
LICENSE="BSD (2-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/fmtlib/fmt/archive/$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="d8773cf062cc806d4dd4df658111f15ba7a2c9c65db5084d2491696828b1eb97"
|
|
SOURCE_FILENAME="fmt-$portVersion.tar.gz"
|
|
SOURCE_DIR="fmt-$portVersion"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
libfmt$secondaryArchSuffix = $portVersion
|
|
lib:libfmt$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
libfmt${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libfmt$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
libfmt$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
|
|
$cmakeDirArgs \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DFMT_INC_DIR=$includeDir \
|
|
-DFMT_TEST=OFF
|
|
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
# prepare develop/lib
|
|
prepareInstalledDevelLib libfmt
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir \
|
|
$libDir/cmake
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
# 86% tests passed, 3 tests failed out of 21
|
|
ctest --test-dir build --output-on-failure
|
|
}
|