diff --git a/games-misc/moonlight-embedded/moonlight_embedded-20240611~git.recipe b/games-misc/moonlight-embedded/moonlight_embedded-20240611~git.recipe new file mode 100644 index 000000000..4fb2b6eeb --- /dev/null +++ b/games-misc/moonlight-embedded/moonlight_embedded-20240611~git.recipe @@ -0,0 +1,94 @@ +SUMMARY="Moonlight Embedded Gamestream client for embedded systems" +DESCRIPTION="Moonlight Embedded is an open source client for Sunshine and NVIDIA GameStream for \ +embedded Linux systems, like Raspberry Pi, CuBox-i and ODROID. Moonlight allows you to stream your \ +full collection of games and applications from your PC to other devices to play them remotely." +HOMEPAGE="https://github.com/moonlight-stream/moonlight-embedded" +COPYRIGHT="2015-2024 Iwan Timmer" +LICENSE="GNU GPL v3" +REVISION="1" +# Main moonlight-embedded +srcGitRev="2782ec6a79ac0cecf316ad361de3f28a1fa80393" +SOURCE_URI="https://github.com/robante15/moonlight-embedded/archive/$srcGitRev.tar.gz" +CHECKSUM_SHA256="b57d1ee4ba15adf3ad217f03a4fa0bc105f787aab0a84ca2cca3bd690e2ee31c" +SOURCE_DIR="moonlight-embedded-$srcGitRev" + +# moonlight-common-c +srcGitRev_2="8599b6042a4ba27749b0f94134dd614b4328a9bc" +SOURCE_URI_2="https://github.com/moonlight-stream/moonlight-common-c/archive/$srcGitRev_2.tar.gz" +CHECKSUM_SHA256_2="1d62bdcd81e77b8bf6dc804c7402685e806dbcc999240857bbaf62790b24fdbc" + +#enet +srcGitRev_3="bbf71856bb144729af4ed08af6bc2f5826a96db5" +SOURCE_URI_3="https://github.com/cgutman/enet/archive/$srcGitRev_3.tar.gz" +CHECKSUM_SHA256_3="b55531ba56bfad5bb7bef606d4ea4868cc50e1e38cc4778bdec23edd4ee5c2ab" + +#enet +srcGitRev_4="ae51c9942f0d985b2161d6b22986f041fc98ce5c" +SOURCE_URI_4="https://github.com/mdqinc/SDL_GameControllerDB/archive/$srcGitRev_4.tar.gz" +CHECKSUM_SHA256_4="fd279f3a60434d139564dec7f77bb8af81ccd129bce9aa474234762845f8c601" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + moonlight_embedded$secondaryArchSuffix = $portVersion + cmd:moonlight = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libavcodec$secondaryArchSuffix + lib:libavutil$secondaryArchSuffix + lib:libcrypto$secondaryArchSuffix + lib:libcurl$secondaryArchSuffix + lib:libexpat$secondaryArchSuffix + lib:libopus$secondaryArchSuffix + lib:libSDL2_2.0$secondaryArchSuffix + lib:libssl$secondaryArchSuffix + lib:libuuid$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libavcodec$secondaryArchSuffix >= 59 + devel:libavutil$secondaryArchSuffix >= 57 + devel:libcurl$secondaryArchSuffix + devel:libexpat$secondaryArchSuffix + devel:libopus$secondaryArchSuffix + devel:libsdl2$secondaryArchSuffix + devel:libuuid$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:pod2man + " + +BUILD() +{ + # Link submodules + rm -rf $sourceDir/third_party/moonlight-common-c + ln -sfn $sourceDir2/moonlight-common-c-$srcGitRev_2 $sourceDir/third_party/moonlight-common-c + + rm -rf $sourceDir/third_party/moonlight-common-c/enet + ln -sfn $sourceDir3/enet-$srcGitRev_3 $sourceDir/third_party/moonlight-common-c/enet + + rm -rf $sourceDir/third_party/SDL_GameControllerDB + ln -sfn $sourceDir4/SDL_GameControllerDB-$srcGitRev_4 $sourceDir/third_party/SDL_GameControllerDB + + mkdir -p build + cd build + cmake -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_BUILD_TYPE=Release .. + cmake --build . +} + +INSTALL() +{ + mkdir -p $prefix/bin + cp build/moonlight $prefix/bin + + mkdir -p $manDir/man1 + cp -rd build/docs/moonlight.1 $manDir/man1 +}