From 1a2699b4867b7a736eedd973d69659ef468a994a Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 20 May 2026 05:01:06 +0900 Subject: [PATCH] internal/rosa/package: migrate multiple packages Signed-off-by: Ophestra --- internal/rosa/p11.go | 38 -------------------------- internal/rosa/package/p11-kit.az | 31 +++++++++++++++++++++ internal/rosa/package/pcre2.az | 30 +++++++++++++++++++++ internal/rosa/package/pixman.az | 19 +++++++++++++ internal/rosa/package/pkg-config.az | 26 ++++++++++++++++++ internal/rosa/package/procps.az | 29 ++++++++++++++++++++ internal/rosa/pcre2.go | 42 ----------------------------- internal/rosa/pixman.go | 29 -------------------- internal/rosa/pkg-config.go | 34 ----------------------- internal/rosa/procps.go | 37 ------------------------- 10 files changed, 135 insertions(+), 180 deletions(-) delete mode 100644 internal/rosa/p11.go create mode 100644 internal/rosa/package/p11-kit.az create mode 100644 internal/rosa/package/pcre2.az create mode 100644 internal/rosa/package/pixman.az create mode 100644 internal/rosa/package/pkg-config.az create mode 100644 internal/rosa/package/procps.az delete mode 100644 internal/rosa/pcre2.go delete mode 100644 internal/rosa/pixman.go delete mode 100644 internal/rosa/pkg-config.go delete mode 100644 internal/rosa/procps.go diff --git a/internal/rosa/p11.go b/internal/rosa/p11.go deleted file mode 100644 index 985714a7..00000000 --- a/internal/rosa/p11.go +++ /dev/null @@ -1,38 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newP11Kit() (pkg.Artifact, string) { - const ( - version = "0.26.2" - checksum = "3ei-6DUVtYzrRVe-SubtNgRlweXd6H2qHmUu-_5qVyIn6gSTvZbGS2u79Y8IFb2N" - ) - return t.NewPackage("p11-kit", version, t.newTagRemote( - "https://github.com/p11-glue/p11-kit.git", - version, checksum, - ), nil, &MesonHelper{ - Setup: []KV{ - {"Dsystemd", "disabled"}, - {"Dlibffi", "enabled"}, - }, - }, - Coreutils, - Diffutils, - - Libtasn1, - ), version -} -func init() { - native.mustRegister(Toolchain.newP11Kit, &Metadata{ - Name: "p11-kit", - Description: "provides a way to load and enumerate PKCS#11 modules", - Website: "https://p11-glue.freedesktop.org/p11-kit.html", - - Dependencies: P{ - Libffi, - Libtasn1, - }, - - ID: 2582, - }) -} diff --git a/internal/rosa/package/p11-kit.az b/internal/rosa/package/p11-kit.az new file mode 100644 index 00000000..9082dcc9 --- /dev/null +++ b/internal/rosa/package/p11-kit.az @@ -0,0 +1,31 @@ +package p11-kit { + description = "provides a way to load and enumerate PKCS#11 modules"; + website = "https://p11-glue.freedesktop.org/p11-kit.html"; + anitya = 2582; + + version* = "0.26.2"; + source = remoteGit { + url = "https://github.com/p11-glue/p11-kit.git"; + tag = version; + checksum = "3ei-6DUVtYzrRVe-SubtNgRlweXd6H2qHmUu-_5qVyIn6gSTvZbGS2u79Y8IFb2N"; + }; + + exec = meson { + setup = { + "Dsystemd": "disabled"; + "Dlibffi": "enabled"; + }; + }; + + inputs = [ + coreutils, + diffutils, + + libtasn1, + ]; + + runtime = [ + libffi, + libtasn1, + ]; +} diff --git a/internal/rosa/package/pcre2.az b/internal/rosa/package/pcre2.az new file mode 100644 index 00000000..c7fc505c --- /dev/null +++ b/internal/rosa/package/pcre2.az @@ -0,0 +1,30 @@ +package pcre2 { + description = "a set of C functions that implement regular expression pattern matching"; + website = "https://pcre2project.github.io/pcre2"; + anitya = 5832; + + version* = "10.47"; + source = remoteGitHubRelease { + suffix = "PCRE2Project/pcre2"; + tag = "pcre2-"+version; + name = "pcre2-"+version+".tar.bz2"; + checksum = "IbC24vVayju6nB9EhrBPSDexk22wDecdpyrjgC3nCZXkwTnUjq4CD2q5sopqu6CW"; + compress = bzip2; + }; + + early = ` +# RunGrepTest expects /bin/echo +ln -s ../system/bin/toybox /bin/echo +`; + + exec = make { + configure = { + "enable-jit"; + "enable-pcre2-8"; + "enable-pcre2-16"; + "enable-pcre2-32"; + }; + }; + + inputs = [ diffutils ]; +} diff --git a/internal/rosa/package/pixman.az b/internal/rosa/package/pixman.az new file mode 100644 index 00000000..96ef4a80 --- /dev/null +++ b/internal/rosa/package/pixman.az @@ -0,0 +1,19 @@ +package pixman { + description = "a low-level software library for pixel manipulation"; + website = "https://pixman.org"; + anitya = 3648; + + version* = "0.46.4"; + source = remoteGitLab { + domain = "gitlab.freedesktop.org"; + suffix = "pixman/pixman"; + ref = "pixman-"+version; + checksum = "iECDxLG9SxUrvGHqeDoaBa-b3uqdT5DC4zudjtrwb8Wodq82pyacmFNEAo4SDsiE"; + }; + + exec = meson { + setup = { + "Dtests": "enabled"; + }; + }; +} diff --git a/internal/rosa/package/pkg-config.az b/internal/rosa/package/pkg-config.az new file mode 100644 index 00000000..b8830cf5 --- /dev/null +++ b/internal/rosa/package/pkg-config.az @@ -0,0 +1,26 @@ +package pkg-config { + description = "a helper tool used when compiling applications and libraries"; + website = "https://pkgconfig.freedesktop.org"; + anitya = 3649; + + version* = "0.29.2"; + source = remoteGitLab { + domain = "gitlab.freedesktop.org"; + suffix = "pkg-config/pkg-config"; + ref = "pkg-config-"+version; + checksum = "6UsGqEMA8EER_5b9N0b32UCqiRy39B6_RnPfvuslWhtFV1qYD4DfS10crGZN_TP2"; + }; + + exec = make { + generate = "./autogen.sh --no-configure"; + configure = { + "CFLAGS": "'-Wno-int-conversion'"; + "with-internal-glib"; + }; + }; + + inputs = [ + automake, + libtool, + ]; +} diff --git a/internal/rosa/package/procps.az b/internal/rosa/package/procps.az new file mode 100644 index 00000000..3c351a87 --- /dev/null +++ b/internal/rosa/package/procps.az @@ -0,0 +1,29 @@ +package procps { + description = "command line and full screen utilities for browsing procfs"; + website = "https://gitlab.com/procps-ng/procps"; + anitya = 3708; + + version* = "4.0.6"; + source = remoteGitLab { + domain = "gitlab.com"; + suffix = "procps-ng/procps"; + ref = "v"+version; + checksum = "pl_fZLvDlv6iZTkm8l_tHFpzTDVFGCiSJEs3eu0zAX6u36AV36P_En8K7JPScRWM"; + }; + + exec = make { + generate = "./autogen.sh"; + configure = { + "without-ncurses"; + }; + }; + + inputs = [ + automake, + gettext, + libtool, + + gzip, + pkg-config, + ]; +} diff --git a/internal/rosa/pcre2.go b/internal/rosa/pcre2.go deleted file mode 100644 index c2c41ac8..00000000 --- a/internal/rosa/pcre2.go +++ /dev/null @@ -1,42 +0,0 @@ -package rosa - -import ( - "hakurei.app/internal/pkg" -) - -func (t Toolchain) newPCRE2() (pkg.Artifact, string) { - const ( - version = "10.47" - checksum = "IbC24vVayju6nB9EhrBPSDexk22wDecdpyrjgC3nCZXkwTnUjq4CD2q5sopqu6CW" - ) - return t.NewPackage("pcre2", version, newFromGitHubRelease( - "PCRE2Project/pcre2", - "pcre2-"+version, - "pcre2-"+version+".tar.bz2", - checksum, - pkg.TarBzip2, - ), &PackageAttr{ - ScriptEarly: ` -# RunGrepTest expects /bin/echo -ln -s ../system/bin/toybox /bin/echo -`, - }, &MakeHelper{ - Configure: []KV{ - {"enable-jit"}, - {"enable-pcre2-8"}, - {"enable-pcre2-16"}, - {"enable-pcre2-32"}, - }, - }, - Diffutils, - ), version -} -func init() { - native.mustRegister(Toolchain.newPCRE2, &Metadata{ - Name: "pcre2", - Description: "a set of C functions that implement regular expression pattern matching", - Website: "https://pcre2project.github.io/pcre2/", - - ID: 5832, - }) -} diff --git a/internal/rosa/pixman.go b/internal/rosa/pixman.go deleted file mode 100644 index 4fe6d5df..00000000 --- a/internal/rosa/pixman.go +++ /dev/null @@ -1,29 +0,0 @@ -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() { - native.mustRegister(Toolchain.newPixman, &Metadata{ - Name: "pixman", - Description: "a low-level software library for pixel manipulation", - Website: "https://pixman.org/", - - ID: 3648, - }) -} diff --git a/internal/rosa/pkg-config.go b/internal/rosa/pkg-config.go deleted file mode 100644 index fec4b3cd..00000000 --- a/internal/rosa/pkg-config.go +++ /dev/null @@ -1,34 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newPkgConfig() (pkg.Artifact, string) { - const ( - version = "0.29.2" - checksum = "6UsGqEMA8EER_5b9N0b32UCqiRy39B6_RnPfvuslWhtFV1qYD4DfS10crGZN_TP2" - ) - return t.NewPackage("pkg-config", version, newFromGitLab( - "gitlab.freedesktop.org", - "pkg-config/pkg-config", - "pkg-config-"+version, - checksum, - ), nil, &MakeHelper{ - Generate: "./autogen.sh --no-configure", - Configure: []KV{ - {"CFLAGS", "'-Wno-int-conversion'"}, - {"with-internal-glib"}, - }, - }, - Automake, - Libtool, - ), version -} -func init() { - native.mustRegister(Toolchain.newPkgConfig, &Metadata{ - Name: "pkg-config", - Description: "a helper tool used when compiling applications and libraries", - Website: "https://pkgconfig.freedesktop.org/", - - ID: 3649, - }) -} diff --git a/internal/rosa/procps.go b/internal/rosa/procps.go deleted file mode 100644 index f4ad141a..00000000 --- a/internal/rosa/procps.go +++ /dev/null @@ -1,37 +0,0 @@ -package rosa - -import "hakurei.app/internal/pkg" - -func (t Toolchain) newProcps() (pkg.Artifact, string) { - const ( - version = "4.0.6" - checksum = "pl_fZLvDlv6iZTkm8l_tHFpzTDVFGCiSJEs3eu0zAX6u36AV36P_En8K7JPScRWM" - ) - return t.NewPackage("procps", version, newFromGitLab( - "gitlab.com", - "procps-ng/procps", - "v"+version, - checksum, - ), nil, &MakeHelper{ - Generate: "./autogen.sh", - Configure: []KV{ - {"without-ncurses"}, - }, - }, - Automake, - Gettext, - Libtool, - - Gzip, - PkgConfig, - ), version -} -func init() { - native.mustRegister(Toolchain.newProcps, &Metadata{ - Name: "procps", - Description: "command line and full screen utilities for browsing procfs", - Website: "https://gitlab.com/procps-ng/procps", - - ID: 3708, - }) -}