mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 09:40:05 +02:00
101 lines
2.3 KiB
Bash
101 lines
2.3 KiB
Bash
SUMMARY="Very fast, header-only/compiled, C++ logging library"
|
||
DESCRIPTION="The description is really “in a nut”:
|
||
|
||
Very fast, header only, C++ logging library.
|
||
|
||
Install: Just copy the files to your build tree and use a C++11 compiler
|
||
|
||
Features:
|
||
|
||
* Very fast – performance is the primary goal (see becnhmarks below)
|
||
* Headers only
|
||
* No dependencies
|
||
* Cross platform - Linux / Windows on 32/64 bits
|
||
* Mult/Single threaded loggers
|
||
* Rotating log files
|
||
* Daily log files
|
||
* Console logging
|
||
* Optional async logging
|
||
* Logging levels
|
||
* Custom formatting with user defined patterns"
|
||
COPYRIGHT="Gabi Melman"
|
||
HOMEPAGE="https://github.com/gabime/spdlog"
|
||
LICENSE="MIT"
|
||
REVISION="3"
|
||
SOURCE_URI="https://github.com/gabime/spdlog/archive/v$portVersion.tar.gz"
|
||
CHECKSUM_SHA256="4dccf2d10f410c1e2feaff89966bfc49a1abb29ef6f08246335b110e001e09a9"
|
||
# Import patches from openSUSE
|
||
#PATCHES="spdlog-1.8.5-fmt8_tests.patch
|
||
# spdlog-1.8.5-fmt8.patch"
|
||
|
||
ARCHITECTURES="all !x86_gcc2"
|
||
SECONDARY_ARCHITECTURES="x86"
|
||
|
||
libVersion="$portVersion"
|
||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||
|
||
PROVIDES="
|
||
spdlog$secondaryArchSuffix = $portVersion
|
||
lib:libspdlog$secondaryArchSuffix = $libVersionCompat
|
||
"
|
||
REQUIRES="
|
||
haiku$secondaryArchSuffix
|
||
lib:libfmt$secondaryArchSuffix
|
||
"
|
||
|
||
PROVIDES_devel="
|
||
spdlog${secondaryArchSuffix}_devel = $portVersion
|
||
devel:libspdlog$secondaryArchSuffix = $libVersionCompat
|
||
"
|
||
REQUIRES_devel="
|
||
spdlog$secondaryArchSuffix == $portVersion base
|
||
devel:libfmt$secondaryArchSuffix
|
||
"
|
||
|
||
BUILD_REQUIRES="
|
||
haiku${secondaryArchSuffix}_devel
|
||
devel:libfmt$secondaryArchSuffix
|
||
"
|
||
BUILD_PREREQUIRES="
|
||
cmd:cmake
|
||
cmd:gcc$secondaryArchSuffix
|
||
cmd:ld$secondaryArchSuffix
|
||
cmd:make
|
||
cmd:pkg_config$secondaryArchSuffix
|
||
"
|
||
|
||
BUILD()
|
||
{
|
||
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
|
||
$cmakeDirArgs \
|
||
-DCMAKE_EXE_LINKER_FLAGS="-lnetwork" \
|
||
-DSPDLOG_BUILD_BENCH=OFF \
|
||
-DSPDLOG_BUILD_TESTS=OFF \
|
||
-DSPDLOG_BUILD_SHARED=ON \
|
||
-DSPDLOG_FMT_EXTERNAL=ON
|
||
make -C build $jobArgs
|
||
}
|
||
|
||
INSTALL()
|
||
{
|
||
make -C build install
|
||
|
||
# prepare develop/lib
|
||
prepareInstalledDevelLib libspdlog
|
||
fixPkgconfig
|
||
|
||
# create symlink to libspdlog
|
||
ln -s libspdlog.so.$libVersion $libDir/libspdlog.so.1
|
||
|
||
# devel package
|
||
packageEntries devel \
|
||
$developDir \
|
||
$libDir/cmake
|
||
}
|
||
|
||
TEST()
|
||
{
|
||
# enable tests in BUILD()
|
||
make -C build test
|
||
}
|