Skip to content

Commit

Permalink
user/wpaperd: fix char and jemalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
nekopsykose committed Nov 22, 2024
1 parent 06827b7 commit ded5039
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 1 deletion.
13 changes: 13 additions & 0 deletions user/wpaperd/patches/char.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/daemon/src/render/shader.rs b/daemon/src/render/shader.rs
index cc8e609..c2a0428 100644
--- a/daemon/src/render/shader.rs
+++ b/daemon/src/render/shader.rs
@@ -12,7 +12,7 @@ use super::gl;
pub unsafe fn create_shader(
gl: &gl::Gl,
shader: gl::types::GLenum,
- sources: &[*const i8],
+ sources: &[*const std::ffi::c_char],
) -> Result<gl::types::GLuint> {
let shader = gl.CreateShader(shader);
gl_check!(gl, "calling CreateShader");
67 changes: 67 additions & 0 deletions user/wpaperd/patches/no-jemalloc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
diff --git a/Cargo.lock b/Cargo.lock
index c709113..41445b1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1822,26 +1822,6 @@ dependencies = [
"weezl",
]

-[[package]]
-name = "tikv-jemalloc-sys"
-version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d"
-dependencies = [
- "cc",
- "libc",
-]
-
-[[package]]
-name = "tikv-jemallocator"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4cec5ff18518d81584f477e9bfdf957f5bb0979b0bac3af4ca30b5b3ae2d2865"
-dependencies = [
- "libc",
- "tikv-jemalloc-sys",
-]
-
[[package]]
name = "toml"
version = "0.8.19"
@@ -2328,7 +2308,6 @@ dependencies = [
"serde",
"serde_json",
"smithay-client-toolkit",
- "tikv-jemallocator",
"toml",
"walkdir",
"wayland-egl",
diff --git a/daemon/Cargo.toml b/daemon/Cargo.toml
index 96f7955..e244624 100644
--- a/daemon/Cargo.toml
+++ b/daemon/Cargo.toml
@@ -36,7 +36,6 @@ serde_json = "1.0.133"
wayland-egl = "0.32.4"
khronos-egl = { version = "6.0.0", features = [ "static" ] }
format-bytes = "0.3.0"
-tikv-jemallocator = "0.6.0"
ctrlc = { version = "3.4.5", features = ["termination"] }

[build-dependencies]
diff --git a/daemon/src/main.rs b/daemon/src/main.rs
index e26cdc6..5b60b11 100644
--- a/daemon/src/main.rs
+++ b/daemon/src/main.rs
@@ -54,11 +54,6 @@ use xdg::BaseDirectories;

use crate::wpaperd::Wpaperd;

-use tikv_jemallocator::Jemalloc;
-
-#[global_allocator]
-static GLOBAL: Jemalloc = Jemalloc;
-
fn run(opts: Opts, xdg_dirs: BaseDirectories) -> Result<()> {
// Path passed from the CLI or the wpaperd.toml file has precedence
let config_file = if let Some(config) = opts.config {
2 changes: 1 addition & 1 deletion user/wpaperd/template.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname = "wpaperd"
pkgver = "1.1.0"
pkgrel = 0
pkgrel = 1
build_style = "cargo"
make_build_args = ["--features", "avif"]
make_check_args = [*make_build_args]
Expand Down

0 comments on commit ded5039

Please sign in to comment.