Compare commits

..

34 Commits

Author SHA1 Message Date
mae
b4348a3db3 internal/rosa/jdk: incomplete gnu classpath 0.93 artifact 2026-05-23 14:22:26 -05:00
mae
486180c11f internal/rosa/gtk: gdk-pixbuf artifact 2026-05-17 23:36:59 -05:00
mae
d3d68ad472 internal/rosa/x: libxtst artifact 2026-05-17 19:20:04 -05:00
mae
d2dc6a716d internal/rosa/x: libxi artifact 2026-05-17 19:19:26 -05:00
c32c06b2e8 internal/rosa: mesa artifact
This has many dependencies.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 05:12:35 +09:00
61199f734c internal/rosa/glslang: remove headers prefix
Maintainers tried to be clever with this and breaks cmake paths.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 04:57:38 +09:00
87cf0d4e6b internal/rosa/mesa: libva artifact
Required by mesa.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 04:40:04 +09:00
cf0dffa0f5 internal/rosa/mesa: libglvnd enable glx
Required to break circular dependency.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 04:35:50 +09:00
686d7ec63a internal/rosa/x: xserver artifact
Required by libglvnd test suite.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 04:15:48 +09:00
4c653b1151 internal/rosa/x: xkeyboard-config artifact
Required by xserver test suite.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 03:59:22 +09:00
0b0a63d151 internal/rosa/x: libxcb-util-wm artifact
Required by xserver xephyr.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 03:46:04 +09:00
6231cfe2aa internal/rosa/x: libxcb-util-image artifact
Required by xserver xephyr.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 03:36:45 +09:00
712e80890b internal/rosa/x: libxcb-util artifact
Required by xserver xephyr.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 03:25:24 +09:00
3fe7d48014 internal/rosa/x: libxcb-render-util artifact
Required by xserver.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 03:09:37 +09:00
16f9d39427 internal/rosa: libepoxy artifact
Required by xserver.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 02:16:55 +09:00
c1cd5ba07b internal/rosa: libtirpc artifact
Required by xserver.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 02:07:25 +09:00
7b0cd2e472 internal/rosa/x: libXdmcp artifact
Required by xserver.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 01:44:37 +09:00
e580307528 internal/rosa/x: libxcvt artifact
Required by xserver.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 01:24:00 +09:00
ee1dffb676 internal/rosa/x: libXfont2 artifact
Required by xserver.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 01:17:27 +09:00
f095fcf181 internal/rosa/x: font-util and libfontenc artifact
Required by libXfont2.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 01:14:12 +09:00
ca8a130130 internal/rosa: freetype artifact
Required by libXfont.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-14 00:54:42 +09:00
0ad6b00e41 internal/rosa/x: xkbcomp artifact
Required by xserver.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 22:24:08 +09:00
ad0f1cf36b internal/rosa/x: libxkbfile artifact
Required by xkbcomp.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 22:22:02 +09:00
b12d924fa2 internal/rosa: pixman artifact
Required by xserver.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 22:07:53 +09:00
c31d8ae41a internal/rosa/x: libXfixes artifact
Required by libva.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 21:36:47 +09:00
6dbbf15c0e internal/rosa: lm_sensors artifact
Generally useful, and an optional dependency of mesa.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 20:11:37 +09:00
be7de68a42 internal/rosa/perl: Test::Cmd artifact
Required by lm_sensors test suite.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 20:05:43 +09:00
a759cf3666 internal/pkg: check exec substitution
This relies on the testtool having ident as relevant input to assert successful substitution.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 19:43:53 +09:00
8c2dd3e984 internal/pkg: verify status kind
While it is still impossible to reliably determine the expected contents of these status files, this checks their nature for expected substitution behaviour.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 19:27:58 +09:00
67038d5af4 internal/pkg: log fault in tests when available
This would otherwise only be available in verbose output, interleaved with everything else.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 18:58:18 +09:00
53d8d12e7f internal/rosa/git: disable flaky test
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 18:51:11 +09:00
7997d79e56 cmd/mbf: display and destroy fault entries
This change extends cmd/mbf commands for working with fault entries.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 19:06:09 +09:00
f2f1726190 internal/pkg: record cure faults
These are useful for troubleshooting. This change records them in a separate directory.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 17:58:18 +09:00
f63203cb0a internal/pkg: populate substitute status
These are not created when taking the fast path, but should be inherited from the alternative.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13 16:16:37 +09:00
21 changed files with 1946 additions and 114 deletions

View File

@@ -1,76 +0,0 @@
package main
import (
"errors"
"log"
"os"
"hakurei.app/command"
"hakurei.app/internal/pkg"
)
func main() {
log.SetFlags(0)
log.SetPrefix("irdump: ")
var (
flagOutput string
flagReal bool
flagHeader bool
flagForce bool
flagRaw bool
)
c := command.New(os.Stderr, log.Printf, "irdump", func(args []string) (err error) {
var input *os.File
if len(args) != 1 {
return errors.New("irdump requires 1 argument")
}
if input, err = os.Open(args[0]); err != nil {
return
}
defer input.Close()
var output *os.File
if flagOutput == "" {
output = os.Stdout
} else {
defer output.Close()
if output, err = os.Create(flagOutput); err != nil {
return
}
}
var out string
if out, err = pkg.Disassemble(input, flagReal, flagHeader, flagForce, flagRaw); err != nil {
return
}
if _, err = output.WriteString(out); err != nil {
return
}
return
}).Flag(
&flagOutput,
"o", command.StringFlag(""),
"Output file for asm (leave empty for stdout)",
).Flag(
&flagReal,
"r", command.BoolFlag(false),
"skip label generation; idents print real value",
).Flag(
&flagHeader,
"H", command.BoolFlag(false),
"display artifact headers",
).Flag(
&flagForce,
"f", command.BoolFlag(false),
"force display (skip validations)",
).Flag(
&flagRaw,
"R", command.BoolFlag(false),
"don't format output",
)
c.MustParse(os.Args[1:], func(err error) {
log.Fatal(err)
})
}

View File

@@ -506,6 +506,8 @@ func main() {
flagExport string
flagRemote bool
flagNoReply bool
flagFaults bool
flagPop bool
flagBoot bool
flagStd bool
@@ -614,6 +616,49 @@ func main() {
}
return err
case flagFaults:
var faults []pkg.Fault
if err := cm.Do(func(cache *pkg.Cache) (err error) {
faults, err = cache.ReadFaults(t.Load(p))
return
}); err != nil {
return err
}
for _, fault := range faults {
log.Printf("%s: %s ago", fault.String(), time.Since(fault.Time()))
}
return nil
case flagPop:
var faults []pkg.Fault
if err := cm.Do(func(cache *pkg.Cache) (err error) {
faults, err = cache.ReadFaults(t.Load(p))
return
}); err != nil {
return err
}
if len(faults) == 0 {
return errors.New("no fault entries found")
}
fault := faults[len(faults)-1]
r, err := fault.Open()
if err != nil {
return err
}
if _, err = io.Copy(os.Stdout, r); err != nil {
_ = r.Close()
return err
}
fmt.Println()
if err = r.Close(); err != nil {
return err
}
log.Printf("faulting cure terminated %s ago", time.Since(fault.Time()))
return fault.Destroy()
}
},
).Flag(
@@ -644,9 +689,40 @@ func main() {
&flagStd,
"std", command.BoolFlag(false),
"Build on the intermediate toolchain",
).Flag(
&flagFaults,
"faults", command.BoolFlag(false),
"Display fault entries of the specified artifact",
).Flag(
&flagPop,
"pop", command.BoolFlag(false),
"Display and destroy the most recent fault entry",
)
}
c.NewCommand(
"clear",
"Remove all fault entries from the cache",
func([]string) error {
return cm.Do(func(*pkg.Cache) error {
pathname := filepath.Join(cm.base, "fault")
dents, err := os.ReadDir(pathname)
if err != nil {
return err
}
for _, dent := range dents {
msg.Verbosef("destroying entry %s", dent.Name())
if err = os.Remove(filepath.Join(pathname, dent.Name())); err != nil {
return err
}
}
log.Printf("destroyed %d fault entries", len(dents))
return nil
})
},
)
c.NewCommand(
"abort",
"Abort all pending cures on the daemon",

View File

@@ -1,6 +1,7 @@
package pkg_test
import (
"bytes"
_ "embed"
"encoding/gob"
"errors"
@@ -85,6 +86,30 @@ func TestExec(t *testing.T) {
pkg.MustPath("/opt", false, testtool),
), ignorePathname, wantOffline, nil},
{"substitution", pkg.NewExec(
"exec-offline", "", new(wantOffline.hash()), 0, false, false,
pkg.AbsWork,
[]string{"HAKUREI_TEST=1"},
check.MustAbs("/opt/bin/testtool"),
[]string{"testtool"},
pkg.MustPath("/file", false, newStubFile(
pkg.KindHTTPGet,
pkg.ID{0xfe, 0},
nil,
nil, nil,
)),
// substitution miss fails in testtool due to differing idents
pkg.MustPath("/.hakurei", false, &stubArtifact{
kind: pkg.KindTar,
params: []byte("empty directory (substituted)"),
cure: func(t *pkg.TContext) error {
return os.MkdirAll(t.GetWorkDir().String(), 0700)
},
}),
pkg.MustPath("/opt", false, testtool),
), ignorePathname, wantOffline, nil},
{"error passthrough", pkg.NewExec(
"", "", nil, 0, false, true,
pkg.AbsWork,
@@ -112,18 +137,41 @@ func TestExec(t *testing.T) {
})
// check init failure passthrough
var exitError *exec.ExitError
if _, _, err := c.Cure(pkg.NewExec(
initFailureArtifact := pkg.NewExec(
"", "", nil, 0, false, false,
pkg.AbsWork,
nil,
check.MustAbs("/opt/bin/testtool"),
[]string{"testtool"},
)); !errors.As(err, &exitError) ||
)
var exitError *exec.ExitError
if _, _, err := c.Cure(initFailureArtifact); !errors.As(err, &exitError) ||
exitError.ExitCode() != hst.ExitFailure {
t.Fatalf("Cure: error = %v, want init exit status 1", err)
}
var faultStatus []byte
if faults, err := c.ReadFaults(initFailureArtifact); err != nil {
t.Fatal(err)
} else if len(faults) != 1 {
t.Fatalf("ReadFaults: %v", faults)
} else if faultStatus, err = os.ReadFile(faults[0].String()); err != nil {
t.Fatal(err)
} else if err = faults[0].Destroy(); err != nil {
t.Fatal(err)
} else {
t.Logf("destroyed expected fault at %s", faults[0].Time().UTC())
}
if !bytes.HasPrefix(faultStatus, []byte(
"internal/pkg ",
)) || !bytes.Contains(faultStatus, []byte(
"\ninit: fork/exec /opt/bin/testtool: no such file or directory\n",
)) {
t.Errorf("unexpected status:\n%s", string(faultStatus))
}
destroyStatus(t, base, 2, 1)
testtoolDestroy(t, base, c)
}, expectsFS{
".": {Mode: fs.ModeDir | 0700},
@@ -135,6 +183,8 @@ func TestExec(t *testing.T) {
"checksum/OLBgp1GsljhM2TJ-sbHjaiH9txEUvgdDTAzHv2P24donTt6_529l-9Ua0vFImLlb": {Mode: 0400, Data: []byte{}},
"identifier": {Mode: fs.ModeDir | 0700},
"identifier/IY91PCtOpCYy21AaIK0c9f8-Z6fb2_2ewoHWkt4dxoLf0GOrWqS8yAGFLV84b1Dw": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/" + wantOfflineEncode)},
"identifier/QwS7SmiatdqryQYgESdGw7Yw2PcpNf0vNfpvUA0t92BTlKiUjfCrXyMW17G2X77X": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/MGWmEfjut2QE2xPJwTsmUzpff4BN_FEnQ7T0j7gvUCCiugJQNwqt9m151fm9D1yU")},
"identifier/_gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/OLBgp1GsljhM2TJ-sbHjaiH9txEUvgdDTAzHv2P24donTt6_529l-9Ua0vFImLlb")},
"identifier/" + expected.Offline: {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/" + wantOfflineEncode)},
"identifier/vjz1MHPcGBKV7sjcs8jQP3cqxJ1hgPTiQBMCEHP9BGXjGxd-tJmEmXKaStObo5gK": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/MGWmEfjut2QE2xPJwTsmUzpff4BN_FEnQ7T0j7gvUCCiugJQNwqt9m151fm9D1yU")},
@@ -178,6 +228,7 @@ func TestExec(t *testing.T) {
), ignorePathname, wantNet, nil},
})
destroyStatus(t, base, 2, 0)
testtoolDestroy(t, base, c)
}, expectsFS{
".": {Mode: fs.ModeDir | 0700},
@@ -221,6 +272,7 @@ func TestExec(t *testing.T) {
), ignorePathname, wantOffline, nil},
})
destroyStatus(t, base, 2, 0)
testtoolDestroy(t, base, c)
}, expectsFS{
".": {Mode: fs.ModeDir | 0700},
@@ -267,6 +319,7 @@ func TestExec(t *testing.T) {
), ignorePathname, wantOffline, nil},
})
destroyStatus(t, base, 2, 0)
testtoolDestroy(t, base, c)
}, expectsFS{
".": {Mode: fs.ModeDir | 0700},
@@ -335,6 +388,7 @@ func TestExec(t *testing.T) {
), ignorePathname, wantOffline, nil},
})
destroyStatus(t, base, 2, 0)
testtoolDestroy(t, base, c)
}, expectsFS{
".": {Mode: fs.ModeDir | 0700},
@@ -387,6 +441,7 @@ func TestExec(t *testing.T) {
), ignorePathname, wantOffline, nil},
})
destroyStatus(t, base, 2, 0)
testtoolDestroy(t, base, c)
}, expectsFS{
".": {Mode: fs.ModeDir | 0700},
@@ -450,6 +505,8 @@ func TestExec(t *testing.T) {
"check": {Mode: 0400, Data: []byte("binfmt")},
}, nil},
})
destroyStatus(t, base, 2, 0)
}, expectsFS{
".": {Mode: fs.ModeDir | 0700},

View File

@@ -4,6 +4,7 @@ package pkg
import (
"bufio"
"bytes"
"cmp"
"context"
"crypto/sha512"
"encoding/base64"
@@ -25,6 +26,7 @@ import (
"sync/atomic"
"syscall"
"testing"
"time"
"unique"
"unsafe"
@@ -248,7 +250,14 @@ func (t *TContext) destroy(errP *error) {
*errP = errors.Join(*errP, err)
}
if *errP != nil {
*errP = errors.Join(*errP, os.Remove(t.statusPath.String()))
*errP = errors.Join(*errP, os.Rename(
t.statusPath.String(), t.cache.base.Append(
dirFault,
t.ids+"."+strconv.FormatUint(uint64(
time.Now().UnixNano(),
), 10),
).String(),
))
}
t.status = nil
}
@@ -509,36 +518,34 @@ const (
)
const (
// fileLock is the file name appended to Cache.base for guaranteeing
// exclusive access to the cache directory.
// fileLock is the lock file for exclusive access to the cache directory.
fileLock = "lock"
// fileVariant is the file name appended to Cache.base holding the variant
// identification string set by a prior call to [SetExtension].
// fileVariant is a file holding the variant identification string set by a
// prior call to [SetExtension].
fileVariant = "variant"
// dirSubstitute is the directory name appended to Cache.base for linking
// artifacts named after their substitute identifier.
// dirSubstitute holds symlinks to artifacts by checksum, named after their
// substitute identifier.
dirSubstitute = "substitute"
// dirIdentifier is the directory name appended to Cache.base for storing
// artifacts named after their [ID].
// dirIdentifier holds symlinks to artifacts by checksum, named after their
// IR-based identifier.
dirIdentifier = "identifier"
// dirChecksum is the directory name appended to Cache.base for storing
// artifacts named after their [Checksum].
// dirChecksum holds artifacts named after their [Checksum].
dirChecksum = "checksum"
// dirStatus is the directory name appended to Cache.base for storing
// artifact metadata and logs named after their [ID].
// dirStatus holds artifact metadata and logs named after their IR-based
// identifier. For [FloodArtifact], the same file is also available under
// its substitute identifier.
dirStatus = "status"
// dirFault holds status files of faulted cures.
dirFault = "fault"
// dirWork is the directory name appended to Cache.base for working
// pathnames set up during [Cache.Cure].
// dirWork holds working pathnames set up during [Cache.Cure].
dirWork = "work"
// dirTemp is the directory name appended to Cache.base for scratch space
// pathnames allocated during [Cache.Cure].
// dirTemp holds scratch space allocated during [Cache.Cure].
dirTemp = "temp"
// dirExecScratch is the directory name appended to Cache.base for scratch
// space setting up the container started by [Cache.EnterExec]. Exclusivity
// via Cache.inExec.
// dirExecScratch is scratch space set up for the container started by
// [Cache.EnterExec]. Exclusivity via Cache.inExec.
dirExecScratch = "scratch"
// checksumLinknamePrefix is prepended to the encoded [Checksum] value
@@ -1995,10 +2002,11 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
buf := c.getIdentBuf()
sh.Sum(buf[wordSize:wordSize])
substitute = unique.Make(ID(buf[wordSize:]))
substitutes := Encode(substitute.Value())
c.putIdentBuf(buf)
alternative = c.base.Append(
dirSubstitute,
Encode(substitute.Value()),
substitutes,
)
if c.flags&CIgnoreSubstitutes == 0 {
@@ -2014,6 +2022,17 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
dirChecksum,
checksums,
)
if _, err = os.Lstat(c.base.Append(
dirStatus,
substitutes,
).String()); err == nil {
err = os.Symlink(substitutes, c.base.Append(
dirStatus,
ids,
).String())
} else if errors.Is(err, os.ErrNotExist) {
err = nil
}
return
}
}
@@ -2023,6 +2042,15 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
return
}
err = ca.Cure(&f)
if err == nil && f.status != nil {
err = os.Link(c.base.Append(
dirStatus,
ids,
).String(), c.base.Append(
dirStatus,
substitutes,
).String())
}
c.exitCure(a, curesExempt)
if err != nil {
return
@@ -2131,6 +2159,52 @@ func (c *Cache) OpenStatus(a Artifact) (r io.ReadSeekCloser, err error) {
return
}
// Fault holds the pathname and termination time of an [Artifact] fault entry.
type Fault struct {
*check.Absolute
t uint64
}
// Time returns the instant in time where the fault occurred.
func (f Fault) Time() time.Time { return time.Unix(0, int64(f.t)) }
// Open opens the underlying entry for reading.
func (f Fault) Open() (io.ReadCloser, error) { return os.Open(f.Absolute.String()) }
// Destroy removes the underlying fault entry.
func (f Fault) Destroy() error { return os.Remove(f.Absolute.String()) }
// ReadFaults returns fault entries for an [Artifact].
func (c *Cache) ReadFaults(a Artifact) (faults []Fault, err error) {
prefix := Encode(c.Ident(a).Value()) + "."
var dents []os.DirEntry
if dents, err = os.ReadDir(c.base.Append(dirFault).String()); err != nil {
return
}
for _, dent := range dents {
name := dent.Name()
if !strings.HasPrefix(name, prefix) {
continue
}
var t uint64
t, err = strconv.ParseUint(name[len(prefix):], 10, 64)
if err != nil {
return
}
faults = append(faults, Fault{c.base.Append(
dirFault,
name,
), t})
}
slices.SortFunc(faults, func(a, b Fault) int {
return cmp.Compare(a.t, b.t)
})
return
}
// Abort cancels all pending cures and waits for them to clean up, but does not
// close the cache.
func (c *Cache) Abort() {
@@ -2234,6 +2308,7 @@ func open(
dirIdentifier,
dirChecksum,
dirStatus,
dirFault,
dirWork,
} {
if err := os.MkdirAll(

View File

@@ -21,6 +21,7 @@ import (
"syscall"
"testing"
"testing/fstest"
"time"
"unique"
"unsafe"
@@ -244,6 +245,41 @@ func newDestroyArtifactFunc(a pkg.Artifact) func(
}
}
// destroyStatus counts non-substitution status entries and destroys them.
func destroyStatus(t *testing.T, base *check.Absolute, c, s int) {
dents, err := os.ReadDir(base.Append("status").String())
if err != nil {
t.Fatal(err)
}
var gotC, gotS int
for _, dent := range dents {
if err = os.Remove(base.Append(
"status",
dent.Name(),
).String()); err != nil {
t.Fatal(err)
}
if dent.Type().IsRegular() {
gotC++
continue
}
if dent.Type()&fs.ModeSymlink == fs.ModeSymlink {
gotS++
continue
}
t.Errorf("%s: %s", dent.Name(), dent.Type())
}
if gotC != c {
t.Errorf("status: c = %d, want %d", gotC, c)
}
if gotS != s {
t.Errorf("status: s = %d, want %d", gotS, s)
}
}
func TestIdent(t *testing.T) {
t.Parallel()
@@ -488,10 +524,17 @@ func checkWithCache(t *testing.T, testCases []cacheTestCase) {
}
}
// destroy non-deterministic status files
if err := os.RemoveAll(base.Append("status").String()); err != nil {
// destroy empty status directory
if err := syscall.Rmdir(base.Append("status").String()); err != nil {
t.Error(expectsFrom(base.Append("status").String()))
t.Fatal(err)
}
// destroy empty fault directory
if err := os.Remove(base.Append("fault").String()); err != nil {
t.Fatal(err)
}
want := tc.want.hash()
var checksum pkg.Checksum
@@ -555,6 +598,21 @@ func cureMany(t *testing.T, c *pkg.Cache, steps []cureStep) {
for _, step := range steps {
t.Log("cure step:", step.name)
if pathname, checksum, err := c.Cure(step.a); !reflect.DeepEqual(err, step.err) {
faults, _err := c.ReadFaults(step.a)
if _err != nil {
t.Errorf("ReadFaults: error = %v", _err)
}
var p []byte
for _, fault := range faults {
p, _err = os.ReadFile(fault.String())
if _err != nil {
t.Error(_err)
continue
}
t.Log(string(p))
t.Logf("faulting cure terminated %s ago", time.Since(faults[0].Time()))
}
t.Fatalf("Cure: error = %v, want %v", err, step.err)
} else if step.pathname != ignorePathname && !pathname.Is(step.pathname) {
t.Fatalf("Cure: pathname = %q, want %q", pathname, step.pathname)
@@ -1059,8 +1117,14 @@ func TestCache(t *testing.T) {
"_EmV5nsYZ2UWHgRmLDMU8i-rJWDx-kv5_1pFrzQI7vMMCM5mAXivO8UZtVfOqMR_",
), want, nil},
})
}
if dents, err := os.ReadDir(base.Append("status").String()); err != nil {
t.Fatal(err)
} else if len(dents) > 0 {
t.Errorf("ReadDir: %v", dents)
}
}, expectsFS{
".": {Mode: fs.ModeDir | 0700},

View File

@@ -45,6 +45,7 @@ const (
Binutils
Bison
Bzip2
Cairo
CMake
Connman
Coreutils
@@ -56,7 +57,12 @@ const (
Fakeroot
Findutils
Flex
FontConfig
FontUtil
Freetype
Fribidi
Fuse
Gconf
GMP
GLib
Gawk
@@ -66,33 +72,46 @@ const (
Glslang
GnuTLS
Go
GObjectIntrospection
Gperf
Grep
Gzip
Hakurei
HakureiDist
HarfBuzz
Hwdata
IPTables
JDK
Kmod
LIT
LibX11
LibXau
LibXdmcp
LibXext
LibXfixes
LibXfont2
LibXft
LibXi
LibXrandr
LibXrender
LibXtst
LibXxf86vm
Libarchive
Libbsd
Libcap
Libconfig
Libdatrie
LibdisplayInfo
Libdrm
Libepoxy
Libev
Libexpat
Libffi
Libfontenc
Libgd
Libglvnd
Libiconv
Libjpeg
Libmd
Libmnl
Libnftnl
@@ -101,17 +120,29 @@ const (
Libpsl
Libseccomp
Libtasn1
Libthai
Libtirpc
Libtool
Libucontext
Libunistring
Libxshmfence
Libva
LibxcbRenderUtil
LibxcbUtil
LibxcbUtilImage
LibxcbUtilKeysyms
LibxcbUtilWM
Libxcvt
Libxkbfile
Libxml2
Libxshmfence
Libxslt
Libxtrans
LMSensors
M4
MPC
MPFR
Make
Mesa
Meson
Mksh
MuslFts
@@ -124,6 +155,7 @@ const (
OpenSSL
P11Kit
PCRE2
Pango
Parallel
Patch
Perl
@@ -133,10 +165,12 @@ const (
PerlPodParser
PerlSGMLS
PerlTermReadKey
PerlTestCmd
PerlTextCharWidth
PerlTextWrapI18N
PerlUnicodeLineBreak
PerlYAMLTiny
Pixman
PkgConfig
Procps
Python
@@ -162,6 +196,7 @@ const (
Readline
Rsync
Sed
SharedMimeInfo
SPIRVHeaders
SPIRVLLVMTranslator
SPIRVTools
@@ -179,10 +214,13 @@ const (
WaylandProtocols
XCB
XCBProto
XCBUtilKeysyms
XDGDBusProxy
XZ
Xkbcomp
XkeyboardConfig
XorgProto
Xserver
Zip
Zlib
Zstd

196
internal/rosa/fontstack.go Normal file
View File

@@ -0,0 +1,196 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newFontConfig() (pkg.Artifact, string) {
const (
version = "2.15.0"
checksum = "rvlTL_zn-RwVkTBFdsOacUmEdLmwa3whTkuTzV8JH7kKbsFmnbG2qof3hN9ghr9d"
)
return t.NewPackage("fontconfig", version, newFromGitLab("gitlab.freedesktop.org", "fontconfig/fontconfig", version, checksum),
nil,
(*MesonHelper)(nil),
Gperf,
Freetype,
Libexpat,
Python,
), version
}
func init() {
artifactsM[FontConfig] = Metadata{
f: Toolchain.newFontConfig,
Name: "fontconfig",
Description: "freedesktop font discovery",
Website: "https://fontconfig.pages.freedesktop.org/fontconfig/fontconfig-user.html",
ID: 827,
}
}
func (t Toolchain) newCairo() (pkg.Artifact, string) {
const (
version = "1.18.4"
checksum = "_Ztw0ttmYLIiElqS27x2Iu4EneXOMNHp2or6bJA6suLeF3NRvORzUMPPQy9Wr5gT"
)
return t.NewPackage("cairo", version, newFromGitLab("gitlab.freedesktop.org", "cairo/cairo", version, checksum),
nil,
&MesonHelper{
SkipTest: true,
Setup: []KV{{"Dfreetype", "enabled"}, {"Dfontconfig", "enabled"}},
},
Automake,
Libtool,
Libpng,
PkgConfig,
FontConfig,
Libexpat,
Freetype,
Pixman,
Gawk,
), version
}
func init() {
artifactsM[Cairo] = Metadata{
f: Toolchain.newCairo,
Name: "cairo",
Description: "freedesktop 2d rendering library",
Website: "https://cairographics.org",
ID: 247,
}
}
func (t Toolchain) newHarfbuzz() (pkg.Artifact, string) {
const (
version = "14.2.0"
checksum = "2VgjUmcPeIbleafZaGk5l7iGnag2qj0HTqrJ5770GzivebryZ2pbwVIha5j_24PH"
)
return t.NewPackage("harfbuzz", version, newFromGitHub("harfbuzz/harfbuzz", version, checksum),
nil,
(*MesonHelper)(nil),
Freetype,
GLib,
Cairo,
), version
}
func init() {
artifactsM[HarfBuzz] = Metadata{
f: Toolchain.newHarfbuzz,
Name: "harfbuzz",
Description: "text shaping library",
Website: "https://harfbuzz.github.io",
ID: 1299,
}
}
func (t Toolchain) newFribidi() (pkg.Artifact, string) {
const (
version = "1.0.16"
checksum = "Sn9hwdgViXW9_MOi8ovAcBgQy6s6o4cc0o260k76nqCRzxmxxD1-B37GVkJ2EoMy"
)
return t.NewPackage("fribidi", version, newFromGitHub("fribidi/fribidi", "v"+version, checksum),
nil,
&MesonHelper{
Setup: []KV{[2]string{"Ddocs", "false"}},
},
PkgConfig,
), version
}
func init() {
artifactsM[Fribidi] = Metadata{
f: Toolchain.newFribidi,
Name: "fribidi",
Description: "bidirectional text library",
Website: "https://www.gnu.org/software/fribidi/",
ID: 857,
}
}
func (t Toolchain) newLibdatrie() (pkg.Artifact, string) {
const (
version = "0.2.14"
checksum = "JnJBEFrA8xYscXOSRJNGb1ZyRqrdsfP1_sdRIQeeSujdcsxmYT5Yl9m4byTsLozp"
)
return t.NewPackage("libdatrie", version, newFromGitHub("tlwg/libdatrie", "v"+version, checksum),
nil,
&MakeHelper{
Generate: "sh autogen.sh",
},
Libtool,
Automake,
M4,
), version
}
func init() {
artifactsM[Libdatrie] = Metadata{
f: Toolchain.newLibdatrie,
Name: "libdatrie",
Description: "double-array trie library",
Website: "https://linux.thai.net/~thep/datrie/datrie.html",
ID: 7342,
}
}
func (t Toolchain) newLibThai() (pkg.Artifact, string) {
const (
version = "0.1.30"
checksum = "jQxUviF-lSiVrnqXebc4kROp0hrIeQbke2gvaeTfkCDp-wHkpxb3xP18fsNOF_F-"
)
return t.NewPackage("libthai", version, newFromGitHub("tlwg/libthai", "v"+version, checksum),
nil,
&MakeHelper{
Generate: "sh autogen.sh",
},
Libtool,
Automake,
M4,
Libdatrie,
PkgConfig,
), version
}
func init() {
artifactsM[Libthai] = Metadata{
f: Toolchain.newLibThai,
Name: "libthai",
Description: "thai language handling library",
Website: "https://linux.thai.net/",
ID: 1737,
}
}
func (t Toolchain) newPango() (pkg.Artifact, string) {
const (
version = "1.56.3"
checksum = "O73sc8axQyjIFpW4XkV7wi4HVSvmdUnx1uTn-HtbewXgrCVWX9Du-pssL5BK7rf1"
)
return t.NewPackage("pango", version, newFromGitLab("gitlab.gnome.org", "GNOME/pango", version, checksum),
nil,
&MesonHelper{
SkipTest: true,
},
GLib,
GObjectIntrospection,
Freetype,
PkgConfig,
FontConfig,
HarfBuzz,
Fribidi,
Cairo,
Pixman,
Libpng,
Libexpat,
Libdatrie,
Libthai,
Libtool,
LibX11,
LibXrender,
LibXft,
Diffutils,
), version
}
func init() {
artifactsM[Pango] = Metadata{
f: Toolchain.newPango,
Name: "pango",
Description: "text rendering library",
Website: "https://pango.org",
ID: 11783,
}
}

27
internal/rosa/freetype.go Normal file
View File

@@ -0,0 +1,27 @@
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() {
artifactsM[Freetype] = Metadata{
f: Toolchain.newFreetype,
Name: "freetype",
Description: "a freely available software library to render fonts",
Website: "http://www.freetype.org/",
ID: 854,
}
}

View File

@@ -62,6 +62,7 @@ disable_test t7002-mv-sparse-checkout
disable_test t1451-fsck-buffer
disable_test t4104-apply-boundary
disable_test t4200-rerere
disable_test t5515-fetch-merge-logic
`,
Check: []string{
"-C t",

View File

@@ -189,9 +189,18 @@ func (t Toolchain) newSPIRVLLVMTranslator() (pkg.Artifact, string) {
), &PackageAttr{
Patches: []KV{
{"remove-early-prefix", `diff --git a/CMakeLists.txt b/CMakeLists.txt
index c000a77e..86f79b03 100644
index c000a77e..f18f3fde 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,7 +164,7 @@ install(
${LLVM_SPIRV_INCLUDE_DIRS}/LLVMSPIRVOpts.h
${LLVM_SPIRV_INCLUDE_DIRS}/LLVMSPIRVExtensions.inc
DESTINATION
- ${CMAKE_INSTALL_PREFIX}/include/LLVMSPIRVLib
+ include/LLVMSPIRVLib
)
configure_file(LLVMSPIRVLib.pc.in ${CMAKE_BINARY_DIR}/LLVMSPIRVLib.pc @ONLY)
@@ -172,5 +172,5 @@ install(
FILES
${CMAKE_BINARY_DIR}/LLVMSPIRVLib.pc
@@ -199,7 +208,7 @@ index c000a77e..86f79b03 100644
- ${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}/pkgconfig
+ lib${LLVM_LIBDIR_SUFFIX}/pkgconfig
)
`},
;`},
},
// litArgs emits shell syntax

View File

@@ -58,3 +58,91 @@ func init() {
ID: 10024,
}
}
func (t Toolchain) newSharedMimeInfo() (pkg.Artifact, string) {
const (
version = "2.4"
checksum = "RrqfOT1gGuYfN7pkwgeLPfljkk9eL5BwRsNTuJNZjOk1vT5frTJ1EshDvaSqKwiL"
)
return t.NewPackage("shared-mime-info", version, newFromGitLab("gitlab.freedesktop.org", "xdg/shared-mime-info", version, checksum),
nil,
&MesonHelper{
SkipTest: true,
},
GLib,
Meson,
Libxml2,
Gettext,
Libpng,
Libjpeg,
), version
}
func init() {
artifactsM[SharedMimeInfo] = Metadata{
f: Toolchain.newSharedMimeInfo,
Name: "shared-mime-info",
Description: "xdg MIME repository",
Website: "https://www.freedesktop.org/wiki/Software/shared-mime-info/",
ID: 5524,
}
}
func (t Toolchain) newGobjectIntrospection() (pkg.Artifact, string) {
const (
version = "1.86.0"
checksum = "M-eq1kEEX215x0VMfTIfJXNfVnZwiC41QK33tlCeK0_GDwGUILQm0SqvRSySNoka"
)
return t.NewPackage("gobject-introspection", version, t.NewViaGit("https://gitlab.gnome.org/GNOME/gobject-introspection.git", version, mustDecode(checksum)),
&PackageAttr{
Writable: true,
},
&MesonHelper{
SkipTest: true,
},
GLib,
PythonSetuptools,
Flex,
Bison,
Cairo,
Libffi,
Libpng,
M4,
PythonMako,
Pixman,
), version
}
func init() {
artifactsM[GObjectIntrospection] = Metadata{
f: Toolchain.newGobjectIntrospection,
Name: "gobject-introspection",
Description: "introspection toolkit",
Website: "https://gi.readthedocs.io/",
ID: 1223,
}
}
func (t Toolchain) newGconf() (pkg.Artifact, string) {
const (
version = "3.2.6"
checksum = "oSoPCk8J4Xd1gF1RLPqzdvHQfEn2eOE9qpLoT2CyDwnkUERgg2990dHN_AKhVgJp"
)
return t.NewPackage("gconf", version, newFromGitLab("gitlab.gnome.org", "Archive/gconf", version, checksum),
nil,
&MakeHelper{
Configure: []KV{{"disable-orbit"}, {"disable-introspection"}},
Generate: "autoreconf -if",
},
Automake,
Libtool,
GLib,
), version
}
func init() {
artifactsM[Gconf] = Metadata{
f: Toolchain.newGconf,
Name: "gconf",
Description: "outdated configuration database library",
Website: "http://projects.gnome.org/gconf/",
ID: 8423,
}
}

139
internal/rosa/jdk.go Normal file
View File

@@ -0,0 +1,139 @@
package rosa
import (
"slices"
"hakurei.app/internal/pkg"
)
func (t Toolchain) newJikes() pkg.Artifact {
const (
version = "1.22"
checksum = "qb5Pf6P7RBrXRVLNEwfGxqhb05WW-MjJyJw7O-fYKizNGDNJEpsttbmOsFge0MO1"
)
return t.NewPackage("jikes", version,
newTar("https://sourceforge.net/projects/jikes/files/Jikes/"+version+"/jikes-"+version+".tar.bz2/download",
checksum, pkg.TarBzip2),
&PackageAttr{},
&MakeHelper{
Generate: "autoreconf -if",
Make: []string{
"CXXFLAGS='-std=c++03'",
},
},
Automake,
)
}
func (t Toolchain) newClasspath(version, checksum string, extra ...pkg.Artifact) pkg.Artifact {
attr := &PackageAttr{
Patches: []KV{{"classpath0.93-include-stdlib",
`diff --git a/native/fdlibm/dtoa.c b/native/fdlibm/dtoa.c
index 5fb6aae..e710d96 100644
--- a/native/fdlibm/dtoa.c
+++ b/native/fdlibm/dtoa.c
@@ -28,6 +28,7 @@
#include "mprec.h"
#include <string.h>
+#include <stdlib.h>
static int
_DEFUN (quorem,
`}},
}
helper := &MakeHelper{
SkipCheck: true,
Generate: "autoreconf -if",
Configure: []KV{{"with-jikes"}, {"disable-gtk-peer"}, {"disable-gconf-peer"}, {"disable-Werror"}, {"disable-plugin"}},
}
script := attr.ScriptEarly
script += helper.scriptEarly()
source := newTar(
"https://ftp.gnu.org/gnu/classpath/classpath-"+version+".tar.gz",
checksum,
pkg.TarGzip,
)
wantsChmod, wantsWrite := helper.wantsChmod(), helper.wantsWrite()
pExtra := []PArtifact{Automake, Libtool, LibX11, LibXtst, LibXi, PkgConfig, Gzip, GLib, Findutils, Unzip}
extraRes := make([]pkg.Artifact, 0, 1<<3+len(pExtra))
{
pv := paGet()
for _, p := range helper.extra(attr.Flag) {
extraRes = t.appendPreset(extraRes, pv, p)
}
for _, p := range pExtra {
extraRes = t.appendPreset(extraRes, pv, p)
}
paPut(pv)
}
var (
scriptEarly string
sourceSuffix string
)
if _, ok := source.(pkg.FileArtifact); ok {
if attr.Writable || attr.Chmod ||
wantsChmod || wantsWrite ||
len(attr.Patches) > 0 {
panic("source processing requested on a xz-compressed tarball")
}
sourceSuffix = ".tar.xz"
scriptEarly += `
tar -C /usr/src/ -xf '/usr/src/` + "classpath" + `.tar.xz'
mv '/usr/src/` + "classpath" + `-` + version + `' '/usr/src/` + "classpath" + `'
`
}
dir := helper.wantsDir()
helperScriptEarly := helper.scriptEarly()
if attr.EnterSource ||
dir == "" ||
attr.ScriptEarly != "" ||
helperScriptEarly != "" {
scriptEarly += `
cd '/usr/src/` + "classpath" + `/'
`
}
scriptEarly += attr.ScriptEarly + helperScriptEarly
if dir != "" && dir != helperInPlace {
if helper.createDir() {
scriptEarly += "\nmkdir -p " + dir
}
scriptEarly += "\ncd " + dir + "\n"
} else if !attr.EnterSource && attr.ScriptEarly == "" {
panic("cannot remain in root")
}
return t.New(
"classpath"+"-"+version,
attr.Flag,
slices.Concat(extra, extraRes),
attr.KnownChecksum,
attr.Env,
scriptEarly+helper.script("classpath"),
slices.Concat(attr.Paths, []pkg.ExecPath{
pkg.Path(AbsUsrSrc.Append(
"classpath"+sourceSuffix,
), attr.Writable || wantsWrite, t.NewPatchedSource(
"classpath", version, source, !attr.Chmod && !wantsChmod, attr.Patches...,
)),
})...,
)
}
func (t Toolchain) newLatestJdk() (pkg.Artifact, string) {
jikes := t.newJikes()
classpath093 := t.newClasspath("0.93", "WKsqDegi4rVCdQ2uJc3BOPuMnovU_cbiQy7nAzvYYtYnw75V6--sZFyRKnfiwGg9", jikes)
return classpath093, "0.93"
}
func init() {
artifactsM[JDK] = Metadata{
f: Toolchain.newLatestJdk,
Name: "jdk",
Description: "java toolchain",
Website: "https://jikes.sourceforge.net/",
}
}

33
internal/rosa/libepoxy.go Normal file
View File

@@ -0,0 +1,33 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newLibepoxy() (pkg.Artifact, string) {
const (
version = "1.5.10"
checksum = "OHI8wshrlGw6BMGrmSyejJtwzM2gPhyFJrTsKxULyKMmYrfgcOe7Iw2ibVoUND_Q"
)
return t.NewPackage("libepoxy", version, newFromGitHub(
"anholt/libepoxy",
version,
checksum,
), nil, &MesonHelper{
Setup: []KV{
{"Dglx", "no"},
{"Degl", "no"},
},
},
LibX11,
), version
}
func init() {
artifactsM[Libepoxy] = Metadata{
f: Toolchain.newLibepoxy,
Name: "libepoxy",
Description: "a library for handling OpenGL function pointer management",
Website: "https://github.com/anholt/libepoxy",
ID: 6090,
}
}

24
internal/rosa/libjpeg.go Normal file
View File

@@ -0,0 +1,24 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newLibjpeg() (pkg.Artifact, string) {
const (
version = "10"
checksum = "N-o4pq6wO8fPeIePdi6-fZtiiRUzdizja_B-BYpmx-GU2Qesdgg0QF0ub-jtiYmd"
)
return t.NewPackage("libjpeg", version, newTar("https://www.ijg.org/files/jpegsrc.v"+version+".tar.gz", checksum, pkg.TarGzip),
nil,
(*MakeHelper)(nil),
), version
}
func init() {
artifactsM[Libjpeg] = Metadata{
f: Toolchain.newLibjpeg,
Name: "libjpeg",
Description: "jpeg library",
Website: "https://www.ijg.org",
ID: 21362,
}
}

44
internal/rosa/libtirpc.go Normal file
View File

@@ -0,0 +1,44 @@
package rosa
import (
"strings"
"hakurei.app/internal/pkg"
)
func (t Toolchain) newLibtirpc() (pkg.Artifact, string) {
const (
version = "1.3.7"
checksum = "nzFfu7LNvnSNiNAryD1vtnNWnU-Xqee8KqfXUKoBf5yjb5-dkeRkYuRijdCoYLof"
)
return t.NewPackage("libtirpc", version, t.newTagRemote(
"git://linux-nfs.org/~steved/libtirpc",
"libtirpc-"+
strings.Join(strings.SplitN(version, ".", 3), "-"),
checksum,
), nil, &MakeHelper{
Generate: "sh -e ./bootstrap",
Configure: []KV{
{"CFLAGS", `"$(pkg-config --cflags libbsd-overlay) ${CFLAGS:-}"`},
{"disable-gssapi"},
},
},
Automake,
Libtool,
PkgConfig,
Libbsd,
KernelHeaders,
), version
}
func init() {
artifactsM[Libtirpc] = Metadata{
f: Toolchain.newLibtirpc,
Name: "libtirpc",
Description: "a port of Suns Transport-Independent RPC library to Linux",
Website: "https://sourceforge.net/projects/libtirpc/",
ID: 1740,
}
}

View File

@@ -0,0 +1,59 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newLMSensors() (pkg.Artifact, string) {
const (
version = "3-6-2"
checksum = "7JYNutrihe-FP6r3ftf96uFZJJWPfxnBHL0ALSMA-vovaXVRr-sAjlLitw7WWpCI"
)
return t.NewPackage("lm_sensors", version, newFromGitHub(
"lm-sensors/lm-sensors",
"V"+version,
checksum,
), &PackageAttr{
Writable: true,
Chmod: true,
EnterSource: true,
ScriptEarly: `
ln -s \
../../system/bin/perl \
/usr/bin/
`,
}, &MakeHelper{
InPlace: true,
SkipConfigure: true,
Make: []string{
"CC=cc",
"ETCDIR=/system/etc",
"PREFIX=/system",
},
Check: []string{
"CC=cc",
"check",
},
Install: "make DESTDIR=/work PREFIX=/system install",
},
Perl,
PerlTestCmd,
M4,
Bison,
Flex,
), version
}
func init() {
artifactsM[LMSensors] = Metadata{
f: Toolchain.newLMSensors,
Name: "lm_sensors",
Description: "user-space support for hardware monitoring drivers",
Website: "https://hwmon.wiki.kernel.org/lm_sensors",
ID: 1831,
}
}

View File

@@ -1,6 +1,10 @@
package rosa
import "hakurei.app/internal/pkg"
import (
"strings"
"hakurei.app/internal/pkg"
)
func (t Toolchain) newLibglvnd() (pkg.Artifact, string) {
const (
@@ -12,8 +16,22 @@ func (t Toolchain) newLibglvnd() (pkg.Artifact, string) {
"glvnd/libglvnd",
"v"+version,
checksum,
), nil, (*MesonHelper)(nil),
), nil, &MesonHelper{
Setup: []KV{
{"Dx11", "enabled"},
{"Dglx", "enabled"},
},
ScriptCompiled: `
export DISPLAY=':0'
Xvfb &
XVFB_PID="$!"
trap 'kill $XVFB_PID && wait $XVFB_PID' EXIT
`,
},
Binutils, // symbols check fail with llvm nm
Xserver, // test suite wants X server
LibXext,
), version
}
func init() {
@@ -24,6 +42,10 @@ func init() {
Description: "The GL Vendor-Neutral Dispatch library",
Website: "https://gitlab.freedesktop.org/glvnd/libglvnd",
Dependencies: P{
LibXext,
},
ID: 12098,
}
}
@@ -64,3 +86,180 @@ func init() {
ID: 1596,
}
}
func (t Toolchain) newLibva() (pkg.Artifact, string) {
const (
version = "2.23.0"
checksum = "UmF5tPyWIG_w5kiR3KFpoYbF7UUcaak5tyc-RhOheNTwQlLkPlifreFYCM9FQxbq"
)
return t.NewPackage("libva", version, newFromGitHub(
"intel/libva",
version,
checksum,
), nil, &MesonHelper{
Setup: []KV{
{"Dwith_x11", "yes"},
{"Dwith_glx", "yes"},
{"Dwith_wayland", "yes"},
},
},
Libdrm,
LibXfixes,
Libglvnd,
Wayland,
KernelHeaders,
), version
}
func init() {
artifactsM[Libva] = Metadata{
f: Toolchain.newLibva,
Name: "libva",
Description: "an implementation for VA-API (Video Acceleration API)",
Website: "https://01.org/vaapi",
Dependencies: P{
Libdrm,
LibXfixes,
Libglvnd,
Wayland,
},
ID: 1752,
}
}
func (t Toolchain) newMesa() (pkg.Artifact, string) {
const (
version = "26.1.0"
checksum = "zU0fjqevySBaoi_5SLW3e2UffmGeBdxOuHmAHTH68n2hV-sjYoqg30koLqFXuk5y"
)
return t.NewPackage("mesa", version, newFromGitLab(
"gitlab.freedesktop.org",
"mesa/mesa",
"mesa-"+version,
checksum,
), nil, &MesonHelper{
Setup: []KV{
{"Dplatforms", "x11,wayland"},
{"Dvideo-codecs", "all"},
{"Dglvnd", "enabled"},
{"Dgbm", "enabled"},
{"Dgallium-drivers", strings.Join([]string{
"asahi", // Apple AGX
"crocus", // Intel legacy
"etnaviv", // Vivante GPU designs (mostly NXP/Marvell SoCs)
"freedreno", // Qualcomm Adreno (all Qualcomm SoCs)
"i915", // Intel extra legacy
"iris", // new Intel (Broadwell+)
"lima", // ARM Mali 4xx
"llvmpipe", // software renderer
"nouveau", // Nvidia
"panfrost", // ARM Mali Midgard and up (T/G series)
"r300", // very old AMD
"r600", // less old AMD
"radeonsi", // new AMD (GCN+)
"softpipe", // older software renderer
"svga", // VMWare virtualized GPU
"tegra", // Nvidia Tegra SoCs
"v3d", // Broadcom VC5 (Raspberry Pi 4)
"vc4", // Broadcom VC4 (Raspberry Pi 0-3)
"virgl", // QEMU virtualized GPU (aka VirGL)
"zink", // generic OpenGL over Vulkan, experimental
// d3d12: WSL emulated GPU (aka Dozen)
// ethosu: accelerator
// rocket: accelerator
}, ",")},
{"Dvulkan-drivers", strings.Join([]string{
"amd", // AMD (aka RADV)
"broadcom", // Broadcom VC5 (Raspberry Pi 4, aka V3D)
"freedreno", // Qualcomm Adreno (all Qualcomm SoCs)
"intel", // new Intel (aka ANV)
"intel_hasvk", // Intel Haswell/Broadwell, "legacy" Vulkan driver (https://www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code)
"panfrost", // ARM Mali Midgard and up (T/G series)
"swrast", // software renderer (aka Lavapipe)
"virtio", // QEMU virtualized GPU (aka VirGL)
"imagination", // PowerVR Rogue
"asahi", // Apple AGX
"gfxstream", // Android virtualized GPU
// nouveau: Nouveau (aka NVK), requires rust
// microsoft-experimental: WSL virtualized GPU (aka DZN/Dozen)
// kosmickrisp: macOS-specific
}, ",")},
{"Dvulkan-layers", strings.Join([]string{
"device-select",
"intel-nullhw",
"overlay",
"screenshot",
"anti-lag",
"vram-report-limit",
}, ",")},
{"Dfreedreno-kmds", "msm,virtio"},
{"Damdgpu-virtio", "true"},
},
},
M4,
PythonPackaging,
PythonMako,
PythonPyYAML,
PythonPycparser,
Glslang,
SPIRVLLVMTranslator,
Zlib,
Zstd,
Gzip,
Ncurses,
Libglvnd,
Libexpat,
Libva,
Libdrm,
Elfutils,
Bison,
Flex,
LMSensors,
Libconfig,
LibdisplayInfo,
Wayland,
WaylandProtocols,
Libxshmfence,
LibXxf86vm,
LibXrandr,
LibxcbUtilKeysyms,
Libpng,
Libarchive,
KernelHeaders,
), version
}
func init() {
artifactsM[Mesa] = Metadata{
f: Toolchain.newMesa,
Name: "mesa",
Description: "open source implementations of OpenGL, OpenGL ES, Vulkan, OpenCL, and more",
Website: "https://mesa3d.org",
Dependencies: P{
Libdrm,
Elfutils,
LMSensors,
LibdisplayInfo,
Wayland,
Libxshmfence,
LibXxf86vm,
LibXrandr,
LibxcbUtilKeysyms,
Libpng,
},
ID: 1970,
latest: (*Versions).getStable,
}
}

View File

@@ -382,3 +382,27 @@ func init() {
ID: 3549,
}
}
func (t Toolchain) newPerlTestCmd() (pkg.Artifact, string) {
const (
version = "1.09"
checksum = "gpGUwyC9IozDiYSgW_kXARNfXsTPFa6cTowJmmCBbPqcs2-pONZca_SB06FGy-7H"
)
return t.newViaPerlMakeMaker("Test::Cmd", version, newFromCPAN(
"NEILB",
"Test-Cmd",
version,
checksum,
), nil), version
}
func init() {
artifactsM[PerlTestCmd] = Metadata{
f: Toolchain.newPerlTestCmd,
Name: "perl-Test::Cmd",
Description: "portable testing of commands and scripts",
Website: "https://metacpan.org/release/Test-Cmd",
ID: 6014,
}
}

31
internal/rosa/pixman.go Normal file
View File

@@ -0,0 +1,31 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newPixman() (pkg.Artifact, string) {
const (
version = "0.46.4"
checksum = "iECDxLG9SxUrvGHqeDoaBa-b3uqdT5DC4zudjtrwb8Wodq82pyacmFNEAo4SDsiE"
)
return t.NewPackage("pixman", version, newFromGitLab(
"gitlab.freedesktop.org",
"pixman/pixman",
"pixman-"+version,
checksum,
), nil, &MesonHelper{
Setup: []KV{
{"Dtests", "enabled"},
},
}), version
}
func init() {
artifactsM[Pixman] = Metadata{
f: Toolchain.newPixman,
Name: "pixman",
Description: "a low-level software library for pixel manipulation",
Website: "https://pixman.org/",
ID: 3648,
}
}

View File

@@ -186,12 +186,12 @@ func init() {
}
}
func (t Toolchain) newXCBUtilKeysyms() (pkg.Artifact, string) {
func (t Toolchain) newLibxcbUtilKeysyms() (pkg.Artifact, string) {
const (
version = "0.4.1"
checksum = "-EEje12UEjtFBuIjb6Fy4cxEghV20BXwQ1BLvhtvSuVcrFkp_X-ZHRM48wAspXZ4"
)
return t.NewPackage("xcb-util-keysyms", version, newTar(
return t.NewPackage("libxcb-util-keysyms", version, newTar(
"https://xcb.freedesktop.org/dist/xcb-util-keysyms-"+version+".tar.gz",
checksum,
pkg.TarGzip,
@@ -202,10 +202,10 @@ func (t Toolchain) newXCBUtilKeysyms() (pkg.Artifact, string) {
), version
}
func init() {
artifactsM[XCBUtilKeysyms] = Metadata{
f: Toolchain.newXCBUtilKeysyms,
artifactsM[LibxcbUtilKeysyms] = Metadata{
f: Toolchain.newLibxcbUtilKeysyms,
Name: "xcb-util-keysyms",
Name: "libxcb-util-keysyms",
Description: "standard X key constants and conversion to/from keycodes",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-keysyms",
@@ -217,6 +217,135 @@ func init() {
}
}
func (t Toolchain) newLibxcbUtilImage() (pkg.Artifact, string) {
const (
version = "0.4.1"
checksum = "47pvXmFwaUBZIrJ4CE9xjTQIFyxeqoNAL-DshlB11GZ_jjI3G1a6KF0K7mtBQ1E7"
)
return t.NewPackage("libxcb-util-image", version, newTar(
"https://xcb.freedesktop.org/dist/xcb-util-image-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
PkgConfig,
LibxcbUtil,
), version
}
func init() {
artifactsM[LibxcbUtilImage] = Metadata{
f: Toolchain.newLibxcbUtilImage,
Name: "libxcb-util-image",
Description: "XCB port of Xlib's XImage and XShmImage functions",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-image",
Dependencies: P{
LibxcbUtil,
},
ID: 5168,
}
}
func (t Toolchain) newLibxcbUtilWM() (pkg.Artifact, string) {
const (
version = "0.4.2"
checksum = "g0VZgMU9hcIgyXb3XxBR9xqsvUMBd9qt_Dbmwoj2h5y24pODr_S_D0DhRsuXUNjF"
)
return t.NewPackage("libxcb-util-wm", version, newTar(
"https://xcb.freedesktop.org/dist/xcb-util-wm-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
M4,
PkgConfig,
XCB,
), version
}
func init() {
artifactsM[LibxcbUtilWM] = Metadata{
f: Toolchain.newLibxcbUtilWM,
Name: "libxcb-util-wm",
Description: "XCB client and window-manager helpers for ICCCM & EWMH",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-wm",
Dependencies: P{
XCB,
},
ID: 5170,
}
}
func (t Toolchain) newLibxcbUtil() (pkg.Artifact, string) {
const (
version = "0.4.1"
checksum = "YMXGQUQbF6PoEAGflvYnJYsLWjti6sL_ifY47wIXTNGVM3tQ8u41nkBYN4K1D5CD"
)
return t.NewPackage("libxcb-util", version, newTar(
"https://www.x.org/releases/individual/xcb/"+
"xcb-util-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
PkgConfig,
utilMacros,
XCB,
), version
}
func init() {
artifactsM[LibxcbUtil] = Metadata{
f: Toolchain.newLibxcbUtil,
Name: "libxcb-util",
Description: "XCB utility libraries",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-util",
Dependencies: P{
XCB,
},
ID: 5165,
}
}
func (t Toolchain) newLibxcbRenderUtil() (pkg.Artifact, string) {
const (
version = "0.3.10"
checksum = "n08L8PyCoOd7v2vb6fSVq5Pq6JtteXVh9K2wrQMTNwGMf_Fjpi6i3HWF-TMFSVTI"
)
return t.NewPackage("libxcb-render-util", version, newTar(
"https://www.x.org/releases/individual/xcb/"+
"xcb-util-renderutil-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
PkgConfig,
utilMacros,
XCB,
), version
}
func init() {
artifactsM[LibxcbRenderUtil] = Metadata{
f: Toolchain.newLibxcbRenderUtil,
Name: "libxcb-render-util",
Description: "XCB convenience functions for the Render extension",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-render-util",
Dependencies: P{
XCB,
},
ID: 5169,
}
}
func (t Toolchain) newLibX11() (pkg.Artifact, string) {
const (
version = "1.8.13"
@@ -298,6 +427,123 @@ func init() {
}
}
func (t Toolchain) newLibXfixes() (pkg.Artifact, string) {
const (
version = "6.0.2"
checksum = "_-kJfKZ7cE3NNeMr6NLSXCmsyP7MVEHVPLNfxatz2qBy3_fZJvPMQwZNOC9y6V5L"
)
return t.NewPackage("libXfixes", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxfixes",
"libXfixes-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
XorgProto,
LibX11,
), version
}
func init() {
artifactsM[LibXfixes] = Metadata{
f: Toolchain.newLibXfixes,
Name: "libXfixes",
Description: "Xlib-based library for the XFIXES Extension",
Website: "https://www.freedesktop.org/wiki/Software/FixesExt/",
Dependencies: P{
LibX11,
},
ID: 1775,
}
}
func (t Toolchain) newLibXi() (pkg.Artifact, string) {
const (
version = "1.8.2"
checksum = "F5g6yRPPql5QQDCFMiIpl3tvwm0_5Y-anUXX_mX-u5F5E0mSB22azREW99p6Zwso"
)
return t.NewPackage("libXi", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxi",
"libXi-"+version,
checksum), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
LibX11,
LibXext,
Libxslt,
LibXfixes,
), version
}
func init() {
artifactsM[LibXi] = Metadata{
f: Toolchain.newLibXi,
Name: "libXi",
Description: "Xlib-based library for input",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxi",
Dependencies: P{
LibX11,
},
ID: 1778,
}
}
func (t Toolchain) newLibXtst() (pkg.Artifact, string) {
const (
version = "1.2.5"
checksum = "WOoDvv1aUbkupcuo3I4dMe9rH2eGoi7CF2ncA_RRX1JAekqGr3_YQfYiQtakNCiP"
)
return t.NewPackage("libXtst", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxtst",
"libXtst-"+version,
checksum), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
LibX11,
LibXext,
Libxslt,
LibXi,
LibXfixes,
), version
}
func init() {
artifactsM[LibXtst] = Metadata{
f: Toolchain.newLibXtst,
Name: "libXtst",
Description: "Xlib-based library for XTST",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxtst",
Dependencies: P{
LibX11,
},
ID: 1794,
}
}
func (t Toolchain) newLibXrender() (pkg.Artifact, string) {
const (
version = "0.9.12"
@@ -335,6 +581,42 @@ func init() {
}
}
func (t Toolchain) newLibxft() (pkg.Artifact, string) {
const (
version = "2.3.9"
checksum = "uHJtVwC4G9SnUSE8_KMnUR6SxSfLxEaausYSexZ0I8p4tgdxOqjKMuX_rKzfJR79"
)
return t.NewPackage("libxft", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxft",
"libXft-"+version,
checksum),
nil,
&MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
Freetype,
FontConfig,
utilMacros,
LibX11,
LibXext,
LibXrender,
Libexpat,
), version
}
func init() {
artifactsM[LibXft] = Metadata{
f: Toolchain.newLibxft,
Name: "libxft",
Description: "Xorg font library",
Website: "https://www.freedesktop.org/wiki/Software/Xft/",
ID: 1777,
}
}
func (t Toolchain) newLibxshmfence() (pkg.Artifact, string) {
const (
version = "1.3.3"
@@ -446,6 +728,264 @@ func init() {
}
}
func (t Toolchain) newFontUtil() (pkg.Artifact, string) {
const (
version = "1.4.2"
checksum = "YWiaIxkq-N2yNdbGa_RF1S0UkQq6xsgoRT73WZP2DOmyH_CJ0TAkpQjId657MQmh"
)
return t.NewPackage("font-util", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/font/util",
"font-util-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
), version
}
func init() {
artifactsM[FontUtil] = Metadata{
f: Toolchain.newFontUtil,
Name: "font-util",
Description: "X.Org font package creation/installation utilities",
Website: "https://gitlab.freedesktop.org/xorg/font/util",
ID: 15055,
}
}
func (t Toolchain) newLibfontenc() (pkg.Artifact, string) {
const (
version = "1.1.9"
checksum = "XqosXfbVwaoYzG9vVyRCl3eatwjASoJdLZsxQ37NN8S_jTyqNmbxpRSJGImJj7RS"
)
return t.NewPackage("libfontenc", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libfontenc",
"libfontenc-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
FontUtil,
XorgProto,
), version
}
func init() {
artifactsM[Libfontenc] = Metadata{
f: Toolchain.newLibfontenc,
Name: "libfontenc",
Description: "X font encoding library",
Website: "https://gitlab.freedesktop.org/xorg/lib/libfontenc",
ID: 1613,
}
}
func (t Toolchain) newLibxkbfile() (pkg.Artifact, string) {
const (
version = "1.2.0"
checksum = "WUtph1ab0AyATahlwljchBxZJcpjYrjyhCK9DW2VO0uXEXaN22GWmUaibcA83i_B"
)
return t.NewPackage("libxkbfile", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxkbfile",
"libxkbfile-"+version,
checksum,
), nil, (*MesonHelper)(nil),
LibX11,
), version
}
func init() {
artifactsM[Libxkbfile] = Metadata{
f: Toolchain.newLibxkbfile,
Name: "libxkbfile",
Description: "XKB file handling routines",
Website: "http://www.x.org/wiki/XKB",
Dependencies: P{
LibX11,
},
ID: 1781,
}
}
func (t Toolchain) newXkbcomp() (pkg.Artifact, string) {
const (
version = "1.5.0"
checksum = "ttICW8ZPbljI-nw2kknvxFhwFoDK40iAMBeZDLAHYsHf3B6UPO_zc9TpzZYRRyZH"
)
return t.NewPackage("xkbcomp", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/app/xkbcomp",
"xkbcomp-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
Bison,
utilMacros,
Libxkbfile,
), version
}
func init() {
artifactsM[Xkbcomp] = Metadata{
f: Toolchain.newXkbcomp,
Name: "xkbcomp",
Description: "XKB keyboard description compiler",
Website: "http://www.x.org/wiki/XKB",
Dependencies: P{
Libxkbfile,
},
ID: 15018,
}
}
func (t Toolchain) newLibXfont2() (pkg.Artifact, string) {
const (
version = "2.0.7"
checksum = "jv9BZNA02493KB8j1lfAErF5SA3ZFcAhm3_UVJ--Bp1maz-vNprl_wXpkHApBi9M"
)
return t.NewPackage("libXfont2", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxfont",
"libXfont2-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
Freetype,
XorgProto,
Libxtrans,
Libfontenc,
), version
}
func init() {
artifactsM[LibXfont2] = Metadata{
f: Toolchain.newLibXfont2,
Name: "libXfont2",
Description: "X font handling library for server & utilities",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxfont",
Dependencies: P{
Freetype,
Libfontenc,
},
ID: 17165,
}
}
func (t Toolchain) newLibxcvt() (pkg.Artifact, string) {
const (
version = "0.1.3"
checksum = "IfIA7SxlHMWh681e1AgYmZcRAfkZd5LlzmqcMRifNY5nNVRrUx_wnoaidAv0Yu03"
)
return t.NewPackage("libxcvt", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxcvt",
"libxcvt-"+version,
checksum,
), nil, (*MesonHelper)(nil)), version
}
func init() {
artifactsM[Libxcvt] = Metadata{
f: Toolchain.newLibxcvt,
Name: "libxcvt",
Description: "VESA CVT standard timing modeline generation library & utility",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcvt",
ID: 235147,
}
}
func (t Toolchain) newLibXdmcp() (pkg.Artifact, string) {
const (
version = "1.1.5"
checksum = "N6AJSv9pmeBedFn8KuSIOUGvTken4rkypNWVE2KfPlliwkfIbhfXrt5YHZkBMUHp"
)
return t.NewPackage("libXdmcp", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxdmcp",
"libXdmcp-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
XorgProto,
), version
}
func init() {
artifactsM[LibXdmcp] = Metadata{
f: Toolchain.newLibXdmcp,
Name: "libXdmcp",
Description: "X Display Manager Control Protocol library",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxdmcp",
ID: 1772,
}
}
func (t Toolchain) newXkeyboardConfig() (pkg.Artifact, string) {
const (
version = "2.47"
checksum = "E03PsPIaRrxPAuKgDGSQyPiJB49wXtyyvdV0lVx3_G-pelMMlaFLkoTDHTHG_qgA"
)
return t.NewPackage("xkeyboard-config", version, newFromGitLab(
"gitlab.freedesktop.org",
"xkeyboard-config/xkeyboard-config",
"xkeyboard-config-"+version,
checksum,
), nil, (*MesonHelper)(nil),
Perl,
), version
}
func init() {
artifactsM[XkeyboardConfig] = Metadata{
f: Toolchain.newXkeyboardConfig,
Name: "xkeyboard-config",
Description: "the non-arch keyboard configuration database for X Window",
Website: "https://www.freedesktop.org/wiki/Software/XKeyboardConfig/",
ID: 5191,
}
}
func (t Toolchain) newLibpciaccess() (pkg.Artifact, string) {
const (
version = "0.19"
@@ -477,3 +1017,87 @@ func init() {
ID: 1703,
}
}
func (t Toolchain) newXserver() (pkg.Artifact, string) {
const (
version = "21.1.22"
checksum = "prLT2wKecBu5m9w1ThgIt0GvenNpjKXoOyvTiMA1oQTlP0QHh6QiWsdvH3OmUwNo"
)
return t.NewPackage("xserver", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/xserver",
"xorg-server-"+version,
checksum,
), nil, &MesonHelper{
Setup: []KV{
{"Dxorg", "true"},
{"Dxephyr", "true"},
{"Dxnest", "true"},
{"Dipv6", "false"},
{"Dudev", "false"},
{"Dudev_kms", "false"},
{"Dglx", "false"},
// ../../usr/src/xserver/glamor/glamor_glx.c:24:10: fatal error: 'epoxy/glx.h' file not found
{"Dglamor", "false"},
},
},
Gawk,
XorgProto,
Libxtrans,
Libxshmfence,
Pixman,
Libbsd,
Xkbcomp,
XkeyboardConfig,
LibXfont2,
DBus,
FontUtil,
Libxcvt,
LibXext,
Libmd,
LibXdmcp,
Libtirpc,
Libepoxy,
LibxcbUtil,
LibxcbUtilImage,
LibxcbUtilWM,
LibxcbUtilKeysyms,
LibxcbRenderUtil,
Libpciaccess,
KernelHeaders,
), version
}
func init() {
artifactsM[Xserver] = Metadata{
f: Toolchain.newXserver,
Name: "xserver",
Description: "X server",
Website: "https://gitlab.freedesktop.org/xorg/xserver",
Dependencies: P{
Xkbcomp,
XkeyboardConfig,
XCB,
Pixman,
Libmd,
Libbsd,
Libtirpc,
Libxcvt,
LibXdmcp,
LibXfont2,
Libpciaccess,
// Xephyr
LibxcbUtilImage,
LibxcbUtilWM,
LibxcbUtilKeysyms,
LibxcbRenderUtil,
},
ID: 5250,
}
}

100
internal/rosa/zip.go Normal file
View File

@@ -0,0 +1,100 @@
package rosa
import (
"strings"
"hakurei.app/internal/pkg"
)
func (t Toolchain) newZip() (pkg.Artifact, string) {
const (
version = "3.0"
checksum = "4-fw0fXSm7qMvJ6FyRs9VRsURdkJ_1A8f8ihjxXWtj2ulEL-Io6ouKXTn0cE0wtT"
)
return t.New("zip-"+version, 0, t.AppendPresets(nil,
Make,
Coreutils,
Unzip,
), nil, nil, `
cd /usr/src/zip/
chmod +x unix/configure
unix/configure
make -f unix/Makefile generic
mkdir -p /work/system/bin/
mv zip /work/system/bin/
`, pkg.Path(AbsUsrSrc.Append("zip"), true, t.NewPatchedSource(
"zip", version, newTar(
"https://downloads.sourceforge.net/project/infozip/"+
"Zip%203.x%20%28latest%29/"+version+"/"+
"zip"+strings.ReplaceAll(version, ".", "")+".tar.gz",
checksum,
pkg.TarGzip,
), false,
KV{"zip-gentoo-patch",
`https://bugs.gentoo.org/869203
See also OE's variant: https://cgit.openembedded.org/openembedded-core/commit/?id=f898db2607ba3837f81292af92bc8cb605b96cb3
--- a/unix/configure
+++ b/unix/configure
@@ -507,18 +507,18 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/
# add NO_'function_name' to flags if missing
for func in rmdir strchr strrchr rename mktemp mktime mkstemp
do
echo Check for $func
- echo "int main(){ $func(); return 0; }" > conftest.c
+ echo "char $func(); int main(){ return $func(); }" > conftest.c
$CC $BFLAG -o conftest conftest.c >/dev/null 2>/dev/null
[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_` + "`echo $func | tr '[a-z]' '[A-Z]'`" + `
done
echo Check for memset
-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c
+echo "int main(){ char memset(); return memset(); }" > conftest.c
$CC -o conftest conftest.c >/dev/null 2>/dev/null
[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM"
echo Check for memmove
@@ -551,11 +551,11 @@ $CC $CFLAGS -c conftest.c >/dev/null 2>/
[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_ERRNO"
echo Check for directory libraries
cat > conftest.c << _EOF_
-int main() { return closedir(opendir(".")); }
+int main() { char closedir(); char opendir(); return closedir(opendir()); }
_EOF_
$CC -o conftest conftest.c >/dev/null 2>/dev/null
if [ $? -ne 0 ]; then
OPT=""
@@ -573,11 +573,11 @@ fi
# Dynix/ptx 1.3 needed this
echo Check for readlink
-echo "int main(){ return readlink(); }" > conftest.c
+echo "int main(){ char readlink(); return readlink(); }" > conftest.c
$CC -o conftest conftest.c >/dev/null 2>/dev/null
if [ $? -ne 0 ]; then
$CC -o conftest conftest.c -lseq >/dev/null 2>/dev/null
[ $? -eq 0 ] && LFLAGS2="${LFLAGS2} -lseq"
fi
`}))), version
}
func init() {
artifactsM[Zip] = Metadata{
f: Toolchain.newZip,
Name: "zip",
Description: "portable compression/archiver utilities",
Website: "https://infozip.sourceforge.net/",
ID: 10080,
}
}