mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 13:20:08 +02:00
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has, is transformed into "all", and then the other entries in ARCHITECTURES either dropped or rearranged appropriately.
80 lines
1.9 KiB
Bash
80 lines
1.9 KiB
Bash
SUMMARY="A YAML parser and emitter in C++"
|
|
DESCRIPTION="yaml-cpp is a YAML parser and emitter in C++ matching the YAML \
|
|
1.2 spec."
|
|
HOMEPAGE="https://github.com/jbeder/yaml-cpp/"
|
|
COPYRIGHT="2008 Jesse Beder"
|
|
LICENSE="MIT"
|
|
REVISION="2"
|
|
SOURCE_URI="https://github.com/jbeder/yaml-cpp/archive/release-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="3492d9c1f4319dfd5588f60caed7cec3f030f7984386c11ed4b39f8e3316d763"
|
|
SOURCE_DIR="yaml-cpp-release-$portVersion"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
yaml_cpp$secondaryArchSuffix = $portVersion compat >= 0.5
|
|
lib:libyaml_cpp$secondaryArchSuffix = $portVersion compat >= 0.5
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
yaml_cpp${secondaryArchSuffix}_devel = $portVersion compat >= 0.5
|
|
devel:libyaml_cpp$secondaryArchSuffix = $portVersion compat >= 0.5
|
|
"
|
|
REQUIRES_devel="
|
|
yaml_cpp$secondaryArchSuffix == $portVersion
|
|
devel:libboost_system$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libboost_system$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc${secondaryArchSuffix}
|
|
cmd:ld${secondaryArchSuffix}
|
|
cmd:make
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake -DBUILD_SHARED_LIBS=ON -DYAML_CPP_BUILD_TOOLS=OFF \
|
|
-DCMAKE_INSTALL_PREFIX:PATH=$prefix .
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
|
|
mkdir -p `dirname $includeDir` $libDir
|
|
mv $prefix/include $includeDir
|
|
|
|
if [ -n "$secondaryArchSuffix" ]; then
|
|
mv $prefix/lib/libyaml-cpp* $prefix/lib/pkgconfig $libDir/
|
|
fi
|
|
|
|
prepareInstalledDevelLibs \
|
|
libyaml-cpp
|
|
fixPkgconfig
|
|
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
# tests make the build considerably longer
|
|
# TODO: fail with: The current thread is not holding the mutex @0xf96b94
|
|
# probably because gtest is not ported (also it uses bundled one)
|
|
cmake -DBUILD_SHARED_LIBS=ON -DYAML_CPP_BUILD_TOOLS=ON \
|
|
-DCMAKE_INSTALL_PREFIX:PATH=$prefix .
|
|
make $jobArgs
|
|
cd test
|
|
./run-tests
|
|
}
|