Date: Thu, 3 Aug 2017 21:44:51 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r447284 - in head/games: . moonlight-embedded moonlight-embedded/files Message-ID: <201708032144.v73LipLj053731@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Thu Aug 3 21:44:51 2017 New Revision: 447284 URL: https://svnweb.freebsd.org/changeset/ports/447284 Log: New port: games/moonlight-embedded Moonlight Embedded is an open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield. Moonlight Embedded allows you to stream your full collection of games from your powerful Windows desktop to your FreeBSD system. WWW: https://github.com/irtimmer/moonlight-embedded Added: head/games/moonlight-embedded/ head/games/moonlight-embedded/Makefile (contents, props changed) head/games/moonlight-embedded/distinfo (contents, props changed) head/games/moonlight-embedded/files/ head/games/moonlight-embedded/files/patch-libgamestream_client.c (contents, props changed) head/games/moonlight-embedded/files/patch-src_main.c (contents, props changed) head/games/moonlight-embedded/files/patch-src_platform.c (contents, props changed) head/games/moonlight-embedded/files/patch-third__party_moonlight-common-c_src_InputStream.c (contents, props changed) head/games/moonlight-embedded/pkg-descr (contents, props changed) head/games/moonlight-embedded/pkg-plist (contents, props changed) Modified: head/games/Makefile Modified: head/games/Makefile ============================================================================== --- head/games/Makefile Thu Aug 3 21:11:59 2017 (r447283) +++ head/games/Makefile Thu Aug 3 21:44:51 2017 (r447284) @@ -620,6 +620,7 @@ SUBDIR += monsterz SUBDIR += moon-buggy SUBDIR += moonlander + SUBDIR += moonlight-embedded SUBDIR += mopesnake SUBDIR += moria SUBDIR += motogt Added: head/games/moonlight-embedded/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/moonlight-embedded/Makefile Thu Aug 3 21:44:51 2017 (r447284) @@ -0,0 +1,56 @@ +# $FreeBSD$ + +PORTNAME= moonlight-embedded +PORTVERSION= 2.4.2 +DISTVERSIONPREFIX= v +CATEGORIES= games + +MAINTAINER= tobik@FreeBSD.org +COMMENT= Gamestream client + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ + libcurl.so:ftp/curl \ + libenet.so:net/enet \ + libexpat.so:textproc/expat2 \ + libopus.so:audio/opus \ + libuuid.so:misc/e2fsprogs-libuuid + +USES= cmake localbase:ldflags perl5 pkgconfig ssl +USE_GITHUB= yes +GH_ACCOUNT= irtimmer +GH_TUPLE= irtimmer:moonlight-common-c:a1bdb36766f8db5dc9cc0694c9a376f0dca3ab59:common/third_party/moonlight-common-c +USE_LDCONFIG= yes +USE_PERL5= build +USE_SDL= sdl2 + +CFLAGS+= -DPREFIX="\\\"${PREFIX}\\\"" + +post-patch: + @${REINPLACE_CMD} -e '/(ALSA)/d' \ + -e '/libpulse-simple/d' \ + -e '/libcec/d' \ + -e '/libevdev/d' -e 's@./src/input/evdev.c@@' \ + -e '/libudev/d' -e 's@./src/input/udev.c@@' \ + -e '/libva/d' \ + -e '/vdpau/d' \ + -e '/egl/d' \ + -e '/glesv2/d' \ + -e '/x11/d' \ + ${WRKSRC}/CMakeLists.txt + @${RM} ${WRKSRC}/src/loop.c + @${REINPLACE_CMD} -e '/avahi-client/d' -e 's@SHARED@STATIC@' \ + -e 's@OpenSSL 1.0.2@OpenSSL@' -e '/^install(/d' \ + ${WRKSRC}/libgamestream/CMakeLists.txt + @${RM} ${WRKSRC}/libgamestream/discover.c + @${REINPLACE_CMD} -e 's@/etc/moonlight/moonlight.conf@${PREFIX}/etc/moonlight.conf@' \ + -e 's@moonligt@moonlight@' \ + ${WRKSRC}/docs/README.pod + +post-install: + @${MV} ${STAGEDIR}${PREFIX}/etc/moonlight.conf \ + ${STAGEDIR}${PREFIX}/etc/moonlight.conf.sample + +.include <bsd.port.mk> Added: head/games/moonlight-embedded/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/moonlight-embedded/distinfo Thu Aug 3 21:44:51 2017 (r447284) @@ -0,0 +1,5 @@ +TIMESTAMP = 1501714039 +SHA256 (irtimmer-moonlight-embedded-v2.4.2_GH0.tar.gz) = 263ec71dc552c8e7f9a21a2b04ad563c34d2a422ba8fe6a0ba5dbb2804500314 +SIZE (irtimmer-moonlight-embedded-v2.4.2_GH0.tar.gz) = 136010 +SHA256 (irtimmer-moonlight-common-c-a1bdb36766f8db5dc9cc0694c9a376f0dca3ab59_GH0.tar.gz) = b9fce9621b4b0cf780c3e1e75b52afa3e4493993289f28301b957beb7299d8bb +SIZE (irtimmer-moonlight-common-c-a1bdb36766f8db5dc9cc0694c9a376f0dca3ab59_GH0.tar.gz) = 64283 Added: head/games/moonlight-embedded/files/patch-libgamestream_client.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/moonlight-embedded/files/patch-libgamestream_client.c Thu Aug 3 21:44:51 2017 (r447284) @@ -0,0 +1,14 @@ +--- libgamestream/client.c.orig 2017-07-02 11:38:48 UTC ++++ libgamestream/client.c +@@ -494,7 +494,11 @@ int gs_pair(PSERVER_DATA server, char* pin) { + RAND_bytes(client_secret_data, 16); + + const ASN1_BIT_STRING *asnSignature; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + X509_get0_signature(&asnSignature, NULL, cert); ++#else ++ asnSignature = cert->signature; ++#endif + + char challenge_response[16 + 256 + 16]; + char challenge_response_hash[32]; Added: head/games/moonlight-embedded/files/patch-src_main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/moonlight-embedded/files/patch-src_main.c Thu Aug 3 21:44:51 2017 (r447284) @@ -0,0 +1,80 @@ +--- src/main.c.orig 2017-07-02 11:38:48 UTC ++++ src/main.c +@@ -113,13 +113,8 @@ static void stream(PSERVER_DATA server, PCONFIGURATION + platform_start(system); + LiStartConnection(&server->serverInfo, &config->stream, &connection_callbacks, platform_get_video(system), platform_get_audio(system, config->audio_device), NULL, drFlags, config->audio_device, 0); + +- if (IS_EMBEDDED(system)) { +- evdev_start(); +- loop_main(); +- evdev_stop(); +- } + #ifdef HAVE_SDL +- else if (system == SDL) ++ if (system == SDL) + sdl_loop(); + #endif + +@@ -160,7 +155,6 @@ static void help() { + printf("\t-surround\t\tStream 5.1 surround sound (requires GFE 2.7)\n"); + printf("\t-keydir <directory>\tLoad encryption keys from directory\n"); + printf("\t-mapping <file>\t\tUse <file> as gamepad mappings configuration file\n"); +- printf("\t-platform <system>\tSpecify system used for audio, video and input: pi/imx/aml/x11/x11_vdpau/sdl/fake (default auto)\n"); + printf("\t-unsupported\t\tTry streaming if GFE version or options are unsupported\n"); + #if defined(HAVE_SDL) || defined(HAVE_X11) + printf("\n WM options (SDL and X11 only)\n\n"); +@@ -199,12 +193,8 @@ int main(int argc, char* argv[]) { + exit(-1); + } + config.address[0] = 0; +- printf("Searching for server...\n"); +- gs_discover_server(config.address); +- if (config.address[0] == 0) { +- fprintf(stderr, "Autodiscovery failed. Specify an IP address next time.\n"); +- exit(-1); +- } ++ fprintf(stderr, "Autodiscovery unsupported. Specify an IP address next time.\n"); ++ exit(-1); + } + + char host_config_file[128]; +@@ -251,38 +241,8 @@ int main(int argc, char* argv[]) { + } + config.stream.supportsHevc = config.codec != CODEC_H264 && (config.codec == CODEC_HEVC || platform_supports_hevc(system)); + +- if (IS_EMBEDDED(system)) { +- char* mapping_env = getenv("SDL_GAMECONTROLLERCONFIG"); +- if (config.mapping == NULL && mapping_env == NULL) { +- fprintf(stderr, "Please specify mapping file as default mapping could not be found.\n"); +- exit(-1); +- } +- +- struct mapping* mappings = NULL; +- if (config.mapping != NULL) +- mappings = mapping_load(config.mapping, config.debug_level > 0); +- +- if (mapping_env != NULL) { +- struct mapping* map = mapping_parse(mapping_env); +- map->next = mappings; +- mappings = map; +- } +- +- for (int i=0;i<config.inputsCount;i++) { +- if (config.debug_level > 0) +- printf("Add input %s...\n", config.inputs[i]); +- +- evdev_create(config.inputs[i], mappings, config.debug_level > 0); +- } +- +- udev_init(!inputAdded, mappings, config.debug_level > 0); +- evdev_init(); +- #ifdef HAVE_LIBCEC +- cec_init(); +- #endif /* HAVE_LIBCEC */ +- } + #ifdef HAVE_SDL +- else if (system == SDL) { ++ if (system == SDL) { + if (config.inputsCount > 0) { + fprintf(stderr, "You can't select input devices as SDL will automatically use all available controllers\n"); + exit(-1); Added: head/games/moonlight-embedded/files/patch-src_platform.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/moonlight-embedded/files/patch-src_platform.c Thu Aug 3 21:44:51 2017 (r447284) @@ -0,0 +1,17 @@ +--- src/platform.c.orig 2017-07-02 11:38:48 UTC ++++ src/platform.c +@@ -163,14 +163,6 @@ AUDIO_RENDERER_CALLBACKS* platform_get_audio(enum plat + if (audio_device == NULL || strcmp(audio_device, "local") == 0 || strcmp(audio_device, "hdmi") == 0) + return (PAUDIO_RENDERER_CALLBACKS) dlsym(RTLD_DEFAULT, "audio_callbacks_omx"); + #endif +- default: +- #ifdef HAVE_PULSE +- if (audio_pulse_init(audio_device)) +- return &audio_callbacks_pulse; +- #endif +- #ifdef HAVE_ALSA +- return &audio_callbacks_alsa; +- #endif + } + return NULL; + } Added: head/games/moonlight-embedded/files/patch-third__party_moonlight-common-c_src_InputStream.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/moonlight-embedded/files/patch-third__party_moonlight-common-c_src_InputStream.c Thu Aug 3 21:44:51 2017 (r447284) @@ -0,0 +1,11 @@ +--- third_party/moonlight-common-c/src/InputStream.c.orig 2017-06-11 16:02:49 UTC ++++ third_party/moonlight-common-c/src/InputStream.c +@@ -34,7 +34,7 @@ typedef struct _PACKET_HOLDER { + LINKED_BLOCKING_QUEUE_ENTRY entry; + } PACKET_HOLDER, *PPACKET_HOLDER; + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + #define EVP_CIPHER_CTX_reset(x) EVP_CIPHER_CTX_cleanup(x); EVP_CIPHER_CTX_init(x) + #endif + Added: head/games/moonlight-embedded/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/moonlight-embedded/pkg-descr Thu Aug 3 21:44:51 2017 (r447284) @@ -0,0 +1,7 @@ +Moonlight Embedded is an open source implementation of NVIDIA's +GameStream, as used by the NVIDIA Shield. + +Moonlight Embedded allows you to stream your full collection of games +from your powerful Windows desktop to your FreeBSD system. + +WWW: https://github.com/irtimmer/moonlight-embedded Added: head/games/moonlight-embedded/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/moonlight-embedded/pkg-plist Thu Aug 3 21:44:51 2017 (r447284) @@ -0,0 +1,4 @@ +bin/moonlight +@sample etc/moonlight.conf.sample +man/man1/moonlight.1.gz +share/moonlight/gamecontrollerdb.txt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708032144.v73LipLj053731>