1
0
forked from rosa/hakurei

internal/rosa: export source kind

This is set for an exported field, so export the constants as well.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-17 20:09:44 +09:00
parent 420c721c7d
commit 20ebddd9bf
5 changed files with 7 additions and 7 deletions

View File

@@ -635,7 +635,7 @@ func (t Toolchain) newFindutils() (pkg.Artifact, string) {
nil, "https://ftpmirror.gnu.org/gnu/findutils/findutils-"+version+".tar.xz", nil, "https://ftpmirror.gnu.org/gnu/findutils/findutils-"+version+".tar.xz",
mustDecode(checksum), mustDecode(checksum),
), &PackageAttr{ ), &PackageAttr{
SourceKind: sourceTarXZ, SourceKind: SourceKindTarXZ,
ScriptEarly: ` ScriptEarly: `
echo '#!/bin/sh' > gnulib-tests/test-c32ispunct.sh echo '#!/bin/sh' > gnulib-tests/test-c32ispunct.sh
echo 'int main(){return 0;}' > tests/xargs/test-sigusr.c echo 'int main(){return 0;}' > tests/xargs/test-sigusr.c

View File

@@ -18,7 +18,7 @@ func (t Toolchain) newGLib() (pkg.Artifact, string) {
"/glib-"+version+".tar.xz", "/glib-"+version+".tar.xz",
mustDecode(checksum), mustDecode(checksum),
), &PackageAttr{ ), &PackageAttr{
SourceKind: sourceTarXZ, SourceKind: SourceKindTarXZ,
Paths: []pkg.ExecPath{ Paths: []pkg.ExecPath{
pkg.Path(fhs.AbsEtc.Append( pkg.Path(fhs.AbsEtc.Append(

View File

@@ -17,7 +17,7 @@ func (t Toolchain) newLibxml2() (pkg.Artifact, string) {
"/libxml2-"+version+".tar.xz", "/libxml2-"+version+".tar.xz",
mustDecode(checksum), mustDecode(checksum),
), &PackageAttr{ ), &PackageAttr{
SourceKind: sourceTarXZ, SourceKind: SourceKindTarXZ,
}, (*MakeHelper)(nil), }, (*MakeHelper)(nil),
Diffutils, Diffutils,
XZ, XZ,

View File

@@ -17,7 +17,7 @@ func (t Toolchain) newLibxslt() (pkg.Artifact, string) {
"/libxslt-"+version+".tar.xz", "/libxslt-"+version+".tar.xz",
mustDecode(checksum), mustDecode(checksum),
), &PackageAttr{ ), &PackageAttr{
SourceKind: sourceTarXZ, SourceKind: SourceKindTarXZ,
}, &MakeHelper{ }, &MakeHelper{
// python libxml2 cyclic dependency // python libxml2 cyclic dependency
SkipCheck: true, SkipCheck: true,

View File

@@ -426,8 +426,8 @@ type Helper interface {
} }
const ( const (
// sourceTarXZ denotes a source tarball to be decompressed using [XZ]. // SourceKindTarXZ denotes a source tarball to be decompressed using [XZ].
sourceTarXZ = 1 + iota SourceKindTarXZ = 1 + iota
) )
// PackageAttr holds build-system-agnostic attributes. // PackageAttr holds build-system-agnostic attributes.
@@ -546,7 +546,7 @@ func (t Toolchain) NewPackage(
var sourceSuffix string var sourceSuffix string
switch attr.SourceKind { switch attr.SourceKind {
case sourceTarXZ: case SourceKindTarXZ:
sourceSuffix = ".tar.xz" sourceSuffix = ".tar.xz"
scriptEarly += ` scriptEarly += `
tar -C /usr/src/ -xf '/usr/src/` + name + `.tar.xz' tar -C /usr/src/ -xf '/usr/src/` + name + `.tar.xz'