diff --git a/internal/rosa/lm-sensors.go b/internal/rosa/lm-sensors.go deleted file mode 100644 index 6818f9f5..00000000 --- a/internal/rosa/lm-sensors.go +++ /dev/null @@ -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, - }) -} diff --git a/internal/rosa/mesa.go b/internal/rosa/mesa.go index 94cb120a..a2bd91fa 100644 --- a/internal/rosa/mesa.go +++ b/internal/rosa/mesa.go @@ -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" diff --git a/internal/rosa/package/libdrm.az b/internal/rosa/package/libdrm.az new file mode 100644 index 00000000..59499d6a --- /dev/null +++ b/internal/rosa/package/libdrm.az @@ -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 ]; +} diff --git a/internal/rosa/package/libglvnd.az b/internal/rosa/package/libglvnd.az new file mode 100644 index 00000000..b409837b --- /dev/null +++ b/internal/rosa/package/libglvnd.az @@ -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 ]; +} diff --git a/internal/rosa/package/libva.az b/internal/rosa/package/libva.az new file mode 100644 index 00000000..552423d2 --- /dev/null +++ b/internal/rosa/package/libva.az @@ -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, + ]; +} diff --git a/internal/rosa/package/lm_sensors.az b/internal/rosa/package/lm_sensors.az new file mode 100644 index 00000000..25765406 --- /dev/null +++ b/internal/rosa/package/lm_sensors.az @@ -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, + ]; +} diff --git a/internal/rosa/state_native.go b/internal/rosa/state_native.go index 1355ef10..8b8d2b1b 100644 --- a/internal/rosa/state_native.go +++ b/internal/rosa/state_native.go @@ -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")