Files
haikuports/media-gfx/opencsg/opencsg-1.8.1.recipe

84 lines
2.7 KiB
Bash

SUMMARY="The CSG rendering library"
DESCRIPTION="OpenCSG is a library that does image-based CSG rendering using OpenGL. It is \
written in C++ and supports most modern graphics hardware using Microsoft Windows or the Linux \
operating system. The current version is OpenCSG-1.8.1.
What is CSG, anyway? CSG is short for Constructive Solid Geometry and denotes an approach to \
model complex 3D-shapes using simpler ones. I.e., two shapes can be combined by taking the union \
of them, by intersecting them, or by subtracting one shape of the other. The most basic shapes, \
which are not result of such a CSG operation, are called primitives. Primitives must be solid, \
i.e., they must have a clearly defined interior and exterior. By construction, a CSG shape is \
also solid then.
Image-based CSG rendering (also z-buffer CSG rendering) is a term for algorithms that render CSG \
shapes without an explicit calculation of the geometric boundary of a CSG shape. Such algorithms \
use frame-buffer settings of the graphics hardware, e.g., the depth and stencil buffer, to \
compose CSG shapes. OpenCSG implements a variety of those algorithms, namely the Goldfeather \
algorithm and the SCS algorithm, both of them in several variants."
HOMEPAGE="https://www.opencsg.org/"
COPYRIGHT="2002-2025, Florian Kirsch
2002-2005 Hasso-Plattner-Institute Potsdam"
LICENSE="GNU GPL v2"
REVISION="1"
#SOURCE_URI="https://github.com/floriankirsch/OpenCSG/archive/refs/tags/opencsg-1-8-1-release.tar.gz"
SOURCE_URI="https://www.opencsg.org/OpenCSG-$portVersion.tar.gz"
CHECKSUM_SHA256="afcc004a89ed3bc478a9e4ba39b20f3d589b24e23e275b7383f91a590d4d57c5"
SOURCE_DIR="OpenCSG-$portVersion"
#PATCHES="projectx-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
opencsg$secondaryArchSuffix = $portVersion
lib:libopencsg$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libGLU$secondaryArchSuffix
"
PROVIDES_devel="
opencsg${secondaryArchSuffix}_devel = $portVersion
devel:libopencsg$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
opencsg$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libGL$secondaryArchSuffix
devel:libGLU$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_EXAMPLE=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib \
libopencsg
packageEntries devel \
"$developDir"
}