raylib: new recipe (#10622)

* raylib: new recipe

* whitespace

* use cmakeDirArgs

* update requires and provides

* use shared lib

* remove brackets and update for devel package

* libs -> lib
This commit is contained in:
Al Hoang
2024-06-23 09:36:32 -05:00
committed by GitHub
parent a5e3d30448
commit 1811d52c8a

View File

@@ -0,0 +1,80 @@
SUMMARY="A simple and easy-to-use library to enjoy videogames programming"
DESCRIPTION="Raylib is highly inspired by Borland BGI graphics \
lib and by XNA framework and it's especially well suited for \
prototyping, tooling, graphical applications, embedded systems and education."
HOMEPAGE="https://github.com/raysan5/raylib"
COPYRIGHT="2013-2024 Ramon Santamaria"
LICENSE="Zlib"
REVISION="1"
SOURCE_URI="https://github.com/raysan5/raylib/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="98f049b9ea2a9c40a14e4e543eeea1a7ec3090ebdcd329c4ca2cf98bc9793482"
SOURCE_FILENAME="$portVersion.tar.gz"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="4.5.0"
libVersionCompat="$libVersion compat >= ${libVersion%.**}"
PROVIDES="
raylib$secondaryArchSuffix = $portVersion
lib:libraylib$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libGLU$secondaryArchSuffix
lib:libglfw$secondaryArchSuffix
"
PROVIDES_devel="
raylib${secondaryArchSuffix}_devel = $portVersion
devel:libraylib$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
raylib$secondaryArchSuffix == $portVersion base
devel:libGL$secondaryArchSuffix
devel:libGLU$secondaryArchSuffix
devel:libglfw$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libGL$secondaryArchSuffix
devel:libGLU$secondaryArchSuffix
devel:libglfw$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:cmake
cmd:make
"
BUILD()
{
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DUSE_EXTERNAL_GLFW=ON \
-DBUILD_SHARED_LIBS=ON
make $jobArgs
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLib \
libraylib
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}