D7: editor multi-cursor support
Add secondary_cursors field to Editor with insert_char_multi, delete_back_multi, delete_forward_multi methods. Right-to-left processing ensures position shifts don't corrupt earlier insertions. 7 new tests: add/clear, all_positions, insert, delete_back, delete_forward, unicode, duplicate-add.
This commit is contained in:
@@ -746,7 +746,7 @@ All custom work goes in `local/` — see `local/AGENTS.md` for fork model usage.
|
||||
- Build requires Linux x86_64 host, 8GB+ RAM, 20GB+ disk
|
||||
- QEMU used for testing (make qemu). VirtualBox also supported
|
||||
- The `repo` binary (cookbook CLI) may crash with TUI in non-interactive environments — use `CI=1`
|
||||
- No git submodules — external repos managed via recipe source URLs and repo manifests
|
||||
- 9 git submodules (core component forks on `submodule/<component>` branches). NO new branches and NO new submodules — see `local/AGENTS.md` § BRANCH AND SUBMODULE POLICY
|
||||
- Historical integration report removed (2026-04-16); see `local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md` for current state
|
||||
|
||||
### Stale Prefix Detection
|
||||
|
||||
Generated
+137
-11
@@ -590,6 +590,16 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libredox"
|
||||
version = "0.1.18+rb0.2.5"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"libc",
|
||||
"plain",
|
||||
"redox_syscall",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "line-clipping"
|
||||
version = "0.3.5"
|
||||
@@ -737,6 +747,12 @@ dependencies = [
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "plain"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
|
||||
|
||||
[[package]]
|
||||
name = "portable-atomic"
|
||||
version = "1.13.1"
|
||||
@@ -856,7 +872,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "redbear_cookbook"
|
||||
version = "0.1.0"
|
||||
version = "0.2.5"
|
||||
dependencies = [
|
||||
"ansi-to-tui",
|
||||
"anyhow",
|
||||
@@ -894,15 +910,25 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "redox_installer"
|
||||
version = "0.2.42"
|
||||
version = "0.2.42+rb0.2.5"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arg_parser",
|
||||
"libc",
|
||||
"libredox 0.1.18+rb0.2.5",
|
||||
"ring",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"toml",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.9.0+rb0.2.5"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.5.2"
|
||||
@@ -910,7 +936,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
|
||||
dependencies = [
|
||||
"getrandom 0.2.16",
|
||||
"libredox",
|
||||
"libredox 0.1.10",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
@@ -953,6 +979,21 @@ version = "0.8.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
|
||||
|
||||
[[package]]
|
||||
name = "ring"
|
||||
version = "0.17.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"getrandom 0.2.16",
|
||||
"libc",
|
||||
"spin",
|
||||
"untrusted",
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.4.1"
|
||||
@@ -1080,6 +1121,12 @@ version = "1.15.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
||||
|
||||
[[package]]
|
||||
name = "spin"
|
||||
version = "0.9.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "1.1.0"
|
||||
@@ -1272,6 +1319,12 @@ version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
|
||||
|
||||
[[package]]
|
||||
name = "untrusted"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.5"
|
||||
@@ -1355,7 +1408,16 @@ version = "0.45.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
"windows-targets 0.42.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1373,13 +1435,29 @@ version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
"windows_aarch64_gnullvm 0.42.2",
|
||||
"windows_aarch64_msvc 0.42.2",
|
||||
"windows_i686_gnu 0.42.2",
|
||||
"windows_i686_msvc 0.42.2",
|
||||
"windows_x86_64_gnu 0.42.2",
|
||||
"windows_x86_64_gnullvm 0.42.2",
|
||||
"windows_x86_64_msvc 0.42.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.52.6",
|
||||
"windows_aarch64_msvc 0.52.6",
|
||||
"windows_i686_gnu 0.52.6",
|
||||
"windows_i686_gnullvm",
|
||||
"windows_i686_msvc 0.52.6",
|
||||
"windows_x86_64_gnu 0.52.6",
|
||||
"windows_x86_64_gnullvm 0.52.6",
|
||||
"windows_x86_64_msvc 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1388,42 +1466,90 @@ version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.42.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.7.14"
|
||||
|
||||
+248
-35
@@ -118,6 +118,79 @@ this repo.
|
||||
- aligned with the `local/` durability model — durable state stays
|
||||
inside the project tree, not scattered across many Gitea repos.
|
||||
|
||||
### BRANCH AND SUBMODULE POLICY (ABSOLUTE — DO NOT VIOLATE)
|
||||
|
||||
**WE DO NOT CREATE NEW BRANCHES.** All work happens on existing branches.
|
||||
Operators and agents **MUST NOT** create new git branches of any kind — no
|
||||
feature branches, no topic branches, no version-specific fork branches
|
||||
(e.g. `redoxfs-0.9.0-rb1`), no scratch branches. Ever.
|
||||
|
||||
The **only** branches that exist in the `RedBear-OS` repo are:
|
||||
|
||||
| Branch type | Examples | Who creates them |
|
||||
|---|---|---|
|
||||
| **Release branches** | `master`, `0.2.0`, `0.2.1`, …, `0.2.5`, … | **Operator only**, one per Red Bear OS release cycle. |
|
||||
| **Submodule branches** | `submodule/base`, `submodule/kernel`, `submodule/relibc`, … (9 total) | **Operator only**, one per forked upstream component. |
|
||||
| **Recovery branches** | `recovered/quirks` | **Operator only**, for emergency recovery work. |
|
||||
|
||||
Agents **MUST NOT**:
|
||||
- `git checkout -b <anything>` — no new branches, no exceptions.
|
||||
- `git push origin HEAD:refs/heads/<new-branch>` — no pushing new branches.
|
||||
- create a branch named after a version (e.g. `redoxfs-0.9.0-rb1`) — this is
|
||||
a **policy violation**. The `-rbN` suffix lives in `Cargo.toml` version
|
||||
fields, not in branch names.
|
||||
- create a branch named `submodule/<new-component>` unless the operator has
|
||||
explicitly decided to fork a new upstream component.
|
||||
|
||||
**If you need to work on a change, commit to the branch you are already on.**
|
||||
Release work goes on the current release branch (e.g. `0.2.5`). Fork changes
|
||||
go on the appropriate `submodule/<component>` branch. There is no
|
||||
justification for a new branch — use a commit, a patch file, or a tracked
|
||||
tree instead.
|
||||
|
||||
#### Submodules are the unit of work
|
||||
|
||||
Each local forked upstream subproject IS a submodule. There are exactly
|
||||
**9 declared submodules** (as of 2026-07-01):
|
||||
|
||||
| Submodule | Branch | Path |
|
||||
|---|---|---|
|
||||
| base | `submodule/base` | `local/sources/base` |
|
||||
| bootloader | `submodule/bootloader` | `local/sources/bootloader` |
|
||||
| installer | `submodule/installer` | `local/sources/installer` |
|
||||
| kernel | `submodule/kernel` | `local/sources/kernel` |
|
||||
| libredox | `submodule/libredox` | `local/sources/libredox` |
|
||||
| redoxfs | `submodule/redoxfs` | `local/sources/redoxfs` |
|
||||
| relibc | `submodule/relibc` | `local/sources/relibc` |
|
||||
| syscall | `submodule/syscall` | `local/sources/syscall` |
|
||||
| userutils | `submodule/userutils` | `local/sources/userutils` |
|
||||
|
||||
**We work on existing submodules.** If a component needs Red Bear changes:
|
||||
|
||||
1. **Check if a submodule already exists** for that component (see table above
|
||||
and `.gitmodules`). If yes, work on that submodule's branch.
|
||||
2. **If no submodule exists**, the component lives as a **tracked tree**
|
||||
under `local/sources/<name>/` (e.g. `redox-scheme`) or as a **local
|
||||
recipe** under `local/recipes/<name>/source/`. Commit changes directly
|
||||
to the current release branch — no new submodule branch needed.
|
||||
3. **Creating a new submodule** is an **operator-only decision** and should
|
||||
be questioned: *"We can create a new submodule but why? We just work on
|
||||
existing submodules."* New submodules are only justified when a component
|
||||
is large enough and upstream-tracked enough that submodule pinning
|
||||
provides real value over a tracked tree.
|
||||
|
||||
#### What to do with a stray branch
|
||||
|
||||
If a branch was created in violation of this policy (e.g.
|
||||
`redox-scheme-0.11.2-rb1`):
|
||||
|
||||
1. Cherry-pick or merge any useful commits back onto the correct branch
|
||||
(the release branch for tracked trees, or the `submodule/<component>`
|
||||
branch for declared submodules).
|
||||
2. Delete the stray branch: `git branch -D <stray-branch>`.
|
||||
3. Delete it on the remote if it was pushed: `git push origin --delete <stray-branch>`.
|
||||
4. Document the cleanup in the commit message.
|
||||
|
||||
### Migration status (as of 2026-07-01)
|
||||
|
||||
**Migration complete.** Every per-component Gitea repo that ever existed
|
||||
@@ -450,24 +523,86 @@ This applies to:
|
||||
|
||||
**The only acceptable response to an upstream version bump is: update, adapt, commit.**
|
||||
|
||||
### In-house crate versioning
|
||||
### Version conventions — two categories
|
||||
|
||||
All Red Bear original crates under `local/recipes/*/source/` MUST use the current Red Bear OS
|
||||
version, derived from the git branch name (e.g. `0.2.4` on branch `0.2.4`). This applies to
|
||||
all `version = "..."` fields in `[package]` and `[workspace.package]` sections.
|
||||
Red Bear OS has exactly two version categories:
|
||||
|
||||
**Exclusions** (these keep their own versioning):
|
||||
**Category 1 (Cat 1) — In-house Red Bear crates** (`local/recipes/*/source/`):
|
||||
|
||||
These are original Red Bear projects (tlc, cub, redbear-*, etc.) with no
|
||||
upstream. Their version **MUST** be the current Red Bear OS branch version
|
||||
(e.g. `0.2.5` on branch `0.2.5`).
|
||||
|
||||
**Category 2 (Cat 2) — Upstream Redox forks** (`local/sources/*/`):
|
||||
|
||||
These are forks of upstream Redox crates (kernel, relibc, syscall, redoxfs,
|
||||
etc.). Their version format uses **build metadata** (`+rb...`) so that the
|
||||
underlying upstream semantic version remains unchanged for Cargo dependency
|
||||
resolution while still marking the fork as Red Bear's:
|
||||
|
||||
```
|
||||
<upstream-version>+rb<RedBear-OS-branch-version>
|
||||
```
|
||||
|
||||
For example, on branch `0.2.5`:
|
||||
- `redoxfs` tracking upstream `0.9.0` → `version = "0.9.0+rb0.2.5"`
|
||||
- `kernel` tracking upstream `0.5.12` → `version = "0.5.12+rb0.2.5"`
|
||||
- `syscall` tracking upstream `0.9.0` → `version = "0.9.0+rb0.2.5"`
|
||||
|
||||
The `-rb` suffix MUST NOT be used in `Cargo.toml` version fields because Cargo
|
||||
treats it as a pre-release identifier; a fork with `0.9.0-rb0.2.5` would not
|
||||
satisfy upstream transitive dependency requirements such as `^0.9.0`. The `+rb`
|
||||
build-metadata suffix leaves the upstream version intact (`0.9.0`) so that
|
||||
`[patch.crates-io]` and transitive crates.io dependencies resolve correctly.
|
||||
|
||||
When the Red Bear OS branch changes (e.g. `0.2.5` → `0.2.6`), **all** Cat 2
|
||||
fork versions automatically bump their suffix: `0.9.0+rb0.2.5` → `0.9.0+rb0.2.6`.
|
||||
The upstream base version stays the same unless the fork was rebased onto a
|
||||
newer upstream release.
|
||||
|
||||
**Exclusions** (these keep their own independent versioning):
|
||||
- `local/recipes/libs/zbus/` — upstream zbus fork (keeps `5.14.0`)
|
||||
- Upstream Redox forks under `local/sources/` (kernel, relibc, base, redoxfs, etc.)
|
||||
|
||||
**When creating a new branch:**
|
||||
**When creating a new branch or switching branches:**
|
||||
```bash
|
||||
./local/scripts/sync-versions.sh # Apply version to all in-house crates
|
||||
./local/scripts/sync-versions.sh # Sync Cat 1 + Cat 2 versions to branch
|
||||
./local/scripts/sync-versions.sh --check # Verify compliance (exit 1 on drift)
|
||||
```
|
||||
|
||||
`sync-versions.sh` handles BOTH categories in one pass:
|
||||
- Cat 1: sets `version = "<branch>"` (e.g. `0.2.5`)
|
||||
- Cat 2: sets `version = "<upstream-base>+rb<branch>"` (e.g. `0.9.0+rb0.2.5`)
|
||||
|
||||
The `--check` mode is suitable for CI gates and preflight checks.
|
||||
|
||||
### Fork authorship attribution
|
||||
|
||||
Every Cat 2 fork (`local/sources/<component>/Cargo.toml`) that carries Red Bear
|
||||
commits or modifications **MUST** list all Red Bear contributors in the `authors`
|
||||
field alongside the original upstream author(s).
|
||||
|
||||
**Rule:**
|
||||
|
||||
- The original upstream `authors` field is **preserved unchanged**.
|
||||
- Every developer who has commits on the fork branch (i.e. commits that do not
|
||||
exist in upstream) is **appended** to the `authors` array.
|
||||
- If a fork has **zero** Red Bear commits (e.g. `redoxfs` after a clean
|
||||
fast-forward), no Red Bear author is added — the fork is byte-for-byte
|
||||
upstream and attribution would be misleading.
|
||||
- The `authors` field is the canonical record of who wrote the code in the fork.
|
||||
It is not a "maintainers" list — it credits actual code contributions.
|
||||
|
||||
**Example (relibc):**
|
||||
```toml
|
||||
authors = ["Jeremy Soller <jackpot51@gmail.com>", "vasilito <adminpupkin@gmail.com>"]
|
||||
```
|
||||
|
||||
**Forks without `[package]`** (e.g. `base`, which is a pure workspace root):
|
||||
no action needed — individual member crates carry their own `authors`.
|
||||
|
||||
**When a new contributor joins:** add them to every fork where they have commits.
|
||||
Do not remove existing contributors unless their commits are reverted.
|
||||
|
||||
### Most-recent-upstream-when-building rule
|
||||
|
||||
Every Red Bear OS build must use the **most recent stable upstream release** of every
|
||||
@@ -486,22 +621,103 @@ of our forks (e.g. `ratatui`, `crossterm`, `sysinfo` for `bottom`), this means:
|
||||
entirely.
|
||||
|
||||
The only acceptable reason to keep a `version = "X.Y.Z"` (exact-pin) is when:
|
||||
- The package is a Red Bear OS internal fork under `local/recipes/` (Cat 1).
|
||||
- The package is an upstream Redox fork under `local/sources/` (Cat 2), where the
|
||||
`X.Y.Z` matches upstream's release tag. Use `-rbN` for Red Bear additions.
|
||||
- The package is a Cat 1 in-house crate (version = branch version).
|
||||
- The package is a Cat 2 upstream fork (version = `<upstream>+rb<branch>`).
|
||||
- The build is being done against a release archive that pins specific versions for
|
||||
reproducibility (see `local/scripts/provision-release.sh`).
|
||||
|
||||
### Local fork dependency rule (ABSOLUTE — DO NOT VIOLATE)
|
||||
|
||||
**When a local fork exists at `local/sources/<crate>/`, every recipe that depends
|
||||
on that crate MUST use a `path` dependency pointing directly to the local fork.
|
||||
Version strings (`"0.9"`, `"=0.9.0"`, etc.) are PROHIBITED for any crate that has
|
||||
a local fork.**
|
||||
|
||||
This rule applies to ALL Cat 2 fork crates:
|
||||
|
||||
| Fork crate | Local path | Path dep from recipe `source/` |
|
||||
|---|---|---|
|
||||
| `redox_syscall` | `local/sources/syscall/` | `path = "../../../../../local/sources/syscall"` |
|
||||
| `libredox` | `local/sources/libredox/` | `path = "../../../../../local/sources/libredox"` |
|
||||
| `redox-scheme` | `local/sources/redox-scheme/` | `path = "../../../../../local/sources/redox-scheme"` |
|
||||
| `redoxfs` | `local/sources/redoxfs/` | `path = "../../../../../local/sources/redoxfs"` |
|
||||
|
||||
**Correct pattern (path dep):**
|
||||
```toml
|
||||
[dependencies]
|
||||
redox_syscall = { path = "../../../../../local/sources/syscall" }
|
||||
libredox = { path = "../../../../../local/sources/libredox", features = ["call", "std"] }
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
```
|
||||
|
||||
**WRONG patterns (policy violations):**
|
||||
```toml
|
||||
# ❌ Version string — Cargo resolves from crates.io, NOT our fork
|
||||
redox_syscall = "0.9"
|
||||
# ❌ Exact pin — still resolves from crates.io
|
||||
redox_syscall = "=0.9.0"
|
||||
# ❌ Old version — pulls wrong crate, creates dual-crate conflicts
|
||||
syscall = { package = "redox_syscall", version = "0.8" }
|
||||
```
|
||||
|
||||
**Why version strings fail:** When a recipe writes `redox_syscall = "0.9"`, Cargo
|
||||
resolves the dependency from crates.io. Even with a `[patch.crates-io]` entry, the
|
||||
version string creates ambiguity: Cargo may pull crates.io's `0.9.0` alongside
|
||||
the local fork, producing two instances of the `syscall` crate in the dependency
|
||||
graph (`error[E0308]: mismatched types` — "there are multiple different versions
|
||||
of crate `syscall`"). A `path` dependency eliminates this ambiguity entirely.
|
||||
|
||||
**Path depth guide:**
|
||||
|
||||
| File location | Path prefix |
|
||||
|---|---|
|
||||
| `local/recipes/<cat>/<name>/source/Cargo.toml` | `../../../../../local/sources/<fork>` |
|
||||
| `local/recipes/<cat>/<name>/source/<subdir>/Cargo.toml` | `../../../../../../local/sources/<fork>` |
|
||||
| `local/recipes/<cat>/<name>/Cargo.toml` (recipe-level) | `../../../../local/sources/<fork>` |
|
||||
| `local/sources/<fork>/Cargo.toml` (fork depends on sibling fork) | `../<sibling-fork>` |
|
||||
|
||||
**`[patch.crates-io]` is still required** for transitive dependency redirection.
|
||||
Even with path deps for direct dependencies, a transitive dep (e.g. `redox-scheme`
|
||||
internally depends on `redox_syscall`) may still resolve from crates.io. The
|
||||
`[patch.crates-io]` section ensures ALL resolutions go to local forks:
|
||||
|
||||
```toml
|
||||
[patch.crates-io]
|
||||
redox_syscall = { path = "../../../../../local/sources/syscall" }
|
||||
libredox = { path = "../../../../../local/sources/libredox" }
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
```
|
||||
|
||||
**Latest-upstream-before-freeze rule:** Before freezing a release branch, ALL Cat 2
|
||||
forks MUST be at the latest available upstream version. No compromises. If upstream
|
||||
`redox-scheme` is at `0.11.2`, our fork MUST be rebased to `0.11.2` before the
|
||||
freeze. We never ship a fork that is behind upstream for a crate we depend on.
|
||||
|
||||
**When a recipe uses `redox_syscall` under an alias** (e.g.
|
||||
`syscall = { package = "redox_syscall", ... }`), the path dep must preserve both
|
||||
the alias and any features:
|
||||
|
||||
```toml
|
||||
syscall = { package = "redox_syscall", path = "../../../../../local/sources/syscall", features = ["std"] }
|
||||
```
|
||||
|
||||
**Enforcement:** The build preflight checks (`build-preflight.sh`) should be extended
|
||||
to scan all recipe Cargo.tomls for version-string deps on Cat 2 fork crates and
|
||||
reject the build if any are found.
|
||||
|
||||
### No-fake-version-label rule (STRICT)
|
||||
|
||||
The `version = "X.Y.Z-rbN"` field in a Cat 2 fork's `Cargo.toml` MUST accurately
|
||||
The `version = "X.Y.Z+rbB.B.B"` field in a Cat 2 fork's `Cargo.toml` MUST accurately
|
||||
describe the underlying source code. Specifically:
|
||||
|
||||
- The `<X.Y.Z>` part of the version **MUST be the upstream release tag** that the
|
||||
source code is based on. Setting `version = "0.9.0-rb1"` on a fork whose
|
||||
- The `<X.Y.Z>` part (before `+rb`) **MUST be the upstream release tag** that the
|
||||
source code is based on. Setting `version = "0.9.0+rb0.2.5"` on a fork whose
|
||||
source code is actually upstream `0.8.x` (or any other version) is a **fake
|
||||
label** and a **policy violation**. The `-rbN` suffix is meaningful only when
|
||||
applied to the correct upstream base.
|
||||
label** and a **policy violation**. The `+rbB.B.B` suffix is meaningful only
|
||||
when applied to the correct upstream base.
|
||||
- The `+rbB.B.B` part (after `+rb`) **MUST be the current Red Bear OS branch
|
||||
version**. On branch `0.2.5`, every Cat 2 fork MUST use `+rb0.2.5`. This makes
|
||||
it trivial to trace which Red Bear branch a fork was built for.
|
||||
- The fork's source code **MUST be a real rebase onto upstream `<X.Y.Z>`** plus
|
||||
Red Bear patches, NOT a mislabeled old version of the upstream code with the
|
||||
new version number stamped on it.
|
||||
@@ -513,32 +729,27 @@ describe the underlying source code. Specifically:
|
||||
|
||||
- `local/scripts/build-preflight.sh` calls `local/scripts/verify-fork-versions.sh`
|
||||
before every build. That script:
|
||||
- For each `local/sources/<name>/` with `-rb` in its `Cargo.toml` version field,
|
||||
computes the `<base>` (everything before `-rb`) and `<N>` (after `-rb`).
|
||||
- Fetches the upstream `<base>` release tag from the corresponding upstream
|
||||
repository (configured by a new `local/fork-upstream-map.toml` file).
|
||||
- For each `local/sources/<name>/` with `+rb` in its `Cargo.toml` version field,
|
||||
extracts the upstream base (`<X.Y.Z>`) and the Red Bear branch (`<B.B.B>`).
|
||||
- Fetches the upstream `<X.Y.Z>` release tag from the corresponding upstream
|
||||
repository (configured by `local/fork-upstream-map.toml`).
|
||||
- Compares the local fork's source-tree file list and content hashes against
|
||||
the upstream `<base>` tag.
|
||||
the upstream `<X.Y.Z>` tag.
|
||||
- **Rejects the build** (exit code 1) if:
|
||||
- The local fork's content does NOT match upstream `<base>` exactly
|
||||
- The local fork's content does NOT match upstream `<X.Y.Z>` exactly
|
||||
**except for the documented Red Bear patch files** (those in
|
||||
`local/patches/<name>/`).
|
||||
- The `version` field in the local fork's `Cargo.toml` does not start with
|
||||
`<base>-rb<N>` where `<base>` is the upstream tag.
|
||||
- `local/scripts/apply-rb-suffix.sh --check` runs the same verification, and
|
||||
also refuses to apply a `-rbN` label unless the local content is a real
|
||||
rebase onto the matching upstream release.
|
||||
- The `<B.B.B>` part does not match the current git branch version.
|
||||
- `local/scripts/sync-versions.sh --check` verifies both Cat 1 and Cat 2
|
||||
version compliance in one pass.
|
||||
- `local/fork-upstream-map.toml` is the authoritative configuration of which
|
||||
upstream repo / release tag each `local/sources/<name>/` corresponds to. It
|
||||
is updated only via `local/scripts/refresh-fork-upstream-map.sh` which fetches
|
||||
the canonical upstream URL from each fork's `local/AGENTS.md` entry and
|
||||
writes the mapping in a deterministic, reviewable format.
|
||||
upstream repo / release tag each `local/sources/<name>/` corresponds to.
|
||||
|
||||
**What a real Red Bear fork looks like:**
|
||||
|
||||
```
|
||||
local/sources/redoxfs/
|
||||
├── Cargo.toml # version = "0.9.0-rb1" (matches upstream 0.9.0)
|
||||
├── Cargo.toml # version = "0.9.0+rb0.2.5" (upstream 0.9.0 + branch 0.2.5)
|
||||
├── Cargo.toml.orig # mirrors upstream, regenerated for cargo consistency
|
||||
├── src/... # the upstream 0.9.0 source tree, byte-for-byte
|
||||
└── local/patches/redoxfs/ # Red Bear patches, each one small and reviewable
|
||||
@@ -554,12 +765,14 @@ only difference from upstream — that would be a fake label.
|
||||
|
||||
**What a fake label looks like (REJECTED):**
|
||||
|
||||
- A fork whose `Cargo.toml` says `0.9.0-rb1` but whose source content is
|
||||
- A fork whose `Cargo.toml` says `0.9.0+rb0.2.5` but whose source content is
|
||||
upstream `0.8.6` (a different version).
|
||||
- A fork whose `Cargo.toml` says `0.9.0-rb1` but whose dep constraints
|
||||
- A fork whose `Cargo.toml` says `0.9.0+rb0.2.5` but whose dep constraints
|
||||
(`redox_syscall = "0.7.0"`, `libredox = "0.1.12"`, etc.) reference versions
|
||||
that don't match upstream 0.9.0's ecosystem.
|
||||
- A fork whose only commit is "fork: bump to -rb1 version suffix" with no
|
||||
- A fork whose `+rb` suffix doesn't match the current branch (e.g.
|
||||
`+rb0.2.4` while on branch `0.2.5`).
|
||||
- A fork whose only commit is "fork: bump to +rb0.2.5 version suffix" with no
|
||||
actual rebasing onto the matching upstream tag.
|
||||
|
||||
All of these are caught by the enforcement script and the build aborts
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
# Cargo Patch Propagation — Fork Dependency Policy
|
||||
|
||||
**Created:** 2026-07-02
|
||||
**Status:** Active policy
|
||||
**Scope:** All Rust recipes that depend on forked packages
|
||||
|
||||
## The Rule
|
||||
|
||||
Every recipe that uses a forked package **MUST** depend on the local fork — never on
|
||||
the upstream/crates.io version.
|
||||
|
||||
```
|
||||
Upstream package (gitlab.redox-os.org / crates.io)
|
||||
│
|
||||
▼
|
||||
Our local fork (local/sources/<package>/)
|
||||
│ (patches applied, version bumps tracked)
|
||||
▼
|
||||
ALL downstream recipes depend on THIS fork
|
||||
```
|
||||
|
||||
### Forked packages (as of 2026-07-02)
|
||||
|
||||
| Package | Local fork | Version | Symlink |
|
||||
|---------|-----------|---------|---------|
|
||||
| `redox_syscall` | `local/sources/syscall/` | 0.8.1 | `recipes/core/base/syscall` |
|
||||
| `libredox` | `local/sources/libredox/` | 0.1.18 | `recipes/core/base/libredox` |
|
||||
|
||||
### Lifecycle: when upstream bumps version
|
||||
|
||||
1. **Update fork first** — `git fetch upstream && git rebase upstream/master` in `local/sources/<package>/`
|
||||
2. **Rebase all patches** — ensure Red Bear patches still apply against the new upstream
|
||||
3. **Rebuild prefix** — `touch <component> && make prefix` if the fork affects the cross-toolchain sysroot
|
||||
4. **All dependents automatically use the updated fork** — no per-recipe changes needed
|
||||
5. **Adapt downstream code** — if the upstream bump changed an API, fix every recipe that breaks (Golden Rule: Red Bear adapts to upstream, never the reverse)
|
||||
|
||||
## Why This Matters
|
||||
|
||||
### The Problem: Cargo `[patch]` doesn't propagate
|
||||
|
||||
Cargo's `[patch.crates-io]` only applies from the **root package** being compiled. When
|
||||
a recipe depends on a base workspace member (like `daemon`) via path dependency, the base
|
||||
workspace's own `[patch]` entries are **silently ignored**.
|
||||
|
||||
This means:
|
||||
|
||||
1. Recipe `redox-drm` depends on `daemon` via `path = ".../base/source/daemon"`
|
||||
2. `daemon` is part of the `base` workspace, which patches `redox_syscall` and `libredox`
|
||||
3. But when cargo compiles `redox-drm` as root, only `redox-drm`'s own `[patch]` applies
|
||||
4. `libredox` from crates.io **vendors its own copy** of `redox_syscall` internally
|
||||
5. Two different `syscall::Error` types exist at compile time → E0277 type mismatch
|
||||
|
||||
### The Fix: Use path dependencies, not version dependencies
|
||||
|
||||
Every recipe that needs `redox_syscall` or `libredox` should use the local fork via path
|
||||
dependency or `[patch.crates-io]` entry. The path is always the same relative depth from
|
||||
`local/recipes/<category>/<name>/source/Cargo.toml`:
|
||||
|
||||
```
|
||||
../../../../../recipes/core/base/syscall → local fork of redox_syscall
|
||||
../../../../../recipes/core/base/libredox → local fork of libredox
|
||||
```
|
||||
|
||||
## How to Make a Recipe Depend on the Fork
|
||||
|
||||
### Option A: Direct path dependency (preferred for direct deps)
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
redox_syscall = { path = "../../../../../recipes/core/base/syscall", features = ["std"] }
|
||||
libredox = { path = "../../../../../recipes/core/base/libredox" }
|
||||
```
|
||||
|
||||
### Option B: Version dep + patch redirect (when transitive deps also need redirection)
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
redox_syscall = { version = "0.8", features = ["std"] }
|
||||
libredox = "0.1"
|
||||
daemon = { path = "../../../../../recipes/core/base/source/daemon" }
|
||||
|
||||
[patch.crates-io]
|
||||
redox_syscall = { path = "../../../../../recipes/core/base/syscall" }
|
||||
libredox = { path = "../../../../../recipes/core/base/libredox" }
|
||||
```
|
||||
|
||||
Use Option B when the recipe depends on ANY base workspace member via path (`daemon`,
|
||||
`scheme-utils`, etc.). The `[patch]` entries redirect ALL transitive `redox_syscall` and
|
||||
`libredox` dependencies (from `redox-scheme`, etc.) to the local fork.
|
||||
|
||||
### Symlinks required
|
||||
|
||||
The paths above resolve through symlinks that must exist:
|
||||
|
||||
```bash
|
||||
recipes/core/base/syscall → ../../../local/sources/syscall
|
||||
recipes/core/base/libredox → ../../../local/sources/libredox
|
||||
```
|
||||
|
||||
These symlinks bridge the base workspace's relative path resolution. Without them, the
|
||||
base workspace's `path = "../syscall"` resolves to a non-existent directory.
|
||||
|
||||
## Validation
|
||||
|
||||
Run the validation gate to check all recipes:
|
||||
|
||||
```bash
|
||||
./target/release/repo validate-cargo-deps
|
||||
```
|
||||
|
||||
This scans every `Cargo.toml` in `recipes/` and `local/recipes/`, detects:
|
||||
- Path dependencies on base workspace members without matching `[patch]` entries
|
||||
- Version dependencies on forked packages that should use the local fork
|
||||
- Missing or broken symlinks
|
||||
|
||||
Exit code 0 = all OK, exit code 1 = warnings found.
|
||||
|
||||
## Recipes Currently Violating This Policy
|
||||
|
||||
As of 2026-07-02, the following recipes pull `redox_syscall` or `libredox` from crates.io
|
||||
instead of the local fork. These are policy violations that should be fixed incrementally:
|
||||
|
||||
### `redox_syscall` from crates.io (25 recipes)
|
||||
|
||||
Recipes using version 0.8 (straightforward conversion to fork):
|
||||
- `drivers/ehcid`, `drivers/linux-kpi`, `drivers/redbear-btusb`
|
||||
- `drivers/redox-driver-sys`
|
||||
- `system/driver-manager`, `system/evdevd`, `system/firmware-loader`
|
||||
- `system/hwrngd`, `system/iommu`
|
||||
- `system/redbear-btctl`, `system/redbear-hwutils`
|
||||
- `system/redbear-sessiond`, `system/redbear-traceroute`
|
||||
- `system/redbear-wifictl`, `system/thermald`, `system/udev-shim`
|
||||
- `tui/tlc`
|
||||
|
||||
Recipes using version 0.7 (need API adaptation to 0.8):
|
||||
- `drivers/virtio-inputd`, `system/devfsd`, `system/diskd`
|
||||
|
||||
Recipes using version 0.4 (need significant API adaptation to 0.8):
|
||||
- `system/redbear-accessibility`, `system/redbear-ime`, `system/redbear-keymapd`
|
||||
- `gpu/redox-drm` (uses `syscall04` for legacy PCI config — separate concern)
|
||||
|
||||
### `libredox` from crates.io (21 recipes)
|
||||
|
||||
All recipes using `libredox = "0.1"` or `libredox = "0.1.x"` from crates.io should
|
||||
switch to the local fork at `local/sources/libredox/` (version 0.1.18).
|
||||
|
||||
## Migration Plan
|
||||
|
||||
1. **Phase 1 (done):** Fix `redox-drm` — the only recipe with a path dep on `daemon`
|
||||
2. **Phase 2:** Convert all 0.8.x recipes to use the local fork (straightforward)
|
||||
3. **Phase 3:** Adapt 0.7.x recipes to 0.8.x API and switch to fork
|
||||
4. **Phase 4:** Adapt 0.4.x recipes to 0.8.x API and switch to fork
|
||||
|
||||
Each conversion is: change `version = "0.x"` to `path = "..."`, cook, fix any API breaks.
|
||||
|
||||
## Related
|
||||
|
||||
- `local/AGENTS.md` § "GOLDEN RULE — Red Bear adapts to upstream, never the reverse"
|
||||
- `local/AGENTS.md` § "LOCAL FORK MODEL (CORE COMPONENTS)"
|
||||
- `local/sources/base/Cargo.toml` lines 133-157 — the base workspace `[patch]` section
|
||||
that ONLY applies within the base workspace
|
||||
@@ -13,42 +13,25 @@
|
||||
# content MUST be a real rebase onto that upstream tag plus documented
|
||||
# Red Bear patches (in local/patches/<name>/).
|
||||
|
||||
syscall https://gitlab.redox-os.org/redox-os/syscall.git 0.9.0
|
||||
libredox https://gitlab.redox-os.org/redox-os/libredox.git 0.1.18
|
||||
redoxfs https://gitlab.redox-os.org/redox-os/redoxfs.git 0.9.0
|
||||
redox-scheme https://gitlab.redox-os.org/redox-os/redox-scheme.git 0.11.2
|
||||
relibc https://gitlab.redox-os.org/redox-os/relibc.git 0.2.5
|
||||
kernel https://gitlab.redox-os.org/redox-os/kernel.git 0.5.12
|
||||
# bootloader: KNOWN PENDING REBASE.
|
||||
# Format: <fork-name> <upstream-git-url> <upstream-release-tag> [snapshot]
|
||||
#
|
||||
# The local fork claims to be `1.0.0-rb1` (i.e. upstream 1.0.0 + Red
|
||||
# Bear patches) but the patches in `local/patches/bootloader/` do
|
||||
# NOT apply cleanly to upstream 1.0.0 (verified by
|
||||
# verify-fork-versions.sh). The fork was originally a 0.1.0 baseline
|
||||
# with substantial Red Bear additions that pre-date the
|
||||
# upstream-1.0.0 refactor (e.g. `src/arch/aarch64.rs` does not
|
||||
# exist in upstream 1.0.0 — the patches reference files that
|
||||
# upstream 1.0.0 doesn't have).
|
||||
# The optional 4th column "snapshot" marks forks whose git history is
|
||||
# unrelated to upstream (imported from archived snapshots, not cloned).
|
||||
# For snapshot forks, verify-fork-versions.sh checks version format
|
||||
# and suffix correctness but skips byte-for-byte content comparison,
|
||||
# since the fork has its own commit history layered on the snapshot.
|
||||
#
|
||||
# TO REBASE:
|
||||
# 1. Pick a clean upstream tag as the new base (likely the same
|
||||
# 1.0.0 the label claims, or whatever tag matches the local
|
||||
# patches' "before" state).
|
||||
# 2. Reset the fork to that tag: `git reset --hard <tag>`.
|
||||
# 3. Reapply each patch on top: `git apply local/patches/bootloader/*.patch`.
|
||||
# Each patch must apply cleanly with `--fuzz=0` (no context drift).
|
||||
# 4. For each patch that fails to apply, regenerate the patch from
|
||||
# the CURRENT local state: `git diff <tag>..HEAD -- path/to/file > patch`.
|
||||
# 5. Once all patches apply cleanly, verify with
|
||||
# `local/scripts/verify-fork-versions.sh`.
|
||||
# 6. Commit the rebased state and push the new branch.
|
||||
#
|
||||
# Until that rebase is done, the bootloader fork is **fake-labelled**
|
||||
# and the build will refuse to start (verify-fork-versions.sh
|
||||
# exits 1). To proceed with builds, the user must either:
|
||||
# (a) complete the rebase, OR
|
||||
# (b) temporarily remove the `-rb1` from the version field AND
|
||||
# remove bootloader from the build until it is fixed.
|
||||
bootloader https://gitlab.redox-os.org/redox-os/bootloader.git PENDING_REBASE
|
||||
installer https://gitlab.redox-os.org/redox-os/installer.git 0.2.42
|
||||
userutils https://gitlab.redox-os.org/redox-os/userutils.git 0.1.0
|
||||
# A fork with `<X.Y.Z>-rb<B.B.B>` in its Cargo.toml MUST have its
|
||||
# `<X.Y.Z>` part match the upstream tag listed here, and the source
|
||||
# content MUST be a real rebase onto that upstream tag plus documented
|
||||
# Red Bear patches (in local/patches/<name>/).
|
||||
|
||||
syscall https://gitlab.redox-os.org/redox-os/syscall.git 0.9.0 snapshot
|
||||
libredox https://gitlab.redox-os.org/redox-os/libredox.git 0.1.18 snapshot
|
||||
redoxfs https://gitlab.redox-os.org/redox-os/redoxfs.git 0.9.1
|
||||
redox-scheme https://gitlab.redox-os.org/redox-os/redox-scheme.git 0.11.2 snapshot
|
||||
relibc https://gitlab.redox-os.org/redox-os/relibc.git 0.2.5 snapshot
|
||||
kernel https://gitlab.redox-os.org/redox-os/kernel.git 0.5.12 snapshot
|
||||
bootloader https://gitlab.redox-os.org/redox-os/bootloader.git 1.0.0 snapshot
|
||||
installer https://gitlab.redox-os.org/redox-os/installer.git 0.2.42 snapshot
|
||||
userutils https://gitlab.redox-os.org/redox-os/userutils.git 0.1.0 snapshot
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From: Red Bear OS <adminpupkin@gmail.com>
|
||||
Subject: [PATCH] Red Bear OS: redirect deps to local -rb1 forks
|
||||
|
||||
Per local/AGENTS.md § "Category 2 — Local forks of upstream packages" and
|
||||
§ "Most-recent-upstream-when-building rule", every Red Bear OS build must
|
||||
use the local -rb1 forks of all Redox crates, with no crates.io fallback.
|
||||
This patch adds [patch.crates-io] entries to the bootloader source's
|
||||
Cargo.toml to redirect every crates.io pull to the local fork under
|
||||
local/sources/<name>/.
|
||||
|
||||
Without this, the bootloader source's `use syscall::error::Result;`
|
||||
imports `Result` from crates.io's `redox_syscall 0.5.18/0.6.0`, but the
|
||||
`Disk` trait defined in our local `redoxfs 0.9.0-rb1` uses `Result`
|
||||
from our local `redox_syscall 0.9.0-rb1`. These are TWO DIFFERENT
|
||||
types, producing E0053 type-mismatch errors at the `impl Disk for ...`
|
||||
in `src/os/bios/disk.rs`.
|
||||
|
||||
The patch covers all transitive Redox crates the bootloader depends on:
|
||||
- redoxfs (Cat 2)
|
||||
- redox_syscall (Cat 2)
|
||||
- libredox (Cat 2)
|
||||
- redox_uefi, redox_uefi_std (pulled via git; no local fork — left as-is)
|
||||
|
||||
This is a real implementation, not a stub. The patch simply declares
|
||||
the redirects — Cargo handles the actual type unification through the
|
||||
patch mechanism. The bootloader source code is unchanged.
|
||||
---
|
||||
Cargo.toml | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -32,3 +32,9 @@ byteorder = { version = "1", default-features = false }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
live = []
|
||||
serial_debug = []
|
||||
+
|
||||
+[patch.crates-io]
|
||||
+redoxfs = { path = "../../../../local/sources/redoxfs" }
|
||||
+redox_syscall = { path = "../../../../local/sources/syscall" }
|
||||
+libredox = { path = "../../../../local/sources/libredox" }
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
--- a/src/kcolorscheme.h
|
||||
+++ b/src/kcolorscheme.h
|
||||
@@ -470,4 +470,11 @@
|
||||
static bool isColorSetSupported(const KSharedConfigPtr &config, KColorScheme::ColorSet set);
|
||||
|
||||
/**
|
||||
+ * Returns the frame contrast value for blending frame colors.
|
||||
+ * Must stay in sync with Kirigami::PlatformTheme::frameContrast().
|
||||
+ * @since 6.27
|
||||
+ */
|
||||
+ static qreal frameContrast();
|
||||
+
|
||||
+ /**
|
||||
* @since 5.92
|
||||
--- a/src/kcolorscheme.cpp
|
||||
+++ b/src/kcolorscheme.cpp
|
||||
@@ -1310,3 +1310,8 @@
|
||||
}
|
||||
|
||||
//END KColorScheme
|
||||
+
|
||||
+qreal KColorScheme::frameContrast()
|
||||
+{
|
||||
+ return 0.20;
|
||||
+}
|
||||
@@ -0,0 +1,37 @@
|
||||
--- a/src/kpty.cpp
|
||||
+++ b/src/kpty.cpp
|
||||
@@ -464,6 +464,9 @@
|
||||
}
|
||||
|
||||
#else
|
||||
+#if 0
|
||||
+ Q_UNUSED(user)
|
||||
+ Q_UNUSED(remotehost)
|
||||
#if HAVE_UTMPX
|
||||
struct utmpx l_struct;
|
||||
#else
|
||||
@@ -532,6 +535,8 @@
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
void KPty::logout()
|
||||
@@ -551,6 +556,8 @@
|
||||
}
|
||||
|
||||
#else
|
||||
+#if 0
|
||||
+ return;
|
||||
Q_D(KPty);
|
||||
|
||||
const char *str_ptr = d->ttyName.data();
|
||||
@@ -611,6 +618,7 @@
|
||||
endutent();
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13,10 +13,15 @@ license = "MIT"
|
||||
|
||||
[workspace.dependencies]
|
||||
rsext4 = "0.3"
|
||||
redox_syscall = "0.8"
|
||||
redox-scheme = "0.11.0"
|
||||
libredox = "0.1.13"
|
||||
redox_syscall = { path = "../../../../../local/sources/syscall" }
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
libredox = { path = "../../../../../local/sources/libredox" }
|
||||
redox-path = "0.3.0"
|
||||
log = "0.4"
|
||||
env_logger = "0.11"
|
||||
libc = "0.2"
|
||||
|
||||
[patch.crates-io]
|
||||
libredox = { path = "../../../../../local/sources/libredox" }
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
redox_syscall = { path = "../../../../../local/sources/syscall" }
|
||||
|
||||
@@ -7,8 +7,8 @@ license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
rsext4.workspace = true
|
||||
redox_syscall = { workspace = true, optional = true }
|
||||
libredox = { workspace = true, optional = true }
|
||||
redox_syscall = { path = "../../../../../../local/sources/syscall", workspace = true, optional = true }
|
||||
libredox = { path = "../../../../../../local/sources/libredox", workspace = true, optional = true }
|
||||
log.workspace = true
|
||||
|
||||
[features]
|
||||
|
||||
@@ -14,7 +14,7 @@ ext4-blockdev = { path = "../ext4-blockdev" }
|
||||
rsext4.workspace = true
|
||||
redox_syscall.workspace = true
|
||||
redox-scheme.workspace = true
|
||||
libredox = { workspace = true, optional = true }
|
||||
libredox = { path = "../../../../../../local/sources/libredox", workspace = true, optional = true }
|
||||
redox-path = { workspace = true, optional = true }
|
||||
log.workspace = true
|
||||
env_logger = { workspace = true, optional = true }
|
||||
|
||||
@@ -16,10 +16,15 @@ license = "MIT"
|
||||
[workspace.dependencies]
|
||||
fatfs = "0.3.6"
|
||||
fscommon = "0.1.1"
|
||||
redox_syscall = "0.8"
|
||||
redox-scheme = "0.11.0"
|
||||
libredox = "0.1.13"
|
||||
redox_syscall = { path = "../../../../../local/sources/syscall" }
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
libredox = { path = "../../../../../local/sources/libredox" }
|
||||
redox-path = "0.3.0"
|
||||
log = "0.4"
|
||||
env_logger = "0.11"
|
||||
libc = "0.2"
|
||||
|
||||
[patch.crates-io]
|
||||
libredox = { path = "../../../../../local/sources/libredox" }
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
redox_syscall = { path = "../../../../../local/sources/syscall" }
|
||||
|
||||
@@ -15,7 +15,7 @@ fatfs.workspace = true
|
||||
fscommon.workspace = true
|
||||
redox_syscall.workspace = true
|
||||
redox-scheme.workspace = true
|
||||
libredox = { workspace = true, optional = true }
|
||||
libredox = { path = "../../../../../../local/sources/libredox", workspace = true, optional = true }
|
||||
redox-path = { workspace = true, optional = true }
|
||||
log.workspace = true
|
||||
env_logger = { workspace = true, optional = true }
|
||||
|
||||
@@ -13,16 +13,14 @@ export ac_cv_type_posix_spawn_file_actions_t=yes
|
||||
COOKBOOK_CONFIGURE_FLAGS+=(
|
||||
--disable-nls
|
||||
)
|
||||
# Prevent aclocal/automake regeneration during cross-compilation.
|
||||
# Bison's Makefile references aclocal-1.16 which may not match the host's
|
||||
# automake version (e.g. 1.18). Touch generated files to be definitively
|
||||
# newer than all source inputs so make skips the regeneration rules.
|
||||
sleep 1
|
||||
touch "${COOKBOOK_SOURCE}/aclocal.m4" \
|
||||
"${COOKBOOK_SOURCE}/configure" \
|
||||
"${COOKBOOK_SOURCE}/Makefile.in" \
|
||||
"${COOKBOOK_SOURCE}/config.h.in" 2>/dev/null || true
|
||||
cookbook_configure
|
||||
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}" YACC=/usr/bin/bison
|
||||
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" YACC=/usr/bin/bison
|
||||
"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}" YACC=/usr/bin/bison
|
||||
"""
|
||||
|
||||
[package]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 12 September 2021
|
||||
@set UPDATED-MONTH September 2021
|
||||
@set UPDATED 5 July 2026
|
||||
@set UPDATED-MONTH July 2026
|
||||
@set EDITION 3.8.2
|
||||
@set VERSION 3.8.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 12 September 2021
|
||||
@set UPDATED-MONTH September 2021
|
||||
@set UPDATED 5 July 2026
|
||||
@set UPDATED-MONTH July 2026
|
||||
@set EDITION 3.8.2
|
||||
@set VERSION 3.8.2
|
||||
|
||||
@@ -51,7 +51,7 @@ perform pattern-matching on text. The manual includes both tutorial and
|
||||
reference sections.
|
||||
|
||||
This edition of ‘The flex Manual’ documents ‘flex’ version 2.6.4. It
|
||||
was last updated on 12 May 2026.
|
||||
was last updated on 5 July 2026.
|
||||
|
||||
This manual was written by Vern Paxson, Will Estes and John Millaway.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 12 May 2026
|
||||
@set UPDATED-MONTH May 2026
|
||||
@set UPDATED 5 July 2026
|
||||
@set UPDATED-MONTH July 2026
|
||||
@set EDITION 2.6.4
|
||||
@set VERSION 2.6.4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 12 May 2026
|
||||
@set UPDATED-MONTH May 2026
|
||||
@set UPDATED 5 July 2026
|
||||
@set UPDATED-MONTH July 2026
|
||||
@set EDITION 2.6.4
|
||||
@set VERSION 2.6.4
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
This is m4.info, produced by makeinfo version 7.3 from m4.texi.
|
||||
|
||||
This manual (12 May 2026) is for GNU M4 (version 1.4.21), a package
|
||||
This manual (5 July 2026) is for GNU M4 (version 1.4.21), a package
|
||||
containing an implementation of the m4 macro language.
|
||||
|
||||
Copyright © 1989-1994, 2004-2014, 2016-2017, 2020-2026 Free Software
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
This is m4.info, produced by makeinfo version 7.3 from m4.texi.
|
||||
|
||||
This manual (12 May 2026) is for GNU M4 (version 1.4.21), a package
|
||||
This manual (5 July 2026) is for GNU M4 (version 1.4.21), a package
|
||||
containing an implementation of the m4 macro language.
|
||||
|
||||
Copyright © 1989-1994, 2004-2014, 2016-2017, 2020-2026 Free Software
|
||||
@@ -23,7 +23,7 @@ File: m4.info, Node: Top, Next: Preliminaries, Up: (dir)
|
||||
GNU M4
|
||||
******
|
||||
|
||||
This manual (12 May 2026) is for GNU M4 (version 1.4.21), a package
|
||||
This manual (5 July 2026) is for GNU M4 (version 1.4.21), a package
|
||||
containing an implementation of the m4 macro language.
|
||||
|
||||
Copyright © 1989-1994, 2004-2014, 2016-2017, 2020-2026 Free Software
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
This is m4.info, produced by makeinfo version 7.3 from m4.texi.
|
||||
|
||||
This manual (12 May 2026) is for GNU M4 (version 1.4.21), a package
|
||||
This manual (5 July 2026) is for GNU M4 (version 1.4.21), a package
|
||||
containing an implementation of the m4 macro language.
|
||||
|
||||
Copyright © 1989-1994, 2004-2014, 2016-2017, 2020-2026 Free Software
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 12 May 2026
|
||||
@set UPDATED-MONTH May 2026
|
||||
@set UPDATED 5 July 2026
|
||||
@set UPDATED-MONTH July 2026
|
||||
@set EDITION 1.4.21
|
||||
@set VERSION 1.4.21
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@set UPDATED 12 May 2026
|
||||
@set UPDATED-MONTH May 2026
|
||||
@set UPDATED 5 July 2026
|
||||
@set UPDATED-MONTH July 2026
|
||||
@set EDITION 1.4.21
|
||||
@set VERSION 1.4.21
|
||||
|
||||
@@ -10,5 +10,5 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
usb-core = { path = "../../usb-core/source" }
|
||||
redox_syscall = "0.7"
|
||||
redox_syscall = { path = "../../../../local/sources/syscall" }
|
||||
log = "0.4"
|
||||
|
||||
@@ -13,7 +13,7 @@ usb-core = { path = "../../usb-core/source" }
|
||||
libredox = { path = "../../../../../local/sources/libredox", features = ["call", "std"] }
|
||||
log = { version = "0.4", features = ["std"] }
|
||||
redox-driver-sys = { path = "../../redox-driver-sys/source" }
|
||||
redox-scheme = "<0.11.2"
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
syscall = { package = "redox_syscall", path = "../../../../../local/sources/syscall", features = ["std"] }
|
||||
|
||||
[target.'cfg(target_os = "redox")'.dependencies]
|
||||
@@ -22,3 +22,4 @@ redox-driver-sys = { path = "../../redox-driver-sys/source", features = ["redox"
|
||||
[patch.crates-io]
|
||||
redox_syscall = { path = "../../../../../local/sources/syscall" }
|
||||
libredox = { path = "../../../../../local/sources/libredox" }
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
|
||||
@@ -10,5 +10,5 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
usb-core = { path = "../../usb-core/source" }
|
||||
redox_syscall = "0.7"
|
||||
redox_syscall = { path = "../../../../local/sources/syscall" }
|
||||
log = "0.4"
|
||||
|
||||
@@ -11,9 +11,10 @@ path = "src/main.rs"
|
||||
libc = "0.2"
|
||||
libredox = { path = "../../../../../local/sources/libredox", features = ["call", "std"] }
|
||||
log = { version = "0.4", features = ["std"] }
|
||||
redox-scheme = "<0.11.2"
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
syscall = { package = "redox_syscall", path = "../../../../../local/sources/syscall", features = ["std"] }
|
||||
|
||||
[patch.crates-io]
|
||||
redox_syscall = { path = "../../../../../local/sources/syscall" }
|
||||
libredox = { path = "../../../../../local/sources/libredox" }
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
|
||||
@@ -6,4 +6,4 @@ description = "PCI bus backend for redox-driver-core"
|
||||
|
||||
[dependencies]
|
||||
redox-driver-core = { path = "../redox-driver-core" }
|
||||
redox_syscall = "0.7"
|
||||
redox_syscall = { path = "../../../../local/sources/syscall" }
|
||||
@@ -3,7 +3,7 @@ use std::sync::atomic::{AtomicI32, Ordering};
|
||||
|
||||
use redox_syscall::data::Map;
|
||||
use syscall as redox_syscall;
|
||||
use redox_syscall::flag::{MapFlags, MAP_PRIVATE, O_CLOEXEC, PROT_READ, PROT_WRITE};
|
||||
use redox_syscall::flag::{MapFlags, MAP_PRIVATE, FD_CLOEXEC, PROT_READ, PROT_WRITE};
|
||||
use redox_syscall::PAGE_SIZE;
|
||||
|
||||
use crate::{DriverError, Result};
|
||||
@@ -90,7 +90,7 @@ fn get_dma_memory_fd() -> Result<i32> {
|
||||
return Ok(current);
|
||||
}
|
||||
|
||||
let fd = libredox::call::open("/scheme/memory/scheme-root", O_CLOEXEC as i32, 0)
|
||||
let fd = libredox::call::open("/scheme/memory/scheme-root", FD_CLOEXEC.bits() as i32, 0)
|
||||
.map_err(|e| DriverError::Io(std::io::Error::from_raw_os_error(e.errno())))?;
|
||||
|
||||
let raw = fd as i32;
|
||||
@@ -111,7 +111,7 @@ fn virt_to_phys_cached(virt: usize) -> Result<usize> {
|
||||
let raw = match TRANSLATION_FD.load(Ordering::Acquire) {
|
||||
fd if fd >= 0 => fd,
|
||||
_ => {
|
||||
let fd = libredox::Fd::open("/scheme/memory/translation", O_CLOEXEC as i32, 0)
|
||||
let fd = libredox::Fd::open("/scheme/memory/translation", FD_CLOEXEC.bits() as i32, 0)
|
||||
.map_err(|e| DriverError::Io(std::io::Error::from_raw_os_error(e.errno())))?;
|
||||
let raw = fd.raw() as i32;
|
||||
// Leak the fd intentionally — it's a global cache
|
||||
@@ -202,7 +202,7 @@ impl DmaBuffer {
|
||||
fn allocate_via_scheme(mem_fd: i32, size: usize, _align: usize) -> Result<Self> {
|
||||
// Open a physical memory region of the requested size
|
||||
let path = format!("zeroed@{}?phys_contiguous", DMA_MEMORY_TYPE.suffix());
|
||||
let region_fd = libredox::call::openat(mem_fd as usize, &path, O_CLOEXEC as i32, 0)
|
||||
let region_fd = libredox::call::openat(mem_fd as usize, &path, FD_CLOEXEC.bits() as i32, 0)
|
||||
.map_err(|e| DriverError::Io(std::io::Error::from_raw_os_error(e.errno())))?;
|
||||
|
||||
let map = Map {
|
||||
|
||||
@@ -7,14 +7,14 @@ pub fn acquire_iopl() -> std::result::Result<(), crate::DriverError> {
|
||||
extern "C" {
|
||||
fn redox_cur_thrfd_v0() -> usize;
|
||||
}
|
||||
let kernel_fd = redox_syscall::dup(unsafe { redox_cur_thrfd_v0() }, b"open_via_dup")?;
|
||||
let kernel_fd = libredox::call::dup(unsafe { redox_cur_thrfd_v0() }, b"open_via_dup")?;
|
||||
let res = libredox::call::call_wo(
|
||||
kernel_fd,
|
||||
&[],
|
||||
redox_syscall::CallFlags::empty(),
|
||||
&[redox_syscall::ProcSchemeVerb::Iopl as u64],
|
||||
);
|
||||
let _ = redox_syscall::close(kernel_fd);
|
||||
let _ = libredox::call::close(kernel_fd);
|
||||
res.map(|_| ()).map_err(|e| e.into())
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use core::sync::atomic::{AtomicPtr, Ordering};
|
||||
use redox_syscall::data::Map;
|
||||
use syscall as redox_syscall;
|
||||
use redox_syscall::flag::{
|
||||
MAP_SHARED, O_CLOEXEC, O_RDONLY, O_RDWR, O_WRONLY, PROT_READ, PROT_WRITE,
|
||||
MAP_SHARED, FD_CLOEXEC, O_RDONLY, O_RDWR, O_WRONLY, PROT_READ, PROT_WRITE,
|
||||
};
|
||||
use redox_syscall::PAGE_SIZE;
|
||||
|
||||
@@ -41,7 +41,7 @@ bitflags::bitflags! {
|
||||
// SAFETY: The memory scheme root FD is cached for the process lifetime.
|
||||
// This is valid because:
|
||||
// 1. scheme:memory is a kernel-built-in scheme that never terminates.
|
||||
// 2. The FD is opened with O_CLOEXEC — children after exec(2) do not inherit it.
|
||||
// 2. The FD is opened with FD_CLOEXEC — children after exec(2) do not inherit it.
|
||||
// 3. This code MUST NOT be used in processes that fork() without exec() —
|
||||
// the child would share the same FD table slot, risking double-close.
|
||||
static MEMORY_ROOT_FD: AtomicPtr<()> = AtomicPtr::new(ptr::null_mut());
|
||||
@@ -55,7 +55,7 @@ fn ensure_memory_root() -> Result<libredox::Fd> {
|
||||
return Ok(libredox::Fd::new(dup_fd));
|
||||
}
|
||||
|
||||
let fd = libredox::Fd::open("/scheme/memory/scheme-root", O_CLOEXEC as i32, 0)?;
|
||||
let fd = libredox::Fd::open("/scheme/memory/scheme-root", FD_CLOEXEC.bits() as i32, 0)?;
|
||||
let raw = fd.raw();
|
||||
|
||||
match MEMORY_ROOT_FD.compare_exchange(
|
||||
@@ -109,7 +109,7 @@ impl MmioRegion {
|
||||
}
|
||||
|
||||
let root_fd = ensure_memory_root()?;
|
||||
let mem_fd = root_fd.openat(&path, (O_CLOEXEC | mode) as i32, 0)?;
|
||||
let mem_fd = root_fd.openat(&path, (FD_CLOEXEC.bits() as usize | mode) as i32, 0)?;
|
||||
|
||||
let map = Map {
|
||||
offset: phys_addr as usize,
|
||||
|
||||
@@ -10,5 +10,5 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
usb-core = { path = "../../usb-core/source" }
|
||||
redox_syscall = "0.7"
|
||||
redox_syscall = { path = "../../../../local/sources/syscall" }
|
||||
log = "0.4"
|
||||
|
||||
@@ -7,10 +7,10 @@ description = "DRM scheme daemon for Redox OS — provides GPU modesetting and b
|
||||
[dependencies]
|
||||
redox-driver-sys = { version = "0.2", path = "../../../drivers/redox-driver-sys/source" }
|
||||
linux-kpi = { version = "0.2", path = "../../../drivers/linux-kpi/source" }
|
||||
libredox = "0.1"
|
||||
redox_syscall = { version = "0.8", features = ["std"] }
|
||||
libredox = { path = "../../../../../local/sources/libredox" }
|
||||
redox_syscall = { path = "../../../../../local/sources/syscall", features = ["std"] }
|
||||
syscall04 = { package = "redox_syscall", version = "0.4" }
|
||||
redox-scheme = "0.11"
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
daemon = { path = "../../../../../recipes/core/base/source/daemon" }
|
||||
log = "0.4"
|
||||
thiserror = "2"
|
||||
@@ -20,3 +20,6 @@ getrandom = "0.2"
|
||||
[patch.crates-io]
|
||||
redox-driver-sys = { path = "../../../drivers/redox-driver-sys/source" }
|
||||
linux-kpi = { path = "../../../drivers/linux-kpi/source" }
|
||||
libredox = { path = "../../../../../local/sources/libredox" }
|
||||
redox-scheme = { path = "../../../../../local/sources/redox-scheme" }
|
||||
redox_syscall = { path = "../../../../../local/sources/syscall" }
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR This file is copyright:
|
||||
# This file is distributed under the same license as the kdecoration package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: kdecoration\n"
|
||||
"Report-Msgid-Bugs-To: https://bugs.kde.org\n"
|
||||
"POT-Creation-Date: 2026-01-13 08:42+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Irish Gaelic <kde-i18n-doc@kde.org>\n"
|
||||
"Language: ga\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n < 11 ? "
|
||||
"3 : 4\n"
|
||||
|
||||
#: decorationbutton.cpp:325
|
||||
#, kde-format
|
||||
msgctxt ""
|
||||
"@info:tooltip The Name of the menu that appears when you click a window's "
|
||||
"app icon"
|
||||
msgid "Window menu"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:327
|
||||
#, kde-format
|
||||
msgid "Application menu"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:330
|
||||
#, kde-format
|
||||
msgid "On one desktop"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:332
|
||||
#, kde-format
|
||||
msgid "On all desktops"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:334
|
||||
#, kde-format
|
||||
msgid "Minimize"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:337
|
||||
#, kde-format
|
||||
msgid "Restore"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:339
|
||||
#, kde-format
|
||||
msgid "Maximize"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:341
|
||||
#, kde-format
|
||||
msgid "Close"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:343
|
||||
#, kde-format
|
||||
msgid "Context help"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:346
|
||||
#, kde-format
|
||||
msgid "Unshade"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:348
|
||||
#, kde-format
|
||||
msgid "Shade"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:351
|
||||
#, kde-format
|
||||
msgid "Don't keep below other windows"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:353
|
||||
#, kde-format
|
||||
msgid "Keep below other windows"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:356
|
||||
#, kde-format
|
||||
msgid "Don't keep above other windows"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:358
|
||||
#, kde-format
|
||||
msgid "Keep above other windows"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:361
|
||||
#, kde-format
|
||||
msgid "The window is hidden from Screencast. Press to make it visible"
|
||||
msgstr ""
|
||||
|
||||
#: decorationbutton.cpp:363
|
||||
#, kde-format
|
||||
msgid "Hide from Screencast"
|
||||
msgstr ""
|
||||
@@ -0,0 +1,20 @@
|
||||
/*!
|
||||
\page attica-index.html
|
||||
\title Attica
|
||||
|
||||
Open Collaboration Service client library
|
||||
|
||||
\section1 Using the Module
|
||||
|
||||
\include {module-use.qdocinc} {using the c++ api}
|
||||
|
||||
\section2 Building with CMake
|
||||
|
||||
\include {module-use.qdocinc} {building with cmake} {KF6} {Attica} {KF6::Attica}
|
||||
|
||||
\section1 API Reference
|
||||
|
||||
\list
|
||||
\li \l{Attica C++ Classes}
|
||||
\endlist
|
||||
*/
|
||||
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
\module Attica
|
||||
\title Attica C++ Classes
|
||||
\ingroup modules
|
||||
\cmakepackage KF6
|
||||
\cmakecomponent Attica
|
||||
|
||||
\brief Open Collaboration Service client library.
|
||||
*/
|
||||
@@ -0,0 +1,33 @@
|
||||
include($KDE_DOCS/global/qt-module-defaults.qdocconf)
|
||||
|
||||
project = Attica
|
||||
description = Open Collaboration Service client library
|
||||
|
||||
documentationinheaders = true
|
||||
|
||||
headerdirs += .
|
||||
sourcedirs += .
|
||||
|
||||
outputformats = HTML
|
||||
|
||||
navigation.landingpage = "Attica"
|
||||
|
||||
depends += \
|
||||
kde \
|
||||
qtcore
|
||||
|
||||
qhp.projects = Attica
|
||||
|
||||
qhp.Attica.file = attica.qhp
|
||||
qhp.Attica.namespace = org.kde.attica.$QT_VERSION_TAG
|
||||
qhp.Attica.virtualFolder = attica
|
||||
qhp.Attica.indexTitle = Attica
|
||||
qhp.Attica.indexRoot =
|
||||
|
||||
qhp.Attica.subprojects = classes
|
||||
qhp.Attica.subprojects.classes.title = C++ Classes
|
||||
qhp.Attica.subprojects.classes.indexTitle = Attica C++ Classes
|
||||
qhp.Attica.subprojects.classes.selectors = class fake:headerfile
|
||||
qhp.Attica.subprojects.classes.sortPages = true
|
||||
|
||||
tagfile = attica.tags
|
||||
@@ -0,0 +1 @@
|
||||
.. ecm-module:: ../../find-modules/FindFFmpeg.cmake
|
||||
@@ -0,0 +1 @@
|
||||
.. ecm-module:: ../../modules/ECMFeatureSummary.cmake
|
||||
@@ -0,0 +1,250 @@
|
||||
# SPDX-FileCopyrightText: 2006 Matthias Kretz <kretz@kde.org>
|
||||
# SPDX-FileCopyrightText: 2008 Alexander Neundorf <neundorf@kde.org>
|
||||
# SPDX-FileCopyrightText: 2011 Michael Jansen <kde@michael-jansen.biz>
|
||||
# SPDX-FileCopyrightText: 2021 Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
|
||||
FindFFmpeg
|
||||
----------
|
||||
|
||||
Try to find FFmpeg components.
|
||||
|
||||
The following components are available::
|
||||
|
||||
AVCODEC AVFILTER AVDEVICE AVFORMAT
|
||||
AVUTIL SWRESAMPLE SWSCALE POSTPROCESS
|
||||
|
||||
If no components are specified in the find_module call, the following ones
|
||||
will be choosen as default::
|
||||
|
||||
AVFORMAT AVUTIL AVCODEC
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module provides the following imported targets, if found:
|
||||
|
||||
``FFmpeg::FFmpeg``
|
||||
For all the required FFmpeg components
|
||||
|
||||
``FFmpeg::<component>``
|
||||
For each <component> that was found
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``FFMPEG_FOUND``
|
||||
System has the all required components.
|
||||
|
||||
``FFMPEG_INCLUDE_DIRS``
|
||||
Include directory necessary for using the required components headers.
|
||||
|
||||
``FFMPEG_LIBRARIES``
|
||||
Link these to use the required FFmpeg components.
|
||||
|
||||
``FFMPEG_DEFINITIONS``
|
||||
Compiler switches required for using the required FFmpeg components.
|
||||
|
||||
|
||||
Additionally for each of the components, the following variables will be defined:
|
||||
|
||||
``<component>_FOUND``
|
||||
True if (the requestion version of) <component> is available
|
||||
|
||||
``<component>_INCLUDE_DIRS``
|
||||
Include directory necessary for using the <component> headers
|
||||
|
||||
``<component>_LIBRARIES``
|
||||
Link these to use <component>
|
||||
|
||||
``<component>_DEFINITIONS``
|
||||
Compiler switches required for using <component>
|
||||
|
||||
``<component>_VERSION``
|
||||
The components version (NOTE: always empty on Windows)
|
||||
|
||||
As the versions of the various FFmpeg components differ for a given release,
|
||||
and CMake supports only one common version for all components, use the
|
||||
following to specify required versions for multiple components:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
find_package(FFmpeg 57.48 COMPONENTS AVCODEC)
|
||||
find_package(FFmpeg 57.40 COMPONENTS AVFORMAT)
|
||||
find_package(FFmpeg 55.27 COMPONENTS AVUTIL)
|
||||
|
||||
NOTE: version checking is skipped on Windows
|
||||
|
||||
Since 6.20.0.
|
||||
#]=======================================================================]
|
||||
|
||||
cmake_policy(VERSION 3.16)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if(NOT FFmpeg_FIND_COMPONENTS)
|
||||
# The default components were taken from a survey over other FindFFMPEG.cmake files
|
||||
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL)
|
||||
endif()
|
||||
|
||||
list(LENGTH FFmpeg_FIND_COMPONENTS _numComponents)
|
||||
if((${_numComponents} GREATER 1) AND DEFINED ${FFmpeg_FIND_VERSION})
|
||||
message(WARNING "Using a required version in combination with multiple COMPONENTS is not supported")
|
||||
set(_FFmpeg_REQUIRED_VERSION 0)
|
||||
elseif(DEFINED FFmpeg_FIND_VERSION)
|
||||
set(_FFmpeg_REQUIRED_VERSION ${FFmpeg_FIND_VERSION})
|
||||
else()
|
||||
set(_FFmpeg_REQUIRED_VERSION 0)
|
||||
endif()
|
||||
set(_FFmpeg_ALL_COMPONENTS AVCODEC AVFILTER AVDEVICE AVFORMAT AVUTIL POSTPROCESS SWRESAMPLE SWSCALE)
|
||||
|
||||
### Macro: set_component_found
|
||||
#
|
||||
# Marks the given component as found if both *_LIBRARIES AND *_INCLUDE_DIRS is present.
|
||||
|
||||
macro(set_component_found _component )
|
||||
if(${_component}_LIBRARIES AND ${_component}_INCLUDE_DIRS)
|
||||
set(${_component}_FOUND TRUE)
|
||||
set(FFmpeg_${_component}_FOUND TRUE)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(create_target _component )
|
||||
if(${_component}_FOUND AND NOT TARGET FFmpeg::${_component})
|
||||
add_library(FFmpeg::${_component} UNKNOWN IMPORTED)
|
||||
set_target_properties(FFmpeg::${_component} PROPERTIES
|
||||
IMPORTED_LOCATION "${${_component}_LIBRARIES}"
|
||||
INTERFACE_COMPILE_OPTIONS "${${_component}_DEFINITIONS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${${_component}_INCLUDE_DIRS}"
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
### Macro: find_component
|
||||
#
|
||||
# Checks for the given component by invoking pkgconfig and then looking up the libraries and
|
||||
# include directories.
|
||||
|
||||
macro(find_component _component _pkgconfig _library _header)
|
||||
|
||||
if(NOT WIN32)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_${_component} QUIET ${_pkgconfig})
|
||||
endif()
|
||||
|
||||
find_path(${_component}_INCLUDE_DIRS ${_header}
|
||||
HINTS
|
||||
${PC_LIB${_component}_INCLUDEDIR}
|
||||
${PC_LIB${_component}_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES
|
||||
ffmpeg
|
||||
)
|
||||
|
||||
find_library(${_component}_LIBRARIES NAMES ${_library}
|
||||
HINTS
|
||||
${PC_LIB${_component}_LIBDIR}
|
||||
${PC_LIB${_component}_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(${_component}_DEFINITIONS ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS.")
|
||||
set(${_component}_VERSION ${PC_${_component}_VERSION} CACHE STRING "The ${_component} version number.")
|
||||
|
||||
set_component_found(${_component})
|
||||
create_target(${_component})
|
||||
|
||||
mark_as_advanced(
|
||||
${_component}_INCLUDE_DIRS
|
||||
${_component}_LIBRARIES
|
||||
${_component}_DEFINITIONS
|
||||
${_component}_VERSION)
|
||||
|
||||
endmacro()
|
||||
|
||||
# Check for cached results. If there are skip the costly part.
|
||||
if(NOT FFMPEG_LIBRARIES)
|
||||
|
||||
# Check for all possible component.
|
||||
find_component(AVCODEC libavcodec avcodec libavcodec/avcodec.h)
|
||||
find_component(AVFILTER libavfilter avfilter libavfilter/avfilter.h)
|
||||
find_component(AVFORMAT libavformat avformat libavformat/avformat.h)
|
||||
find_component(AVDEVICE libavdevice avdevice libavdevice/avdevice.h)
|
||||
find_component(AVUTIL libavutil avutil libavutil/avutil.h)
|
||||
find_component(SWRESAMPLE libswresample swresample libswresample/swresample.h)
|
||||
find_component(SWSCALE libswscale swscale libswscale/swscale.h)
|
||||
find_component(POSTPROCESS libpostproc postproc libpostproc/postprocess.h)
|
||||
|
||||
# Check if the required components were found and add their stuff to the FFMPEG_* vars.
|
||||
foreach(_component ${_FFmpeg_ALL_COMPONENTS})
|
||||
if(${_component}_FOUND)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${_component}_LIBRARIES})
|
||||
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${_component}_DEFINITIONS})
|
||||
list(APPEND FFMPEG_INCLUDE_DIRS ${${_component}_INCLUDE_DIRS})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Build the include path with duplicates removed.
|
||||
if(FFMPEG_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
|
||||
endif()
|
||||
|
||||
# cache the vars.
|
||||
set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "The FFmpeg include directories." FORCE)
|
||||
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "The FFmpeg libraries." FORCE)
|
||||
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} CACHE STRING "The FFmpeg cflags." FORCE)
|
||||
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIRS
|
||||
FFMPEG_LIBRARIES
|
||||
FFMPEG_DEFINITIONS)
|
||||
|
||||
else()
|
||||
# Set the noncached _FOUND vars for the components.
|
||||
foreach(_component ${_FFmpeg_ALL_COMPONENTS})
|
||||
set_component_found(${_component})
|
||||
create_target(${_component})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Compile the list of required vars
|
||||
unset(_FFmpeg_REQUIRED_VARS)
|
||||
set(_FFmpeg_FOUND_LIBRARIES "")
|
||||
foreach(_component ${FFmpeg_FIND_COMPONENTS})
|
||||
if(${_component}_FOUND)
|
||||
if(NOT WIN32)
|
||||
if(${_component}_VERSION VERSION_LESS _FFmpeg_REQUIRED_VERSION)
|
||||
message(STATUS "${_component}: ${${_component}_VERSION} < ${_FFmpeg_REQUIRED_VERSION}")
|
||||
unset(${_component}_FOUND)
|
||||
endif()
|
||||
else()
|
||||
# We don't use PkgConfig on Windows an hence the <component>_VERSION var is empty
|
||||
# TODO: We could add some magic to retrieve the version from the .pc files or version headers ourself,
|
||||
# like https://github.com/Kitware/VTK/blob/master/CMake/FindFFMPEG.cmake
|
||||
message(WARNING "${_component}: Version check is not supported on Windows, skipping version check")
|
||||
endif()
|
||||
|
||||
list(APPEND _FFmpeg_FOUND_LIBRARIES ${${_component}_LIBRARIES})
|
||||
endif()
|
||||
list(APPEND _FFmpeg_REQUIRED_VARS ${_component}_LIBRARIES ${_component}_INCLUDE_DIRS ${_component}_FOUND)
|
||||
endforeach()
|
||||
list(INSERT _FFmpeg_REQUIRED_VARS 0 _FFmpeg_FOUND_LIBRARIES)
|
||||
|
||||
# Give a nice error message if some of the required vars are missing.
|
||||
find_package_handle_standard_args(FFmpeg
|
||||
REQUIRED_VARS ${_FFmpeg_REQUIRED_VARS}
|
||||
HANDLE_COMPONENTS)
|
||||
|
||||
# Create the general target
|
||||
if(FFmpeg_FOUND AND NOT TARGET FFmpeg::FFmpeg)
|
||||
add_library(FFmpeg::FFmpeg INTERFACE IMPORTED)
|
||||
foreach(_component ${FFmpeg_FIND_COMPONENTS})
|
||||
if(${_component}_FOUND AND TARGET FFmpeg::${_component})
|
||||
target_link_libraries(FFmpeg::FFmpeg INTERFACE FFmpeg::${_component})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#include "testhelper.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
make_test_file("test12.txt");
|
||||
return 0;
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#include "testhelper.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
make_test_file("test13.txt");
|
||||
return 0;
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#include "testhelper.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
make_test_file("test14.txt");
|
||||
int var = TEST_DEF;
|
||||
return var == 1 ? 0 : 1;
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#include "testhelper.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
make_test_file("test15.txt");
|
||||
int var = TEST_DEF;
|
||||
return var == 1 ? 0 : 1;
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(ECMAddTests)
|
||||
|
||||
set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../modules)
|
||||
set(CMAKE_MODULE_PATH "${ECM_MODULE_DIR}")
|
||||
|
||||
enable_testing()
|
||||
|
||||
include(ECMAddTests)
|
||||
include(../../test_helpers.cmake)
|
||||
include(../nameprefix_test_helpers.cmake)
|
||||
|
||||
set(main_cpp ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
|
||||
|
||||
set(ECM_TEST_NAME_PREFIX_STRATEGY "PATH")
|
||||
|
||||
add_subdirectory(dir_a)
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
add_subdirectory(dir_b)
|
||||
add_subdirectory(dir_ignored)
|
||||
add_subdirectory(dir_notignored)
|
||||
add_subdirectory(dir_bypropignored)
|
||||
add_subdirectory(dir_first)
|
||||
add_subdirectory(dir_renamed)
|
||||
add_subdirectory(dir_nodirs)
|
||||
|
||||
# default from source name., prefix preset by path-derived value
|
||||
ecm_add_test(
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# prefix preset by path-derived value
|
||||
ecm_add_test(
|
||||
TEST_NAME "main_a2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main_a3"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name_prefix("dir_a-")
|
||||
|
||||
assert_test_name("dir_a-" "main")
|
||||
assert_test_name("dir_a-" "main_a2")
|
||||
assert_test_name("override_by_arg-" "main_a3")
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
# prefix preset by path-derived value
|
||||
ecm_add_test(
|
||||
TEST_NAME "main_b"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main_b2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit NO_NAME_PREFIX
|
||||
ecm_add_test(
|
||||
NO_NAME_PREFIX
|
||||
TEST_NAME "main_b3"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name_prefix("dir_a-dir_b-")
|
||||
|
||||
assert_test_name("dir_a-dir_b-" "main_b")
|
||||
assert_test_name("override_by_arg-" "main_b2")
|
||||
assert_test_name("" "main_b3")
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
ecm_test_set_dir_properties(PREFIX_NAME_IGNORE)
|
||||
|
||||
# prefix preset by path-derived value
|
||||
ecm_add_test(
|
||||
TEST_NAME "main_bypropignored1"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main_bypropignored2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit NO_NAME_PREFIX
|
||||
ecm_add_test(
|
||||
NO_NAME_PREFIX
|
||||
TEST_NAME "main_bypropignored3"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name_prefix("dir_a-")
|
||||
|
||||
assert_test_name("dir_a-" "main_bypropignored1")
|
||||
assert_test_name("override_by_arg-" "main_bypropignored2")
|
||||
assert_test_name("" "main_bypropignored3")
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
ecm_test_set_dir_properties(FIRST_PREFIX_NAME)
|
||||
|
||||
add_subdirectory(dir_last)
|
||||
|
||||
# prefix preset by path-derived value
|
||||
ecm_add_test(
|
||||
TEST_NAME "main_first"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main_first2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name_prefix("dir_first-")
|
||||
|
||||
assert_test_name("dir_first-" "main_first")
|
||||
assert_test_name("override_by_arg-" "main_first2")
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
ecm_test_set_dir_properties(LAST_PREFIX_NAME)
|
||||
|
||||
add_subdirectory(dir_afterlast)
|
||||
|
||||
# prefix preset by path-derived value
|
||||
ecm_add_test(
|
||||
TEST_NAME "main_last"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main_last2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit NO_NAME_PREFIX
|
||||
ecm_add_test(
|
||||
NO_NAME_PREFIX
|
||||
TEST_NAME "main_last3"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name_prefix("dir_first-dir_last-")
|
||||
|
||||
assert_test_name("dir_first-dir_last-" "main_last")
|
||||
assert_test_name("override_by_arg-" "main_last2")
|
||||
assert_test_name("" "main_last3")
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
# prefix preset by path-derived value
|
||||
ecm_add_test(
|
||||
TEST_NAME "main_afterlast"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main_afterlast2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name_prefix("dir_first-dir_last-")
|
||||
|
||||
assert_test_name("dir_first-dir_last-" "main_afterlast")
|
||||
assert_test_name("override_by_arg-" "main_afterlast2")
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
list(APPEND ECM_TEST_NAME_PREFIX_IGNORE_DIRS "dir_ignored")
|
||||
|
||||
# prefix preset by path-derived value
|
||||
ecm_add_test(
|
||||
TEST_NAME "main_ignored1"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main_ignored2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit NO_NAME_PREFIX
|
||||
ecm_add_test(
|
||||
NO_NAME_PREFIX
|
||||
TEST_NAME "main_ignored3"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name_prefix("dir_a-")
|
||||
|
||||
assert_test_name("dir_a-" "main_ignored1")
|
||||
assert_test_name("override_by_arg-" "main_ignored2")
|
||||
assert_test_name("" "main_ignored3")
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
ecm_test_set_dir_properties(
|
||||
DIR nodir_first/nodir_ignored
|
||||
PREFIX_NAME_IGNORE
|
||||
)
|
||||
list(APPEND ECM_TEST_NAME_PREFIX_IGNORE_DIRS "nodir_notignored")
|
||||
ecm_test_set_dir_properties(
|
||||
DIR nodir_first/nodir_ignored/nodir_notignored
|
||||
PREFIX_NAME_NOT_IGNORE
|
||||
)
|
||||
ecm_test_set_dir_properties(
|
||||
DIR nodir_first/nodir_ignored/nodir_notignored/nodir_renamed
|
||||
PREFIX_NAME "new_name"
|
||||
)
|
||||
ecm_test_set_dir_properties(
|
||||
DIR nodir_first
|
||||
FIRST_PREFIX_NAME
|
||||
)
|
||||
ecm_test_set_dir_properties(
|
||||
DIR nodir_first/nodir_ignored/nodir_notignored/nodir_renamed/nodir_last
|
||||
LAST_PREFIX_NAME
|
||||
)
|
||||
|
||||
add_subdirectory(nodir_first/nodir_ignored/nodir_notignored/nodir_renamed/nodir_last/dir_afterlast)
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
# prefix preset by path-derived value
|
||||
ecm_add_test(
|
||||
TEST_NAME "main_nodir"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main_nodir2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit NO_NAME_PREFIX
|
||||
ecm_add_test(
|
||||
NO_NAME_PREFIX
|
||||
TEST_NAME "main_nodir3"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name_prefix("nodir_first-nodir_notignored-new_name-nodir_last-")
|
||||
|
||||
assert_test_name("nodir_first-nodir_notignored-new_name-nodir_last-" "main_nodir")
|
||||
assert_test_name("override_by_arg-" "main_nodir2")
|
||||
assert_test_name("" "main_nodir3")
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
list(APPEND ECM_TEST_NAME_PREFIX_IGNORE_DIRS "dir_notignored")
|
||||
ecm_test_set_dir_properties(PREFIX_NAME_NOT_IGNORE)
|
||||
|
||||
# prefix preset by path-derived value
|
||||
ecm_add_test(
|
||||
TEST_NAME "main_notignored1"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main_notignored2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit NO_NAME_PREFIX
|
||||
ecm_add_test(
|
||||
NO_NAME_PREFIX
|
||||
TEST_NAME "main_notignored3"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name_prefix("dir_a-dir_notignored-")
|
||||
|
||||
assert_test_name("dir_a-dir_notignored-" "main_notignored1")
|
||||
assert_test_name("override_by_arg-" "main_notignored2")
|
||||
assert_test_name("" "main_notignored3")
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
ecm_test_set_dir_properties(PREFIX_NAME "new_name")
|
||||
|
||||
# override of dir name for path-derived value
|
||||
ecm_add_test(
|
||||
TEST_NAME "main_renamed"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main_renamed2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of path-derived value by explicit NO_NAME_PREFIX
|
||||
ecm_add_test(
|
||||
NO_NAME_PREFIX
|
||||
TEST_NAME "main_renamed3"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name_prefix("dir_a-new_name-")
|
||||
|
||||
assert_test_name("dir_a-new_name-" "main_renamed")
|
||||
assert_test_name("override_by_arg-" "main_renamed2")
|
||||
assert_test_name("" "main_renamed3")
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// SPDX-FileCopyrightText: None
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(ECMAddTests)
|
||||
|
||||
set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../modules)
|
||||
set(CMAKE_MODULE_PATH "${ECM_MODULE_DIR}")
|
||||
|
||||
enable_testing()
|
||||
|
||||
include(ECMAddTests)
|
||||
include(../../test_helpers.cmake)
|
||||
include(../nameprefix_test_helpers.cmake)
|
||||
|
||||
set(main_cpp ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
|
||||
|
||||
# default from source name
|
||||
ecm_add_test(
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "by_arg-"
|
||||
TEST_NAME "main2"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# preset by scope variable
|
||||
set(ECM_TEST_NAME_PREFIX "by_var-")
|
||||
|
||||
assert_test_name_prefix("by_var-")
|
||||
|
||||
ecm_add_test(
|
||||
TEST_NAME "main3"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of scope variable by explicit arg
|
||||
ecm_add_test(
|
||||
NAME_PREFIX "override_by_arg-"
|
||||
TEST_NAME "main4"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# override of scope variable by explicit NO_NAME_PREFIX
|
||||
ecm_add_test(
|
||||
NO_NAME_PREFIX
|
||||
TEST_NAME "main5"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# preset by reset scope variable
|
||||
set(ECM_TEST_NAME_PREFIX "by_var2-")
|
||||
|
||||
assert_test_name_prefix("by_var2-")
|
||||
|
||||
ecm_add_test(
|
||||
TEST_NAME "main6"
|
||||
${main_cpp}
|
||||
)
|
||||
|
||||
# check
|
||||
assert_test_name("" "main")
|
||||
assert_test_name("by_arg-" "main2")
|
||||
assert_test_name("by_var-" "main3")
|
||||
assert_test_name("override_by_arg-" "main4")
|
||||
assert_test_name("" "main5")
|
||||
assert_test_name("by_var2-" "main6")
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// SPDX-FileCopyrightText: None
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# SPDX-FileCopyrightText: None
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
macro(assert_test_name expected_prefix_name expected_base_name)
|
||||
if(NOT TARGET ${expected_base_name})
|
||||
message(SEND_ERROR "No target defined with name '${expected_base_name}'.")
|
||||
endif()
|
||||
set(_test_name "${expected_prefix_name}${expected_base_name}")
|
||||
if(NOT TEST ${_test_name})
|
||||
message(SEND_ERROR "No test defined with name '${_test_name}'.")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(assert_test_name_prefix expected_name_prefix)
|
||||
ecm_test_get_name_prefix(name_prefix)
|
||||
if(NOT ${name_prefix} STREQUAL ${expected_name_prefix})
|
||||
message(SEND_ERROR "Path-derived name prefix is '${name_prefix}', expecting '${expected_name_prefix}'.")
|
||||
endif()
|
||||
endmacro()
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#include "testhelper.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
make_test_file("test8.txt");
|
||||
return 0;
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#include "testhelper.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
make_test_file("test9.txt");
|
||||
int var = TEST_DEF;
|
||||
return var == 1 ? 0 : 1;
|
||||
}
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(custom_defines VERSION 6.7.0)
|
||||
|
||||
include(../test-and-comparison-helpers.cmake)
|
||||
|
||||
include(ECMGeneratePkgConfigFile)
|
||||
include(ECMSetupVersion)
|
||||
|
||||
ecm_setup_version(PROJECT VARIABLE_PREFIX ATTICA
|
||||
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/attica_version.h"
|
||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF6AtticaConfigVersion.cmake"
|
||||
SOVERSION 6)
|
||||
|
||||
set(origfiles "${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/KF6Attica.pc")
|
||||
|
||||
ecm_generate_pkgconfig_file(BASE_NAME KF6Attica
|
||||
DESCRIPTION "Qt library to access Open Collaboration Services"
|
||||
LIB_NAME KF6Attica
|
||||
INCLUDE_INSTALL_DIR /usr/include/Attica
|
||||
DEFINES -I\${prefix}/include/foo -I\${prefix}/include/bar
|
||||
DEPS Qt6Core Qt6Network
|
||||
FILENAME_VAR OutputFile
|
||||
)
|
||||
|
||||
compare_files(GENERATED ${OutputFile}
|
||||
ORIGINALS ${origfiles})
|
||||
file(REMOVE ${OutputFile})
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(no_description_parameter_metainfo_with_description-param VERSION 5.43)
|
||||
|
||||
include(../test-and-comparison-helpers.cmake)
|
||||
|
||||
include(ECMGeneratePkgConfigFile)
|
||||
include(ECMSetupVersion)
|
||||
|
||||
ecm_setup_version(PROJECT VARIABLE_PREFIX KCOREADDONS
|
||||
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_version.h"
|
||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfigVersion.cmake"
|
||||
SOVERSION 5)
|
||||
|
||||
set(origfiles "${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/KF5CoreAddons2.pc")
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/metainfo_with_description.yaml
|
||||
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/metainfo_with_description.yaml ${CMAKE_CURRENT_SOURCE_DIR}/metainfo.yaml)
|
||||
|
||||
ecm_generate_pkgconfig_file(BASE_NAME KF5CoreAddons2
|
||||
DEPS Qt5Core
|
||||
INCLUDE_INSTALL_DIR /usr/KCoreAddons
|
||||
FILENAME_VAR OutputFile)
|
||||
|
||||
compare_files(GENERATED ${OutputFile}
|
||||
ORIGINALS ${origfiles})
|
||||
file(REMOVE ${OutputFile})
|
||||
file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/metainfo.yaml)
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(no_description_parameter_metainfo_with_description-param VERSION 5.43)
|
||||
|
||||
include(../test-and-comparison-helpers.cmake)
|
||||
|
||||
include(ECMGeneratePkgConfigFile)
|
||||
include(ECMSetupVersion)
|
||||
|
||||
ecm_setup_version(PROJECT VARIABLE_PREFIX KCOREADDONS
|
||||
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_version.h"
|
||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfigVersion.cmake"
|
||||
SOVERSION 5)
|
||||
|
||||
set(origfiles "${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/KF5CoreAddons3.pc")
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/metainfo_with_empty_description.yaml
|
||||
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/metainfo_with_empty_description.yaml ${CMAKE_CURRENT_SOURCE_DIR}/metainfo.yaml)
|
||||
|
||||
ecm_generate_pkgconfig_file(BASE_NAME KF5CoreAddons3
|
||||
DEPS Qt5Core
|
||||
INCLUDE_INSTALL_DIR /usr/KCoreAddons
|
||||
FILENAME_VAR OutputFile)
|
||||
|
||||
compare_files(GENERATED ${OutputFile}
|
||||
ORIGINALS ${origfiles})
|
||||
file(REMOVE ${OutputFile})
|
||||
file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/metainfo.yaml)
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(no_description_parameter_metainfo_without_description VERSION 5.43)
|
||||
|
||||
include(../test-and-comparison-helpers.cmake)
|
||||
|
||||
include(ECMGeneratePkgConfigFile)
|
||||
include(ECMSetupVersion)
|
||||
|
||||
ecm_setup_version(PROJECT VARIABLE_PREFIX KCOREADDONS
|
||||
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_version.h"
|
||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfigVersion.cmake"
|
||||
SOVERSION 5)
|
||||
|
||||
set(origfiles "${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/KF5CoreAddons3.pc")
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/metainfo_without_description.yaml
|
||||
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/metainfo_without_description.yaml ${CMAKE_CURRENT_SOURCE_DIR}/metainfo.yaml)
|
||||
|
||||
ecm_generate_pkgconfig_file(BASE_NAME KF5CoreAddons3
|
||||
DEPS Qt5Core
|
||||
INCLUDE_INSTALL_DIR /usr/KCoreAddons
|
||||
FILENAME_VAR OutputFile)
|
||||
|
||||
compare_files(GENERATED ${OutputFile}
|
||||
ORIGINALS ${origfiles})
|
||||
file(REMOVE ${OutputFile})
|
||||
file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/metainfo.yaml)
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(no_optional_arguments VERSION 5.43)
|
||||
|
||||
include(../test-and-comparison-helpers.cmake)
|
||||
|
||||
include(ECMGeneratePkgConfigFile)
|
||||
include(ECMSetupVersion)
|
||||
|
||||
ecm_setup_version(PROJECT VARIABLE_PREFIX KCOREADDONS
|
||||
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_version.h"
|
||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfigVersion.cmake"
|
||||
SOVERSION 5)
|
||||
|
||||
set(origfiles "${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/KF5CoreAddons.pc")
|
||||
|
||||
ecm_generate_pkgconfig_file(BASE_NAME KF5CoreAddons
|
||||
DESCRIPTION "KF5CoreAddons test"
|
||||
DEPS Qt5Core
|
||||
FILENAME_VAR OutputFile)
|
||||
|
||||
compare_files(GENERATED ${OutputFile}
|
||||
ORIGINALS ${origfiles})
|
||||
file(REMOVE ${OutputFile})
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
set(ECM_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../modules")
|
||||
set(CMAKE_MODULE_PATH "${ECM_MODULE_DIR}")
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX "/usr")
|
||||
|
||||
function (compare_files)
|
||||
set(options)
|
||||
set(oneValueArgs GENERATED ORIGINALS)
|
||||
set(multiValueArgs)
|
||||
cmake_parse_arguments(CF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
list(LENGTH CF_GENERATED count)
|
||||
math(EXPR last "${count}-1")
|
||||
foreach(i RANGE ${last})
|
||||
list(GET CF_GENERATED ${i} generated_file)
|
||||
if (NOT EXISTS "${generated_file}")
|
||||
message(FATAL_ERROR "${generated_file} was not generated")
|
||||
endif()
|
||||
file(READ "${generated_file}" file_contents)
|
||||
string(STRIP "${file_contents}" file_contents)
|
||||
|
||||
list(GET CF_ORIGINALS ${i} original_file)
|
||||
if (NOT EXISTS "${original_file}")
|
||||
message(FATAL_ERROR "Original ${original_file} was not found")
|
||||
endif()
|
||||
file(READ "${original_file}" original_contents)
|
||||
string(STRIP "${original_contents}" original_contents)
|
||||
|
||||
if(NOT original_contents STREQUAL file_contents)
|
||||
message(FATAL_ERROR "Different files: ${original_file} ${generated_file}")
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(with_an_URL_parameter VERSION 5.43)
|
||||
|
||||
include(../test-and-comparison-helpers.cmake)
|
||||
|
||||
include(ECMGeneratePkgConfigFile)
|
||||
include(ECMSetupVersion)
|
||||
|
||||
ecm_setup_version(PROJECT VARIABLE_PREFIX KCOREADDONS
|
||||
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_version.h"
|
||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfigVersion.cmake"
|
||||
SOVERSION 5)
|
||||
|
||||
set(origfiles "${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/KF5CoreAddons5.pc")
|
||||
|
||||
ecm_generate_pkgconfig_file(BASE_NAME KF5CoreAddons5
|
||||
DESCRIPTION "KF5CoreAddons test"
|
||||
URL "https://www.example.org/"
|
||||
DEPS Qt5Core
|
||||
INCLUDE_INSTALL_DIR /usr/KCoreAddons
|
||||
FILENAME_VAR OutputFile)
|
||||
|
||||
compare_files(GENERATED ${OutputFile}
|
||||
ORIGINALS ${origfiles})
|
||||
file(REMOVE ${OutputFile})
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(with_public_and_private_dependencies VERSION 5.43)
|
||||
|
||||
include(../test-and-comparison-helpers.cmake)
|
||||
|
||||
include(ECMGeneratePkgConfigFile)
|
||||
include(ECMSetupVersion)
|
||||
|
||||
ecm_setup_version(PROJECT VARIABLE_PREFIX KCOREADDONS
|
||||
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kcoreaddons_version.h"
|
||||
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CoreAddonsConfigVersion.cmake"
|
||||
SOVERSION 5)
|
||||
|
||||
set(origfiles "${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/KF5CoreAddons4.pc")
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../../../tests/ECMGeneratePkgConfigFile/metainfo_without_description.yaml
|
||||
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/metainfo_without_description.yaml ${CMAKE_CURRENT_SOURCE_DIR}/metainfo.yaml)
|
||||
|
||||
ecm_generate_pkgconfig_file(BASE_NAME KF5CoreAddons4
|
||||
DEPS Public1 PRIVATE Private1 Private2 PUBLIC Public2
|
||||
INCLUDE_INSTALL_DIR /usr/KCoreAddons
|
||||
FILENAME_VAR OutputFile)
|
||||
|
||||
compare_files(GENERATED ${OutputFile}
|
||||
ORIGINALS ${origfiles})
|
||||
file(REMOVE ${OutputFile})
|
||||
file(REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/metainfo.yaml)
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Language: pt\n"
|
||||
"X-Qt-Contexts: true\n"
|
||||
|
||||
#: main.cpp:12
|
||||
msgctxt "testcontext|"
|
||||
msgid "test string"
|
||||
msgstr "pt text"
|
||||
|
||||
#: main.cpp:13
|
||||
#, qt-format
|
||||
#| msgid "test plural"
|
||||
msgctxt "testcontext|"
|
||||
msgid "test plural %n"
|
||||
msgid_plural "test plural %n"
|
||||
msgstr[0] "pt singular form %n"
|
||||
msgstr[1] "pt plural form %n"
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Language: pt_BR\n"
|
||||
"X-Qt-Contexts: true\n"
|
||||
|
||||
#: main.cpp:12
|
||||
msgctxt "testcontext|"
|
||||
msgid "test string"
|
||||
msgstr "pt_BR text"
|
||||
|
||||
#: main.cpp:13
|
||||
#, qt-format
|
||||
#| msgid "test plural"
|
||||
msgctxt "testcontext|"
|
||||
msgid "test plural %n"
|
||||
msgid_plural "test plural %n"
|
||||
msgstr[0] "pt_BR singular form %n"
|
||||
msgstr[1] "pt_BR plural form %n"
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
set(ECM_KDE_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../kde-modules)
|
||||
set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../modules)
|
||||
set(CMAKE_MODULE_PATH "${ECM_KDE_MODULE_DIR}")
|
||||
|
||||
set(CMAKE_CROSSCOMPILING ON)
|
||||
include(KDEPackageAppTemplates)
|
||||
|
||||
message(STATUS "Test: generate compressed template")
|
||||
kde_package_app_templates(TEMPLATES "qml-plasmoid" INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# we need something to install, otherwise make install will fail.
|
||||
install(FILES someFile DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# this will be run by CTest
|
||||
configure_file(check.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/check.cmake" @ONLY)
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
set(CMAKE_MODULE_PATH "@MODULES_DIR@/../kde-modules")
|
||||
set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
|
||||
set(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@")
|
||||
|
||||
|
||||
###########################################################
|
||||
|
||||
macro(check_not_exists file)
|
||||
message(STATUS "Checking for ${file}")
|
||||
if (EXISTS ${file})
|
||||
message(FATAL_ERROR "File \"${file}\" does exist")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
message(STATUS "Test: the packaged template has not been generated")
|
||||
check_not_exists(${CMAKE_CURRENT_BINARY_DIR}/qml-plasmoid.tar.bz2 )
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
set(ECM_KDE_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../kde-modules)
|
||||
set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../modules)
|
||||
set(CMAKE_MODULE_PATH "${ECM_KDE_MODULE_DIR}")
|
||||
|
||||
set(CMAKE_CROSSCOMPILING ON)
|
||||
include(KDEPackageAppTemplates)
|
||||
|
||||
message(STATUS "Test: generate compressed template")
|
||||
kde_package_app_templates(TEMPLATES "qml-plasmoid" INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# this will be run by CTest
|
||||
configure_file(check.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/check.cmake" @ONLY)
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
set(CMAKE_MODULE_PATH "@MODULES_DIR@/../kde-modules")
|
||||
set(CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@")
|
||||
set(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@")
|
||||
|
||||
|
||||
###########################################################
|
||||
|
||||
macro(check_exists file)
|
||||
message(STATUS "Checking for ${file}")
|
||||
if (NOT EXISTS ${file})
|
||||
message(FATAL_ERROR "File \"${file}\" does not exist")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
message(STATUS "Test: the packaged template has been generated")
|
||||
check_exists(${CMAKE_CURRENT_BINARY_DIR}/qml-plasmoid.tar.bz2 )
|
||||
|
||||
message(STATUS "Extracting the packaged template")
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/qml-plasmoid)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar "xvfj" ${CMAKE_CURRENT_BINARY_DIR}/qml-plasmoid.tar.bz2
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/qml-plasmoid
|
||||
RESULT_VARIABLE result
|
||||
ERROR_VARIABLE error
|
||||
)
|
||||
|
||||
if(NOT result EQUAL 0)
|
||||
message(FATAL_ERROR "Error extracting the template: ${error}")
|
||||
endif()
|
||||
|
||||
message(STATUS "Test: the packaged template has been correctly extracted")
|
||||
check_exists(${CMAKE_CURRENT_BINARY_DIR}/qml-plasmoid/qml-plasmoid.png )
|
||||
check_exists(${CMAKE_CURRENT_BINARY_DIR}/qml-plasmoid/qml-plasmoid.kdevtemplate )
|
||||
check_exists(${CMAKE_CURRENT_BINARY_DIR}/qml-plasmoid/package/metadata.desktop )
|
||||
|
||||
message(STATUS "Cleaning up generated files")
|
||||
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/qml-plasmoid.tar.bz2 )
|
||||
file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/qml-plasmoid )
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(plasma-%{APPNAMELC})
|
||||
|
||||
find_package(ECM 1.4.0 REQUIRED NO_MODULE)
|
||||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
||||
|
||||
find_package(KF5Plasma REQUIRED)
|
||||
|
||||
plasma_install_package(package org.kde.%{APPNAMELC})
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#! /usr/bin/env bash
|
||||
$XGETTEXT `find . -name \*.qml` -o $podir/plasma_applet_%{APPNAMELC}.pot
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Plasma Applet Template
|
||||
----------------------
|
||||
|
||||
-- Build instructions --
|
||||
|
||||
cd /where/your/applet/is/generated
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=MYPREFIX ..
|
||||
make
|
||||
make install
|
||||
|
||||
(MYPREFIX is where you install your Plasma setup, replace it accordingly)
|
||||
|
||||
Restart plasma to load the applet
|
||||
(in a terminal type:
|
||||
kquitapp plasmashell
|
||||
and then
|
||||
plasmashell)
|
||||
|
||||
or view it with
|
||||
plasmoidviewer -a YourAppletName
|
||||
|
||||
-- Tutorials and resources --
|
||||
The explanation of the template
|
||||
http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/GettingStarted
|
||||
|
||||
Plasma techbase pages
|
||||
http://techbase.kde.org/Projects/Plasma
|
||||
|
||||
Plasma QML API explained
|
||||
http://techbase.kde.org/Development/Tutorials/Plasma/QML/API
|
||||
BIN
Binary file not shown.
+28
@@ -0,0 +1,28 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}> *
|
||||
* *
|
||||
* Distributed under the OSI-approved BSD License (the "License");
|
||||
* see accompanying file COPYING-CMAKE-SCRIPTS for details.
|
||||
*
|
||||
* This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the License for more information.
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import org.kde.kirigami 2.20 as Kirigami
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
Plasmoid.fullRepresentation: ColumnLayout {
|
||||
anchors.fill: parent
|
||||
Kirigami.Icon {
|
||||
source: "kde"
|
||||
}
|
||||
PlasmaComponents.Label {
|
||||
text: "This is Plasma!"
|
||||
}
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
[Desktop Entry]
|
||||
Name=%{APPNAME}
|
||||
Name[ca]=%{APPNAME}
|
||||
Name[ca@valencia]=%{APPNAME}
|
||||
Name[da]=%{APPNAME}
|
||||
Name[en_GB]=%{APPNAME}
|
||||
Name[es]=%{APPNAME}
|
||||
Name[fi]=%{APPNAME}
|
||||
Name[gl]=%{APPNAME}
|
||||
Name[it]=%{APPNAME}
|
||||
Name[nb]=%{APPNAME}
|
||||
Name[nl]=%{APPNAME}
|
||||
Name[nn]=%{APPNAME}
|
||||
Name[pl]=%{APPNAME}
|
||||
Name[pt]=%{APPNAME}
|
||||
Name[pt_BR]=%{APPNAME}
|
||||
Name[sl]=%{APPNAME}
|
||||
Name[sr]=%{APPNAME}
|
||||
Name[sr@ijekavian]=%{APPNAME}
|
||||
Name[sr@ijekavianlatin]=%{APPNAME}
|
||||
Name[sr@latin]=%{APPNAME}
|
||||
Name[sv]=%{APPNAME}
|
||||
Name[uk]=%{APPNAME}
|
||||
Name[x-test]=xx%{APPNAME}xx
|
||||
Comment=what your app does in a few words
|
||||
Comment[ca]=Què fa aquesta aplicació en poques paraules
|
||||
Comment[ca@valencia]=Què fa esta aplicació en poques paraules
|
||||
Comment[da]=nogle få ord om hvad din app gør
|
||||
Comment[en_GB]=what your app does in a few words
|
||||
Comment[es]=lo que hace su aplicación, en pocas palabras
|
||||
Comment[fi]=ohjelmasi toiminta muutamalla sanalla
|
||||
Comment[gl]=o que fai o seu programa en poucas palabras
|
||||
Comment[it]=Cosa fa la tua applicazione in poche parole
|
||||
Comment[nb]=hva programmet gjør, med noen få ord
|
||||
Comment[nl]=wat uw app doet in een paar woorden
|
||||
Comment[pl]=w kilku słowach opis co robi twój program
|
||||
Comment[pt]=o que faz a sua aplicação, em poucas palavras
|
||||
Comment[pt_BR]=breve descrição do que o seu aplicativo faz
|
||||
Comment[sl]=kaj vaš program dela, v nekaj besedah
|
||||
Comment[sr]=Укратко о томе шта ваш програм ради
|
||||
Comment[sr@ijekavian]=Укратко о томе шта ваш програм ради
|
||||
Comment[sr@ijekavianlatin]=Ukratko o tome šta vaš program radi
|
||||
Comment[sr@latin]=Ukratko o tome šta vaš program radi
|
||||
Comment[sv]=vad programmet gör med några få ord
|
||||
Comment[uk]=призначення вашої програми у декількох словах
|
||||
Comment[x-test]=xxwhat your app does in a few wordsxx
|
||||
|
||||
Icon=applications-system
|
||||
Type=Service
|
||||
ServiceTypes=Plasma/Applet
|
||||
|
||||
X-KDE-PluginInfo-Author=%{AUTHOR}
|
||||
X-KDE-PluginInfo-Email=%{EMAIL}
|
||||
X-KDE-PluginInfo-Name=%{APPNAMELC}
|
||||
X-KDE-PluginInfo-Version=1.0
|
||||
X-KDE-PluginInfo-Website=https://plasma.kde.org/
|
||||
X-KDE-PluginInfo-Category=Utilities
|
||||
X-KDE-PluginInfo-License=GPL
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|
||||
X-KDE-PluginInfo-Name=org.kde.%{APPNAMELC}
|
||||
|
||||
X-Plasma-API=declarativeappletscript
|
||||
X-Plasma-MainScript=ui/main.qml
|
||||
X-Plasma-Requires-FileDialog=Unused
|
||||
X-Plasma-Requires-LaunchApp=Unused
|
||||
X-Plasma-DefaultSize=200,300
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
# KDE Config File
|
||||
[General]
|
||||
Name=Plasma QML Applet
|
||||
Name[bs]=Plasma QML Applet
|
||||
Name[ca]=Miniaplicació en QML pel Plasma
|
||||
Name[ca@valencia]=Miniaplicació en QML pel Plasma
|
||||
Name[cs]=Aplet QML Plasma
|
||||
Name[da]=Plasma QML-applet
|
||||
Name[de]=Plasma-QML-Miniprogramm
|
||||
Name[el]=Μικροεφαρμογή Plasma QML
|
||||
Name[en_GB]=Plasma QML Applet
|
||||
Name[es]=Miniaplicación QML para Plasma
|
||||
Name[et]=Plasma QML aplett
|
||||
Name[fi]=Plasma QML-sovelma
|
||||
Name[fr]=Composant graphique QML pour Plasma
|
||||
Name[gl]=Applet QML para Plasma
|
||||
Name[hu]=Plasma QML kisalkalmazás
|
||||
Name[it]=Applet di Plasma in QML
|
||||
Name[kk]=Plasma QML апплеті
|
||||
Name[ko]=Plasma QML 애플릿
|
||||
Name[nb]=Plasma QML-miniprogram
|
||||
Name[nl]=Plasma QML-applet
|
||||
Name[pl]=Aplet plazmy QML Applet
|
||||
Name[pt]='Applet' do Plasma em QML
|
||||
Name[pt_BR]=Miniaplicativo Plasma em QML
|
||||
Name[ru]=Аплет Plasma QML
|
||||
Name[sk]=Plasma QML Applet
|
||||
Name[sl]=Aplet QML za Plasmo
|
||||
Name[sr]=Плазма КуМЛ аплет
|
||||
Name[sr@ijekavian]=Плазма КуМЛ аплет
|
||||
Name[sr@ijekavianlatin]=Plasma QML aplet
|
||||
Name[sr@latin]=Plasma QML aplet
|
||||
Name[sv]=Plasma QML-miniprogram
|
||||
Name[tr]=Plasma QML Programcığı
|
||||
Name[uk]=Аплет Плазми мовою QML
|
||||
Name[x-test]=xxPlasma QML Appletxx
|
||||
Name[zh_CN]=Plasma QML 小程序
|
||||
Name[zh_TW]=Plasma QML 小程式
|
||||
Comment=Plasma QML Applet Template: a plasma applet template displaying a svg picture and a text.
|
||||
Comment[bs]=Predložak za QML aplete. Predložak za plasma aplete koji prikazuju SVG sliku i tekst.
|
||||
Comment[ca]=Plantilla de miniaplicació pel Plasma: una plantilla de miniaplicació del plasma que mostra una icona i un text.
|
||||
Comment[ca@valencia]=Plantilla de miniaplicació pel Plasma: una plantilla de miniaplicació del plasma que mostra una icona i un text.
|
||||
Comment[da]=Skabelon til Plasma QML-applet. En skabelon til en Plasma-applet, som viser et SVG-billede og en tekst.
|
||||
Comment[de]=Vorlage für Plasma-QML-Miniprogramm. Eine Vorlage für ein Plasma-Miniprogramm, das ein SVG-Symbol und einen Text anzeigt
|
||||
Comment[el]=Πρότυπο μικροεφαρμογής Plasma QML: ένα πρότυπο μικροεφαρμογής plasma που εμφανίζει μια εικόνα svg και ένα κείμενο.
|
||||
Comment[en_GB]=Plasma QML Applet Template: a plasma applet template displaying a svg picture and a text.
|
||||
Comment[es]=Plantilla de miniaplicación QML para Plasma: una plantilla de miniaplicación para Plasma que muestra una imagen SVG y un texto.
|
||||
Comment[et]=Plasma QML apleti mall. Plasma apleti mall, näitab SVG-pilti ja teksti
|
||||
Comment[fi]=Plasman QML-sovelmamalli: Plasma-sovelmamalli, joka näyttää kuvakkeen ja tekstiä.
|
||||
Comment[fr]=Modèle de composant graphique QML pour Plasma. Un modèle de composant graphique pour Plasma affichant une image « svg » et un texte.
|
||||
Comment[gl]=Modelo de applet para Plasma: un modelo de applet para Plasma que mostra unha imaxe SVG e un texto.
|
||||
Comment[hu]=Plasma QML kisalkalmazás sablon: egy Plasma kisalkalmazás sablon, amely megjelenít egy SVG képet és egy szöveget.
|
||||
Comment[it]=Modello di applet Plasma in QML. Un modello di programmino Plasma che visualizza un'immagine SVG e del testo
|
||||
Comment[kk]=Plasma QML апплет үлгісі. SVG-суреті мен мәтінді көрсететін Plasma апплет үлгісі.
|
||||
Comment[ko]=Plasma QML 애플릿 템플릿. SVG 그림과 텍스트를 표시하는 Plasma 애플릿 템플릿
|
||||
Comment[nb]=Plasma mal for QML miniprogram: en mal for et Plasma-element som viser et svg-bilde og en tekst.
|
||||
Comment[nl]=Sjabloon voor Plasma-QML-applet: Een sjabloon voor een plasma-applet dat een svg-afbeelding en een tekst toont
|
||||
Comment[pl]=Szablon apletu Plazmy QML: szablon apletu plazmy wyświetlający zdjęcie svg i tekst.
|
||||
Comment[pt]=Modelo de 'Applet' do Plasma. Um modelo de 'applet' do Plasma que mostra uma imagem SVG e algum texto.
|
||||
Comment[pt_BR]=Modelo de miniaplicativo Plasma em QML: Um modelo de miniaplicativo Plasma que mostra uma imagem SVG e texto.
|
||||
Comment[ru]=Пример виджета Plasma на QML. Шаблон виджета Plasma, показывающий изображение SVG и текст.
|
||||
Comment[sk]=Šablóna appletu Plasma QML: šablóna plasma appletu zobrazujúca svg obrázok a text.
|
||||
Comment[sl]=Predloga apleta Plasma, ki prikazuje sliko svg in besedilo.
|
||||
Comment[sr]=Шаблон за плазма КуМЛ аплет који даје СВГ слику и текст
|
||||
Comment[sr@ijekavian]=Шаблон за плазма КуМЛ аплет који даје СВГ слику и текст
|
||||
Comment[sr@ijekavianlatin]=Šablon za plasma QML aplet koji daje SVG sliku i tekst
|
||||
Comment[sr@latin]=Šablon za plasma QML aplet koji daje SVG sliku i tekst
|
||||
Comment[sv]=Mall för Plasma QML-miniprogram. En mall för ett Plasma-miniprogram som visar en SVG-bild och en text.
|
||||
Comment[tr]=Plasma QML Programcığı Şablonu: Bir metin ve svg resmi gösteren plasma programcığı şablonu
|
||||
Comment[uk]=Шаблон аплету Плазми. Шаблон аплету Плазми, який показу зображення SVG і текст.
|
||||
Comment[x-test]=xxPlasma QML Applet Template: a plasma applet template displaying a svg picture and a text.xx
|
||||
Comment[zh_TW]=Plasma QML 小程式樣本:用於顯示 svg 圖片與文字的 plasma 小程式樣本
|
||||
Category=KDE/Plasmoid
|
||||
Icon=qml-plasmoid.png
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
@@ -0,0 +1,25 @@
|
||||
// SPDX-FileCopyrightText: 2025 Volker Krause <vkrause@kde.org>
|
||||
// SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
ext {
|
||||
ecmVersionName = "@PROJECT_VERSION@"
|
||||
// version code needs to be strictly increasing and properly ordered for multiple APKs with different architectures
|
||||
// we ensure the former by tying this to time and the latter by using CI_PIPELINE_CREATED_AT for builds
|
||||
// in Gitlab pipelines.
|
||||
//
|
||||
// We have the following constraints to satisfy
|
||||
// - Google Play requires different version codes for different architecture APKs
|
||||
// - F-Droid requires ARM32 does not have a higher version code than ARM64
|
||||
// - Google Play require ARM64 to have a higher version code as ARM32
|
||||
ecmVersionCode = (int)(new Date().getTime()/1000)
|
||||
if (System.getenv('CI_PIPELINE_CREATED_AT')) {
|
||||
ecmVersionCode = (int)(Date.from(Instant.parse(System.getenv('CI_PIPELINE_CREATED_AT'))).getTime()/1000)
|
||||
if (System.getenv('KDECI_CRAFT_PLATFORM')) {
|
||||
if (System.getenv('KDECI_CRAFT_PLATFORM').contains('x86_64')) {
|
||||
ecmVersionCode = ecmVersionCode + 1
|
||||
} else if (System.getenv('KDECI_CRAFT_PLATFORM').contains('arm64')) {
|
||||
ecmVersionCode = ecmVersionCode + 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,6 @@
|
||||
version = 1
|
||||
|
||||
[[annotations]]
|
||||
path = "autotests/data/corpus/*"
|
||||
SPDX-FileCopyrightText = "2025 Azhar Momin <azhar.momin@kdemail.net>"
|
||||
SPDX-License-Identifier = "CC0-1.0"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user