From e3e03aeb9f61ed87332d5ecb7258d5c5314840f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Audiger?= <31616285+jaudiger@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:22:36 +0200 Subject: [PATCH] feat: Add alsa-lib package (#78) * feat: Add alsa-lib package Signed-off-by: jaudiger * Update project name of also_lib Co-authored-by: Kyle Lacy --------- Signed-off-by: jaudiger Co-authored-by: Kyle Lacy --- packages/alsa_lib/brioche.lock | 3 +++ packages/alsa_lib/project.bri | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 packages/alsa_lib/brioche.lock create mode 100644 packages/alsa_lib/project.bri diff --git a/packages/alsa_lib/brioche.lock b/packages/alsa_lib/brioche.lock new file mode 100644 index 0000000..18a1e41 --- /dev/null +++ b/packages/alsa_lib/brioche.lock @@ -0,0 +1,3 @@ +{ + "dependencies": {} +} diff --git a/packages/alsa_lib/project.bri b/packages/alsa_lib/project.bri new file mode 100644 index 0000000..16ef223 --- /dev/null +++ b/packages/alsa_lib/project.bri @@ -0,0 +1,32 @@ +import * as std from "std"; + +export const project = { + name: "alsa_lib", + version: "1.2.12", +}; + +const source = std + .download({ + url: `https://www.alsa-project.org/files/pub/lib/alsa-lib-${project.version}.tar.bz2`, + hash: std.sha256Hash( + "4868cd908627279da5a634f468701625be8cc251d84262c7e5b6a218391ad0d2", + ), + }) + .unarchive("tar", "bzip2") + .peel(); + +export default (): std.Recipe => { + const alsaLib = std.runBash` + ./configure --prefix=/ + make install DESTDIR="$BRIOCHE_OUTPUT" + ` + .workDir(source) + .dependencies(std.toolchain()) + .toDirectory(); + + return std.setEnv(alsaLib, { + CPATH: { path: "include" }, + LIBRARY_PATH: { path: "lib" }, + PKG_CONFIG_PATH: { path: "lib/pkgconfig" }, + }); +};