mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
recastnavigation, new recipe (#11498)
This commit is contained in:
104
dev-games/recastnavigation/recastnavigation-1.6.0.recipe
Normal file
104
dev-games/recastnavigation/recastnavigation-1.6.0.recipe
Normal file
@@ -0,0 +1,104 @@
|
||||
SUMMARY="Navigation-msh toolset for games"
|
||||
DESCRIPTION="Recast is state of the art navigation mesh construction toolset for games.
|
||||
|
||||
Recast is...
|
||||
* 🤖 **Automatic** - throw any level geometry at it and you will get a robust navmesh out
|
||||
* 🏎️ **Fast** - swift turnaround times for level designers
|
||||
* 🧘 **Flexible** - easily customize the navmesh generation and runtime navigation systems to suit \
|
||||
your specific game's needs.
|
||||
|
||||
Recast constructs a navmesh through a multi-step rasterization process:
|
||||
|
||||
1. First Recast voxelizes the input triangle mesh by rasterizing the triangles into a multi-layer \
|
||||
heightfield.
|
||||
2. Voxels in areas where the character would not be able to move are removed by applying simple \
|
||||
voxel data filters.
|
||||
3. The walkable areas described by the voxel grid are then divided into sets of 2D polygonal \
|
||||
regions.
|
||||
4. The navigation polygons are generated by triangulating and stiching together the generated 2d \
|
||||
plygonal regions."
|
||||
HOMEPAGE="https://recastnav.com/"
|
||||
COPYRIGHT="2009 Mikko Mononen"
|
||||
LICENSE="Zlib"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/recastnavigation/recastnavigation/archive/refs/tags/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="d48ca0121962fa0639502c0f56c4e3ae72f98e55d88727225444f500775c0074"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
recastnavigation$secondaryArchSuffix = $portVersion
|
||||
lib:libDebugUtils$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libDetour$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libDetourCrowd$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libDetourTileCache$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libRecast$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
# lib:libGL$secondaryArchSuffix
|
||||
# lib:libSDL2_2.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
recastnavigation${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libDebugUtils$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libDetour$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libDetourCrowd$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libDetourTileCache$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libRecast$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
recastnavigation$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
# required for the demo application
|
||||
# devel:libGL$secondaryArchSuffix
|
||||
# devel:libSDL2_2.0$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DRECASTNAVIGATION_DEMO=OFF \
|
||||
-DRECASTNAVIGATION_EXAMPLES=OFF \
|
||||
-DRECASTNAVIGATION_TESTS=OFF
|
||||
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libDebugUtils \
|
||||
libDetour \
|
||||
libDetourCrowd \
|
||||
libDetourTileCache \
|
||||
libRecast
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
ctest --test-dir build --output-on-failure
|
||||
}
|
||||
Reference in New Issue
Block a user