From cf8f2cba5943a4e5822812ad1a4174bef8e05516 Mon Sep 17 00:00:00 2001 From: Daniel Martinez Date: Wed, 24 Apr 2024 22:32:37 -0400 Subject: [PATCH] New package: LACT-0.5.4 --- srcpkgs/LACT/files/lact/run | 3 +++ srcpkgs/LACT/patches/malloc_trim.patch | 17 +++++++++++++++ srcpkgs/LACT/template | 30 ++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100755 srcpkgs/LACT/files/lact/run create mode 100644 srcpkgs/LACT/patches/malloc_trim.patch create mode 100644 srcpkgs/LACT/template diff --git a/srcpkgs/LACT/files/lact/run b/srcpkgs/LACT/files/lact/run new file mode 100755 index 00000000000000..74e0a5ebbd8539 --- /dev/null +++ b/srcpkgs/LACT/files/lact/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec chpst -n -10 lact daemon diff --git a/srcpkgs/LACT/patches/malloc_trim.patch b/srcpkgs/LACT/patches/malloc_trim.patch new file mode 100644 index 00000000000000..020683ea3749a7 --- /dev/null +++ b/srcpkgs/LACT/patches/malloc_trim.patch @@ -0,0 +1,17 @@ +diff --git a/lact-daemon/src/server/handler.rs b/lact-daemon/src/server/handler.rs +index 93dc86c..0ef85fd 100644 +--- a/lact-daemon/src/server/handler.rs ++++ b/lact-daemon/src/server/handler.rs +@@ -107,12 +107,6 @@ impl<'a> Handler { + }; + handler.apply_current_config().await; + +- // Eagerly release memory +- // `load_controllers` allocates and deallocates the entire PCI ID database, +- // this tells the os to release it right away, lowering measured memory usage (the actual usage is low regardless as it was already deallocated) +- unsafe { +- libc::malloc_trim(0); +- } + + Ok(handler) + } diff --git a/srcpkgs/LACT/template b/srcpkgs/LACT/template new file mode 100644 index 00000000000000..a0ad54d7599a3e --- /dev/null +++ b/srcpkgs/LACT/template @@ -0,0 +1,30 @@ +# Template file for 'LACT' +pkgname=LACT +version=0.5.4 +revision=1 +# only builds on 64bit +archs="x86_64* aarch64*" +build_style=cargo +make_check_args="-- --skip app::root_stack::thermals_page::fan_curve_frame::tests::set_get_curve" +hostmakedepends="pkg-config blueprint-compiler gtk4-devel" +makedepends="gtk4-devel" +short_desc="Linux AMDGPU Control Application" +maintainer="Daniel Martinez " +license="MIT" +homepage="https://github.com/ilya-zlobintsev/LACT" +distfiles="https://github.com/ilya-zlobintsev/LACT/archive/refs/tags/v${version}.tar.gz" +checksum=ce55f19dab2cb3616b404fc53feb381ee1e10e948bed65c7c33dc3b361685891 + +do_install() { + + vsv lact + + vbin target/$RUST_TARGET/release/lact + + vinstall res/lactd.service 644 usr/lib/systemd/system/lactd.service + vinstall res/io.github.lact-linux.desktop 644 usr/share/applications/io.github.lact-linux.desktop + vinstall res/io.github.lact-linux.png 644 usr/share/pixmaps/io.github.lact-linux.png + vinstall res/io.github.lact-linux.svg 644 usr/share/icons/hicolor/scalable/apps/io.github.lact-linux.svg + + vlicense LICENSE +}