diff --git a/internal/rosa/dbus.go b/internal/rosa/dbus.go deleted file mode 100644 index 485bc422..00000000 --- a/internal/rosa/dbus.go +++ /dev/null @@ -1,77 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newDBus() (pkg.Artifact, string) { - const ( - version = "1.16.2" - checksum = "INwOuNdrDG7XW5ilW_vn8JSxEa444rRNc5ho97i84I1CNF09OmcFcV-gzbF4uCyg" - ) - return t.NewPackage("dbus", version, newFromGitLab( - "gitlab.freedesktop.org", - "dbus/dbus", - "dbus-"+version, - checksum, - ), &PackageAttr{ - // OSError: [Errno 30] Read-only file system: '/usr/src/dbus/subprojects/packagecache' - Writable: true, - // PermissionError: [Errno 13] Permission denied: '/usr/src/dbus/subprojects/packagecache' - Chmod: true, - }, &MesonHelper{ - Setup: []KV{ - {"Depoll", "enabled"}, - {"Dinotify", "enabled"}, - {"Dx11_autolaunch", "disabled"}, - }, - }, - GLib, - Libexpat, - ), version -} -func init() { - native.mustRegister(Toolchain.newDBus, &Metadata{ - Name: "dbus", - Description: "a message bus system", - Website: "https://www.freedesktop.org/wiki/Software/dbus/", - - Dependencies: P{ - GLib, - Libexpat, - }, - - ID: 5356, - }) -} - -func (t Toolchain) newXDGDBusProxy() (pkg.Artifact, string) { - const ( - version = "0.1.7" - checksum = "UW5Pe-TP-XAaN-kTbxrkOQ7eYdmlAQlr2pdreLtPT0uwdAz-7rzDP8V_8PWuZBup" - ) - return t.NewPackage("xdg-dbus-proxy", version, newFromGitHub( - "flatpak/xdg-dbus-proxy", - version, - checksum, - ), nil, &MesonHelper{ - Setup: []KV{ - {"Dman", "disabled"}, - }, - }, - DBus, - - GLib, - ), version -} -func init() { - native.mustRegister(Toolchain.newXDGDBusProxy, &Metadata{ - Name: "xdg-dbus-proxy", - Description: "a filtering proxy for D-Bus connections", - Website: "https://github.com/flatpak/xdg-dbus-proxy", - - Dependencies: P{ - GLib, - }, - - ID: 58434, - }) -} diff --git a/internal/rosa/package/dbus.az b/internal/rosa/package/dbus.az new file mode 100644 index 00000000..b3e3025e --- /dev/null +++ b/internal/rosa/package/dbus.az @@ -0,0 +1,63 @@ +package dbus { + description = "a message bus system"; + website = "https://www.freedesktop.org/wiki/Software/dbus"; + anitya = 5356; + + version* = "1.16.2"; + source = remoteGitLab { + domain = "gitlab.freedesktop.org"; + suffix = "dbus/dbus"; + ref = "dbus-"+version; + checksum = "INwOuNdrDG7XW5ilW_vn8JSxEa444rRNc5ho97i84I1CNF09OmcFcV-gzbF4uCyg"; + }; + + // OSError: [Errno 30] Read-only file system: '/usr/src/dbus/subprojects/packagecache' + writable = true; + + // PermissionError: [Errno 13] Permission denied: '/usr/src/dbus/subprojects/packagecache' + chmod = true; + + exec = meson { + setup = { + "Depoll": "enabled"; + "Dinotify": "enabled"; + "Dx11_autolaunch": "disabled"; + }; + }; + + inputs = [ + glib, + libexpat, + ]; + + runtime = [ + glib, + libexpat, + ]; +} + +package xdg-dbus-proxy { + description = "a filtering proxy for D-Bus connections"; + website = "https://github.com/flatpak/xdg-dbus-proxy"; + anitya = 58434; + + version* = "0.1.7"; + source = remoteGitHub { + suffix = "flatpak/xdg-dbus-proxy"; + tag = version; + checksum = "UW5Pe-TP-XAaN-kTbxrkOQ7eYdmlAQlr2pdreLtPT0uwdAz-7rzDP8V_8PWuZBup"; + }; + + exec = meson { + setup = { + "Dman": "disabled"; + }; + }; + + inputs = [ + dbus, + glib, + ]; + + runtime = [ glib ]; +} diff --git a/internal/rosa/state.go b/internal/rosa/state.go index cdda2127..11415daf 100644 --- a/internal/rosa/state.go +++ b/internal/rosa/state.go @@ -674,6 +674,24 @@ func (s *S) getFrame() azalea.Frame { return }}, + k("meson"): {F: func( + args azalea.FArgs, + ) (v any, set bool, err error) { + var attr MesonHelper + if err = args.Apply(map[unique.Handle[azalea.Ident]]any{ + k("preCompile"): &attr.ScriptCompileEarly, + k("postCompile"): &attr.ScriptCompiled, + k("postInstall"): &attr.Script, + k("setup"): &attr.Setup, + k("skipTest"): &attr.SkipTest, + }); err != nil { + return + } + v = &attr + set = true + return + }}, + k("makeMaker"): {F: func( args azalea.FArgs, ) (v any, set bool, err error) {