Index: head/games/moonlight-embedded/Makefile =================================================================== --- head/games/moonlight-embedded/Makefile (revision 476984) +++ head/games/moonlight-embedded/Makefile (revision 476985) @@ -1,57 +1,53 @@ # $FreeBSD$ PORTNAME= moonlight-embedded -DISTVERSIONPREFIX= v -DISTVERSION= 2.4.6 -PORTREVISION= 1 +DISTVERSION= 2.4.7 CATEGORIES= games +MASTER_SITES= https://github.com/irtimmer/moonlight-embedded/releases/download/v${DISTVERSION}/ 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:186cef0e3a4c104dc224f0ca413345571d79b48c:common/third_party/moonlight-common-c +USES= cmake localbase:ldflags perl5 pkgconfig ssl tar:xz 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@g' \ ${WRKSRC}/docs/README.pod post-install: @${MV} ${STAGEDIR}${PREFIX}/etc/moonlight.conf \ ${STAGEDIR}${PREFIX}/etc/moonlight.conf.sample .include Index: head/games/moonlight-embedded/distinfo =================================================================== --- head/games/moonlight-embedded/distinfo (revision 476984) +++ head/games/moonlight-embedded/distinfo (revision 476985) @@ -1,5 +1,3 @@ -TIMESTAMP = 1518876219 -SHA256 (irtimmer-moonlight-embedded-v2.4.6_GH0.tar.gz) = 5c3c6fbedcd9d9b57d276add82e88be12b3ea974dc191ed5ae29908a62acb374 -SIZE (irtimmer-moonlight-embedded-v2.4.6_GH0.tar.gz) = 137855 -SHA256 (irtimmer-moonlight-common-c-186cef0e3a4c104dc224f0ca413345571d79b48c_GH0.tar.gz) = 68ad7fd341b6fcd218bbe3c502f56bee9e21f7e9d5587e538bb41af4f3ae71af -SIZE (irtimmer-moonlight-common-c-186cef0e3a4c104dc224f0ca413345571d79b48c_GH0.tar.gz) = 66038 +TIMESTAMP = 1534076138 +SHA256 (moonlight-embedded-2.4.7.tar.xz) = f78e7de28e190ea21ad567f2c580be384c53fa40f22d2ab8db16487c3e99fc56 +SIZE (moonlight-embedded-2.4.7.tar.xz) = 152496 Index: head/games/moonlight-embedded/files/patch-ffmpeg4 =================================================================== --- head/games/moonlight-embedded/files/patch-ffmpeg4 (revision 476984) +++ head/games/moonlight-embedded/files/patch-ffmpeg4 (nonexistent) @@ -1,29 +0,0 @@ -src/video/ffmpeg.c:99:27: error: use of undeclared identifier 'CODEC_FLAG_LOW_DELAY' - decoder_ctx->flags |= CODEC_FLAG_LOW_DELAY; - ^ -src/video/sdl.c:43:48: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE' - ffmpeg_buffer = malloc(DECODER_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); - ^ - ---- src/video/ffmpeg.c.orig 2018-01-14 14:09:59 UTC -+++ src/video/ffmpeg.c -@@ -96,7 +96,7 @@ int ffmpeg_init(int videoFormat, int width, int height - - if (perf_lvl & LOW_LATENCY_DECODE) - // Use low delay single threaded encoding -- decoder_ctx->flags |= CODEC_FLAG_LOW_DELAY; -+ decoder_ctx->flags |= AV_CODEC_FLAG_LOW_DELAY; - - if (perf_lvl & SLICE_THREADING) - decoder_ctx->thread_type = FF_THREAD_SLICE; ---- src/video/sdl.c.orig 2018-01-14 14:09:59 UTC -+++ src/video/sdl.c -@@ -40,7 +40,7 @@ static int sdl_setup(int videoFormat, int width, int h - return -1; - } - -- ffmpeg_buffer = malloc(DECODER_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); -+ ffmpeg_buffer = malloc(DECODER_BUFFER_SIZE + AV_INPUT_BUFFER_PADDING_SIZE); - if (ffmpeg_buffer == NULL) { - fprintf(stderr, "Not enough memory\n"); - ffmpeg_destroy(); Property changes on: head/games/moonlight-embedded/files/patch-ffmpeg4 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/moonlight-embedded/files/patch-libgamestream_client.c =================================================================== --- head/games/moonlight-embedded/files/patch-libgamestream_client.c (revision 476984) +++ head/games/moonlight-embedded/files/patch-libgamestream_client.c (revision 476985) @@ -1,14 +1,14 @@ ---- libgamestream/client.c.orig 2017-10-24 18:52:11 UTC +--- libgamestream/client.c.orig 2018-08-11 15:43:13 UTC +++ libgamestream/client.c -@@ -503,7 +503,11 @@ int gs_pair(PSERVER_DATA server, char* pin) { +@@ -505,7 +505,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]; Index: head/games/moonlight-embedded/files/patch-src_main.c =================================================================== --- head/games/moonlight-embedded/files/patch-src_main.c (revision 476984) +++ head/games/moonlight-embedded/files/patch-src_main.c (revision 476985) @@ -1,89 +1,97 @@ ---- src/main.c.orig 2017-10-24 18:52:11 UTC +--- src/main.c.orig 2018-08-11 15:43:13 UTC +++ src/main.c -@@ -115,13 +115,8 @@ static void stream(PSERVER_DATA server, PCONFIGURATION +@@ -91,7 +91,6 @@ static void stream(PSERVER_DATA server, PCONFIGURATION + } + + int gamepads = 0; +- gamepads += evdev_gamepads; + #ifdef HAVE_SDL + gamepads += sdl_gamepads; + #endif +@@ -124,13 +123,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 -@@ -163,7 +158,6 @@ static void help() { +@@ -172,7 +166,6 @@ static void help() { printf("\t-surround\t\tStream 5.1 surround sound (requires GFE 2.7)\n"); printf("\t-keydir \tLoad encryption keys from directory\n"); printf("\t-mapping \t\tUse as gamepad mappings configuration file\n"); -- printf("\t-platform \tSpecify system used for audio, video and input: pi/imx/aml/x11/x11_vdpau/sdl/fake (default auto)\n"); +- printf("\t-platform \tSpecify system used for audio, video and input: pi/imx/aml/rk/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"); -@@ -201,8 +195,6 @@ int main(int argc, char* argv[]) { +@@ -210,8 +203,6 @@ int main(int argc, char* argv[]) { exit(-1); } - evdev_create(config.inputs[0], NULL, config.debug_level > 0); - evdev_map(config.inputs[0]); exit(0); } -@@ -213,12 +205,8 @@ int main(int argc, char* argv[]) { +@@ -222,12 +213,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]; -@@ -268,38 +256,8 @@ int main(int argc, char* argv[]) { +@@ -277,38 +264,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 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); Index: head/games/moonlight-embedded/files/patch-src_platform.c =================================================================== --- head/games/moonlight-embedded/files/patch-src_platform.c (revision 476984) +++ head/games/moonlight-embedded/files/patch-src_platform.c (revision 476985) @@ -1,17 +1,17 @@ ---- src/platform.c.orig 2017-07-02 11:38:48 UTC +--- src/platform.c.orig 2018-08-11 15:43:13 UTC +++ src/platform.c -@@ -163,14 +163,6 @@ AUDIO_RENDERER_CALLBACKS* platform_get_audio(enum plat +@@ -174,14 +174,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; }