From 12094cbd728f5bd89bc993397f9cbb45cc04e065 Mon Sep 17 00:00:00 2001 From: Krul Ceter Date: Wed, 16 Nov 2022 01:36:02 +0300 Subject: [PATCH] glslViewer: update to 3.0.7. --- srcpkgs/glslViewer/patches/liblo.patch | 33 ++++++++++++++++++++++ srcpkgs/glslViewer/template | 38 ++++++++++++++++---------- 2 files changed, 56 insertions(+), 15 deletions(-) create mode 100644 srcpkgs/glslViewer/patches/liblo.patch diff --git a/srcpkgs/glslViewer/patches/liblo.patch b/srcpkgs/glslViewer/patches/liblo.patch new file mode 100644 index 000000000000..251b70217a68 --- /dev/null +++ b/srcpkgs/glslViewer/patches/liblo.patch @@ -0,0 +1,33 @@ +--- a/glslViewer/CMakeLists.txt ++++ b/glslViewer/CMakeLists.txt +@@ -31,7 +31,10 @@ + + add_executable(glslViewer ${ROOT_SOURCE}) + +-include_directories(deps/liblo) ++include(FindPkgConfig) ++pkg_search_module(LIBLO REQUIRED liblo>=0.31) ++include_directories(glslViewer PRIVATE ${LIBLO_INCLUDE_DIRS}) ++target_link_libraries(glslViewer PRIVATE ${LIBLO_LIBRARIES}) + target_include_directories(glslViewer PRIVATE deps) + target_link_libraries(glslViewer PRIVATE vera) + target_compile_definitions(glslViewer PRIVATE GLSLVIEWER_VERSION_MAJOR=${VERSION_MAJOR}) +@@ -151,7 +154,7 @@ + set(CPACK_GENERATOR "ZIP") + + else() +- target_link_libraries(glslViewer PRIVATE pthread dl lo_static) ++ target_link_libraries(glslViewer PRIVATE pthread dl) + install(TARGETS glslViewer DESTINATION bin) + + if (NOT APPLE) +--- a/glslViewer/deps/CMakeLists.txt ++++ b/glslViewer/deps/CMakeLists.txt +@@ -1,6 +1,2 @@ + ## Ada + add_subdirectory(vera) +- +-if (NOT EMSCRIPTEN) +- add_subdirectory(liblo/cmake) +-endif() +\ No newline at end of file diff --git a/srcpkgs/glslViewer/template b/srcpkgs/glslViewer/template index 8a5c942dbf4e..a8c2448cc7f4 100644 --- a/srcpkgs/glslViewer/template +++ b/srcpkgs/glslViewer/template @@ -1,31 +1,39 @@ # Template file for 'glslViewer' pkgname=glslViewer -version=1.6.8 +version=3.0.7 revision=1 -build_style=gnu-makefile -make_use_env=yes +_vera_gitrev="a3538e06ecbfe0694e2a64fc51ce6c4ee018a9a0" +build_wrksrc=${pkgname} +build_style=cmake hostmakedepends="pkg-config" 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" + libXrender-devel libXdamage-devel ncurses-devel liblo-devel" short_desc="Live GLSL coding render" maintainer="Orphaned " license="BSD-3-Clause" homepage="http://patriciogonzalezvivo.com/2015/glslViewer/" -distfiles="https://github.com/patriciogonzalezvivo/glslViewer/archive/${version}.tar.gz" -checksum=3792984457c9487cd1f87374b7698f3b66f4480b3eeac7d940a2ecf9e74dee3e +distfiles="https://github.com/patriciogonzalezvivo/glslViewer/archive/${version}.tar.gz + https://github.com/patriciogonzalezvivo/vera/archive/${_vera_gitrev}.tar.gz" +checksum="4d8bac6a801fa61b81e472a8dabfe5469a43c44547d558849a078ed2c26c8034 + a71f149e84afdf12aa88555efef09d0e420c5d5c6ba9c2d67126ecc49fddaff0" -pre_build() { - # can obscure real errors - vsed -e 's|-fpermissive||g' \ - -e 's|^CXX =.*||g' \ - -i Makefile +if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then + makedepends+=" libatomic-devel" +fi - vsed -e '/window = glfwCreateWindow/i glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);' \ - -i src/window.cpp +post_extract() { + mv ${pkgname}-${version} ${build_wrksrc} + mv vera-${_vera_gitrev}/* ${build_wrksrc}/deps/vera } -do_install() { - vbin bin/glslViewer +pre_configure() { + if [ -z "$XBPS_TARGET_NO_ATOMIC8" ]; then + vsed -e '/target_link_libraries(glslViewer PRIVATE atomic)/d' \ + -i ${build_wrksrc}/CMakeLists.txt + fi +} + +post_install() { vlicense LICENSE }