* [PR PATCH] New package: looking-glass-2019.B1
@ 2020-05-14 9:25 the-eater
2020-05-14 9:57 ` [PR PATCH] [Updated] " the-eater
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: the-eater @ 2020-05-14 9:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
There is a new pull request by the-eater against master on the void-packages repository
https://github.com/the-eater/neo-void-packages pkg/looking-glass
https://github.com/void-linux/void-packages/pull/21952
New package: looking-glass-2019.B1
A patch file from https://github.com/void-linux/void-packages/pull/21952.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/looking-glass-21952.patch --]
[-- Type: text/x-diff, Size: 2913 bytes --]
From 2b7cb8e7a92e89b4901c32e953f3b1a2cbda5695 Mon Sep 17 00:00:00 2001
From: eater <=@eater.me>
Date: Thu, 14 May 2020 11:23:51 +0200
Subject: [PATCH] New package: looking-glass-2019.B1
---
srcpkgs/looking-glass/patches/fix-void.patch | 45 ++++++++++++++++++++
srcpkgs/looking-glass/template | 16 +++++++
2 files changed, 61 insertions(+)
create mode 100644 srcpkgs/looking-glass/patches/fix-void.patch
create mode 100644 srcpkgs/looking-glass/template
diff --git a/srcpkgs/looking-glass/patches/fix-void.patch b/srcpkgs/looking-glass/patches/fix-void.patch
new file mode 100644
index 00000000000..6c08ffee7f4
--- /dev/null
+++ b/srcpkgs/looking-glass/patches/fix-void.patch
@@ -0,0 +1,45 @@
+diff --git client/CMakeLists.txt client/CMakeLists.txt
+index 4c1ba29..f08b4b3 100644
+--- client/CMakeLists.txt
++++ client/CMakeLists.txt
+@@ -37,7 +37,7 @@ add_compile_options(
+ "$<$<CONFIG:DEBUG>:-O0;-g3;-ggdb>"
+ )
+
+-set(EXE_FLAGS "-Wl,--gc-sections")
++set(EXE_FLAGS "-Wl,--gc-sections -Wl,--start-group")
+ set(CMAKE_C_STANDARD 11)
+
+ find_package(PkgConfig)
+@@ -99,6 +99,7 @@ target_link_libraries(looking-glass-client
+ renderers
+ clipboards
+ fonts
++ dl
+ )
+
+ install(PROGRAMS ${CMAKE_BINARY_DIR}/looking-glass-client DESTINATION bin/ COMPONENT binary)
+diff --git common/src/crash.linux.c common/src/crash.linux.c
+index 218d65f..bd23805 100644
+--- common/src/crash.linux.c
++++ common/src/crash.linux.c
+@@ -98,10 +98,10 @@ static void load_symbols()
+
+ static bool lookup_address(bfd_vma pc, const char ** filename, const char ** function, unsigned int * line, unsigned int * discriminator)
+ {
+- if ((bfd_get_section_flags(crash.fd, crash.section) & SEC_ALLOC) == 0)
++ if ((crash.section->flags & SEC_ALLOC) == 0)
+ return false;
+
+- bfd_size_type size = bfd_get_section_size(crash.section);
++ bfd_size_type size = crash.section->size;
+ if (pc >= size)
+ return false;
+
+@@ -230,4 +230,4 @@ bool installCrashHandler(const char * exe)
+ return true;
+ }
+
+-#endif
+\ No newline at end of file
++#endif
diff --git a/srcpkgs/looking-glass/template b/srcpkgs/looking-glass/template
new file mode 100644
index 00000000000..b5a72766c94
--- /dev/null
+++ b/srcpkgs/looking-glass/template
@@ -0,0 +1,16 @@
+# Template file for 'looking-glass'
+pkgname=looking-glass
+_tag="B1"
+version="2019.${_tag}"
+revision=1
+wrksrc="LookingGlass-${_tag}"
+build_wrksrc="client"
+build_style=cmake
+hostmakedepends="pkg-config"
+makedepends="glibc-devel nettle-devel libX11-devel spice-devel SDL2-devel SDL2_ttf-devel binutils-devel fontconfig-devel"
+short_desc="Extremely low latency KVMFR implementation"
+maintainer="eater <=@eater.me>"
+license="GPL-2.0"
+homepage="https://looking-glass.hostfission.com/"
+distfiles="https://github.com/gnif/LookingGlass/archive/${_tag}.tar.gz"
+checksum=fa9b3b380f451551c8b40b56a3e873607aa066e8333b7baacd0ed21a05bbb5c5
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] New package: looking-glass-2019.B1
2020-05-14 9:25 [PR PATCH] New package: looking-glass-2019.B1 the-eater
@ 2020-05-14 9:57 ` the-eater
2020-05-14 10:08 ` the-eater
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: the-eater @ 2020-05-14 9:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
There is an updated pull request by the-eater against master on the void-packages repository
https://github.com/the-eater/neo-void-packages pkg/looking-glass
https://github.com/void-linux/void-packages/pull/21952
New package: looking-glass-2019.B1
A patch file from https://github.com/void-linux/void-packages/pull/21952.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/looking-glass-21952.patch --]
[-- Type: text/x-diff, Size: 11718 bytes --]
From 377e692462aafc8ec2b31b922626838357b1a1a0 Mon Sep 17 00:00:00 2001
From: eater <=@eater.me>
Date: Thu, 14 May 2020 11:23:51 +0200
Subject: [PATCH] New package: looking-glass-2019.B1
---
.../patches/cross-compilation.patch | 221 ++++++++++++++++++
srcpkgs/looking-glass/patches/fix-void.patch | 45 ++++
srcpkgs/looking-glass/template | 17 ++
3 files changed, 283 insertions(+)
create mode 100644 srcpkgs/looking-glass/patches/cross-compilation.patch
create mode 100644 srcpkgs/looking-glass/patches/fix-void.patch
create mode 100644 srcpkgs/looking-glass/template
diff --git a/srcpkgs/looking-glass/patches/cross-compilation.patch b/srcpkgs/looking-glass/patches/cross-compilation.patch
new file mode 100644
index 00000000000..d3f13b757aa
--- /dev/null
+++ b/srcpkgs/looking-glass/patches/cross-compilation.patch
@@ -0,0 +1,221 @@
+diff --git client/decoders/src/h264.c client/decoders/src/h264.c
+index c3abbbf..034edbe 100644
+--- client/decoders/src/h264.c
++++ client/decoders/src/h264.c
+@@ -127,7 +127,7 @@ static bool lgd_h264_create(void ** opaque)
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -978,4 +978,4 @@ const LG_Decoder LGD_H264 =
+ .init_gl_texture = lgd_h264_init_gl_texture,
+ .free_gl_texture = lgd_h264_free_gl_texture,
+ .update_gl_texture = lgd_h264_update_gl_texture
+-};
+\ No newline at end of file
++};
+diff --git client/decoders/src/null.c client/decoders/src/null.c
+index bd30b55..32702d1 100644
+--- client/decoders/src/null.c
++++ client/decoders/src/null.c
+@@ -47,7 +47,7 @@ static bool lgd_null_create(void ** opaque)
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -127,4 +127,4 @@ const LG_Decoder LGD_NULL =
+ .get_frame_stride = lgd_null_get_frame_stride,
+ .decode = lgd_null_decode,
+ .get_buffer = lgd_null_get_buffer
+-};
+\ No newline at end of file
++};
+diff --git client/decoders/src/yuv420.c client/decoders/src/yuv420.c
+index b4c1b86..1e39fc8 100644
+--- client/decoders/src/yuv420.c
++++ client/decoders/src/yuv420.c
+@@ -56,7 +56,7 @@ static bool lgd_yuv420_create(void ** opaque)
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -166,4 +166,4 @@ const LG_Decoder LGD_YUV420 =
+ .init_gl_texture = lgd_yuv420_init_gl_texture,
+ .free_gl_texture = lgd_yuv420_free_gl_texture,
+ .update_gl_texture = lgd_yuv420_update_gl_texture
+-};
+\ No newline at end of file
++};
+diff --git client/fonts/SDL/src/sdl.c client/fonts/SDL/src/sdl.c
+index 9dbc7eb..2d44334 100644
+--- client/fonts/SDL/src/sdl.c
++++ client/fonts/SDL/src/sdl.c
+@@ -55,7 +55,7 @@ static bool lgf_sdl_create(LG_FontObj * opaque, const char * font_name, unsigned
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -150,4 +150,4 @@ struct LG_Font LGF_SDL =
+ .destroy = lgf_sdl_destroy,
+ .render = lgf_sdl_render,
+ .release = lgf_sdl_release
+-};
+\ No newline at end of file
++};
+diff --git client/renderers/EGL/egl.c client/renderers/EGL/egl.c
+index 27f0a1b..e7f9626 100644
+--- client/renderers/EGL/egl.c
++++ client/renderers/EGL/egl.c
+@@ -153,7 +153,7 @@ bool egl_create(void ** opaque, const LG_RendererParams params)
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -566,4 +566,4 @@ struct LG_Renderer LGR_EGL =
+ .render_startup = egl_render_startup,
+ .render = egl_render,
+ .update_fps = egl_update_fps
+-};
+\ No newline at end of file
++};
+diff --git client/renderers/EGL/texture.c client/renderers/EGL/texture.c
+index ce9af86..f02c152 100644
+--- client/renderers/EGL/texture.c
++++ client/renderers/EGL/texture.c
+@@ -233,7 +233,7 @@ bool egl_texture_setup(EGL_Texture * texture, enum EGL_PixelFormat pixFmt, size_
+
+ if (!texture->pboMap[i])
+ {
+- DEBUG_ERROR("glMapBufferRange failed for %d of %lu bytes", i, texture->pboBufferSize);
++ DEBUG_ERROR("glMapBufferRange failed for %d of %lu bytes", i, (unsigned long)texture->pboBufferSize);
+ return false;
+ }
+ }
+@@ -362,4 +362,4 @@ enum EGL_TexStatus egl_texture_bind(EGL_Texture * texture)
+ int egl_texture_count(EGL_Texture * texture)
+ {
+ return texture->textureCount;
+-}
+\ No newline at end of file
++}
+diff --git client/renderers/OpenGL/opengl.c client/renderers/OpenGL/opengl.c
+index a1f1bde..be9d4a2 100644
+--- client/renderers/OpenGL/opengl.c
++++ client/renderers/OpenGL/opengl.c
+@@ -193,7 +193,7 @@ bool opengl_create(void ** opaque, const LG_RendererParams params)
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -1371,7 +1371,7 @@ static bool draw_frame(struct Inst * this)
+ if (check_gl_error("glTexSubImage2D"))
+ {
+ DEBUG_ERROR("texIndex: %u, width: %u, height: %u, vboFormat: %x, texSize: %lu",
+- this->texIndex, this->format.width, this->format.height, this->vboFormat, this->texSize
++ this->texIndex, this->format.width, this->format.height, this->vboFormat, (unsigned long)this->texSize
+ );
+ }
+
+@@ -1415,4 +1415,4 @@ static void draw_mouse(struct Inst * this)
+ glTranslatef(this->mousePos.x, this->mousePos.y, 0.0f);
+ glCallList(this->mouseList);
+ glPopMatrix();
+-}
+\ No newline at end of file
++}
+diff --git client/spice/src/spice.c client/spice/src/spice.c
+index 3436089..0eb3cd2 100644
+--- client/spice/src/spice.c
++++ client/spice/src/spice.c
+@@ -1303,7 +1303,7 @@ bool spice_read_nl(const struct SpiceChannel * channel, void * buffer, const ssi
+ if (len <= 0)
+ {
+ if (len == 0)
+- DEBUG_ERROR("remote end closd connection after %ld byte(s)", size - left);
++ DEBUG_ERROR("remote end closd connection after %ld byte(s)", (long)(size - left));
+ return false;
+ }
+ left -= len;
+@@ -1325,7 +1325,7 @@ bool spice_discard_nl(const struct SpiceChannel * channel, ssize_t size)
+ if (len <= 0)
+ {
+ if (len == 0)
+- DEBUG_ERROR("remote end closed connection after %ld byte(s)", size - left);
++ DEBUG_ERROR("remote end closed connection after %ld byte(s)", (long)size - left);
+ free(c);
+ return false;
+ }
+@@ -1664,4 +1664,4 @@ bool spice_clipboard_data(SpiceDataType type, uint8_t * data, size_t size)
+
+ free(buffer);
+ return true;
+-}
+\ No newline at end of file
++}
+diff --git client/src/main.c client/src/main.c
+index 9ce9384..193e581 100644
+--- client/src/main.c
++++ client/src/main.c
+@@ -314,7 +314,7 @@ static int frameThread(void * unused)
+ DEBUG_WARN(" width : %u" , header.width );
+ DEBUG_WARN(" height : %u" , header.height );
+ DEBUG_WARN(" pitch : %u" , header.pitch );
+- DEBUG_WARN(" dataPos: 0x%08lx", header.dataPos);
++ DEBUG_WARN(" dataPos: 0x%08lx", (long)header.dataPos);
+ usleep(1000);
+ continue;
+ }
+diff --git common/include/common/memcpySSE.h common/include/common/memcpySSE.h
+index 848f517..5e31752 100644
+--- common/include/common/memcpySSE.h
++++ common/include/common/memcpySSE.h
+@@ -34,7 +34,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
+ inline static void * memcpySSE(void *dst, const void * src, size_t length)
+ {
+ if (length == 0 || dst == src)
+- return;
++ return dst;
+
+ // copies under 1MB are faster with the inlined memcpy
+ // tell the dev to use that instead
+@@ -47,7 +47,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
+ smallBufferWarn = true;
+ }
+ memcpy(dst, src, length);
+- return;
++ return dst;
+ }
+
+ const void * end = dst + (length & ~0x7F);
+@@ -129,6 +129,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
+
+ //copy any remaining bytes
+ memcpy(dst, src, length & 0xF);
++ return dst;
+ }
+ #else
+ #define memcpySSE memcpy
diff --git a/srcpkgs/looking-glass/patches/fix-void.patch b/srcpkgs/looking-glass/patches/fix-void.patch
new file mode 100644
index 00000000000..6c08ffee7f4
--- /dev/null
+++ b/srcpkgs/looking-glass/patches/fix-void.patch
@@ -0,0 +1,45 @@
+diff --git client/CMakeLists.txt client/CMakeLists.txt
+index 4c1ba29..f08b4b3 100644
+--- client/CMakeLists.txt
++++ client/CMakeLists.txt
+@@ -37,7 +37,7 @@ add_compile_options(
+ "$<$<CONFIG:DEBUG>:-O0;-g3;-ggdb>"
+ )
+
+-set(EXE_FLAGS "-Wl,--gc-sections")
++set(EXE_FLAGS "-Wl,--gc-sections -Wl,--start-group")
+ set(CMAKE_C_STANDARD 11)
+
+ find_package(PkgConfig)
+@@ -99,6 +99,7 @@ target_link_libraries(looking-glass-client
+ renderers
+ clipboards
+ fonts
++ dl
+ )
+
+ install(PROGRAMS ${CMAKE_BINARY_DIR}/looking-glass-client DESTINATION bin/ COMPONENT binary)
+diff --git common/src/crash.linux.c common/src/crash.linux.c
+index 218d65f..bd23805 100644
+--- common/src/crash.linux.c
++++ common/src/crash.linux.c
+@@ -98,10 +98,10 @@ static void load_symbols()
+
+ static bool lookup_address(bfd_vma pc, const char ** filename, const char ** function, unsigned int * line, unsigned int * discriminator)
+ {
+- if ((bfd_get_section_flags(crash.fd, crash.section) & SEC_ALLOC) == 0)
++ if ((crash.section->flags & SEC_ALLOC) == 0)
+ return false;
+
+- bfd_size_type size = bfd_get_section_size(crash.section);
++ bfd_size_type size = crash.section->size;
+ if (pc >= size)
+ return false;
+
+@@ -230,4 +230,4 @@ bool installCrashHandler(const char * exe)
+ return true;
+ }
+
+-#endif
+\ No newline at end of file
++#endif
diff --git a/srcpkgs/looking-glass/template b/srcpkgs/looking-glass/template
new file mode 100644
index 00000000000..43b52f71069
--- /dev/null
+++ b/srcpkgs/looking-glass/template
@@ -0,0 +1,17 @@
+# Template file for 'looking-glass'
+pkgname=looking-glass
+_tag="B1"
+version="2019.${_tag}"
+revision=1
+wrksrc="LookingGlass-${_tag}"
+build_wrksrc="client"
+build_style=cmake
+configure_args="-DENABLE_BACKTRACE:BOOL=OFF -DOPTIMIZE_FOR_NATIVE:BOOL=OFF"
+hostmakedepends="pkg-config"
+makedepends="nettle-devel libX11-devel spice-devel SDL2-devel SDL2_ttf-devel binutils-devel fontconfig-devel"
+short_desc="Extremely low latency KVMFR implementation"
+maintainer="eater <=@eater.me>"
+license="GPL-2.0-only"
+homepage="https://looking-glass.hostfission.com/"
+distfiles="https://github.com/gnif/LookingGlass/archive/${_tag}.tar.gz"
+checksum=fa9b3b380f451551c8b40b56a3e873607aa066e8333b7baacd0ed21a05bbb5c5
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Updated] New package: looking-glass-2019.B1
2020-05-14 9:25 [PR PATCH] New package: looking-glass-2019.B1 the-eater
2020-05-14 9:57 ` [PR PATCH] [Updated] " the-eater
@ 2020-05-14 10:08 ` the-eater
2020-05-14 10:14 ` the-eater
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: the-eater @ 2020-05-14 10:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
There is an updated pull request by the-eater against master on the void-packages repository
https://github.com/the-eater/neo-void-packages pkg/looking-glass
https://github.com/void-linux/void-packages/pull/21952
New package: looking-glass-2019.B1
A patch file from https://github.com/void-linux/void-packages/pull/21952.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/looking-glass-21952.patch --]
[-- Type: text/x-diff, Size: 12715 bytes --]
From 571a2bfbc4ce79e84cb91e6db8d1ea4367a4671c Mon Sep 17 00:00:00 2001
From: eater <=@eater.me>
Date: Thu, 14 May 2020 11:23:51 +0200
Subject: [PATCH] New package: looking-glass-2019.B1
---
.../patches/cross-compilation.patch | 248 ++++++++++++++++++
srcpkgs/looking-glass/patches/fix-void.patch | 45 ++++
srcpkgs/looking-glass/template | 17 ++
3 files changed, 310 insertions(+)
create mode 100644 srcpkgs/looking-glass/patches/cross-compilation.patch
create mode 100644 srcpkgs/looking-glass/patches/fix-void.patch
create mode 100644 srcpkgs/looking-glass/template
diff --git a/srcpkgs/looking-glass/patches/cross-compilation.patch b/srcpkgs/looking-glass/patches/cross-compilation.patch
new file mode 100644
index 00000000000..7bd08ebe4bd
--- /dev/null
+++ b/srcpkgs/looking-glass/patches/cross-compilation.patch
@@ -0,0 +1,248 @@
+diff --git client/decoders/src/h264.c client/decoders/src/h264.c
+index c3abbbf..034edbe 100644
+--- client/decoders/src/h264.c
++++ client/decoders/src/h264.c
+@@ -127,7 +127,7 @@ static bool lgd_h264_create(void ** opaque)
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -978,4 +978,4 @@ const LG_Decoder LGD_H264 =
+ .init_gl_texture = lgd_h264_init_gl_texture,
+ .free_gl_texture = lgd_h264_free_gl_texture,
+ .update_gl_texture = lgd_h264_update_gl_texture
+-};
+\ No newline at end of file
++};
+diff --git client/decoders/src/null.c client/decoders/src/null.c
+index bd30b55..32702d1 100644
+--- client/decoders/src/null.c
++++ client/decoders/src/null.c
+@@ -47,7 +47,7 @@ static bool lgd_null_create(void ** opaque)
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -127,4 +127,4 @@ const LG_Decoder LGD_NULL =
+ .get_frame_stride = lgd_null_get_frame_stride,
+ .decode = lgd_null_decode,
+ .get_buffer = lgd_null_get_buffer
+-};
+\ No newline at end of file
++};
+diff --git client/decoders/src/yuv420.c client/decoders/src/yuv420.c
+index b4c1b86..1e39fc8 100644
+--- client/decoders/src/yuv420.c
++++ client/decoders/src/yuv420.c
+@@ -56,7 +56,7 @@ static bool lgd_yuv420_create(void ** opaque)
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -166,4 +166,4 @@ const LG_Decoder LGD_YUV420 =
+ .init_gl_texture = lgd_yuv420_init_gl_texture,
+ .free_gl_texture = lgd_yuv420_free_gl_texture,
+ .update_gl_texture = lgd_yuv420_update_gl_texture
+-};
+\ No newline at end of file
++};
+diff --git client/fonts/SDL/src/sdl.c client/fonts/SDL/src/sdl.c
+index 9dbc7eb..2d44334 100644
+--- client/fonts/SDL/src/sdl.c
++++ client/fonts/SDL/src/sdl.c
+@@ -55,7 +55,7 @@ static bool lgf_sdl_create(LG_FontObj * opaque, const char * font_name, unsigned
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -150,4 +150,4 @@ struct LG_Font LGF_SDL =
+ .destroy = lgf_sdl_destroy,
+ .render = lgf_sdl_render,
+ .release = lgf_sdl_release
+-};
+\ No newline at end of file
++};
+diff --git client/renderers/EGL/egl.c client/renderers/EGL/egl.c
+index 27f0a1b..e7f9626 100644
+--- client/renderers/EGL/egl.c
++++ client/renderers/EGL/egl.c
+@@ -153,7 +153,7 @@ bool egl_create(void ** opaque, const LG_RendererParams params)
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -566,4 +566,4 @@ struct LG_Renderer LGR_EGL =
+ .render_startup = egl_render_startup,
+ .render = egl_render,
+ .update_fps = egl_update_fps
+-};
+\ No newline at end of file
++};
+diff --git client/renderers/EGL/texture.c client/renderers/EGL/texture.c
+index ce9af86..f02c152 100644
+--- client/renderers/EGL/texture.c
++++ client/renderers/EGL/texture.c
+@@ -233,7 +233,7 @@ bool egl_texture_setup(EGL_Texture * texture, enum EGL_PixelFormat pixFmt, size_
+
+ if (!texture->pboMap[i])
+ {
+- DEBUG_ERROR("glMapBufferRange failed for %d of %lu bytes", i, texture->pboBufferSize);
++ DEBUG_ERROR("glMapBufferRange failed for %d of %lu bytes", i, (unsigned long)texture->pboBufferSize);
+ return false;
+ }
+ }
+@@ -362,4 +362,4 @@ enum EGL_TexStatus egl_texture_bind(EGL_Texture * texture)
+ int egl_texture_count(EGL_Texture * texture)
+ {
+ return texture->textureCount;
+-}
+\ No newline at end of file
++}
+diff --git client/renderers/OpenGL/opengl.c client/renderers/OpenGL/opengl.c
+index a1f1bde..be9d4a2 100644
+--- client/renderers/OpenGL/opengl.c
++++ client/renderers/OpenGL/opengl.c
+@@ -193,7 +193,7 @@ bool opengl_create(void ** opaque, const LG_RendererParams params)
+ *opaque = malloc(sizeof(struct Inst));
+ if (!*opaque)
+ {
+- DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
++ DEBUG_INFO("Failed to allocate %lu bytes", (unsigned long)sizeof(struct Inst));
+ return false;
+ }
+ memset(*opaque, 0, sizeof(struct Inst));
+@@ -1371,7 +1371,7 @@ static bool draw_frame(struct Inst * this)
+ if (check_gl_error("glTexSubImage2D"))
+ {
+ DEBUG_ERROR("texIndex: %u, width: %u, height: %u, vboFormat: %x, texSize: %lu",
+- this->texIndex, this->format.width, this->format.height, this->vboFormat, this->texSize
++ this->texIndex, this->format.width, this->format.height, this->vboFormat, (unsigned long)this->texSize
+ );
+ }
+
+@@ -1415,4 +1415,4 @@ static void draw_mouse(struct Inst * this)
+ glTranslatef(this->mousePos.x, this->mousePos.y, 0.0f);
+ glCallList(this->mouseList);
+ glPopMatrix();
+-}
+\ No newline at end of file
++}
+diff --git client/spice/src/spice.c client/spice/src/spice.c
+index 3436089..0eb3cd2 100644
+--- client/spice/src/spice.c
++++ client/spice/src/spice.c
+@@ -1303,7 +1303,7 @@ bool spice_read_nl(const struct SpiceChannel * channel, void * buffer, const ssi
+ if (len <= 0)
+ {
+ if (len == 0)
+- DEBUG_ERROR("remote end closd connection after %ld byte(s)", size - left);
++ DEBUG_ERROR("remote end closd connection after %ld byte(s)", (long)(size - left));
+ return false;
+ }
+ left -= len;
+@@ -1325,7 +1325,7 @@ bool spice_discard_nl(const struct SpiceChannel * channel, ssize_t size)
+ if (len <= 0)
+ {
+ if (len == 0)
+- DEBUG_ERROR("remote end closed connection after %ld byte(s)", size - left);
++ DEBUG_ERROR("remote end closed connection after %ld byte(s)", (long)size - left);
+ free(c);
+ return false;
+ }
+@@ -1664,4 +1664,4 @@ bool spice_clipboard_data(SpiceDataType type, uint8_t * data, size_t size)
+
+ free(buffer);
+ return true;
+-}
+\ No newline at end of file
++}
+diff --git client/src/main.c client/src/main.c
+index 9ce9384..193e581 100644
+--- client/src/main.c
++++ client/src/main.c
+@@ -314,7 +314,7 @@ static int frameThread(void * unused)
+ DEBUG_WARN(" width : %u" , header.width );
+ DEBUG_WARN(" height : %u" , header.height );
+ DEBUG_WARN(" pitch : %u" , header.pitch );
+- DEBUG_WARN(" dataPos: 0x%08lx", header.dataPos);
++ DEBUG_WARN(" dataPos: 0x%08lx", (long)header.dataPos);
+ usleep(1000);
+ continue;
+ }
+diff --git common/include/common/memcpySSE.h common/include/common/memcpySSE.h
+index 848f517..8ea2e29 100644
+--- common/include/common/memcpySSE.h
++++ common/include/common/memcpySSE.h
+@@ -21,8 +21,24 @@ Place, Suite 330, Boston, MA 02111-1307 USA
+ #include <stdbool.h>
+ #include <stdint.h>
+ #include <string.h>
+-#include <tmmintrin.h>
+-#include <immintrin.h>
++
++#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
++ /* GCC-compatible compiler, targeting x86/x86-64 */
++ #include <x86intrin.h>
++#elif defined(__GNUC__) && defined(__ARM_NEON__)
++ /* GCC-compatible compiler, targeting ARM with NEON */
++ #include <arm_neon.h>
++#elif defined(__GNUC__) && defined(__IWMMXT__)
++ /* GCC-compatible compiler, targeting ARM with WMMX */
++ #include <mmintrin.h>
++#elif (defined(__GNUC__) || defined(__xlC__)) && (defined(__VEC__) || defined(__ALTIVEC__))
++ /* XLC or GCC-compatible compiler, targeting PowerPC with VMX/VSX */
++ #include <altivec.h>
++#elif defined(__GNUC__) && defined(__SPE__)
++ /* GCC-compatible compiler, targeting PowerPC with SPE */
++ #include <spe.h>
++#endif
++
+
+ #include "debug.h"
+
+@@ -34,7 +50,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
+ inline static void * memcpySSE(void *dst, const void * src, size_t length)
+ {
+ if (length == 0 || dst == src)
+- return;
++ return dst;
+
+ // copies under 1MB are faster with the inlined memcpy
+ // tell the dev to use that instead
+@@ -47,7 +63,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
+ smallBufferWarn = true;
+ }
+ memcpy(dst, src, length);
+- return;
++ return dst;
+ }
+
+ const void * end = dst + (length & ~0x7F);
+@@ -129,6 +145,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
+
+ //copy any remaining bytes
+ memcpy(dst, src, length & 0xF);
++ return dst;
+ }
+ #else
+ #define memcpySSE memcpy
diff --git a/srcpkgs/looking-glass/patches/fix-void.patch b/srcpkgs/looking-glass/patches/fix-void.patch
new file mode 100644
index 00000000000..6c08ffee7f4
--- /dev/null
+++ b/srcpkgs/looking-glass/patches/fix-void.patch
@@ -0,0 +1,45 @@
+diff --git client/CMakeLists.txt client/CMakeLists.txt
+index 4c1ba29..f08b4b3 100644
+--- client/CMakeLists.txt
++++ client/CMakeLists.txt
+@@ -37,7 +37,7 @@ add_compile_options(
+ "$<$<CONFIG:DEBUG>:-O0;-g3;-ggdb>"
+ )
+
+-set(EXE_FLAGS "-Wl,--gc-sections")
++set(EXE_FLAGS "-Wl,--gc-sections -Wl,--start-group")
+ set(CMAKE_C_STANDARD 11)
+
+ find_package(PkgConfig)
+@@ -99,6 +99,7 @@ target_link_libraries(looking-glass-client
+ renderers
+ clipboards
+ fonts
++ dl
+ )
+
+ install(PROGRAMS ${CMAKE_BINARY_DIR}/looking-glass-client DESTINATION bin/ COMPONENT binary)
+diff --git common/src/crash.linux.c common/src/crash.linux.c
+index 218d65f..bd23805 100644
+--- common/src/crash.linux.c
++++ common/src/crash.linux.c
+@@ -98,10 +98,10 @@ static void load_symbols()
+
+ static bool lookup_address(bfd_vma pc, const char ** filename, const char ** function, unsigned int * line, unsigned int * discriminator)
+ {
+- if ((bfd_get_section_flags(crash.fd, crash.section) & SEC_ALLOC) == 0)
++ if ((crash.section->flags & SEC_ALLOC) == 0)
+ return false;
+
+- bfd_size_type size = bfd_get_section_size(crash.section);
++ bfd_size_type size = crash.section->size;
+ if (pc >= size)
+ return false;
+
+@@ -230,4 +230,4 @@ bool installCrashHandler(const char * exe)
+ return true;
+ }
+
+-#endif
+\ No newline at end of file
++#endif
diff --git a/srcpkgs/looking-glass/template b/srcpkgs/looking-glass/template
new file mode 100644
index 00000000000..43b52f71069
--- /dev/null
+++ b/srcpkgs/looking-glass/template
@@ -0,0 +1,17 @@
+# Template file for 'looking-glass'
+pkgname=looking-glass
+_tag="B1"
+version="2019.${_tag}"
+revision=1
+wrksrc="LookingGlass-${_tag}"
+build_wrksrc="client"
+build_style=cmake
+configure_args="-DENABLE_BACKTRACE:BOOL=OFF -DOPTIMIZE_FOR_NATIVE:BOOL=OFF"
+hostmakedepends="pkg-config"
+makedepends="nettle-devel libX11-devel spice-devel SDL2-devel SDL2_ttf-devel binutils-devel fontconfig-devel"
+short_desc="Extremely low latency KVMFR implementation"
+maintainer="eater <=@eater.me>"
+license="GPL-2.0-only"
+homepage="https://looking-glass.hostfission.com/"
+distfiles="https://github.com/gnif/LookingGlass/archive/${_tag}.tar.gz"
+checksum=fa9b3b380f451551c8b40b56a3e873607aa066e8333b7baacd0ed21a05bbb5c5
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: New package: looking-glass-2019.B1
2020-05-14 9:25 [PR PATCH] New package: looking-glass-2019.B1 the-eater
2020-05-14 9:57 ` [PR PATCH] [Updated] " the-eater
2020-05-14 10:08 ` the-eater
@ 2020-05-14 10:14 ` the-eater
2020-05-14 19:27 ` bra1nwave
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: the-eater @ 2020-05-14 10:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 245 bytes --]
New comment by the-eater on void-packages repository
https://github.com/void-linux/void-packages/pull/21952#issuecomment-628537199
Comment:
I don't know why you ever want VGA PCI passthrough on ARM, but hey, our looking glass package is ready
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: New package: looking-glass-2019.B1
2020-05-14 9:25 [PR PATCH] New package: looking-glass-2019.B1 the-eater
` (2 preceding siblings ...)
2020-05-14 10:14 ` the-eater
@ 2020-05-14 19:27 ` bra1nwave
2020-05-15 16:39 ` Chocimier
2020-05-15 16:39 ` [PR PATCH] [Closed]: " Chocimier
5 siblings, 0 replies; 7+ messages in thread
From: bra1nwave @ 2020-05-14 19:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 261 bytes --]
New comment by bra1nwave on void-packages repository
https://github.com/void-linux/void-packages/pull/21952#issuecomment-628841957
Comment:
I doubt that this PR will be merged. See the last comment here: https://github.com/void-linux/void-packages/pull/13393
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: New package: looking-glass-2019.B1
2020-05-14 9:25 [PR PATCH] New package: looking-glass-2019.B1 the-eater
` (3 preceding siblings ...)
2020-05-14 19:27 ` bra1nwave
@ 2020-05-15 16:39 ` Chocimier
2020-05-15 16:39 ` [PR PATCH] [Closed]: " Chocimier
5 siblings, 0 replies; 7+ messages in thread
From: Chocimier @ 2020-05-15 16:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
New comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/21952#issuecomment-629361193
Comment:
Patches are interesting, could you propose them upstream?
Closing as duplicate of #13393.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PR PATCH] [Closed]: New package: looking-glass-2019.B1
2020-05-14 9:25 [PR PATCH] New package: looking-glass-2019.B1 the-eater
` (4 preceding siblings ...)
2020-05-15 16:39 ` Chocimier
@ 2020-05-15 16:39 ` Chocimier
5 siblings, 0 replies; 7+ messages in thread
From: Chocimier @ 2020-05-15 16:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 168 bytes --]
There's a closed pull request on the void-packages repository
New package: looking-glass-2019.B1
https://github.com/void-linux/void-packages/pull/21952
Description:
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-05-15 16:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 9:25 [PR PATCH] New package: looking-glass-2019.B1 the-eater
2020-05-14 9:57 ` [PR PATCH] [Updated] " the-eater
2020-05-14 10:08 ` the-eater
2020-05-14 10:14 ` the-eater
2020-05-14 19:27 ` bra1nwave
2020-05-15 16:39 ` Chocimier
2020-05-15 16:39 ` [PR PATCH] [Closed]: " Chocimier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).