Skip to content

Commit

Permalink
Add checkdeps field to package.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Zhao <git@gzgz.dev>
  • Loading branch information
GZGavinZhao authored and joebonrichie committed Oct 22, 2023
1 parent 8b94671 commit 373a143
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 10 deletions.
14 changes: 12 additions & 2 deletions man/package.yml.5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "PACKAGE\.YML" "5" "August 2023" ""
.TH "PACKAGE\.YML" "5" "October 2023" ""
.SH "NAME"
\fBpackage\.yml\fR \- Solus package build format
.SH "SYNOPSIS"
Expand Down Expand Up @@ -100,6 +100,16 @@ You may use full package names here, though it is preferable to use the \fBpkg\-
.IP
It is not required to list any package here that exists in the \fBsystem\.base\fR or \fBsystem\.devel\fR component\.
.IP "\[ci]" 4
\fBcheckdeps\fR [list]
.IP
Specifies the build and/or run dependencies required to build and/or run the tests of this package in an isolated environment (\fBsolbuild(1)\fR)\.
.IP
You may use full package names here, though it is preferable to use the \fBpkg\-config(1)\fR names\.
.IP
\fBypkg\-build(1)\fR understands pkgconfig dependencies denoted inside either the \fBpkgconfig($name)\fR identifier, or \fBpkgconfig32($name)\fR for emul32 build dependencies\.
.IP
It is not required to list any package here that exists in the \fBsystem\.base\fR or \fBsystem\.devel\fR component\.
.IP "\[ci]" 4
\fBclang\fR [boolean]
.IP
Set this key to \fByes\fR to force building this package with the \fBclang\fR compiler\. The build environment will be configured to use \fBclang\fR as the \fB$CC\fR and \fBclang++\fR as the \fB$CXX\fR variables\.
Expand Down Expand Up @@ -202,7 +212,7 @@ In the majority of cases, this is the desired behaviour in full build environmen
.IP
If set, the package will be rebuilt again with the \fBx86\-64\-v3\fR microarchitecture to enable libraries to be optimised to use newer hardware instructions such as \fBAdvanced Vector Extensions\fR\. From baseline (\fBx86\-64\fR) to v3 (\fBx86\-64\-v3\fR) it allows the compiler to use additional instructions such as, but not limited to; SSE4\.2, SSSE3, POPCNT, CMPXCHG16B, MOVBE and AVX2\.
.IP
The build will be configured to make use of the glibc HWCaps (hardware capabilities) feature, by placing the libraries into the library directory suffix of \fBglibc\-hwcaps/x86\-64\-v3\fR i\.e\. \fB/usr/lib64/glibc\-hwcaps/x86\-64\-v3\fR\.
The build will be configured to make use of the Glibc HWCaps (hardware capabilities) feature, by placing the libraries into the library directory suffix of \fBglibc\-hwcaps/x86\-64\-v3\fR i\.e\. \fB/usr/lib64/glibc\-hwcaps/x86\-64\-v3\fR\.
.IP
These libraries will be automatically loaded on the Solus installation if the hardware supports the \fBx86\-64\-v3\fR microarchitecture\.
.IP "\[ci]" 4
Expand Down
21 changes: 19 additions & 2 deletions man/package.yml.5.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions man/package.yml.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,22 @@ additional functionality.
It is not required to list any package here that exists in the `system.base`
or `system.devel` component.

* `checkdeps` [list]

Specifies the build and/or run dependencies required to build and/or run
the tests of
this package in an isolated environment (`solbuild(1)`).

You may use full package names here, though it is preferable to use the
`pkg-config(1)` names.

`ypkg-build(1)` understands pkgconfig dependencies denoted inside either
the `pkgconfig($name)` identifier, or `pkgconfig32($name)` for emul32
build dependencies.

It is not required to list any package here that exists in the `system.base`
or `system.devel` component.

* `clang` [boolean]

Set this key to `yes` to force building this package with the `clang`
Expand Down
2 changes: 1 addition & 1 deletion man/ypkg-build.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "YPKG\-BUILD" "1" "August 2023" ""
.TH "YPKG\-BUILD" "1" "October 2023" ""
.SH "NAME"
\fBypkg\-build\fR \- Build Solus ypkg files
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion man/ypkg-build.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ypkg-install-deps.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "YPKG\-INSTALL\-DEPS" "1" "August 2023" ""
.TH "YPKG\-INSTALL\-DEPS" "1" "October 2023" ""
.SH "NAME"
\fBypkg\-install\-deps\fR \- Install build dependencies
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion man/ypkg-install-deps.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ypkg.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "YPKG" "1" "August 2023" ""
.TH "YPKG" "1" "October 2023" ""
.SH "NAME"
\fBypkg\fR \- Build Solus ypkg files
.SH "SYNOPSIS"
Expand Down
2 changes: 1 addition & 1 deletion man/ypkg.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions ypkg-install-deps
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ def main():
if not idb.has_package(dep):
ndeps.add(dep)

if spec.pkg_checkdeps:
for dep in spec.pkg_checkdeps:
em32 = pkgconfig32_dep.match(dep)
if em32:
pc32deps.add(em32.group(1))
continue
em = pkgconfig_dep.match(dep)
if em:
pcdeps.add(em.group(1))
continue
if not idb.has_package(dep):
ndeps.add(dep)

# Get the global known pkgconfig providers
pkgConfigs, pkgConfigs32 = pdb.get_pkgconfig_providers()

Expand Down
2 changes: 2 additions & 0 deletions ypkg2/ypkgspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class YpkgSpec:

# Dependencies
pkg_builddeps = None
pkg_checkdeps = None

mandatory_tokens = None
optional_tokens = None
Expand Down Expand Up @@ -219,6 +220,7 @@ def __init__(self):
("patterns", MultimapFormat(self, self.add_pattern, "main")),
("permanent", OneOrMoreString),
("builddeps", OneOrMoreString),
("checkdeps", OneOrMoreString),
("rundeps", MultimapFormat(self, self.add_rundep, "main")),
("component", MultimapFormat(self, self.add_component, "main")),
("conflicts", MultimapFormat(self, self.add_conflict, "main")),
Expand Down

0 comments on commit 373a143

Please # to comment.