package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newElfutils() (pkg.Artifact, string) {
	const (
		version  = "0.195"
		checksum = "JrGnBD38w8Mj0ZxDw3fKlRBFcLvRKu8rcYnX35R9yTlUSYnzTazyLboG-a2CsJlu"
	)
	return t.NewPackage("elfutils", version, newTar(
		"https://sourceware.org/elfutils/ftp/"+
			version+"/elfutils-"+version+".tar.bz2",
		checksum,
		pkg.TarBzip2,
	), &PackageAttr{
		Env: []string{
			"CC=cc" +
				// nonstandard glibc extension
				" -DFNM_EXTMATCH=0",
		},
	}, &MakeHelper{
		// nonstandard glibc extension
		SkipCheck: true,

		Configure: []KV{
			{"enable-deterministic-archives"},
		},
	},
		M4,
		PkgConfig,

		Zlib,
		Bzip2,
		Zstd,
		ArgpStandalone,
		MuslFts,
		MuslObstack,
		KernelHeaders,
	), version
}
func init() {
	artifactsM[Elfutils] = Metadata{
		f: Toolchain.newElfutils,

		Name:        "elfutils",
		Description: "utilities and libraries to handle ELF files and DWARF data",
		Website:     "https://sourceware.org/elfutils/",

		Dependencies: P{
			Zlib,
			Bzip2,
			Zstd,
			MuslFts,
			MuslObstack,
		},

		ID: 5679,
	}
}
