package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newLibucontext() (pkg.Artifact, string) {
	const (
		version  = "1.5.1"
		checksum = "mUgeyJknjMxT-5fORzz-rqhZfP3Y7EZGBhOwvhuX7MsF4Pk9wkuwtrLf5IML-jWu"
	)
	return t.NewPackage("libucontext", version, newFromGitHub(
		"kaniini/libucontext",
		"libucontext-"+version,
		checksum,
	), &PackageAttr{
		// uses source tree as scratch space
		Writable:    true,
		Chmod:       true,
		EnterSource: true,
	}, &MakeHelper{
		OmitDefaults:  true,
		SkipConfigure: true,
		InPlace:       true,
		Make: []string{
			"ARCH=" + linuxArch(),
		},
		Install: "make prefix=/system DESTDIR=/work install",
	}), version
}
func init() {
	artifactsM[Libucontext] = Metadata{
		f: Toolchain.newLibucontext,

		Name:        "libucontext",
		Description: "ucontext implementation featuring glibc-compatible ABI",
		Website:     "https://github.com/kaniini/libucontext/",

		ID: 17085,
	}
}
