internal/rosa/package: migrate mesa dependencies
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m42s
Test / Hakurei (push) Successful in 3m48s
Test / ShareFS (push) Successful in 3m44s
Test / Sandbox (race detector) (push) Successful in 5m23s
Test / Hakurei (race detector) (push) Successful in 6m29s
Test / Flake checks (push) Successful in 1m20s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-20 03:51:48 +09:00
parent ef414ab01a
commit d728607505
7 changed files with 151 additions and 178 deletions

View File

@@ -1,57 +0,0 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newLMSensors() (pkg.Artifact, string) {
const (
version = "3-6-2"
checksum = "7JYNutrihe-FP6r3ftf96uFZJJWPfxnBHL0ALSMA-vovaXVRr-sAjlLitw7WWpCI"
)
return t.NewPackage("lm_sensors", version, newFromGitHub(
"lm-sensors/lm-sensors",
"V"+version,
checksum,
), &PackageAttr{
Writable: true,
Chmod: true,
EnterSource: true,
ScriptEarly: `
ln -s \
../../system/bin/perl \
/usr/bin/
`,
}, &MakeHelper{
InPlace: true,
SkipConfigure: true,
Make: []string{
"CC=cc",
"ETCDIR=/system/etc",
"PREFIX=/system",
},
Check: []string{
"CC=cc",
"check",
},
Install: "make DESTDIR=/work PREFIX=/system install",
},
Perl,
PerlTestCmd,
M4,
Bison,
Flex,
), version
}
func init() {
native.mustRegister(Toolchain.newLMSensors, &Metadata{
Name: "lm_sensors",
Description: "user-space support for hardware monitoring drivers",
Website: "https://hwmon.wiki.kernel.org/lm_sensors",
ID: 1831,
})
}

View File

@@ -6,123 +6,6 @@ import (
"hakurei.app/internal/pkg"
)
func (t Toolchain) newLibglvnd() (pkg.Artifact, string) {
const (
version = "1.7.0"
checksum = "eIQJK2sgFQDHdeFkQO87TrSUaZRFG4y2DrwA8Ut-sGboI59uw1OOiIVqq2AIwnGY"
)
return t.NewPackage("libglvnd", version, newFromGitLab(
"gitlab.freedesktop.org",
"glvnd/libglvnd",
"v"+version,
checksum,
), nil, &MesonHelper{
Setup: []KV{
{"Dx11", "enabled"},
{"Dglx", "enabled"},
},
ScriptCompiled: `
export DISPLAY=':0'
Xvfb &
XVFB_PID="$!"
trap 'kill $XVFB_PID && wait $XVFB_PID' EXIT
`,
},
Binutils, // symbols check fail with llvm nm
Xserver, // test suite wants X server
LibXext,
), version
}
func init() {
native.mustRegister(Toolchain.newLibglvnd, &Metadata{
Name: "libglvnd",
Description: "The GL Vendor-Neutral Dispatch library",
Website: "https://gitlab.freedesktop.org/glvnd/libglvnd",
Dependencies: P{
LibXext,
},
ID: 12098,
})
}
func (t Toolchain) newLibdrm() (pkg.Artifact, string) {
const (
version = "2.4.133"
checksum = "bfj296NcR9DndO11hqDbSRFPqaweSLMqRk3dlCPZpM6FONX1WZ9J4JdbTDMUd1rU"
)
return t.NewPackage("libdrm", version, newFromGitLab(
"gitlab.freedesktop.org",
"mesa/libdrm",
"libdrm-"+version,
checksum,
), nil, &MesonHelper{
Setup: []KV{
{"Dintel", "enabled"},
},
},
Binutils, // symbols check fail with llvm nm
Libpciaccess,
KernelHeaders,
), version
}
func init() {
native.mustRegister(Toolchain.newLibdrm, &Metadata{
Name: "libdrm",
Description: "a userspace library for accessing the DRM",
Website: "https://dri.freedesktop.org/",
Dependencies: P{
Libpciaccess,
},
ID: 1596,
})
}
func (t Toolchain) newLibva() (pkg.Artifact, string) {
const (
version = "2.23.0"
checksum = "UmF5tPyWIG_w5kiR3KFpoYbF7UUcaak5tyc-RhOheNTwQlLkPlifreFYCM9FQxbq"
)
return t.NewPackage("libva", version, newFromGitHub(
"intel/libva",
version,
checksum,
), nil, &MesonHelper{
Setup: []KV{
{"Dwith_x11", "yes"},
{"Dwith_glx", "yes"},
{"Dwith_wayland", "yes"},
},
},
Libdrm,
LibXfixes,
Libglvnd,
Wayland,
KernelHeaders,
), version
}
func init() {
native.mustRegister(Toolchain.newLibva, &Metadata{
Name: "libva",
Description: "an implementation for VA-API (Video Acceleration API)",
Website: "https://01.org/vaapi",
Dependencies: P{
Libdrm,
LibXfixes,
Libglvnd,
Wayland,
},
ID: 1752,
})
}
func (t Toolchain) newMesa() (pkg.Artifact, string) {
const (
version = "26.1.0"

View File

@@ -0,0 +1,29 @@
package libdrm {
description = "a userspace library for accessing the DRM";
website = "https://dri.freedesktop.org";
anitya = 1596;
version* = "2.4.133";
source = remoteGitLab {
domain = "gitlab.freedesktop.org";
suffix = "mesa/libdrm";
ref = "libdrm-"+version;
checksum = "bfj296NcR9DndO11hqDbSRFPqaweSLMqRk3dlCPZpM6FONX1WZ9J4JdbTDMUd1rU";
};
exec = meson {
setup = {
"Dintel": "enabled";
};
};
inputs = [
// symbols check fail with llvm nm
binutils,
libpciaccess,
kernel-headers,
];
runtime = [ libpciaccess ];
}

View File

@@ -0,0 +1,38 @@
package libglvnd {
description = "The GL Vendor-Neutral Dispatch library";
website = "https://gitlab.freedesktop.org/glvnd/libglvnd";
anitya = 12098;
version* = "1.7.0";
source = remoteGitLab {
domain = "gitlab.freedesktop.org";
suffix = "glvnd/libglvnd";
ref = "v"+version;
checksum = "eIQJK2sgFQDHdeFkQO87TrSUaZRFG4y2DrwA8Ut-sGboI59uw1OOiIVqq2AIwnGY";
};
exec = meson {
setup = {
"Dx11": "enabled";
"Dglx": "enabled";
};
postCompile = `
export DISPLAY=':0'
Xvfb &
XVFB_PID="$!"
trap 'kill $XVFB_PID && wait $XVFB_PID' EXIT
`;
};
inputs = [
// symbols check fail with llvm nm
binutils,
// test suite wants X server
xserver,
libXext,
];
runtime = [ libXext ];
}

View File

@@ -0,0 +1,35 @@
package libva {
description = "an implementation for VA-API (Video Acceleration API)";
website = "https://01.org/vaapi";
anitya = 1752;
version* = "2.23.0";
source = remoteGitHub {
suffix = "intel/libva";
tag = version;
checksum = "UmF5tPyWIG_w5kiR3KFpoYbF7UUcaak5tyc-RhOheNTwQlLkPlifreFYCM9FQxbq";
};
exec = meson {
setup = {
"Dwith_x11": "yes";
"Dwith_glx": "yes";
"Dwith_wayland": "yes";
};
};
inputs = [
libdrm,
libXfixes,
libglvnd,
wayland,
kernel-headers,
];
runtime = [
libdrm,
libXfixes,
libglvnd,
wayland,
];
}

View File

@@ -0,0 +1,49 @@
package lm_sensors {
description = "user-space support for hardware monitoring drivers";
website = "https://hwmon.wiki.kernel.org/lm_sensors";
anitya = 1831;
version* = "3-6-2";
source = remoteGitHub {
suffix = "lm-sensors/lm-sensors";
tag = "V"+version;
checksum = "7JYNutrihe-FP6r3ftf96uFZJJWPfxnBHL0ALSMA-vovaXVRr-sAjlLitw7WWpCI";
};
writable = true;
chmod = true;
enterSource = true;
early = `
ln -s \
../../system/bin/perl \
/usr/bin/
`;
exec = make {
inPlace = true;
skipConfigure = true;
make = [
"CC=cc",
"ETCDIR=/system/etc",
"PREFIX=/system",
];
check = [
"CC=cc",
"check",
];
install = "make DESTDIR=/work PREFIX=/system install";
};
inputs = [
perl,
perl-Test-Cmd,
m4,
bison,
flex,
];
}

View File

@@ -9,7 +9,6 @@ var (
ACL = H("acl")
Automake = H("automake")
Bash = H("bash")
Binutils = H("binutils")
Bison = H("bison")
Bzip2 = H("bzip2")
Coreutils = H("coreutils")
@@ -37,7 +36,6 @@ var (
LibXau = H("libXau")
LibXdmcp = H("libXdmcp")
LibXext = H("libXext")
LibXfixes = H("libXfixes")
LibXfont2 = H("libXfont2")
LibXrandr = H("libXrandr")
LibXrender = H("libXrender")
@@ -80,7 +78,6 @@ var (
Nettle = H("nettle")
OpenSSL = H("openssl")
Patch = H("patch")
PerlTestCmd = H("perl-Test-Cmd")
Pixman = H("pixman")
PkgConfig = H("pkg-config")
PythonMako = H("python-mako")
@@ -105,7 +102,6 @@ var (
Xkbcomp = H("xkbcomp")
XkeyboardConfig = H("xkeyboard-config")
XorgProto = H("xorgproto")
Xserver = H("xserver")
Zlib = H("zlib")
Zstd = H("zstd")
stage0Dist = H("stage0-dist")