From 629fe86e38e88e360879b85d6e481ee6d71a1c62 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Wed, 20 Feb 2019 04:24:33 -0300 Subject: [PATCH] New package: glslViewer-1.5.5 closes #2307 --- .../patches/floating_workaround.patch | 15 +++++++++ srcpkgs/glslViewer/template | 32 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 srcpkgs/glslViewer/patches/floating_workaround.patch create mode 100644 srcpkgs/glslViewer/template diff --git a/srcpkgs/glslViewer/patches/floating_workaround.patch b/srcpkgs/glslViewer/patches/floating_workaround.patch new file mode 100644 index 0000000000..678a8bd534 --- /dev/null +++ b/srcpkgs/glslViewer/patches/floating_workaround.patch @@ -0,0 +1,15 @@ +diff --git a/src/window.cpp b/src/window.cpp +index 66cf765..fc8f44c 100644 +--- src/window.cpp ++++ src/window.cpp +@@ -204,6 +204,9 @@ void initGL (glm::ivec4 &_viewport, bool _headless, bool _alwaysOnTop) { + glfwWindowHint(GLFW_FLOATING, GL_TRUE); + } + ++ // Make it float ++ glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); ++ + window = glfwCreateWindow(_viewport.z, _viewport.w, appTitle.c_str(), NULL, NULL); + + if(!window) { + diff --git a/srcpkgs/glslViewer/template b/srcpkgs/glslViewer/template new file mode 100644 index 0000000000..9a35808090 --- /dev/null +++ b/srcpkgs/glslViewer/template @@ -0,0 +1,32 @@ +# Template file for 'glslViewer' +pkgname=glslViewer +version=1.5.5 +revision=1 +build_style=gnu-makefile +make_use_env=yes +hostmakedepends="pkgconf" +makedepends="glfw-devel glu-devel MesaLib-devel libX11-devel libXrandr-devel + libXi-devel libXxf86vm-devel libXcursor-devel libXinerama-devel libXext-devel + libXrender-devel libXdamage-devel" +short_desc="Live GLSL coding render" +maintainer="maxice8 " +license="BSD-3-Clause" +homepage="http://patriciogonzalezvivo.com/2015/glslViewer/" +distfiles="https://github.com/patriciogonzalezvivo/glslViewer/archive/${version}.tar.gz" +checksum=28a784d701294fd335031ab293c5f4764a498f84714b1ae677dbc4e05ed94b23 + +case "$XBPS_TARGET_MACHINE" in + *-musl) broken="Requires lots -D_GNU_SOURCE=1 and #include " ;; +esac + +pre_build() { + # can obscure real errors + vsed -e 's|-fpermissive||g' \ + -e 's|^CXX =.*||g' \ + -i Makefile +} + +do_install() { + vbin bin/glslViewer + vlicense LICENSE +}