From df9108d73b6d4acac9ebcba6aed73dfa9dd5efd0 Mon Sep 17 00:00:00 2001 From: Kenneth Dodrill Date: Tue, 5 Oct 2021 15:32:16 -0500 Subject: [PATCH] New package: TrenchBroom-2021.1 --- srcpkgs/TrenchBroom/files/README.voidlinux | 8 ++++ srcpkgs/TrenchBroom/template | 52 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 srcpkgs/TrenchBroom/files/README.voidlinux create mode 100644 srcpkgs/TrenchBroom/template diff --git a/srcpkgs/TrenchBroom/files/README.voidlinux b/srcpkgs/TrenchBroom/files/README.voidlinux new file mode 100644 index 000000000000..5f64c5654337 --- /dev/null +++ b/srcpkgs/TrenchBroom/files/README.voidlinux @@ -0,0 +1,8 @@ +TrenchBroom currently does not support wayland. +If you normally run QT applications using + + QT_QPA_PLATFORM=wayland + +you will need to run TrenchBroom like so: + + QT_QPA_PLATFORM=xcb trenchbroom diff --git a/srcpkgs/TrenchBroom/template b/srcpkgs/TrenchBroom/template new file mode 100644 index 000000000000..e52f9ca37fc3 --- /dev/null +++ b/srcpkgs/TrenchBroom/template @@ -0,0 +1,52 @@ +# Template file for 'TrenchBroom' +pkgname=TrenchBroom +version=2021.1 +revision=1 +wrksrc="${pkgname}-${version}" +build_style=cmake +hostmakedepends="git pandoc" +makedepends="qt5-devel qt5-svg-devel glew-devel MesaLib-devel libfreeglut-devel + glm libXxf86vm-devel freeimage-devel freetype-devel libxcb-devel" +short_desc="Cross-Platform Level Editor" +maintainer="Kenneth Dodrill " +license="GPL-3.0-or-later" +homepage="https://trenchbroom.github.io/" +_vecmath_rev=15a858e9fff8030e895d2974244053ada67d30bb +_Catch2_rev=7f21cc6c5599f59835f769debf13b4c3e6148a28 +_BinaryLibs_rev=bacae0b1b323bf99ea54055744e294d0fa085e53 +_fmt_rev=cc09f1a6798c085c325569ef466bcdcffdc266d4 +distfiles="https://github.com/TrenchBroom/TrenchBroom/archive/refs/tags/v${version}.tar.gz + https://github.com/TrenchBroom/vecmath/archive/${_vecmath_rev}.tar.gz + https://github.com/catchorg/Catch2/archive/${_Catch2_rev}.tar.gz + https://github.com/TrenchBroom/BinaryLibs/archive/${_BinaryLibs_rev}.tar.gz + https://github.com/fmtlib/fmt/archive/${_fmt_rev}.tar.gz" +checksum="6b7fe4b906ecdb67ff52a70aeafaaf39c1fb6f64891f863483ee3fa5316ea7e6 + f4b7475b8c1ad3b9bde90ad7b2629b3c893ee193f6dfaab1f156d3f290f0e419 + 3c5a0147726e891d740a3f9de805e1d2f4fae57fbec4fbfb4d26fd9560e2604d + 20e5f96c7b8d4295c81b0641f2c2b0a66801d1c09ac708177cf74ab30a94fceb + f0da66d8f5949d78a6972f7f884310797b2dc422835a12fd3634697ec8c25acf" + +# Allows headless builds, otherwise receive an xcb error. +export QT_QPA_PLATFORM=offscreen + +pre_configure() { + rmdir lib/vecmath + rmdir lib/Catch2 + rmdir lib/BinaryLibs + rmdir lib/fmt + + mv ../vecmath-${_vecmath_rev} lib/vecmath + mv ../Catch2-${_Catch2_rev} lib/Catch2 + mv ../BinaryLibs-${_BinaryLibs_rev} lib/BinaryLibs + mv ../fmt-${_fmt_rev} lib/fmt +} + +post_install() { + vinstall app/resources/linux/trenchbroom.desktop 644 usr/share/applications + + for size in 8 16 22 24 32 36 42 48 64 72 96 128 192 256 512; do + vinstall app/resources/linux/icons/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ trenchbroom.png + done + + vdoc "${FILESDIR}/README.voidlinux" +}