diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-03-01 23:54:40 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-03-02 01:24:50 +0900 |
| commit | cc60e0d15d79916a69c8a1caeb3c4611351bb6c4 (patch) | |
| tree | 67f4f59ed7ba7b18af51338e56ffa8d9acf52da6 /internal/rosa/git.go | |
| parent | 9deaf853f0676ee4475468bffd35aae7e1160a74 (diff) | |
internal/rosa/make: migrate to helper interface
This also updates all affected artifacts to use new behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/git.go')
| -rw-r--r-- | internal/rosa/git.go | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/internal/rosa/git.go b/internal/rosa/git.go index a243e507..1880af06 100644 --- a/internal/rosa/git.go +++ b/internal/rosa/git.go @@ -7,24 +7,22 @@ func (t Toolchain) newGit() pkg.Artifact { version = "2.52.0" checksum = "uH3J1HAN_c6PfGNJd2OBwW4zo36n71wmkdvityYnrh8Ak0D1IifiAvEWz9Vi9DmS" ) - return t.NewViaMake("git", version, t.NewPatchedSource( - "git", version, pkg.NewHTTPGetTar( - nil, "https://www.kernel.org/pub/software/scm/git/"+ - "git-"+version+".tar.gz", - mustDecode(checksum), - pkg.TarGzip, - ), false, - ), &MakeAttr{ - // uses source tree as scratch space - Writable: true, - InPlace: true, - + return t.NewPackage("git", version, pkg.NewHTTPGetTar( + nil, "https://www.kernel.org/pub/software/scm/git/"+ + "git-"+version+".tar.gz", + mustDecode(checksum), + pkg.TarGzip, + ), &PackageAttr{ ScriptEarly: ` -cd /usr/src/git - -make configure ln -s ../../system/bin/perl /usr/bin/ || true +`, + // uses source tree as scratch space + EnterSource: true, + }, &MakeHelper{ + InPlace: true, + Generate: "make configure", + ScriptMakeEarly: ` function disable_test { local test=$1 pattern=${2:-''} if [ $# -eq 1 ]; then @@ -55,16 +53,16 @@ disable_test t2200-add-update "prove", }, }, - t.Load(Perl), - t.Load(Diffutils), - t.Load(M4), - t.Load(Autoconf), - t.Load(Gettext), + Perl, + Diffutils, + M4, + Autoconf, + Gettext, - t.Load(Zlib), - t.Load(Curl), - t.Load(OpenSSL), - t.Load(Libexpat), + Zlib, + Curl, + OpenSSL, + Libexpat, ) } func init() { artifactsF[Git] = Toolchain.newGit } |
