blob: d2654a2932d1f125a4606bc2c8bf191deb99cf67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package rosa
import (
"strings"
"hakurei.app/internal/pkg"
)
func (t Toolchain) newLibxml2() pkg.Artifact {
const (
version = "2.15.1"
checksum = "pYzAR3cNrEHezhEMirgiq7jbboLzwMj5GD7SQp0jhSIMdgoU4G9oU9Gxun3zzUIU"
)
return t.New("libxml2-"+version, []pkg.Artifact{
t.Load(Make),
}, nil, nil, `
cd /usr/src/
tar xf libxml2.tar.xz
mv libxml2-`+version+` libxml2
cd "$(mktemp -d)"
/usr/src/libxml2/configure \
--prefix=/system \
--build="${ROSA_TRIPLE}"
make "-j$(nproc)" check
make DESTDIR=/work install
`, pkg.Path(AbsUsrSrc.Append("libxml2.tar.xz"), false, pkg.NewHTTPGet(
nil, "https://download.gnome.org/sources/libxml2/"+
strings.Join(strings.Split(version, ".")[:2], ".")+
"/libxml2-"+version+".tar.xz",
mustDecode(checksum),
)))
}
func init() { artifactsF[Libxml2] = Toolchain.newLibxml2 }
|