package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newLibgd() (pkg.Artifact, string) {
	const (
		version  = "2.3.3"
		checksum = "8T-sh1_FJT9K9aajgxzh8ot6vWIF-xxjcKAHvTak9MgGUcsFfzP8cAvvv44u2r36"
	)
	return t.NewPackage("libgd", version, newFromGitHubRelease(
		"libgd/libgd",
		"gd-"+version,
		"libgd-"+version+".tar.gz", checksum,
		pkg.TarGzip,
	), &PackageAttr{
		Env: []string{
			"TMPDIR=/dev/shm/gd",
		},
		ScriptEarly: `
mkdir /dev/shm/gd
`,
	}, (*MakeHelper)(nil),
		Zlib,
	), version
}
func init() {
	artifactsM[Libgd] = Metadata{
		f: Toolchain.newLibgd,

		Name:        "libgd",
		Description: "an open source code library for the dynamic creation of images",
		Website:     "https://libgd.github.io/",

		Dependencies: P{
			Zlib,
		},

		ID: 880,
	}
}
