mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 17:50:06 +02:00
139 lines
3.8 KiB
Bash
139 lines
3.8 KiB
Bash
SUMMARY="Multi-platform GL implementation"
|
|
DESCRIPTION="Mesa is an open-source implementation of the OpenGL \
|
|
specification. The OpenGL specification documents a system for rendering \
|
|
interactive 3D graphics. Mesa fills the role of the Haiku OpenGL kit \
|
|
providing 3D rendering to Haiku applications."
|
|
HOMEPAGE="http://www.mesa3d.org/"
|
|
COPYRIGHT="1999-2017 Brian Paul"
|
|
LICENSE="MIT"
|
|
REVISION="5"
|
|
SOURCE_URI="https://mesa.freedesktop.org/archive/mesa-${portVersion}.tar.xz"
|
|
CHECKSUM_SHA256="69f472a874b1122404fa0bd13e2d6bf87eb3b9ad9c21d2f39872a96d83d9e5f5"
|
|
PATCHES="mesa-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="!x86_gcc2 x86 x86_64 ?arm ?ppc"
|
|
SECONDARY_ARCHITECTURES="?x86"
|
|
|
|
PROVIDES="
|
|
mesa$secondaryArchSuffix = $portVersion
|
|
lib:libGL$secondaryArchSuffix = 1.0.0 compat >= 1
|
|
lib:libEGL$secondaryArchSuffix = 1.0.0 compat >= 1
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
mesa${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libGL$secondaryArchSuffix = 1.0.0 compat >= 1
|
|
devel:libEGL$secondaryArchSuffix = 1.0.0 compat >= 1
|
|
"
|
|
REQUIRES_devel="
|
|
mesa$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
SUMMARY_swpipe="The Mesa LLVM enhanced Gallium software pipe renderer"
|
|
DESCRIPTION_swpipe="This 3D BGLRenderer add-on provides Gallium LLVM \
|
|
enhanced software rendering. Software pipe rendering performs all \
|
|
3D rendering on the systems CPU and doesn't require any specialized \
|
|
hardware. The usage of LLVM over traditional rasterization gives this \
|
|
renderer a boost in performance.
|
|
|
|
Gallium software pipe rendering is in an extremely early state as of \
|
|
this version of Mesa, and may not function as expected."
|
|
|
|
PROVIDES_swpipe="
|
|
mesa${secondaryArchSuffix}_swpipe = $portVersion
|
|
"
|
|
REQUIRES_swpipe="
|
|
mesa$secondaryArchSuffix == $portVersion base
|
|
lib:libLLVM_5.0$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libz$secondaryArchSuffix
|
|
llvm${secondaryArchSuffix} >= 5
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:aclocal
|
|
cmd:autoconf
|
|
cmd:automake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:libtoolize$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:which
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
if [ -n "$secondaryArchSuffix" ]; then
|
|
export HAIKU_SECONDARY_ARCH="$effectiveTargetArchitecture"
|
|
fi
|
|
|
|
autoreconf -fi
|
|
runConfigure ./configure \
|
|
--disable-dri \
|
|
--disable-glx \
|
|
--disable-glx-tls \
|
|
--disable-gbm \
|
|
--disable-gles1 \
|
|
--disable-gles2 \
|
|
--disable-shared-glapi \
|
|
--with-gallium-drivers=swrast \
|
|
--with-platforms=haiku
|
|
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
|
|
rm $libDir/lib*.la
|
|
|
|
# Our rendering add-ons
|
|
mkdir -p $addOnsDir/opengl
|
|
mv $(find $libDir -name 'libswpipe.so') \
|
|
"$addOnsDir/opengl/Software Pipe"
|
|
rm -rf $libDir/haiku
|
|
|
|
# Set some nice version info
|
|
appVersion=${portVersion//\./ }
|
|
setversion "$libDir/libGL.so" -app $appVersion -long "Haiku OpenGL kit"
|
|
setversion "$libDir/libEGL.so.1" -app $appVersion -long "Mesa EGL"
|
|
setversion "$addOnsDir/opengl/Software Pipe" -app $appVersion -long "Gallium LLVM software pipe renderer"
|
|
|
|
prepareInstalledDevelLibs \
|
|
libGL libEGL
|
|
fixPkgconfig
|
|
|
|
# for compatibility
|
|
symlinkRelative -s $libDir/libGL.so.1 $libDir/libGL.so
|
|
|
|
# OpenGL Kit
|
|
mkdir -p $includeDir/os/opengl
|
|
cp ./include/HaikuGL/OpenGLKit.h $includeDir/os/
|
|
cp ./include/HaikuGL/GLView.h $includeDir/os/opengl/
|
|
cp ./include/HaikuGL/GLRenderer.h $includeDir/os/opengl/
|
|
|
|
# Create GL symlink in opengl kit
|
|
symlinkRelative -s $includeDir/GL $includeDir/os/opengl/GL
|
|
# Create EGL symlink in opengl kit
|
|
symlinkRelative -s $includeDir/EGL $includeDir/os/opengl/EGL
|
|
# Create KHR symlink in opengl kit
|
|
symlinkRelative -s $includeDir/KHR $includeDir/os/opengl/KHR
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir
|
|
|
|
# swpipe renderer package
|
|
packageEntries swpipe \
|
|
"$addOnsDir/opengl/Software Pipe"
|
|
}
|
|
|