Files
haikuports/dev-libs/libcpuid/libcpuid-0.6.3~git.recipe
2023-03-11 07:19:31 +01:00

84 lines
1.9 KiB
Bash

SUMMARY="A small C library for x86 (and x86_64) CPU detection and feature extraction"
DESCRIPTION="libcpuid provides CPU identification for the x86 (and x86_64).
For details about the programming API, you might want to take a look at the project's website \
on sourceforge:
* http://libcpuid.sourceforge.net/.
There you'd find a short tutorial:
* http://libcpuid.sf.net/documentation.html
As well as the full API reference:
* http://libcpuid.sf.net/doxy."
HOMEPAGE="http://libcpuid.sourceforge.net/"
COPYRIGHT="2008 Veselin Georgiev"
LICENSE="BSD (2-clause)"
REVISION="1"
srcGitRev="54ed9a0a17797982c82a7053d1386e42cecf4a9f"
SOURCE_URI="https://github.com/anrieff/libcpuid/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="77b8ec25a7c9ba21d6d330f80a07d4fd35d276e14712e5fc5c138f14a8ec943a"
SOURCE_FILENAME="libcpuid-v$portVersion.tar.gz"
SOURCE_DIR="libcpuid-$srcGitRev"
PATCHES="186.patch
libcpuid-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
libcpuid$secondaryArchSuffix = $portVersion
cmd:cpuid_tool$commandSuffix
lib:libcpuid$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libcpuid${secondaryArchSuffix}_devel = $portVersion
devel:libcpuid$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
libcpuid$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:doxygen
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$commandBinDir
make -C build
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libcpuid
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make check
}