1
0
forked from rosa/hakurei
Files
hakurei/internal/rosa/x.go
Ophestra 4407e14dfc internal/rosa/x: migrate to xorgproto
This is much cleaner than the many protocol packages.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-03 04:09:36 +09:00

161 lines
3.5 KiB
Go

package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newUtilMacros() (pkg.Artifact, string) {
const (
version = "1.20.2"
checksum = "Ze8QH3Z3emC0pWFP-0nUYeMy7aBW3L_dxBBmVgcumIHNzEKc1iGTR-yUFR3JcM1G"
)
return t.NewPackage("util-macros", version, newTar(
"https://www.x.org/releases/individual/util/"+
"util-macros-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil)), version
}
func init() {
artifactsM[utilMacros] = Metadata{
f: Toolchain.newUtilMacros,
Name: "util-macros",
Description: "X.Org Autotools macros",
Website: "https://xorg.freedesktop.org/",
ID: 5252,
}
}
func (t Toolchain) newLibxtrans() (pkg.Artifact, string) {
const (
version = "1.6.0"
checksum = "1cxDCF59fLf1HyGDMcjR1L50ZbjD0RTTEDUpOJYcHXu6HUK_Ds0x-KREY7rLNxu9"
)
return t.NewPackage("libxtrans", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxtrans",
"xtrans-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
), version
}
func init() {
artifactsM[Libxtrans] = Metadata{
f: Toolchain.newLibxtrans,
Name: "libxtrans",
Description: "X Window System Protocols Transport layer shared code",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxtrans",
ID: 13441,
}
}
func (t Toolchain) newXorgProto() (pkg.Artifact, string) {
const (
version = "2025.1"
checksum = "pTwJiBJHKA6Rgm3cVDXy1lyvXNIUzTRaukvvYdk1xWoJ_1G-Dfjm9MyewuyIjoHz"
)
return t.NewPackage("xorgproto", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/proto/xorgproto",
"xorgproto-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
PkgConfig,
utilMacros,
), version
}
func init() {
artifactsM[XorgProto] = Metadata{
f: Toolchain.newXorgProto,
Name: "xorgproto",
Description: "X Window System unified protocol definitions",
Website: "https://gitlab.freedesktop.org/xorg/proto/xorgproto",
ID: 17190,
}
}
func (t Toolchain) newLibXau() (pkg.Artifact, string) {
const (
version = "1.0.12"
checksum = "G9AjnU_C160q814MCdjFOVt_mQz_pIt4wf4GNOQmGJS3UuuyMw53sfPvJ7WOqwXN"
)
return t.NewPackage("libXau", version, newTar(
"https://www.x.org/releases/individual/lib/"+
"libXau-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, &MakeHelper{
// ancient configure script
Generate: "autoreconf -if",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
XorgProto,
), version
}
func init() {
artifactsM[LibXau] = Metadata{
f: Toolchain.newLibXau,
Name: "libXau",
Description: "functions for handling Xauthority files and entries",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxau",
Dependencies: P{
XorgProto,
},
ID: 1765,
}
}
func (t Toolchain) newLibpciaccess() (pkg.Artifact, string) {
const (
version = "0.19"
checksum = "84H0c_U_7fMqo81bpuwyXGXtk4XvvFH_YK00UiOriv3YGsuAhmbo2IkFhmJnvu2x"
)
return t.NewPackage("libpciaccess", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libpciaccess",
"libpciaccess-"+version,
checksum,
), nil, &MesonHelper{
Setup: []KV{
{"Dzlib", "enabled"},
},
}), version
}
func init() {
artifactsM[Libpciaccess] = Metadata{
f: Toolchain.newLibpciaccess,
Name: "libpciaccess",
Description: "generic PCI access library",
Website: "https://gitlab.freedesktop.org/xorg/lib/libpciaccess",
Dependencies: P{
Zlib,
},
ID: 1703,
}
}