internal/rosa/package: migrate argp-standalone, dtc, elfutils, flex, freetype, fuse
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m44s
Test / ShareFS (push) Successful in 3m41s
Test / Hakurei (push) Successful in 3m51s
Test / Sandbox (race detector) (push) Successful in 5m19s
Test / Hakurei (race detector) (push) Successful in 6m28s
Test / Flake checks (push) Successful in 1m22s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-19 23:26:34 +09:00
parent c0593e8325
commit 98d915af3d
12 changed files with 173 additions and 228 deletions

View File

@@ -1,34 +0,0 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newArgpStandalone() (pkg.Artifact, string) {
const (
version = "1.3"
checksum = "vtW0VyO2pJ-hPyYmDI2zwSLS8QL0sPAUKC1t3zNYbwN2TmsaE-fADhaVtNd3eNFl"
)
return t.NewPackage("argp-standalone", version, newTar(
"http://www.lysator.liu.se/~nisse/misc/"+
"argp-standalone-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), &PackageAttr{
Env: []string{
"CC=cc -std=gnu89 -fPIC",
},
}, &MakeHelper{
Install: `
install -D -m644 /usr/src/argp-standalone/argp.h /work/system/include/argp.h
install -D -m755 libargp.a /work/system/lib/libargp.a
`,
},
Diffutils,
), version
}
func init() {
native.mustRegister(Toolchain.newArgpStandalone, &Metadata{
Name: "argp-standalone",
Description: "hierarchical argument parsing library broken out from glibc",
Website: "http://www.lysator.liu.se/~nisse/misc/",
})
}

View File

@@ -1,41 +0,0 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newDTC() (pkg.Artifact, string) {
const (
version = "1.7.2"
checksum = "vUoiRynPyYRexTpS6USweT5p4SVHvvVJs8uqFkkVD-YnFjwf6v3elQ0-Etrh00Dt"
)
return t.NewPackage("dtc", version, newTar(
"https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/"+
"dtc-v"+version+".tar.gz",
checksum,
pkg.TarGzip,
), &PackageAttr{
// works around buggy test:
// fdtdump-runtest.sh /usr/src/dtc/tests/fdtdump.dts
Writable: true,
Chmod: true,
}, &MesonHelper{
Setup: []KV{
{"Dyaml", "disabled"},
{"Dstatic-build", "true"},
},
},
Flex,
Bison,
M4,
Coreutils,
Diffutils,
), version
}
func init() {
native.mustRegister(Toolchain.newDTC, &Metadata{
Name: "dtc",
Description: "The Device Tree Compiler",
Website: "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/",
ID: 16911,
})
}

View File

@@ -1,57 +0,0 @@
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() {
native.mustRegister(Toolchain.newElfutils, &Metadata{
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,
})
}

View File

@@ -1,30 +0,0 @@
package rosa
import (
"hakurei.app/internal/pkg"
)
func (t Toolchain) newFlex() (pkg.Artifact, string) {
const (
version = "2.6.4"
checksum = "p9POjQU7VhgOf3x5iFro8fjhy0NOanvA7CTeuWS_veSNgCixIJshTrWVkc5XLZkB"
)
return t.NewPackage("flex", version, newFromGitHubRelease(
"westes/flex",
"v"+version,
"flex-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
M4,
), version
}
func init() {
native.mustRegister(Toolchain.newFlex, &Metadata{
Name: "flex",
Description: "scanner generator for lexing in C and C++",
Website: "https://github.com/westes/flex/",
ID: 819,
})
}

View File

@@ -1,25 +0,0 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newFreetype() (pkg.Artifact, string) {
const (
version = "2.14.3"
checksum = "-WfLv8fVJNyCHpP_lriiDzOcVbBL9ajdQ3tl8AzIIUa9-8sVpU9irxOmSMgRHWYz"
)
return t.NewPackage("freetype", version, newTar(
"https://download.savannah.gnu.org/releases/freetype/"+
"freetype-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil)), version
}
func init() {
native.mustRegister(Toolchain.newFreetype, &Metadata{
Name: "freetype",
Description: "a freely available software library to render fonts",
Website: "http://www.freetype.org/",
ID: 854,
})
}

View File

@@ -1,41 +0,0 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newFuse() (pkg.Artifact, string) {
const (
version = "3.18.2"
checksum = "iL-7b7eUtmlVSf5cSq0dzow3UiqSjBmzV3cI_ENPs1tXcHdktkG45j1V12h-4jZe"
)
return t.NewPackage("fuse", version, newFromGitHubRelease(
"libfuse/libfuse",
"fuse-"+version,
"fuse-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, &MesonHelper{
Setup: []KV{
{"Ddefault_library", "both"},
{"Dtests", "true"},
{"Duseroot", "false"},
{"Dinitscriptdir", "/system/etc"},
},
ScriptCompiled: "python3 -m pytest test/",
// this project uses pytest
SkipTest: true,
},
PythonPyTest,
KernelHeaders,
), version
}
func init() {
native.mustRegister(Toolchain.newFuse, &Metadata{
Name: "fuse",
Description: "the reference implementation of the Linux FUSE interface",
Website: "https://github.com/libfuse/libfuse/",
ID: 861,
})
}

View File

@@ -0,0 +1,25 @@
package argp-standalone {
description = "hierarchical argument parsing library broken out from glibc";
website = "http://www.lysator.liu.se/~nisse/misc";
version* = "1.3";
source = remoteTar {
url = "http://www.lysator.liu.se/~nisse/misc/"+
"argp-standalone-"+version+".tar.gz";
checksum = "vtW0VyO2pJ-hPyYmDI2zwSLS8QL0sPAUKC1t3zNYbwN2TmsaE-fADhaVtNd3eNFl";
compress = gzip;
};
env = [
"CC=cc -std=gnu89 -fPIC",
];
exec = make {
install = `
install -D -m644 /usr/src/argp-standalone/argp.h /work/system/include/argp.h
install -D -m755 libargp.a /work/system/lib/libargp.a
`;
};
inputs = [ diffutils ];
}

View File

@@ -0,0 +1,33 @@
package dtc {
description = "The Device Tree Compiler";
website = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git";
anitya = 16911;
version* = "1.7.2";
source = remoteTar {
url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/"+
"dtc-v"+version+".tar.gz";
checksum = "vUoiRynPyYRexTpS6USweT5p4SVHvvVJs8uqFkkVD-YnFjwf6v3elQ0-Etrh00Dt";
compress = gzip;
};
// works around buggy test:
// fdtdump-runtest.sh /usr/src/dtc/tests/fdtdump.dts
writable = true;
chmod = true;
exec = meson {
setup = {
"Dyaml": "disabled";
"Dstatic-build": "true";
};
};
inputs = [
flex,
bison,
m4,
coreutils,
diffutils,
];
}

View File

@@ -0,0 +1,49 @@
package elfutils {
description = "utilities and libraries to handle ELF files and DWARF data";
website = "https://sourceware.org/elfutils";
anitya = 5679;
version* = "0.195";
source = remoteTar {
url = "https://sourceware.org/elfutils/ftp/"+
version+"/elfutils-"+version+".tar.bz2";
checksum = "JrGnBD38w8Mj0ZxDw3fKlRBFcLvRKu8rcYnX35R9yTlUSYnzTazyLboG-a2CsJlu";
compress = bzip2;
};
env = [
"CC=cc" +
// nonstandard glibc extension
" -DFNM_EXTMATCH=0",
];
exec = make {
// nonstandard glibc extension
skipCheck = true;
configure = {
"enable-deterministic-archives";
};
};
inputs = [
m4,
pkg-config,
zlib,
bzip2,
zstd,
argp-standalone,
musl-fts,
musl-obstack,
kernel-headers,
];
runtime = [
zlib,
bzip2,
zstd,
musl-fts,
musl-obstack,
];
}

View File

@@ -0,0 +1,18 @@
package flex {
description = "scanner generator for lexing in C and C++";
website = "https://github.com/westes/flex";
anitya = 819;
version* = "2.6.4";
source = remoteGitHubRelease {
suffix = "westes/flex";
tag = "v"+version;
name = "flex-"+version+".tar.gz";
checksum = "p9POjQU7VhgOf3x5iFro8fjhy0NOanvA7CTeuWS_veSNgCixIJshTrWVkc5XLZkB";
compress = gzip;
};
exec = make {};
inputs = [ m4 ];
}

View File

@@ -0,0 +1,15 @@
package freetype {
description = "a freely available software library to render fonts";
website = "http://www.freetype.org";
anitya = 854;
version* = "2.14.3";
source = remoteTar {
url = "https://download.savannah.gnu.org/releases/freetype/"+
"freetype-"+version+".tar.gz";
checksum = "-WfLv8fVJNyCHpP_lriiDzOcVbBL9ajdQ3tl8AzIIUa9-8sVpU9irxOmSMgRHWYz";
compress = gzip;
};
exec = make {};
}

View File

@@ -0,0 +1,33 @@
package fuse {
description = "the reference implementation of the Linux FUSE interface";
website = "https://github.com/libfuse/libfuse";
anitya = 861;
version* = "3.18.2";
source = remoteGitHubRelease {
suffix = "libfuse/libfuse";
tag = "fuse-"+version;
name = "fuse-"+version+".tar.gz";
checksum = "iL-7b7eUtmlVSf5cSq0dzow3UiqSjBmzV3cI_ENPs1tXcHdktkG45j1V12h-4jZe";
compress = gzip;
};
exec = meson {
setup = {
"Ddefault_library": "both";
"Dtests": "true";
"Duseroot": "false";
"Dinitscriptdir": "/system/etc";
};
postCompile = "python3 -m pytest test/";
// this project uses pytest
skipTest = true;
};
inputs = [
python-pytest,
kernel-headers,
];
}