aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-26 01:26:03 +0900
committerOphestra <cat@gensokyo.uk>2026-01-26 01:26:54 +0900
commit763d2572feffeb6515d1b24852715b171ae33557 (patch)
tree559bf31662129bf2da9e7f6dc4f7999773cbe6b0 /internal
parentbb1b6beb87ea8e3734299f1b01b49b14901c5833 (diff)
internal/rosa: pkg-config artifact
Used by hakurei and many other programs. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/all.go3
-rw-r--r--internal/rosa/pkg-config.go29
2 files changed, 31 insertions, 1 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go
index 68ae8e91..4bc45a7a 100644
--- a/internal/rosa/all.go
+++ b/internal/rosa/all.go
@@ -24,8 +24,9 @@ const (
M4
Make
Ninja
- Perl
Patch
+ Perl
+ PkgConfig
Python
Rsync
Zlib
diff --git a/internal/rosa/pkg-config.go b/internal/rosa/pkg-config.go
new file mode 100644
index 00000000..d6ae9c83
--- /dev/null
+++ b/internal/rosa/pkg-config.go
@@ -0,0 +1,29 @@
+package rosa
+
+import "hakurei.app/internal/pkg"
+
+func (t Toolchain) newPkgConfig() pkg.Artifact {
+ const (
+ version = "0.29.2"
+ checksum = "gi7yAvkwo20Inys1tHbeYZ3Wjdm5VPkrnO0Q6_QZPCAwa1zrA8F4a63cdZDd-717"
+ )
+ return t.New("pkg-config-"+version, []pkg.Artifact{
+ t.Load(Make),
+ }, nil, nil, `
+cd "$(mktemp -d)"
+/usr/src/pkg-config/configure \
+ --prefix=/system \
+ --build="${ROSA_TRIPLE}" \
+ CFLAGS='-Wno-int-conversion' \
+ --with-internal-glib
+make "-j$(nproc)" check
+make DESTDIR=/work install
+`, pkg.Path(AbsUsrSrc.Append("pkg-config"), true, pkg.NewHTTPGetTar(
+ nil,
+ "https://pkgconfig.freedesktop.org/releases/"+
+ "pkg-config-"+version+".tar.gz",
+ mustDecode(checksum),
+ pkg.TarGzip,
+ )))
+}
+func init() { artifactsF[PkgConfig] = Toolchain.newPkgConfig }