diff --git a/.backportrc.json b/.backportrc.json index 1c5d20bad8..1a9f634db4 100644 --- a/.backportrc.json +++ b/.backportrc.json @@ -2,7 +2,7 @@ "repoOwner": "terrapkg", "repoName": "packages", "resetAuthor": true, - "targetBranchChoices": ["el10", "f40", "f41", "f42", "frawhide"], + "targetBranchChoices": ["el10", "f41", "f42", "f43", "frawhide"], "branchLabelMapping": { "^sync-(.+)$": "$1" } diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index ace04bd797..4e3fab3f60 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -1,6 +1,8 @@ # for each folder in anda/ # generate a new workflow for each folder in anda/ name: Automatically build packages +permissions: + contents: read on: push: paths: @@ -18,7 +20,7 @@ on: jobs: manifest: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04-arm outputs: build_matrix: ${{ steps.generate_build_matrix.outputs.build_matrix }} container: @@ -36,77 +38,8 @@ jobs: run: anda ci >> $GITHUB_OUTPUT build: needs: manifest - strategy: - matrix: - pkg: ${{ fromJson(needs.manifest.outputs.build_matrix) }} - version: ["rawhide"] - fail-fast: false - runs-on: ${{ (matrix.pkg.arch == 'aarch64' && matrix.pkg.labels['large']) && 'arm64-lg' || matrix.pkg.arch == 'aarch64' && 'ubuntu-22.04-arm' || matrix.pkg.labels['large'] && 'x86-64-lg' || 'ubuntu-22.04' }} - container: - image: ghcr.io/terrapkg/builder:f${{ matrix.version }} - options: --cap-add=SYS_ADMIN --privileged - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up git repository - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - - name: CI Setup Script - if: ${{ matrix.pkg.labels.mock != '1' }} - run: | - dir=$(dirname ${{ matrix.pkg.pkg }}) - if [ -f $dir/ci_setup.rhai ]; then - anda run $dir/ci_setup.rhai --labels script_path=$dir/ci_setup.rhai - fi - - - name: Install Build Dependencies - if: ${{ matrix.pkg.labels.mock != '1' }} - run: | - dir=$(dirname ${{ matrix.pkg.pkg }}) - dnf5 builddep -y ${dir}/*.spec - - - name: Build with Andaman - run: anda build ${{ matrix.pkg.pkg }} -D "vendor Terra" -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} ${{ !matrix.pkg.labels.mock == '1' && '-rrpmbuild' || '' }} - - - name: Generating artifact name - id: art - run: | - NAME=${{ matrix.pkg.pkg }}-${{ matrix.pkg.arch }}-${{ matrix.version }} - x=${NAME//\//@} - echo "name=$x" >> $GITHUB_OUTPUT - - - uses: actions/upload-artifact@v4 - with: - name: ${{ steps.art.outputs.name }} - compression-level: 0 # The RPMs are already compressed :p - path: | - anda-build/rpm/rpms/* - anda-build/rpm/srpm/* - - - name: Upload packages to subatomic - if: github.event_name == 'push' - run: | - subrepo="${{ matrix.pkg.labels.subrepo }}" - subatomic-cli upload --prune \ - --server https://subatomic.fyralabs.com \ - --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}${{ matrix.pkg.labels['subrepo'] && '-$subrepo' || '' }} anda-build/rpm/rpms/* - - - name: Upload source packages to subatomic - if: github.event_name == 'push' - run: | - subrepo="${{ matrix.pkg.labels.subrepo }}" - subatomic-cli upload --prune \ - --server https://subatomic.fyralabs.com \ - --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}${{ matrix.pkg.labels['subrepo'] && '-$subrepo' || '' }}-source anda-build/rpm/srpm/* - - - name: Notify Madoguchi (Success) - if: success() && github.event_name == 'push' - run: ./.github/workflows/mg.sh true ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA - - name: Notify Madoguchi (Failure) - if: ( cancelled() || failure() ) && github.event_name == 'push' - run: ./.github/workflows/mg.sh false ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA + uses: ./.github/workflows/json-build.yml + secrets: inherit + with: + packages: ${{ needs.manifest.outputs.build_matrix }} + publish: ${{ github.event_name == 'push' }} diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index 30b6c2e863..f5e0bcfeb5 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -1,5 +1,6 @@ name: Bootstrap Andaman and Subatomic - +permissions: + contents: read on: workflow_dispatch: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7d8064118c..7e0ff6ed58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,6 @@ name: Manual Builds +permissions: + contents: read on: workflow_dispatch: inputs: @@ -10,92 +12,53 @@ on: required: false default: "" architecture: - description: "Architecture" + description: "Architectures" required: false - default: all + default: "" type: string -jobs: - parse: - outputs: - pkgs: ${{ steps.parsing.outputs.pkgs }} - builder: ${{ inputs.custom_builder }} - arch: ${{ steps.parsing.outputs.arch }} - runs-on: ubuntu-22.04 - steps: - - name: Parse Input - id: parsing - run: | - echo "${{ inputs.packages }}" | sed 's/ /\n/g' | sed 's/$/\//g' | jq -R . | jq -s . | jq -c . | sed 's/^/pkgs=/' >> $GITHUB_OUTPUT - echo "builder=${{ inputs.custom_builder }}" >> $GITHUB_OUTPUT - arch="${{ inputs.architecture }}" - # Convert to json array using jq - # if arch is not all, convert to array - if [ "$arch" != "all" ]; then - # jq, array with single element as string - arch=$(echo $arch | sed 's/,/\n/g') - echo "arch=$(echo $arch | jq -Rs 'split("\n")' | jq 'map(select(length > 0))' | jq -c .)" >> $GITHUB_OUTPUT - else - echo "arch=$(echo '["aarch64", "x86_64"]' | jq -c .)" >> $GITHUB_OUTPUT - fi +run-name: ${{ inputs.packages }} - build: - needs: parse - strategy: - matrix: - pkg: ${{ fromJson(needs.parse.outputs.pkgs) }} - version: ["rawhide"] - arch: ${{ fromJson(needs.parse.outputs.arch) }} - fail-fast: false - runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-22.04-arm' || needs.parse.outputs.builder && needs.parse.outputs.builder || 'ubuntu-22.04' }} +jobs: + manifest: + outputs: + build_matrix: ${{ steps.parsing.outputs.build_matrix }} + runs-on: ubuntu-24.04-arm container: - image: ghcr.io/terrapkg/builder:f${{ matrix.version }} + image: ghcr.io/terrapkg/builder:frawhide options: --cap-add=SYS_ADMIN --privileged steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Set up git repository - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - - name: Build with Andaman - run: anda build -D "vendor Terra" -c terra-${{ matrix.version }}-${{ matrix.arch }} anda/${{ matrix.pkg }}pkg - - - name: Generating artifact name - id: art + - name: Setup Git run: | - NAME=${{ matrix.pkg }}-${{ matrix.arch }}-${{ matrix.version }} - x=${NAME//\//@} - echo "name=$x" >> $GITHUB_OUTPUT - echo "labels=$(anda run andax/get_proj_label.rhai -l project=anda/${{ matrix.pkg }}anda.hcl)" >> $GITHUB_OUTPUT - - - uses: actions/upload-artifact@v4 - with: - name: ${{ steps.art.outputs.name }} - compression-level: 0 # The RPMs are already compressed :p - path: | - anda-build/rpm/rpms/* - anda-build/rpm/srpm/* - - - name: Upload packages to subatomic + git config --global --add safe.directory "$GITHUB_WORKSPACE" + git config user.name "Raboneko" + git config user.email "raboneko@fyralabs.com" + - name: Parse Input + id: parsing run: | - subatomic-cli upload --prune \ - --server https://subatomic.fyralabs.com \ - --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}${{ fromJson(steps.art.outputs.labels)['extra'] && '-extras' }} anda-build/rpm/rpms/* + for pkg in ${{ inputs.packages }}; do + touch anda/$pkg/.build + done + git add --all + git commit -a -m "tmp" + b=$(anda ci | sed -E 's@^build_matrix=@@') + if [ "${{ inputs.architecture }}" != "" ]; then + # e.g.: [ unique_by(.pkg)[] | (.arch="x86_64", .arch="aarch64") ] + filter=`echo -n "${{ inputs.architecture }}" | tr '[:space:]' '\n' | sed -E '/^$/d; s@^.+$@.arch="\0"@' | tr '\n' ', '` + b=`echo $b | jq -c '[unique_by(.pkg)[] | ('"$filter"')]'` + elif [ "${{ inputs.custom_builder }}" != "" ]; then + b=`echo $b | jq -c 'unique_by(.pkg)'` + fi + echo "build_matrix=$b" >> $GITHUB_OUTPUT - - name: Upload source packages to subatomic - run: | - subatomic-cli upload --prune \ - --server https://subatomic.fyralabs.com \ - --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}${{ fromJson(steps.art.outputs.labels)['extra'] && '-extras' }}-source anda-build/rpm/srpm/* - - - name: Notify Madoguchi (Success) - if: success() - run: ./.github/workflows/mg.sh true ${{matrix.pkg}} ${{matrix.version}} ${{matrix.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA - - name: Notify Madoguchi (Failure) - if: cancelled() || failure() - run: ./.github/workflows/mg.sh false ${{matrix.pkg}} ${{matrix.version}} ${{matrix.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA + build: + needs: manifest + uses: ./.github/workflows/json-build.yml + secrets: inherit + with: + packages: ${{ needs.manifest.outputs.build_matrix }} + custom_builder: ${{ inputs.custom_builder }} diff --git a/.github/workflows/json-build.yml b/.github/workflows/json-build.yml index 7857cffb9b..536d2d5d54 100644 --- a/.github/workflows/json-build.yml +++ b/.github/workflows/json-build.yml @@ -1,10 +1,34 @@ name: JSON Build +permissions: + contents: read on: + workflow_call: + inputs: + packages: + description: "Packages to Build" + required: true + type: string + publish: + description: "Whether the package should be published" + required: false + type: boolean + default: true + custom_builder: + description: "Custom Builder" + required: false + type: string + default: "" workflow_dispatch: inputs: packages: description: "Packages to Build" required: true + type: string + publish: + description: "Whether the package should be published" + required: false + type: boolean + default: true jobs: build: @@ -13,7 +37,7 @@ jobs: pkg: ${{ fromJson(inputs.packages) }} version: ["rawhide"] fail-fast: false - runs-on: ${{ (matrix.pkg.arch == 'aarch64' && matrix.pkg.labels['large']) && 'arm64-lg' || matrix.pkg.arch == 'aarch64' && 'ubuntu-22.04-arm' || matrix.pkg.labels['large'] && 'x86-64-lg' || 'ubuntu-22.04' }} + runs-on: ${{ inputs.custom_builder && inputs.custom_builder || (matrix.pkg.arch == 'aarch64' && matrix.pkg.labels['large']) && 'arm64-lg' || matrix.pkg.arch == 'aarch64' && 'ubuntu-22.04-arm' || matrix.pkg.labels['large'] && format('cirun-x86-64-lg--{0}', github.run_id) || 'ubuntu-22.04' }} container: image: ghcr.io/terrapkg/builder:f${{ matrix.version }} options: --cap-add=SYS_ADMIN --privileged @@ -35,13 +59,13 @@ jobs: fi - name: Install Build Dependencies - if: ${{ !contains(matrix.pkg.labels, 'mock') }} + if: ${{ matrix.pkg.labels.mock != '1' }} run: | dir=$(dirname ${{ matrix.pkg.pkg }}) dnf5 builddep -y ${dir}/*.spec - name: Build with Andaman - run: anda build -D "vendor Terra" ${{ matrix.pkg.pkg }} -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} ${{ contains(matrix.pkg.labels, 'mock') && '' || '-rrpmbuild' }} + run: anda build -D "vendor Terra" ${{ matrix.pkg.pkg }} -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} ${{ !matrix.pkg.labels.mock == '1' && '-rrpmbuild' || '' }} - name: Generating artifact name id: art @@ -59,6 +83,7 @@ jobs: anda-build/rpm/srpm/* - name: Upload packages to subatomic + if: inputs.publish run: | subrepo="${{ matrix.pkg.labels.subrepo }}" subatomic-cli upload --prune \ @@ -67,6 +92,7 @@ jobs: terra${{ matrix.version }}${{ matrix.pkg.labels['subrepo'] && '-$subrepo' || '' }} anda-build/rpm/rpms/* - name: Upload source packages to subatomic + if: inputs.publish && matrix.pkg.labels['no_upload_srpms'] != '1' run: | subrepo="${{ matrix.pkg.labels.subrepo }}" subatomic-cli upload --prune \ @@ -75,8 +101,8 @@ jobs: terra${{ matrix.version }}${{ matrix.pkg.labels['subrepo'] && '-$subrepo' || '' }}-source anda-build/rpm/srpm/* - name: Notify Madoguchi (Success) - if: success() - run: ./.github/workflows/mg.sh true ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA + if: inputs.publish && success() + run: ./.github/workflows/mg.sh true "${{matrix.pkg.pkg}}" "${{matrix.version}}" "${{matrix.pkg.arch}}" "${{github.run_id}}" "${{secrets.MADOGUCHI_JWT}}" "$GITHUB_SHA" - name: Notify Madoguchi (Failure) - if: cancelled() || failure() - run: ./.github/workflows/mg.sh false ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA + if: inputs.publish && (cancelled() || failure()) + run: ./.github/workflows/mg.sh false "${{matrix.pkg.pkg}}" "${{matrix.version}}" "${{matrix.pkg.arch}}" "${{github.run_id}}" "${{secrets.MADOGUCHI_JWT}}" "$GITHUB_SHA" diff --git a/.github/workflows/mg.sh b/.github/workflows/mg.sh index 64402b1718..1195f8d31c 100755 --- a/.github/workflows/mg.sh +++ b/.github/workflows/mg.sh @@ -7,14 +7,14 @@ export p="{\"id\":\"$5\",\"ver\":\"%v\",\"rel\":\"%r\",\"arch\":\"$4\",\"dirs\": if [[ $1 == false ]]; then d=${p/\%v/?} d=${d/\%r/?} - curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci/terra$3/builds/f -X PUT -H "Content-Type: application/json" -d $d --fail-with-body + curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci5/terra$3/builds/f -X PUT -H "Content-Type: application/json" -d "$d" --fail-with-body exit 0 fi for f in anda-build/rpm/rpms/*; do - n=$(lesspipe.sh $f | grep -E "Name\s*: " | sed "s@Name\s*: @@") - v=$(lesspipe.sh $f | grep -E "Version\s*: " | sed "s@Version\s*: @@") - r=$(lesspipe.sh $f | grep -E "Release\s*: " | sed "s@Release\s*: @@") + n=$(lesspipe.sh $f | grep -E "Name\s*: " | sed "s@Name\s*: @@" | head -n1) + v=$(lesspipe.sh $f | grep -E "Version\s*: " | sed "s@Version\s*: @@" | head -n1) + r=$(lesspipe.sh $f | grep -E "Release\s*: " | sed "s@Release\s*: @@" | head -n1) d=${p/\%v/$v} d=${d/\%r/$r} curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci5/terra$3/builds/$n -X PUT -H "Content-Type: application/json" -d $d --fail-with-body diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index fdd4824ec0..f061efc1d3 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -1,5 +1,7 @@ name: Automatic backport/sync action - +permissions: + contents: write + pull-requests: write on: pull_request_target: types: ["labeled", "closed"] diff --git a/.github/workflows/update-branch.yml b/.github/workflows/update-branch.yml index 8f082e659e..2a43172b4e 100644 --- a/.github/workflows/update-branch.yml +++ b/.github/workflows/update-branch.yml @@ -1,4 +1,6 @@ name: Update per branch +permissions: + contents: write on: schedule: - cron: "*/30 * * * *" @@ -6,14 +8,14 @@ on: jobs: autoupdate: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04-arm strategy: matrix: branch: - frawhide - - f40 - f41 - f42 + - f43 - el10 container: image: ghcr.io/terrapkg/builder:frawhide diff --git a/.github/workflows/update-comps.yml b/.github/workflows/update-comps.yml index 40f5627232..3c026bb3b8 100644 --- a/.github/workflows/update-comps.yml +++ b/.github/workflows/update-comps.yml @@ -1,12 +1,14 @@ name: Push comps updates +permissions: + contents: read on: push: branches: - frawhide + - f43 - f42 - f41 - - f40 - el10 paths: - comps.xml @@ -14,7 +16,7 @@ on: jobs: update-comps: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04-arm container: image: ghcr.io/terrapkg/builder:frawhide steps: diff --git a/.github/workflows/update-nightly.yml b/.github/workflows/update-nightly.yml index 091f36972b..a9d3bc9e15 100644 --- a/.github/workflows/update-nightly.yml +++ b/.github/workflows/update-nightly.yml @@ -1,4 +1,6 @@ name: Nightly Update +permissions: + contents: write on: schedule: - cron: "0 0 * * *" @@ -6,7 +8,7 @@ on: jobs: autoupdate: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04-arm container: image: ghcr.io/terrapkg/builder:frawhide options: --cap-add=SYS_ADMIN --privileged @@ -46,9 +48,9 @@ jobs: git add anda git commit -S -a -m "$msg" } - copy_over f40 || true copy_over f41 || true copy_over f42 || true + copy_over f43 || true copy_over el10 || true git push -u origin --all fi diff --git a/.github/workflows/update-weekly.yml b/.github/workflows/update-weekly.yml index 65edb49785..379a6e516e 100644 --- a/.github/workflows/update-weekly.yml +++ b/.github/workflows/update-weekly.yml @@ -1,4 +1,6 @@ name: Weekly Update +permissions: + contents: write on: schedule: - cron: "0 0 * * *" @@ -6,7 +8,7 @@ on: jobs: autoupdate: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04-arm container: image: ghcr.io/terrapkg/builder:frawhide options: --cap-add=SYS_ADMIN --privileged @@ -46,9 +48,9 @@ jobs: git add anda git commit -S -a -m "$msg" } - copy_over f40 || true copy_over f41 || true copy_over f42 || true + copy_over f43 || true copy_over el10 || true git push -u origin --all fi diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 60cdc844a5..1e9a115dba 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,4 +1,6 @@ name: Update +permissions: + contents: write on: schedule: - cron: "*/10 * * * *" @@ -6,7 +8,7 @@ on: jobs: autoupdate: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04-arm container: image: ghcr.io/terrapkg/builder:frawhide options: --cap-add=SYS_ADMIN --privileged @@ -46,9 +48,9 @@ jobs: git add anda git commit -S -a -m "$msg" } - copy_over f40 || true copy_over f41 || true copy_over f42 || true + copy_over f43 || true copy_over el10 || true git push -u origin --all fi diff --git a/.gitignore b/.gitignore index b94a9b5645..44eb52965d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ anda-build/ **/*.tar* +**/*.crate +**/*.zip diff --git a/README.md b/README.md index 2db5d61314..fc0c5d7f18 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ This monorepo contains the package manifests for all packages in Terra. ## Installation +### Fedora + ```bash sudo dnf install --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release ``` @@ -24,6 +26,24 @@ curl -fsSL https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo | pke sudo rpm-ostree install terra-release ``` +Optionally, you can install `terra-release-extra` to use the Extras repository. This also installs the Nvidia, and Mesa streams but does not enable them. + +### Enterprise Linux (EL) + +Only EL10 is supported. Not all packages available in Terra are available in Terra EL at this time. + +Terra EL requires the EPEL repos, which may be installed with: + +```bash +sudo dnf install 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-$releasever.noarch.rpm' +``` + +And Terra EL itself can be installed with: + +```bash +sudo dnf install --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terrael$releasever' terra-release +``` + ## Documentation Our documentation can be found on our [Devdocs](https://developer.fyralabs.com/terra/). diff --git a/anda/apps/anki-bin/anki-bin.spec b/anda/apps/anki-bin/anki-bin.spec index 92d8980fca..2147f0f5d0 100644 --- a/anda/apps/anki-bin/anki-bin.spec +++ b/anda/apps/anki-bin/anki-bin.spec @@ -1,9 +1,9 @@ -%global xurl https://files.pythonhosted.org/packages/32/51/cf365e03f3820f8b8adfd11717c38b3fcc167d08c0e53591dbfc702b2292/anki-25.02.5-cp39-abi3-manylinux_2_35_x86_64.whl -%global aurl https://files.pythonhosted.org/packages/c9/9d/6e27cec817c7f0f208e880f78585071eedc1bfd4294ebbae4ac5e49bf98d/anki-25.02.5-cp39-abi3-manylinux_2_35_aarch64.whl -%global qurl https://files.pythonhosted.org/packages/5e/8b/2651dcd76e3a670bc0ae95e462ad0776c3bcb9cc2b0b19eaa9cb8f92b709/aqt-25.02.5-py3-none-any.whl +%global xurl https://files.pythonhosted.org/packages/a3/86/c1c459a06466ffc3a205de9852875a922c378a7bfb9fb1310bea019dacd1/anki-25.7.5-cp39-abi3-manylinux_2_36_x86_64.whl +%global aurl https://files.pythonhosted.org/packages/29/75/81eb12d43381f5150a2fb1acc2757d25741af5bf0635f40faab61eefcb44/anki-25.7.5-cp39-abi3-manylinux_2_36_aarch64.whl +%global qurl https://files.pythonhosted.org/packages/5e/e6/4c36d3c1ed0e2a6e4bf95eb919d603078d935b5c75950c7627e79340f25a/aqt-25.7.5-py3-none-any.whl Name: anki-bin -Version: 25.02.5 +Version: 25.7.5 Release: 1%?dist Summary: Flashcard program for using space repetition learning (Installed with wheel) License: AGPL-3.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND BSD-3-Clause AND CC-BY-SA-3.0 AND CC-BY-3.0 AND Apache-2.0 AND CC-BY-2.5 diff --git a/anda/apps/anki-qt5/anki-qt5.spec b/anda/apps/anki-qt5/anki-qt5.spec index 70596ba93d..b1879201d1 100644 --- a/anda/apps/anki-qt5/anki-qt5.spec +++ b/anda/apps/anki-qt5/anki-qt5.spec @@ -1,5 +1,5 @@ Name: anki-qt5 -Version: 25.02.5 +Version: 25.07.5 Release: 1%?dist Summary: Flashcard program for using space repetition learning License: AGPL-3.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND BSD-3-Clause AND CC-BY-SA-3.0 AND CC-BY-3.0 AND Apache-2.0 AND CC-BY-2.5 diff --git a/anda/apps/anki/anki.spec b/anda/apps/anki/anki.spec index 555c42aae7..4fd052c8b4 100644 --- a/anda/apps/anki/anki.spec +++ b/anda/apps/anki/anki.spec @@ -1,5 +1,5 @@ Name: anki -Version: 25.02.5 +Version: 25.07.5 Release: 1%?dist Summary: Flashcard program for using space repetition learning License: AGPL-3.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND BSD-3-Clause AND CC-BY-SA-3.0 AND CC-BY-3.0 AND Apache-2.0 AND CC-BY-2.5 diff --git a/anda/apps/audacity-freeworld/audacity-freeworld.spec b/anda/apps/audacity-freeworld/audacity-freeworld.spec index e2e22a8c86..2fca654d4a 100644 --- a/anda/apps/audacity-freeworld/audacity-freeworld.spec +++ b/anda/apps/audacity-freeworld/audacity-freeworld.spec @@ -1,7 +1,7 @@ %global __requires_exclude ^lib-.*.so %global __provides_exclude ^lib-.*.so -%global ver Audacity-3.7.3 +%global ver Audacity-3.7.5 %global sanitized_ver %(echo %{ver} | sed 's/Audacity-//g') Name: audacity-freeworld diff --git a/anda/apps/bitwarden/cli.bin/anda.hcl b/anda/apps/bitwarden/cli.bin/anda.hcl new file mode 100644 index 0000000000..961f09175b --- /dev/null +++ b/anda/apps/bitwarden/cli.bin/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "bitwarden-cli.bin.spec" + } +} diff --git a/anda/apps/bitwarden/cli.bin/bitwarden-cli.bin.spec b/anda/apps/bitwarden/cli.bin/bitwarden-cli.bin.spec new file mode 100644 index 0000000000..3a8cdf718d --- /dev/null +++ b/anda/apps/bitwarden/cli.bin/bitwarden-cli.bin.spec @@ -0,0 +1,25 @@ +Name: bitwarden-cli.bin +Version: 2025.8.0 +Release: 1%?dist +Summary: Bitwarden command-line client +License: GPL-3.0-only +URL: https://bitwarden.com +Source0: https://github.com/bitwarden/clients/releases/download/cli-v%version/bw-oss-linux-%version.zip + +Packager: madonuko +Provides: bw +ExclusiveArch: x86_64 + +BuildRequires: unzip + +%description +%summary. + +%prep +unzip %{S:0} + +%install +install -Dpm755 bw -t %buildroot%_bindir + +%files +%_bindir/bw diff --git a/anda/apps/bitwarden/cli.bin/update.rhai b/anda/apps/bitwarden/cli.bin/update.rhai new file mode 100644 index 0000000000..9b38d863b0 --- /dev/null +++ b/anda/apps/bitwarden/cli.bin/update.rhai @@ -0,0 +1,5 @@ +let v = gh("bitwarden/clients"); +if v.starts_with("cli-v") { + v.crop(5); + rpm.version(v); +} diff --git a/anda/apps/bitwarden/cli/anda.hcl b/anda/apps/bitwarden/cli/anda.hcl new file mode 100644 index 0000000000..240de1b3ce --- /dev/null +++ b/anda/apps/bitwarden/cli/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "bitwarden-cli.spec" + } + labels { + updbranch = 1 + } +} diff --git a/anda/apps/bitwarden/cli/bitwarden-cli.spec b/anda/apps/bitwarden/cli/bitwarden-cli.spec new file mode 100644 index 0000000000..a3041e5baa --- /dev/null +++ b/anda/apps/bitwarden/cli/bitwarden-cli.spec @@ -0,0 +1,40 @@ +%define debug_package %nil +%global __strip /bin/true + +%ifarch aarch64 +%global armsuffix -arm64 +%endif + +Name: bitwarden-cli +Version: 2025.8.0 +Release: 1%?dist +Summary: Bitwarden command-line client +License: GPL-3.0-only +URL: https://bitwarden.com +Source0: https://github.com/bitwarden/clients/archive/refs/tags/cli-v%version.tar.gz + +Packager: madonuko +Provides: bw + +BuildRequires: nodejs-npm +BuildRequires: gcc-c++ gcc make + +%description +%summary. + +%prep +%autosetup -n clients-cli-v%version +npm i + +%build +pushd apps/cli +npm i +npm run dist:oss:lin%?armsuffix + +%install +install -Dm755 apps/cli/dist/oss/linux%?armsuffix/bw -t %buildroot%_bindir + +%files +%doc README.md SECURITY.md CONTRIBUTING.md +%license LICENSE.txt LICENSE_GPL.txt LICENSE_BITWARDEN.txt +%_bindir/bw diff --git a/anda/apps/bitwarden/cli/update.rhai b/anda/apps/bitwarden/cli/update.rhai new file mode 100644 index 0000000000..5ac855ef2d --- /dev/null +++ b/anda/apps/bitwarden/cli/update.rhai @@ -0,0 +1,3 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("bitwarden-cli.bin", labels.branch)); diff --git a/anda/apps/coolercontrol/coolercontrol.spec b/anda/apps/coolercontrol/coolercontrol.spec index b872e9546d..f342fc7281 100644 --- a/anda/apps/coolercontrol/coolercontrol.spec +++ b/anda/apps/coolercontrol/coolercontrol.spec @@ -8,7 +8,7 @@ for background device management, as well as a GUI to expertly customize your se %global __brp_mangle_shebangs %{nil} Name: coolercontrol -Version: 2.1.0 +Version: 2.2.2 Release: 1%?dist Summary: Cooling device control for Linux License: GPL-3.0-or-later diff --git a/anda/apps/discord-canary-openasar/discord-canary-openasar.spec b/anda/apps/discord-canary-openasar/discord-canary-openasar.spec index f93a1bd6e7..8ef8bbbc4b 100644 --- a/anda/apps/discord-canary-openasar/discord-canary-openasar.spec +++ b/anda/apps/discord-canary-openasar/discord-canary-openasar.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord-canary-openasar -Version: 0.0.685 +Version: 0.0.748 Release: 1%?dist Summary: A snappier Discord rewrite with features like further customization and theming License: MIT AND https://discord.com/terms diff --git a/anda/apps/discord-canary/discord-canary.spec b/anda/apps/discord-canary/discord-canary.spec index 750cfa4bb6..565a41fd14 100644 --- a/anda/apps/discord-canary/discord-canary.spec +++ b/anda/apps/discord-canary/discord-canary.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord-canary -Version: 0.0.685 +Version: 0.0.748 Release: 1%?dist Summary: Free Voice and Text Chat for Gamers URL: discord.com diff --git a/anda/apps/discord-openasar/discord-openasar.spec b/anda/apps/discord-openasar/discord-openasar.spec index caf8345786..3766e49b3a 100644 --- a/anda/apps/discord-openasar/discord-openasar.spec +++ b/anda/apps/discord-openasar/discord-openasar.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord-openasar -Version: 0.0.95 +Version: 0.0.107 Release: 1%?dist Summary: A snappier Discord rewrite with features like further customization and theming License: MIT AND https://discord.com/terms diff --git a/anda/apps/discord-ptb-openasar/discord-ptb-openasar.spec b/anda/apps/discord-ptb-openasar/discord-ptb-openasar.spec index ceed238582..274b6eced0 100644 --- a/anda/apps/discord-ptb-openasar/discord-ptb-openasar.spec +++ b/anda/apps/discord-ptb-openasar/discord-ptb-openasar.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord-ptb-openasar -Version: 0.0.144 +Version: 0.0.158 Release: 1%?dist Summary: A snappier Discord rewrite with features like further customization and theming License: MIT AND https://discord.com/terms diff --git a/anda/apps/discord-ptb/discord-ptb.spec b/anda/apps/discord-ptb/discord-ptb.spec index 5117bfd834..d1946abaae 100644 --- a/anda/apps/discord-ptb/discord-ptb.spec +++ b/anda/apps/discord-ptb/discord-ptb.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord-ptb -Version: 0.0.144 +Version: 0.0.158 Release: 1%?dist Summary: Free Voice and Text Chat for Gamers. URL: https://discord.com diff --git a/anda/apps/discord/discord.spec b/anda/apps/discord/discord.spec index 7af5b0510b..1224125e33 100644 --- a/anda/apps/discord/discord.spec +++ b/anda/apps/discord/discord.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord -Version: 0.0.95 +Version: 0.0.107 Release: 1%?dist Summary: Free Voice and Text Chat for Gamers URL: https://discord.com diff --git a/anda/apps/envision/envision.spec b/anda/apps/envision/envision.spec index d809c583bf..9becf7faf9 100644 --- a/anda/apps/envision/envision.spec +++ b/anda/apps/envision/envision.spec @@ -1,5 +1,5 @@ -%global commit d42de840a2d1f2bb973278c45a873db75b773e25 -%global commit_date 20250521 +%global commit 32b222cd9e2749cfdecb216189f954c719e3f66e +%global commit_date 20250820 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: envision-nightly diff --git a/anda/apps/feishin/feishin.spec b/anda/apps/feishin/feishin.spec index 18937c3507..9f7a34606b 100644 --- a/anda/apps/feishin/feishin.spec +++ b/anda/apps/feishin/feishin.spec @@ -6,14 +6,15 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: feishin -Version: 0.13.0 +Version: 0.19.0 Release: 1%?dist Summary: A modern self-hosted music player License: GPL-3.0 URL: https://github.com/jeffvli/feishin Source0: %url/archive/refs/tags/v%version.tar.gz Requires: fuse mpv -BuildRequires: nodejs20-npm jq libxcrypt-compat +Packager: madonuko +BuildRequires: jq libxcrypt-compat pnpm %description %summary. @@ -38,13 +39,9 @@ Keywords=Music;Jellyfin;Audio;Stream;Sonixd EOF %build -export PATH="$PATH:$(pwd)/bin" -mkdir bin -ln -s /usr/bin/node-20 bin/node -ln -s /usr/bin/npm-20 bin/npm -npm-20 install --legacy-peer-deps -npm-20 run postinstall -npm-20 run build +pnpm i +pnpm run postinstall +pnpm run build %ifarch x86_64 %define a linux @@ -52,11 +49,11 @@ npm-20 run build %define a arm64 %endif -npx-20 electron-builder --linux dir --%a +pnpm exec electron-builder --linux dir --%a %install mkdir -p %buildroot%_datadir/{pixmaps,applications} %buildroot%_bindir -mv release/build/*-unpacked %buildroot%_datadir/feishin +mv dist/*-unpacked %buildroot%_datadir/feishin install -Dm644 assets/icons/icon.png %buildroot%_datadir/pixmaps/feishin.png ln -s %_datadir/feishin/feishin %buildroot%_bindir/feishin install -Dm644 feishin.desktop %buildroot%_datadir/applications/ diff --git a/anda/apps/flameshot.qt5/anda.hcl b/anda/apps/flameshot.qt5/anda.hcl new file mode 100644 index 0000000000..25c3f965db --- /dev/null +++ b/anda/apps/flameshot.qt5/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "flameshot.qt5.spec" + } +} diff --git a/anda/apps/flameshot.qt5/flameshot.qt5.spec b/anda/apps/flameshot.qt5/flameshot.qt5.spec new file mode 100644 index 0000000000..55d06e2993 --- /dev/null +++ b/anda/apps/flameshot.qt5/flameshot.qt5.spec @@ -0,0 +1,110 @@ +#? https://github.com/terrapkg/packages/pull/5554 +#? https://github.com/flameshot-org/flameshot/blob/master/packaging/rpm/fedora/flameshot.spec + +%global ver 12.1.0 +%global commit 4edfb2ac1d71e7f75fcdcb850ff6bce5fb148a7b +%global shortcommit %{sub %{commit} 1 7} +%global commit_date 20250618 +%global devel_name QtColorWidgets + +Name: flameshot.qt5 +Version: %ver^%{commit_date}git.%shortcommit +Release: 3%?dist +License: GPL-3.0-or-later AND ASL-2.0 AND GPL-2.0-only AND LGPL-3.0-only AND FAL-1.3 +Summary: Powerful yet simple to use screenshot software +URL: https://flameshot.org +Source0: https://github.com/flameshot-org/flameshot/archive/%commit/flameshot-%commit.tar.gz +Packager: madonuko + +BuildRequires: cmake >= 3.13.0 +BuildRequires: gcc-c++ >= 7 +BuildRequires: fdupes +BuildRequires: libappstream-glib +BuildRequires: ninja-build +BuildRequires: desktop-file-utils + +BuildRequires: cmake(Qt5Core) >= 5.9.0 +BuildRequires: cmake(KF5GuiAddons) >= 5.89.0 +BuildRequires: cmake(Qt5DBus) >= 5.9.0 +BuildRequires: cmake(Qt5Gui) >= 5.9.0 +BuildRequires: cmake(Qt5LinguistTools) >= 5.9.0 +BuildRequires: cmake(Qt5Network) >= 5.9.0 +BuildRequires: cmake(Qt5Svg) >= 5.9.0 +BuildRequires: cmake(Qt5Widgets) >= 5.9.0 + +Requires: hicolor-icon-theme +Requires: qt5-qtbase >= 5.9.0 +Requires: qt5-qttools >= 5.9.0 +Requires: qt5-qtsvg%{?_isa} >= 5.9.0 + +%dnl Provides: flameshot = %version-%release +Conflicts: flameshot + +Recommends: xdg-desktop-portal%{?_isa} +Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa}) +Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa}) +Recommends: (xdg-desktop-portal-wlr%{?_isa} if wlroots%{?_isa}) + +%description +Powerful and simple to use screenshot software with built-in +editor with advanced features. + +Features: + + * Customizable appearance. + * Easy to use. + * In-app screenshot edition. + * DBus interface. + * Upload to Imgur + + +%pkg_completion -Bfz flameshot + +%package devel +Summary: Flameshot development files +Requires: %{name} = %{version} + +%description devel +Development files for Flameshot. + +%prep +%autosetup -p1 -n flameshot-%commit + +%build +export GIT_HASH=%commit +%cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_WAYLAND_CLIPBOARD:BOOL=ON \ +%cmake_build + +%install +%cmake_install +# https://fedoraproject.org/wiki/PackagingDrafts/find_lang +%find_lang Internationalization --with-qt +%fdupes %{buildroot}%{_datadir}/icons + +%check +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml +desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop + +%files -f Internationalization.lang +%{_datadir}/flameshot/translations/Internationalization_grc.qm +%doc README.md +%license LICENSE +%dir %{_datadir}/flameshot +%dir %{_datadir}/flameshot/translations +%{_bindir}/flameshot +%{_libdir}/lib%{devel_name}.so.* +%{_datadir}/applications/org.flameshot.Flameshot.desktop +%{_metainfodir}/org.flameshot.Flameshot.metainfo.xml +%{_datadir}/dbus-1/interfaces/org.flameshot.Flameshot.xml +%{_datadir}/dbus-1/services/org.flameshot.Flameshot.service +%{_datadir}/icons/hicolor/*/apps/*.png +%{_datadir}/icons/hicolor/scalable/apps/*.svg +%{_mandir}/man1/flameshot.1* + +%files devel +%{_libdir}/lib%{devel_name}.so +%{_libdir}/cmake/%{devel_name}/ +%{_libdir}/pkgconfig/%{devel_name}.pc +%{_includedir}/%{devel_name}/ diff --git a/anda/apps/flameshot/flameshot-nightly.spec b/anda/apps/flameshot/flameshot-nightly.spec index a6b87fcfea..81d2e7286b 100644 --- a/anda/apps/flameshot/flameshot-nightly.spec +++ b/anda/apps/flameshot/flameshot-nightly.spec @@ -1,13 +1,16 @@ #? https://github.com/flameshot-org/flameshot/blob/master/packaging/rpm/fedora/flameshot.spec -%global ver v12.1.0 -%global commit 09f2d959be5a64371cf205f5e46079c276fbfc20 +%global ver 13.1.0 +%global commit 06f41a86cc91d53d68871fcdc67053239ff1e87b %global shortcommit %{sub %{commit} 1 7} -%global commit_date 20250527 +%global commit_date 20250830 +%global devel_name QtColorWidgets +%global _distro_extra_cflags -fuse-ld=mold +%global _distro_extra_cxxflags -fuse-ld=mold Name: flameshot.nightly Version: %ver^%{commit_date}git.%shortcommit -Release: 1%?dist +Release: 2%?dist License: GPL-3.0-or-later AND ASL-2.0 AND GPL-2.0-only AND LGPL-3.0-only AND FAL-1.3 Summary: Powerful yet simple to use screenshot software URL: https://flameshot.org @@ -20,24 +23,22 @@ BuildRequires: fdupes BuildRequires: libappstream-glib BuildRequires: ninja-build BuildRequires: desktop-file-utils +BuildRequires: mold -BuildRequires: cmake(Qt5Core) >= 5.9.0 -BuildRequires: cmake(KF5GuiAddons) >= 5.89.0 -BuildRequires: cmake(Qt5DBus) >= 5.9.0 -BuildRequires: cmake(Qt5Gui) >= 5.9.0 -BuildRequires: cmake(Qt5LinguistTools) >= 5.9.0 -BuildRequires: cmake(Qt5Network) >= 5.9.0 -BuildRequires: cmake(Qt5Svg) >= 5.9.0 -BuildRequires: cmake(Qt5Widgets) >= 5.9.0 +BuildRequires: cmake(Qt6Core) >= 6.0.0 +BuildRequires: cmake(KF6GuiAddons) >= 6.7.0 +BuildRequires: cmake(Qt6DBus) >= 6.0.0 +BuildRequires: cmake(Qt6Gui) >= 6.0.0 +BuildRequires: cmake(Qt6LinguistTools) >= 6.0.0 +BuildRequires: cmake(Qt6Network) >= 6.0.0 +BuildRequires: cmake(Qt6Svg) >= 6.0.0 +BuildRequires: cmake(Qt6Widgets) >= 6.0.0 Requires: hicolor-icon-theme -Requires: qt5-qtbase >= 5.9.0 -Requires: qt5-qttools >= 5.9.0 -Requires: qt5-qtsvg%{?_isa} >= 5.9.0 -%dnl Provides: flameshot = %version-%release Conflicts: flameshot +Recommends: qt6-qtimageformats Recommends: xdg-desktop-portal%{?_isa} Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa}) Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa}) @@ -53,49 +54,32 @@ Features: * Easy to use. * In-app screenshot edition. * DBus interface. - * Upload to Imgur +%pkg_completion -Bfz flameshot -%package bash-completion -Summary: Bash completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: bash-completion -Supplements: (%{name} and bash-completion) +%package devel +Requires: %{name} = %{version} +%pkg_devel_files +%_libdir/cmake/*/ -%description bash-completion -Bash command line completion support for %{name}. - -%package fish-completion -Summary: Fish completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: fish -Supplements: (%{name} and fish) - -%description fish-completion -Fish command line completion support for %{name}. - -%package zsh-completion -Summary: Zsh completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: zsh -Supplements: (%{name} and zsh) - -%description zsh-completion -Zsh command line completion support for %{name}. +%package libs +%pkg_libs_files +%package static +%pkg_static_files %prep %autosetup -p1 -n flameshot-%commit %build +export GIT_HASH=%commit %cmake -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ - -DUSE_WAYLAND_CLIPBOARD:BOOL=ON \ + -DUSE_WAYLAND_CLIPBOARD:BOOL=ON %cmake_build %install %cmake_install -# https://fedoraproject.org/wiki/PackagingDrafts/find_lang %find_lang Internationalization --with-qt %fdupes %{buildroot}%{_datadir}/icons @@ -104,7 +88,6 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %files -f Internationalization.lang -%{_datadir}/flameshot/translations/Internationalization_grc.qm %doc README.md %license LICENSE %dir %{_datadir}/flameshot @@ -117,12 +100,3 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/apps/*.png %{_datadir}/icons/hicolor/scalable/apps/*.svg %{_mandir}/man1/flameshot.1* - -%files bash-completion -%{bash_completions_dir}/flameshot - -%files fish-completion -%{fish_completions_dir}/flameshot.fish - -%files zsh-completion -%{zsh_completions_dir}/_flameshot diff --git a/anda/apps/flameshot/update.rhai b/anda/apps/flameshot/update.rhai index ea700708a8..5350ca331b 100644 --- a/anda/apps/flameshot/update.rhai +++ b/anda/apps/flameshot/update.rhai @@ -1,5 +1,7 @@ rpm.global("commit", gh_commit("flameshot-org/flameshot")); if rpm.changed() { - rpm.global("ver", gh("flameshot-org/flameshot")); + let v = gh("flameshot-org/flameshot"); + v.crop(1); + rpm.global("ver", v); rpm.global("commit_date", date()); } diff --git a/anda/apps/flatpost/flatpost-desktop-mimetype.patch b/anda/apps/flatpost/flatpost-desktop-mimetype.patch deleted file mode 100644 index 9a38226d84..0000000000 --- a/anda/apps/flatpost/flatpost-desktop-mimetype.patch +++ /dev/null @@ -1,16 +0,0 @@ -commit 86a77b2e3d69a09f75992e6795903ab56df1a900 (HEAD -> main, fork/main) -Author: Adam Fidel -Date: Tue Apr 22 14:52:16 2025 -0500 - - feat: add MimeType to .desktop file - -diff --git a/data/usr/share/applications/com.flatpost.flatpostapp.desktop b/data/usr/share/applications/com.flatpost.flatpostapp.desktop -index 73013fc..d1f321d 100644 ---- a/data/usr/share/applications/com.flatpost.flatpostapp.desktop -+++ b/data/usr/share/applications/com.flatpost.flatpostapp.desktop -@@ -4,3 +4,4 @@ Exec=python3 /usr/bin/flatpost - Icon=com.flatpost.flatpostapp - Type=Application - Categories=Utility; -+MimeType=application/vnd.flatpak.ref;application/vnd.flatpak.repo; - diff --git a/anda/apps/flatpost/flatpost-mime.xml b/anda/apps/flatpost/flatpost-mime.xml deleted file mode 100644 index c473050ee5..0000000000 --- a/anda/apps/flatpost/flatpost-mime.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Flatpak Reference File - - - - Flatpak Repository File - - diff --git a/anda/apps/flatpost/flatpost.spec b/anda/apps/flatpost/flatpost.spec index 720712cf36..dd9cdf780e 100644 --- a/anda/apps/flatpost/flatpost.spec +++ b/anda/apps/flatpost/flatpost.spec @@ -1,13 +1,11 @@ Name: flatpost -Version: 1.0.5 +Version: 1.1.0 Release: 1%?dist License: BSD-2-Clause Summary: Desktop environment agnostic Flathub software center. URL: https://github.com/gloriouseggroll/flatpost Source0: %{url}/archive/refs/tags/%{version}.tar.gz -Source1: flatpost-mime.xml -Patch0: flatpost-desktop-mimetype.patch BuildArch: noarch BuildRequires: python3-devel @@ -45,7 +43,6 @@ installation, removal, updating, and permission management of flatpak packages a %build make all DESTDIR=%{buildroot} -install -D -m644 %{SOURCE1} %{buildroot}/usr/share/mime/packages/flatpost.xml %check desktop-file-validate %{buildroot}%{_datadir}/applications/com.flatpost.flatpostapp.desktop diff --git a/anda/apps/fontviewer/fontviewer.spec b/anda/apps/fontviewer/fontviewer.spec index e54b93a5c1..0911c2b911 100644 --- a/anda/apps/fontviewer/fontviewer.spec +++ b/anda/apps/fontviewer/fontviewer.spec @@ -1,6 +1,6 @@ Name: fontviewer Epoch: 1 -Version: 1.1.0 +Version: 1.2.0 Release: 1%?dist Summary: View and install fonts diff --git a/anda/apps/goofcord/nightly/anda.hcl b/anda/apps/goofcord/nightly/anda.hcl new file mode 100644 index 0000000000..5bb2829afb --- /dev/null +++ b/anda/apps/goofcord/nightly/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "goofcord-nightly.spec" + } + labels { + mock = 1 + nightly = 1 + } +} diff --git a/anda/apps/goofcord/nightly/goofcord-nightly.spec b/anda/apps/goofcord/nightly/goofcord-nightly.spec new file mode 100644 index 0000000000..c152a28ccb --- /dev/null +++ b/anda/apps/goofcord/nightly/goofcord-nightly.spec @@ -0,0 +1,101 @@ +%global commit 3f5eda113f33fead76a5a53e0b71c11b254d68fd +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250615 +%global ver 1.10.1 +%global base_name goofcord +%global git_name GoofCord +%global debug_package %{nil} +# Exclude private libraries +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%ifnarch aarch64 armv7hl armv7l +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\aarch64*\\.so.*))$ +%elifarch aarch64 armv7hl armv7l +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\x86_64*\\.so.*)|(.*\\x86-64*\\.so.*))$ +%endif + +Name: %{base_name}-nightly +Version: %{ver}^%{commit_date}.git.%{shortcommit} +Release: 1%{?dist} +License: OSL-3.0 +Summary: A privacy-minded Legcord fork. +Group: Applications/Internet +URL: https://github.com/Milkshiift/%{git_name} +Source0: %{url}/archive/%{commit}/%{git_name}-%{commit}.tar.gz +BuildRequires: bun-bin +BuildRequires: desktop-file-utils +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: git +BuildRequires: make +BuildRequires: nodejs +BuildRequires: nodejs-npm +BuildRequires: python3 +%ifarch aarch64 +BuildRequires: zlib-ng-compat-devel +%endif +Packager: Gilver E. + +%description +A highly configurable and privacy minded Discord client. + +%prep +%autosetup -n %{git_name}-%{commit} + +%build +%ifarch aarch64 armv7hl armv7l +sed -i '/\"x64\",/d' electron-builder.ts +%endif +bun install +bun run packageLinux --publish=never + +%install +mkdir -p %{buildroot}%{_datadir}/%{git_name} +%ifarch x86_64 +mv dist/linux-unpacked/* -t %{buildroot}%{_datadir}/%{git_name} +%elifarch aarch64 +mv dist/linux-arm64-unpacked/* -t %{buildroot}%{_datadir}/%{git_name} +%elifarch armv7hl armv7l +mv dist/linux-armv7l-unpacked/* -t %{buildroot}%{_datadir}/%{git_name} +%endif + +mkdir -p %{buildroot}%{_bindir} +ln -sf %{_datadir}/%{git_name}/%{git_name} %{buildroot}%{_bindir}/%{git_name} +install -Dm644 dist/.icon-set/icon_16x16.png %{buildroot}/%{_iconsdir}/hicolor/16x16/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_32.png %{buildroot}/%{_iconsdir}/hicolor/32x32/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_48x48.png %{buildroot}/%{_iconsdir}/hicolor/48x48/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_64.png %{buildroot}/%{_iconsdir}/hicolor/64x64/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_128.png %{buildroot}/%{_iconsdir}/hicolor/128x128/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_256.png %{buildroot}/%{_iconsdir}/hicolor/256x256/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_512.png %{buildroot}/%{_iconsdir}/hicolor/512x512/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_1024.png %{buildroot}/%{_iconsdir}/hicolor/1024x1024/apps/%{git_name}.png + +%ifarch x86_64 +dist/%{git_name}-*x86_64.AppImage --appimage-extract '*.desktop' +%elifarch aarch64 +dist/%{git_name}-*arm64.AppImage --appimage-extract '*.desktop' +%elifarch armv7hl armv7l +dist/%{git_name}-*armv7l.AppImage --appimage-extract '*.desktop' +%endif +desktop-file-install --set-key=Exec --set-value="%{_datadir}/%{git_name}/%{git_name} --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto %U" squashfs-root/%{git_name}.desktop + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/%{git_name}.desktop + +%files +%doc README.md +%license LICENSE +%{_bindir}/%{git_name} +%{_datadir}/applications/%{git_name}.desktop +%{_datadir}/%{git_name}/ +%{_iconsdir}/hicolor/16x16/apps/%{git_name}.png +%{_iconsdir}/hicolor/32x32/apps/%{git_name}.png +%{_iconsdir}/hicolor/48x48/apps/%{git_name}.png +%{_iconsdir}/hicolor/64x64/apps/%{git_name}.png +%{_iconsdir}/hicolor/128x128/apps/%{git_name}.png +%{_iconsdir}/hicolor/256x256/apps/%{git_name}.png +%{_iconsdir}/hicolor/512x512/apps/%{git_name}.png +%{_iconsdir}/hicolor/1024x1024/apps/%{git_name}.png + +%changelog +* Sat Jun 28 2025 Gilver E. - 1.10.1^20250615.git.3f5eda1 +- Initial package diff --git a/anda/apps/goofcord/nightly/update.rhai b/anda/apps/goofcord/nightly/update.rhai new file mode 100644 index 0000000000..0e24d0bdb5 --- /dev/null +++ b/anda/apps/goofcord/nightly/update.rhai @@ -0,0 +1,8 @@ +rpm.global("commit", gh_commit("Milkshiift/GoofCord")); + if rpm.changed { + let v = gh_tag("Milkshiift/GoofCord"); + v.crop(1); + rpm.global("ver", v); + rpm.global("commit_date", date()); + rpm.release(); +} diff --git a/anda/apps/goofcord/stable/anda.hcl b/anda/apps/goofcord/stable/anda.hcl new file mode 100644 index 0000000000..ab54b297f3 --- /dev/null +++ b/anda/apps/goofcord/stable/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "goofcord.spec" + } + labels { + mock = 1 + } +} diff --git a/anda/apps/goofcord/stable/goofcord.spec b/anda/apps/goofcord/stable/goofcord.spec new file mode 100644 index 0000000000..a67e1bac70 --- /dev/null +++ b/anda/apps/goofcord/stable/goofcord.spec @@ -0,0 +1,95 @@ +%global git_name GoofCord +%global debug_package %{nil} +# Exclude private libraries +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%ifnarch aarch64 armv7hl armv7l +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\aarch64*\\.so.*))$ +%elifarch aarch64 armv7hl armv7l +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\x86_64*\\.so.*)|(.*\\x86-64*\\.so.*))$ +%endif + +Name: goofcord +Version: 1.10.2 +Release: 1%?dist +License: OSL-3.0 +Summary: A privacy-minded Legcord fork. +Group: Applications/Internet +URL: https://github.com/Milkshiift/%{git_name} +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz +BuildRequires: bun-bin +BuildRequires: desktop-file-utils +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: nodejs +BuildRequires: nodejs-npm +BuildRequires: python3 +%ifarch aarch64 +BuildRequires: zlib-ng-compat-devel +%endif +Packager: Gilver E. + +%description +A highly configurable and privacy minded Discord client. + +%prep +%autosetup -n %{git_name}-%{version} + +%build +%ifarch aarch64 armv7hl armv7l +sed -i '/\"x64\",/d' electron-builder.ts +%endif +bun install +bun run packageLinux + +%install +mkdir -p %{buildroot}%{_datadir}/%{name} +%ifarch x86_64 +mv dist/linux-unpacked/* -t %{buildroot}%{_datadir}/%{name} +%elifarch aarch64 +mv dist/linux-arm64-unpacked/* -t %{buildroot}%{_datadir}/%{name} +%elifarch armv7hl armv7l +mv dist/linux-armv7l-unpacked/* -t %{buildroot}%{_datadir}/%{name} +%endif + +mkdir -p %{buildroot}%{_bindir} +ln -sf %{_datadir}/%{name}/%{name} %{buildroot}%{_bindir}/%{name} +install -Dm644 dist/.icon-set/icon_16x16.png %{buildroot}/%{_iconsdir}/hicolor/16x16/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_32.png %{buildroot}/%{_iconsdir}/hicolor/32x32/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_48x48.png %{buildroot}/%{_iconsdir}/hicolor/48x48/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_64.png %{buildroot}/%{_iconsdir}/hicolor/64x64/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_128.png %{buildroot}/%{_iconsdir}/hicolor/128x128/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_256.png %{buildroot}/%{_iconsdir}/hicolor/256x256/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_512.png %{buildroot}/%{_iconsdir}/hicolor/512x512/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_1024.png %{buildroot}/%{_iconsdir}/hicolor/1024x1024/apps/%{name}.png + +%ifarch x86_64 +dist/%{git_name}-*x86_64.AppImage --appimage-extract '*.desktop' +%elifarch aarch64 +dist/%{git_name}-*arm64.AppImage --appimage-extract '*.desktop' +%elifarch armv7hl armv7l +dist/%{git_name}-*armv7l.AppImage --appimage-extract '*.desktop' +%endif +desktop-file-install --set-key=Exec --set-value="%{_datadir}/%{name}/%{name} --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto %U" squashfs-root/%{name}.desktop + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop + +%files +%doc README.md +%license LICENSE +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/%{name}/ +%{_iconsdir}/hicolor/16x16/apps/%{name}.png +%{_iconsdir}/hicolor/32x32/apps/%{name}.png +%{_iconsdir}/hicolor/48x48/apps/%{name}.png +%{_iconsdir}/hicolor/64x64/apps/%{name}.png +%{_iconsdir}/hicolor/128x128/apps/%{name}.png +%{_iconsdir}/hicolor/256x256/apps/%{name}.png +%{_iconsdir}/hicolor/512x512/apps/%{name}.png +%{_iconsdir}/hicolor/1024x1024/apps/%{name}.png + +%changelog +* Sat Jun 28 2025 Gilver E. - 1.10.1-1 +- Initial package diff --git a/anda/apps/goofcord/stable/update.rhai b/anda/apps/goofcord/stable/update.rhai new file mode 100644 index 0000000000..4b308802cb --- /dev/null +++ b/anda/apps/goofcord/stable/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("Milkshiift/GoofCord")); diff --git a/anda/apps/halloy/anda.hcl b/anda/apps/halloy/anda.hcl new file mode 100644 index 0000000000..c99d54a392 --- /dev/null +++ b/anda/apps/halloy/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "halloy.spec" + } +} diff --git a/anda/apps/halloy/halloy.spec b/anda/apps/halloy/halloy.spec new file mode 100644 index 0000000000..47adfce9ec --- /dev/null +++ b/anda/apps/halloy/halloy.spec @@ -0,0 +1,70 @@ +# Generated by rust2rpm 27 +%bcond check 1 +%global appid org.squidowl.halloy +%global crate halloy + +Name: halloy +Version: 2025.8 +Release: 1%?dist +Summary: An open-source IRC client written in Rust, with the Iced GUI library +Packager: Yoong jin +SourceLicense: GPL-3.0-or-later +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND BSD-3-Clause AND (BSD-3-Clause OR MIT OR Apache-2.0) AND BSL-1.0 AND CC0-1.0 AND (CC0-1.0 OR Apache-2.0) AND (GPL-3.0+ OR BSD-3-Clause) AND (GPL-3.0-or-later) AND ISC AND (LGPL-3.0-or-later OR MPL-2.0) AND MIT AND (MIT AND (MIT OR Apache-2.0)) AND (MIT OR Apache-2.0) AND ((MIT OR Apache-2.0) AND NCSA) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (MIT OR Apache-2.0 OR BSD-1-Clause) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND Unlicense AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) + +URL: https://github.com/squidowl/halloy +Source: https://github.com/squidowl/halloy/archive/refs/tags/%{version}.tar.gz + +BuildRequires: alsa-lib-devel +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: desktop-file-utils +BuildRequires: openssl-devel + + +%description +%{summary}. + +%prep +%autosetup -n halloy-%{version} -p1 +%cargo_prep_online + + +%build +%cargo_build + +%install +%crate_install_bin +desktop-file-install assets/linux/%{appid}.desktop +install -Dpm644 assets/linux/%{appid}.appdata.xml -t %{buildroot}%{_datadir}/metainfo + +mkdir -p %{buildroot}%{_datadir} +cp -r assets/linux/icons -t %{buildroot}%{_datadir} + +%cargo_license_summary_online +%{cargo_license_online} > LICENSE.dependencies + +%if %{with check} +%check +%cargo_test +%endif + +%files +%license LICENSE +%license wix/license.rtf +%license LICENSE.dependencies +%doc CHANGELOG.md +%doc README.md +%{_bindir}/halloy +%{_datadir}/applications/%{appid}.desktop +%{_datadir}/metainfo/%{appid}.appdata.xml +%{_iconsdir}/hicolor/16x16/apps/%{appid}.png +%{_iconsdir}/hicolor/24x24/apps/%{appid}.png +%{_iconsdir}/hicolor/32x32/apps/%{appid}.png +%{_iconsdir}/hicolor/48x48/apps/%{appid}.png +%{_iconsdir}/hicolor/64x64/apps/%{appid}.png +%{_iconsdir}/hicolor/96x96/apps/%{appid}.png +%{_iconsdir}/hicolor/128x128/apps/%{appid}.png +%{_iconsdir}/hicolor/256x256/apps/%{appid}.png +%{_iconsdir}/hicolor/512x512/apps/%{appid}.png + +%changelog +%autochangelog diff --git a/anda/apps/halloy/update.rhai b/anda/apps/halloy/update.rhai new file mode 100644 index 0000000000..2f19283fe9 --- /dev/null +++ b/anda/apps/halloy/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("squidowl/halloy")); diff --git a/anda/apps/komikku/komikku.spec b/anda/apps/komikku/komikku.spec index 76b0e92638..b37d2747b7 100644 --- a/anda/apps/komikku/komikku.spec +++ b/anda/apps/komikku/komikku.spec @@ -3,12 +3,12 @@ %global gtk4_version 4.14.4 %global libadwaita_version 1.5.1 %global pure_protobuf_version 2.0.0 -%global raw_ver v1.77.0 +%global raw_ver v1.86.0 Name: komikku -Version: 1.77.0 +Version: 1.86.0 %forgemeta -Release: 1%?dist +Release: 2%?dist Summary: A manga reader for GNOME BuildArch: noarch @@ -36,7 +36,7 @@ Requires: libnotify Requires: webkitgtk6.0 Requires: python3-beautifulsoup4 Requires: python3-brotli -Requires: python3-colorthief +Requires: python3-modern-colorthief Requires: python3-dateparser %dnl >= 1.1.4 | https://bugzilla.redhat.com/show_bug.cgi?id=2115204 Requires: python3-emoji Requires: python3-gobject diff --git a/anda/apps/legcord/legcord-bin/anda.hcl b/anda/apps/legcord/legcord-bin/anda.hcl deleted file mode 100644 index 5c31d7cdce..0000000000 --- a/anda/apps/legcord/legcord-bin/anda.hcl +++ /dev/null @@ -1,5 +0,0 @@ -project pkg { - rpm { - spec = "legcord-bin.spec" - } -} diff --git a/anda/apps/legcord/legcord-bin/legcord-bin.spec b/anda/apps/legcord/legcord-bin/legcord-bin.spec deleted file mode 100644 index 0032ed2e87..0000000000 --- a/anda/apps/legcord/legcord-bin/legcord-bin.spec +++ /dev/null @@ -1,92 +0,0 @@ -%define debug_package %nil -%global _build_id_links none - -%ifarch x86_64 -%global src Legcord-%version-linux-x64 -%elifarch aarch64 -%global src Legcord-%version-linux-arm64 -%elifarch armv7l -%global src Legcord-%version-linux-armv7l -%endif - -# Exclude private libraries -%global __requires_exclude libffmpeg.so -%global __provides_exclude_from %{_datadir}/(armcord|legcord)/.*\\.so - -Name: legcord-bin -Version: 1.1.5 -Release: 1%?dist -License: OSL-3.0 -Summary: Custom lightweight Discord client designed to enhance your experience -URL: https://github.com/Legcord/Legcord -Group: Applications/Internet -Source0: %url/releases/download/v%version/%src.tar.gz -Source1: legcord.png -Source2: https://raw.githubusercontent.com/Legcord/Legcord/v%version/README.md -Requires: xdg-utils -ExclusiveArch: x86_64 aarch64 armv7l -Conflicts: legcord -Conflicts: legcord-nightly -BuildRequires: add-determinism -Obsoletes: armcord < 3.3.2-1 - -%description -Legcord is a custom client designed to enhance your Discord experience -while keeping everything lightweight. - -%prep -%autosetup -n %src - -cat < .legcord.desktop -[Desktop Entry] -Name=Legcord -Comment=%summary -GenericName=Internet Messenger -Type=Application -Exec=%_bindir/legcord -Icon=legcord -Categories=Network;InstantMessaging; -StartupWMClass=legcord -Keywords=discord;armcord;legcord;vencord;shelter;electron; -EOF - -%build - -%install -mkdir -p %buildroot%_bindir %buildroot%_datadir/applications %buildroot%_datadir/pixmaps %buildroot%_datadir/legcord %buildroot%_docdir/%name -cp -a * %buildroot%_datadir/legcord/ -ln -s %_datadir/legcord/legcord %buildroot%_bindir/legcord -ln -s %_datadir/legcord %buildroot%_datadir/armcord -chmod +x -R %buildroot%_datadir/legcord/* -chmod 755 %buildroot%_datadir/legcord/legcord -install -Dm644 .legcord.desktop %buildroot%_datadir/applications/LegCord.desktop -install -Dm644 %SOURCE1 %buildroot%_datadir/pixmaps/legcord.png -install -Dm644 %SOURCE2 %buildroot%_docdir/%name/ - -# HACK: rpm bug for unability to replace existing files on system. -%pre -if [ -d %_datadir/armcord ] && [ ! -L %_datadir/armcord ]; then - echo "Found old %_datadir/armcord directory, removing…" - rm -rf %_datadir/armcord -fi - -%files -%doc README.md -%_datadir/legcord -%_datadir/armcord -%_bindir/legcord -%_datadir/applications/LegCord.desktop -%_datadir/pixmaps/legcord.png - -%changelog -* Mon Oct 21 2024 madonuko - 1.0.2-2 -- Rename to LegCord. - -* Sat Jun 17 2023 madonuko - 3.2.0-2 -- Remove libnotify dependency. -- Fix desktop entry. -- Set as noarch package because there are not binary files. -- Use /usr/share/ instead of /opt/ - -* Sat May 6 2023 madonuko - 3.1.7-1 -- Initial package diff --git a/anda/apps/legcord/legcord-bin/legcord.png b/anda/apps/legcord/legcord-bin/legcord.png deleted file mode 100644 index bb87d3bafe..0000000000 Binary files a/anda/apps/legcord/legcord-bin/legcord.png and /dev/null differ diff --git a/anda/apps/legcord/legcord-bin/update.rhai b/anda/apps/legcord/legcord-bin/update.rhai deleted file mode 100644 index 15bcc4981d..0000000000 --- a/anda/apps/legcord/legcord-bin/update.rhai +++ /dev/null @@ -1 +0,0 @@ -rpm.version(gh("LegCord/LegCord")); diff --git a/anda/apps/legcord/nightly/anda.hcl b/anda/apps/legcord/nightly/anda.hcl index 819f094492..993068d0b8 100644 --- a/anda/apps/legcord/nightly/anda.hcl +++ b/anda/apps/legcord/nightly/anda.hcl @@ -1,9 +1,9 @@ project pkg { - arches = ["x86_64"] rpm { spec = "legcord-nightly.spec" } labels { nightly = 1 + mock = 1 } -} \ No newline at end of file +} diff --git a/anda/apps/legcord/nightly/launch.sh b/anda/apps/legcord/nightly/launch.sh deleted file mode 100644 index 3ce4e0c829..0000000000 --- a/anda/apps/legcord/nightly/launch.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -electron=/usr/bin/electron - -CONFIG=${XDG_CONFIG_HOME:-~/.config} -FLAGS="$CONFIG/armcord-flags.conf" - -# Allow users to override command-line options -if [ -f "$FLAGS" ]; then - USER_FLAGS="$(cat "$FLAGS")" -fi - -# shellcheck disable=SC2086 # USER_FLAGS has to be unquoted -"$electron" /usr/share/armcord/app.asar $USER_FLAGS "$@" diff --git a/anda/apps/legcord/nightly/legcord-nightly.spec b/anda/apps/legcord/nightly/legcord-nightly.spec index 96fdb4d65f..0f573e3edb 100644 --- a/anda/apps/legcord/nightly/legcord-nightly.spec +++ b/anda/apps/legcord/nightly/legcord-nightly.spec @@ -1,7 +1,14 @@ -%global commit 77a5e7213786c0282589bb2e71cc2e2d9bad146a -%global commit_date 20250527 +%global commit 53299982c074d3b8f2b2ddacc9babf9971f3aef7 +%global commit_date 20250826 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%define debug_package %nil +%global debug_package %nil +%global __strip /bin/true +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%ifnarch aarch64 +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\aarch64*\\.so.*))$ +%elifarch aarch64 +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\x86_64*\\.so.*)|(.*\\x86-64*\\.so.*))$ +%endif Name: legcord-nightly Version: %commit_date.%shortcommit @@ -10,67 +17,60 @@ License: OSL-3.0 Summary: Custom lightweight Discord client designed to enhance your experience URL: https://github.com/Legcord/Legcord Group: Applications/Internet -Source0: %url/archive/%commit/Legcord-%commit.tar.gz -Source1: launch.sh Packager: Owen -Requires: electron xdg-utils -Provides: armcord-nightly +Requires: xdg-utils Obsoletes: armcord < 3.3.2-1 -Conflicts: legcord-bin Conflicts: legcord -BuildArch: noarch -BuildRequires: anda-srpm-macros pnpm +BuildRequires: anda-srpm-macros pnpm nodejs-npm git-core gcc gcc-c++ make desktop-file-utils zlib-ng-compat-devel %description Legcord is a custom client designed to enhance your Discord experience while keeping everything lightweight. %prep -%autosetup -n Legcord-%commit - -cat < legcord.desktop -[Desktop Entry] -Name=Legcord -Comment=%summary -GenericName=Internet Messenger -Type=Application -Exec=/usr/bin/legcord -Icon=legcord -Categories=Network;InstantMessaging; -StartupWMClass=legcord -Keywords=discord;armcord;legcord;vencord;shelter;electron; -EOF - +%git_clone %{url}.git %{commit} %build -pnpm install --no-frozen-lockfile -pnpm run packageQuick - +pnpm install +pnpm run build +pnpm run package --linux AppImage tar.gz %install -install -Dm644 dist/*-unpacked/resources/app.asar %buildroot/usr/share/legcord/app.asar +mkdir -p %{buildroot}%{_datadir}/legcord +%ifarch aarch64 +mv dist/linux-arm64-unpacked/* %{buildroot}%{_datadir}/legcord +%else +mv dist/linux-unpacked/* -t %{buildroot}%{_datadir}/legcord +%endif -install -Dm755 %SOURCE1 %buildroot/usr/bin/legcord -install -Dm644 legcord.desktop %buildroot/usr/share/applications/LegCord.desktop -install -Dm644 build/icon.png %buildroot/usr/share/pixmaps/legcord.png +mkdir -p %{buildroot}%{_bindir} +ln -sf %{_datadir}/legcord/legcord %{buildroot}%{_bindir}/legcord +install -Dm644 dist/.icon-set/icon_16.png %{buildroot}%{_iconsdir}/hicolor/16x16/apps/legcord.png +install -Dm644 dist/.icon-set/icon_32.png %{buildroot}%{_iconsdir}/hicolor/32x32/apps/legcord.png +install -Dm644 dist/.icon-set/icon_48x48.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/legcord.png +install -Dm644 dist/.icon-set/icon_64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/legcord.png +install -Dm644 dist/.icon-set/icon_128.png %{buildroot}%{_iconsdir}/hicolor/128x128/apps/legcord.png +install -Dm644 dist/.icon-set/icon_256.png %{buildroot}%{_iconsdir}/hicolor/256x256/apps/legcord.png +install -Dm644 dist/.icon-set/icon_512.png %{buildroot}%{_iconsdir}/hicolor/512x512/apps/legcord.png +install -Dm644 dist/.icon-set/icon_1024.png %{buildroot}%{_iconsdir}/hicolor/1024x1024/apps/legcord.png -ln -s %_datadir/legcord %buildroot%_datadir/armcord - -# HACK: rpm bug for unability to replace existing files on system. -%pre -if [ -d %_datadir/armcord ] && [ ! -L %_datadir/armcord ]; then - echo "Found old %_datadir/armcord directory, removing…" - rm -rf %_datadir/armcord -fi +dist/Legcord-*.AppImage --appimage-extract '*.desktop' +desktop-file-install --set-key=Exec --set-value="%{_datadir}/legcord/legcord %U" squashfs-root/legcord.desktop %files %doc README.md %license license.txt -/usr/bin/legcord -/usr/share/applications/LegCord.desktop -/usr/share/pixmaps/legcord.png -/usr/share/legcord/app.asar -/usr/share/armcord +%{_bindir}/legcord +%{_datadir}/applications/legcord.desktop +%{_datadir}/legcord/ +%{_iconsdir}/hicolor/16x16/apps/legcord.png +%{_iconsdir}/hicolor/32x32/apps/legcord.png +%{_iconsdir}/hicolor/48x48/apps/legcord.png +%{_iconsdir}/hicolor/64x64/apps/legcord.png +%{_iconsdir}/hicolor/128x128/apps/legcord.png +%{_iconsdir}/hicolor/256x256/apps/legcord.png +%{_iconsdir}/hicolor/512x512/apps/legcord.png +%{_iconsdir}/hicolor/1024x1024/apps/legcord.png %changelog * Fri Nov 22 2024 owen - 1.0.2-2 diff --git a/anda/apps/legcord/stable/anda.hcl b/anda/apps/legcord/stable/anda.hcl index a60a7c45fd..3a5fd3890d 100644 --- a/anda/apps/legcord/stable/anda.hcl +++ b/anda/apps/legcord/stable/anda.hcl @@ -1,6 +1,8 @@ project pkg { - arches = ["x86_64"] rpm { spec = "legcord.spec" } -} + labels { + mock =1 + } +} diff --git a/anda/apps/legcord/stable/launch.sh b/anda/apps/legcord/stable/launch.sh deleted file mode 100644 index 3ce4e0c829..0000000000 --- a/anda/apps/legcord/stable/launch.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -electron=/usr/bin/electron - -CONFIG=${XDG_CONFIG_HOME:-~/.config} -FLAGS="$CONFIG/armcord-flags.conf" - -# Allow users to override command-line options -if [ -f "$FLAGS" ]; then - USER_FLAGS="$(cat "$FLAGS")" -fi - -# shellcheck disable=SC2086 # USER_FLAGS has to be unquoted -"$electron" /usr/share/armcord/app.asar $USER_FLAGS "$@" diff --git a/anda/apps/legcord/stable/legcord.spec b/anda/apps/legcord/stable/legcord.spec index 68fad2c554..2d6e752d8f 100644 --- a/anda/apps/legcord/stable/legcord.spec +++ b/anda/apps/legcord/stable/legcord.spec @@ -1,25 +1,26 @@ %define debug_package %nil # Exclude private libraries -%global __requires_exclude libffmpeg.so -%global __provides_exclude_from %{_datadir}/(armcord|legcord)/.*\\.so +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%ifnarch aarch64 +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\aarch64*\\.so.*))$ +%elifarch aarch64 +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\x86_64*\\.so.*)|(.*\\x86-64*\\.so.*))$ +%endif Name: legcord Version: 1.1.5 -Release: 1%?dist +Release: 2%?dist License: OSL-3.0 Summary: Custom lightweight Discord client designed to enhance your experience URL: https://github.com/Legcord/Legcord Group: Applications/Internet -Source1: launch.sh Packager: madonuko -Requires: electron xdg-utils -Provides: armcord +Requires: xdg-utils Obsoletes: armcord < 3.3.2-1 -Conflicts: legcord-bin +Obsoletes: legcord-bin < 1.1.5-2 Conflicts: legcord-nightly -BuildArch: noarch -BuildRequires: anda-srpm-macros pnpm +BuildRequires: anda-srpm-macros pnpm nodejs-npm git-core gcc gcc-c++ make desktop-file-utils zlib-ng-compat-devel %description Legcord is a custom client designed to enhance your Discord experience @@ -28,49 +29,47 @@ while keeping everything lightweight. %prep %git_clone %url v%version -cat < legcord.desktop -[Desktop Entry] -Name=Legcord -Comment=%summary -GenericName=Internet Messenger -Type=Application -Exec=/usr/bin/legcord -Icon=legcord -Categories=Network;InstantMessaging; -StartupWMClass=legcord -Keywords=discord;armcord;legcord;vencord;shelter;electron; -EOF - - %build -pnpm install --no-frozen-lockfile -pnpm run packageQuick - +pnpm install +pnpm run build +pnpm run package --linux AppImage tar.gz %install -install -Dm644 dist/*-unpacked/resources/app.asar %buildroot/usr/share/legcord/app.asar +mkdir -p %{buildroot}%{_datadir}/legcord +%ifarch aarch64 +mv dist/linux-arm64-unpacked/* %{buildroot}%{_datadir}/legcord +%else +mv dist/linux-unpacked/* -t %{buildroot}%{_datadir}/legcord +%endif -install -Dm755 %SOURCE1 %buildroot/usr/bin/legcord -install -Dm644 legcord.desktop %buildroot/usr/share/applications/LegCord.desktop -install -Dm644 build/icon.png %buildroot/usr/share/pixmaps/legcord.png +mkdir -p %{buildroot}%{_bindir} +ln -sf %{_datadir}/legcord/legcord %{buildroot}%{_bindir}/legcord +install -Dm644 dist/.icon-set/icon_16.png %{buildroot}%{_iconsdir}/hicolor/16x16/apps/legcord.png +install -Dm644 dist/.icon-set/icon_32.png %{buildroot}%{_iconsdir}/hicolor/32x32/apps/legcord.png +install -Dm644 dist/.icon-set/icon_48x48.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/legcord.png +install -Dm644 dist/.icon-set/icon_64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/legcord.png +install -Dm644 dist/.icon-set/icon_128.png %{buildroot}%{_iconsdir}/hicolor/128x128/apps/legcord.png +install -Dm644 dist/.icon-set/icon_256.png %{buildroot}%{_iconsdir}/hicolor/256x256/apps/legcord.png +install -Dm644 dist/.icon-set/icon_512.png %{buildroot}%{_iconsdir}/hicolor/512x512/apps/legcord.png +install -Dm644 dist/.icon-set/icon_1024.png %{buildroot}%{_iconsdir}/hicolor/1024x1024/apps/legcord.png -ln -s %_datadir/legcord %buildroot%_datadir/armcord - -# HACK: rpm bug for unability to replace existing files on system. -%pre -if [ -d %_datadir/armcord ] && [ ! -L %_datadir/armcord ]; then - echo "Found old %_datadir/armcord directory, removing…" - rm -rf %_datadir/armcord -fi +dist/Legcord-*.AppImage --appimage-extract '*.desktop' +desktop-file-install --set-key=Exec --set-value="%{_datadir}/legcord/legcord %U" squashfs-root/legcord.desktop %files %doc README.md %license license.txt -/usr/bin/legcord -/usr/share/applications/LegCord.desktop -/usr/share/pixmaps/legcord.png -/usr/share/legcord/app.asar -/usr/share/armcord +%{_bindir}/legcord +%{_datadir}/applications/legcord.desktop +%{_datadir}/legcord/ +%{_iconsdir}/hicolor/16x16/apps/legcord.png +%{_iconsdir}/hicolor/32x32/apps/legcord.png +%{_iconsdir}/hicolor/48x48/apps/legcord.png +%{_iconsdir}/hicolor/64x64/apps/legcord.png +%{_iconsdir}/hicolor/128x128/apps/legcord.png +%{_iconsdir}/hicolor/256x256/apps/legcord.png +%{_iconsdir}/hicolor/512x512/apps/legcord.png +%{_iconsdir}/hicolor/1024x1024/apps/legcord.png %changelog * Mon Oct 21 2024 madonuko - 1.0.2-2 diff --git a/anda/apps/mpv/mpv-nightly.spec b/anda/apps/mpv/mpv-nightly.spec index f5d9b85c62..eed5df460d 100644 --- a/anda/apps/mpv/mpv-nightly.spec +++ b/anda/apps/mpv/mpv-nightly.spec @@ -1,6 +1,9 @@ -%global commit 1d1535ff9124fdeb3c81a2f089551e2cc8404613 +# Disable X11 for RHEL 10+ +%bcond x11 %[%{undefined rhel} || 0%{?rhel} < 10] + +%global commit efb70d7f27780bbc7db2ad9a7f2fbf05e610c97e %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20250523 +%global commit_date 20250830 %global ver 0.40.0 Name: mpv-nightly @@ -42,8 +45,8 @@ BuildRequires: pkgconfig(libavutil) >= 57.24.100 BuildRequires: pkgconfig(libbluray) BuildRequires: pkgconfig(libcdio) BuildRequires: pkgconfig(libcdio_paranoia) -BuildRequires: pkgconfig(libdisplay-info) BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libdisplay-info) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.19 BuildRequires: pkgconfig(libplacebo) >= 6.338.0 @@ -56,10 +59,8 @@ BuildRequires: pkgconfig(mujs) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(rubberband) BuildRequires: pkgconfig(sdl2) -BuildRequires: pkgconfig(shaderc) BuildRequires: pkgconfig(uchardet) >= 0.0.5 BuildRequires: pkgconfig(vapoursynth) -BuildRequires: pkgconfig(vdpau) BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-cursor) @@ -71,12 +72,15 @@ BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xkbcommon) -BuildRequires: pkgconfig(xpresent) BuildRequires: pkgconfig(xrandr) -BuildRequires: pkgconfig(xscrnsaver) -BuildRequires: pkgconfig(xv) BuildRequires: pkgconfig(zimg) >= 2.9 BuildRequires: pkgconfig(zlib) +%if %{with x11} +BuildRequires: pkgconfig(vdpau) +BuildRequires: pkgconfig(xpresent) +BuildRequires: pkgconfig(xscrnsaver) +BuildRequires: pkgconfig(xv) +%endif Requires: hicolor-icon-theme Provides: mplayer-backend @@ -124,32 +128,7 @@ Requires: mpv-nightly-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description devel This package contains development header files and libraries for Mpv. -%package bash-completion -Summary: MPV Bash completion -Requires: bash -Requires: %{name} -Supplements: (%{name} and bash) - -%description bash-completion -Bash shell completion for MPV. - -%package fish-completion -Summary: MPV Fish completion -Requires: fish -Requires: %{name} -Supplements: (%{name} and fish) - -%description fish-completion -Fish shell completion for MPV. - -%package zsh-completion -Summary: MPV Zsh completion -Requires: zsh -Requires: %{name} -Supplements: (%{name} and zsh) - -%description zsh-completion -Zsh shell completion for MPV. +%pkg_completion -Bfz mpv %prep %autosetup -p1 -n mpv-%commit @@ -171,10 +150,17 @@ sed -e "s|/usr/local/etc|%{_sysconfdir}/mpv|" -i etc/mpv.conf -Ddvdnav=enabled \ -Degl-drm=enabled \ -Degl-wayland=enabled \ +%if %{with x11} -Degl-x11=enabled \ + -Dgl-x11=enabled \ + -Dvaapi-x11=enabled \ + -Dvdpau-gl-x11=enabled \ + -Dvdpau=enabled \ + -Dx11=enabled \ + -Dxv=enabled \ +%endif -Degl=enabled \ -Dgbm=enabled \ - -Dgl-x11=enabled \ -Dgl=enabled \ -Dhtml-build=enabled \ -Diconv=enabled \ @@ -199,22 +185,18 @@ sed -e "s|/usr/local/etc|%{_sysconfdir}/mpv|" -i etc/mpv.conf -Dsdl2-gamepad=enabled \ -Dsdl2-video=enabled \ -Dsdl2=enabled \ + -Dshaderc=disabled \ -Dsndio=disabled \ -Dspirv-cross=disabled \ -Duchardet=enabled \ -Dvaapi-drm=enabled \ -Dvaapi-wayland=enabled \ - -Dvaapi-x11=enabled \ -Dvaapi=enabled \ -Dvapoursynth=enabled \ - -Dvdpau-gl-x11=enabled \ - -Dvdpau=enabled \ -Dvector=enabled \ -Dvulkan=enabled \ -Dwayland=enabled \ -Dwerror=false \ - -Dx11=enabled \ - -Dxv=enabled \ -Dzimg=enabled \ -Dzlib=enabled %meson_build @@ -235,8 +217,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mpv.desktop %{_datadir}/icons/hicolor/*/apps/mpv*.* %{_mandir}/man1/mpv.* %{_metainfodir}/mpv.metainfo.xml -%dir %{_sysconfdir}/mpv/ -%config(noreplace) %{_sysconfdir}/mpv/encoding-profiles.conf %files libs %license LICENSE.GPL LICENSE.LGPL Copyright @@ -246,15 +226,3 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mpv.desktop %{_includedir}/mpv/ %{_libdir}/libmpv.so %{_libdir}/pkgconfig/mpv.pc - -%files bash-completion -%{bash_completions_dir}/mpv - -%files fish-completion -%{fish_completions_dir}/mpv.fish - -%files zsh-completion -%{zsh_completions_dir}/_mpv - -%changelog -%autochangelog diff --git a/anda/apps/nekoray/Sagernet.SingBox.Version.txt b/anda/apps/nekoray/Sagernet.SingBox.Version.txt deleted file mode 100644 index 12410289c4..0000000000 --- a/anda/apps/nekoray/Sagernet.SingBox.Version.txt +++ /dev/null @@ -1 +0,0 @@ -v1.11.11 \ No newline at end of file diff --git a/anda/apps/nekoray/nekoray.spec b/anda/apps/nekoray/nekoray.spec deleted file mode 100644 index f797f302ac..0000000000 --- a/anda/apps/nekoray/nekoray.spec +++ /dev/null @@ -1,93 +0,0 @@ -%global gomodulesmode GO111MODULE=on -Name: nekoray -Version: 4.3.5 -Release: 1%?dist -Summary: Qt based cross-platform GUI proxy configuration manager (backend: sing-box) -URL: https://github.com/Mahdi-zarei/nekoray -License: GPLv3 - -Source0: https://github.com/Mahdi-zarei/nekoray/archive/refs/tags/%{version}.tar.gz#/nekoray-%{version}.tar.gz -Packager: bunzuhbu -Source1: vendor-%{version}.tar.gz -%define fetch_vendor %{_rpmconfigdir}/rpmuncompress -xv %{SOURCE1} - -Source2: Sagernet.SingBox.Version.txt -%define singbox_version $(cat %{SOURCE2}) - -Source3: %{name}.desktop -Source4: %{name}.sh - -BuildRequires: rpm_macro(cmake) -BuildRequires: rpm_macro(cmake_build) -BuildRequires: rpm_macro(cmake_install) -BuildRequires: cmake -BuildRequires: gcc-c++ -BuildRequires: pkgconfig(protobuf) -BuildRequires: pkgconfig(libcurl) -BuildRequires: cmake(yaml-cpp) -BuildRequires: cmake(ZXing) -BuildRequires: cmake(absl) -BuildRequires: cmake(cpr) -BuildRequires: cmake(Qt6) -BuildRequires: cmake(Qt6Svg) -BuildRequires: cmake(Qt6Linguist) -BuildRequires: cmake(Qt6Charts) -BuildRequires: patchelf -BuildRequires: sed -BuildRequires: golang -BuildRequires: rpm_macro(gobuildflags) -Requires: %{name}-core -%define core nekobox_core - -%package core -Summary: %{summary} - -%description -%{summary} - -%description core -%{summary} - -%prep -%autosetup -p1 -n %{name}-%{version} -sed -i 's~find_package(Protobuf CONFIG REQUIRED)~find_package(Protobuf REQUIRED)~' cmake/myproto.cmake -sed -i 's~add_library(qhotkey 3rdparty/QHotkey/qhotkey.cpp)~add_library(qhotkey STATIC 3rdparty/QHotkey/qhotkey.cpp)~' cmake/QHotkey.cmake -sed -i 's~ImageFormat::BGRA~ImageFormat::BGR~' 3rdparty/ZxingQtReader.hpp -pushd core/server -%{fetch_vendor} -popd - -%build -%cmake -%cmake_build -DEST=$PWD/%{__cmake_builddir}/%{core} -pushd core/server -go build %{gobuildflags} -o $DEST -trimpath -ldflags "-B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) -w -s -X 'github.com/sagernet/sing-box/constant.Version=%{singbox_version}'" -tags "with_clash_api,with_gvisor,with_quic,with_wireguard,with_utls,with_ech,with_dhcp" -popd - -%install -mkdir -p %{buildroot}%{_libdir}/%{name} -mkdir -p %{buildroot}%{_bindir} -mkdir -p %{buildroot}%{_datadir}/applications -mkdir -p %{buildroot}%{_datadir}/icons - -cp %{SOURCE4} %{buildroot}%{_bindir}/%{name} -cp %{SOURCE3} %{buildroot}%{_datadir}/applications/%{name}.desktop -sed -i 's~/bin~%{_bindir}~g;s~/usr/share~%{_datadir}~g;s~nekoray~%{name}~g' %{buildroot}%{_datadir}/applications/%{name}.desktop -sed -i 's~/bin~%{_bindir}~g;s~/lib64~%{_libdir}~g;s~nekoray~%{name}~g' %{buildroot}%{_bindir}/%{name} -cp %{__cmake_builddir}/%{name} %{buildroot}%{_libdir}/%{name}/%{name} -cp %{__cmake_builddir}/%{core} %{buildroot}%{_libdir}/%{name}/%{core} -cp res/nekoray.ico %{buildroot}%{_datadir}/icons/%{name}.ico -patchelf --remove-rpath %{buildroot}%{_libdir}/%{name}/%{name} -patchelf --remove-rpath %{buildroot}%{_libdir}/%{name}/%{core} - -%files -%attr(0755, -, -) %{_bindir}/%{name} -%attr(0755, -, -) %{_libdir}/%{name}/%{name} -%attr(0644, -, -) %{_datadir}/icons/%{name}.ico -%attr(0644, -, -) %{_datadir}/applications/%{name}.desktop - -%files core -%dir %{_libdir}/%{name} -%attr(0755, -, -) %{_libdir}/%{name}/%{core} - diff --git a/anda/apps/nekoray/pre.rhai b/anda/apps/nekoray/pre.rhai deleted file mode 100644 index 8ad379de32..0000000000 --- a/anda/apps/nekoray/pre.rhai +++ /dev/null @@ -1,5 +0,0 @@ -let sourcedir = "anda/apps/nekoray"; - -sh(`dnf in -y golang rpmdevtools tar rpm-build coreutils`, #{}); -sh(`pushd ${sourcedir}; bash -x pre.sh; popd`, #{}); - diff --git a/anda/apps/nekoray/pre.sh b/anda/apps/nekoray/pre.sh deleted file mode 100644 index 4c07e522b2..0000000000 --- a/anda/apps/nekoray/pre.sh +++ /dev/null @@ -1,9 +0,0 @@ -export sourcedir="$PWD" -rpmdev-spectool --all --get-files nekoray.spec -version=$(rpmspec --query --queryformat "%{VERSION}\n" nekoray.spec | uniq) - -tar -xzf "nekoray-${version}.tar.gz" -pushd "nekoray-${version}/core/server" - go mod vendor - tar -czf "${sourcedir}/vendor-${version}.tar.gz" vendor -popd diff --git a/anda/apps/nekoray/update.rhai b/anda/apps/nekoray/update.rhai deleted file mode 100644 index 4f1929a65f..0000000000 --- a/anda/apps/nekoray/update.rhai +++ /dev/null @@ -1,3 +0,0 @@ -rpm.version(find(`([\d.]+)-\d+-\d+-\d+`, gh_rawfile("Mahdi-zarei/nekoray", "dev", "nekoray_version.txt"), 1)); - -open_file("anda/apps/nekoray/Sagernet.SingBox.Version.txt", "w").write(gh("sagernet/sing-box")); diff --git a/anda/apps/neohtop/neohtop.spec b/anda/apps/neohtop/neohtop.spec index 8000151906..b6da0e0383 100644 --- a/anda/apps/neohtop/neohtop.spec +++ b/anda/apps/neohtop/neohtop.spec @@ -1,7 +1,7 @@ %global __brp_mangle_shebangs %{nil} Name: neohtop -Version: 1.1.2 +Version: 1.2.0 Release: 1%?dist Summary: System monitoring on steroids License: MIT diff --git a/anda/apps/opensnitch/anda.hcl b/anda/apps/opensnitch/anda.hcl new file mode 100644 index 0000000000..31ac55bb1c --- /dev/null +++ b/anda/apps/opensnitch/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "opensnitch.spec" + } +} diff --git a/anda/apps/opensnitch/opensnitch.spec b/anda/apps/opensnitch/opensnitch.spec new file mode 100644 index 0000000000..981612ce2b --- /dev/null +++ b/anda/apps/opensnitch/opensnitch.spec @@ -0,0 +1,119 @@ +# Generated by go2rpm 1.16.0 +%bcond check 1 +%bcond bootstrap 0 + +# https://github.com/evilsocket/opensnitch +%global goipath github.com/evilsocket/opensnitch +Version: 1.7.0.0 + +%gometa -f + +%global common_description %{expand: +OpenSnitch is a GNU/Linux interactive application firewall inspired by Little +Snitch.} + +%global golicenses LICENSE ui/LICENSE\\\ + ui/opensnitch/res/themes/dark/icons/LICENSE +%global godocs README.md ebpf_prog/README ui/requirements.txt\\\ + ui/i18n/README.md example example example\\\ + utils/packaging/daemon/deb/debian/changelog\\\ + utils/packaging/ui/deb/debian/changelog + +Name: opensnitch +Release: %autorelease +Summary: OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch + +License: GPL-3.0-only AND LGPL-2.1-or-later +URL: %{gourl} +Source: %{gosource} +BuildRequires: gcc-c++ +BuildRequires: python3-devel +BuildRequires: python-rpm-macros +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) >= 61.0 +BuildRequires: python3dist(wheel) >= 0.37.1 +BuildRequires: python3dist(pyqt5) +BuildRequires: /usr/bin/lrelease-qt5 +BuildRequires: protobuf-compiler +BuildRequires: pkgconfig(libnetfilter_queue) +#BuildRequires: protoc-gen-go +#BuildRequires: /usr/bin/protoc-gen-go-grpc + +%description %{common_description} + +%gopkg + + +%prep +%goprep -A +%autopatch -p1 + +export GOBIN=$(go env GOPATH | sed -E 's/:.+$//')/bin +echo $GOBIN > %_builddir/gobin +go install github.com/golang/protobuf/protoc-gen-go@latest +go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.1 +go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 + +sed -i 's/@pip3 /@python3 -m pip /' ui/Makefile + +%build +pushd ui +%make_build deps +popd + +export GOBIN=$(cat %_builddir/gobin) +export PATH=$GOBIN:$PATH +pushd proto +%make_build +popd + +pushd ui +%make_build +%pyproject_wheel +popd + +%global gomodulesmode GO111MODULE=on +pushd daemon +%gobuild -o ../opensnitchd . +popd + + +%install +%gopkginstall +install -Dm755 opensnitchd -t %buildroot%_bindir + +pushd ui +%if 0%{?fedora} <= 41 +%py3_install +%else +%pyproject_install +%pyproject_save_files %name +%endif +popd + +rm -rf %buildroot%python3_sitelib/tests/ +cp -r %buildroot%python3_sitelib%_usr/ %buildroot%_usr/ --preserve=all --no-target-directory +rm -rf %buildroot%python3_sitelib%_usr + + +%if 0%{?fedora} <= 41 +%files +%{python3_sitelib}/%name/ +%{python3_sitelib}/%name-%{version}-py%{python3_version}.egg-info/ +%else +%files -f %{pyproject_files} +%endif +%license LICENSE +%doc README.md +%_bindir/opensnitch-ui +%_bindir/opensnitchd +%_datadir/applications/opensnitch_ui.desktop +%_iconsdir/hicolor/48x48/apps/opensnitch-ui.png +%_iconsdir/hicolor/64x64/apps/opensnitch-ui.png +%_iconsdir/hicolor/scalable/apps/opensnitch-ui.svg +%_datadir/kservices5/kcm_opensnitch.desktop +%_metainfodir/io.github.evilsocket.opensnitch.appdata.xml + +/usr/share/icons/hicolor/scalable/apps/opensnitch-ui.svg + +%gopkgfiles diff --git a/anda/apps/opensnitch/update.rhai b/anda/apps/opensnitch/update.rhai new file mode 100644 index 0000000000..e69de29bb2 diff --git a/anda/apps/peazip/peazip.spec b/anda/apps/peazip/peazip.spec index d5dea2257f..b2666295e3 100644 --- a/anda/apps/peazip/peazip.spec +++ b/anda/apps/peazip/peazip.spec @@ -2,7 +2,7 @@ %define debug_package %nil Name: peazip -Version: 10.4.0 +Version: 10.6.1 Release: 1%?dist Summary: Free Zip / Unzip software and Rar file extractor. Cross-platform file and archive manager License: LGPL-3.0-only diff --git a/anda/apps/protontricks/anda.hcl b/anda/apps/protontricks/anda.hcl new file mode 100644 index 0000000000..08cee6defa --- /dev/null +++ b/anda/apps/protontricks/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "protontricks.spec" + } + labels { + subrepo = "extras" + } +} diff --git a/anda/apps/protontricks/protontricks.spec b/anda/apps/protontricks/protontricks.spec new file mode 100644 index 0000000000..5ea09b3a59 --- /dev/null +++ b/anda/apps/protontricks/protontricks.spec @@ -0,0 +1,92 @@ +%bcond_with tests +%global pypi_name protontricks + +Name: terra-%{pypi_name} +Version: 1.13.0 +Release: 1%?dist +Summary: Simple wrapper that does winetricks things for Proton enabled games +BuildArch: noarch + +License: GPL-3.0-or-later +URL: https://github.com/Matoking/protontricks + +# GitHub tarball won't work for setuptools-scm +Source0: %{pypi_source} + +BuildRequires: desktop-file-utils +BuildRequires: python3-devel +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(setuptools-scm) +# BuildRequires: python3dist(vdf) >= 3.4 +%if %{with tests} +BuildRequires: python3dist(pytest-cov) >= 2.10 +BuildRequires: python3dist(pytest) >= 6.0 +%endif + +Requires: (terra-winetricks or winetricks-git) +Conflicts: protontricks + +Recommends: yad + +Suggests: zenity +# https://github.com/Matoking/protontricks/blob/master/CHANGELOG.md#1120---2024-09-16 +Provides: bundled(python3-vdf) + + +%description +A simple wrapper that does winetricks things for Proton enabled games, +requires Winetricks. + +This is a fork of the original project created by sirmentio. The original +repository is available at Sirmentio/protontricks. + + +%prep +%autosetup -n %{pypi_name}-%{version} + + +%build +%if 0%{?fedora} <= 41 +%py3_build +%else +%pyproject_wheel +%endif + + +%install +%if 0%{?fedora} <= 41 +%py3_install +%else +%pyproject_install +%endif + +# Remove `protontricks-desktop-install`, since we already install .desktop +# files properly +# https://bugzilla.redhat.com/show_bug.cgi?id=1991684 +rm %{buildroot}%{_bindir}/%{pypi_name}-desktop-install + + +%if %{with tests} +%check +%{py3_test_envvars} %{python3} -m pytest -v +desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop +%endif + + +%files +%license LICENSE +%doc README.md CHANGELOG.md +%{_bindir}/%{pypi_name}-launch +%{_bindir}/%{pypi_name} +%{_datadir}/applications/*.desktop +%{python3_sitelib}/%{pypi_name}/ +%if 0%{?fedora} <= 41 +%{python3_sitelib}/%{pypi_name}-%{version}*.egg-info/ +%else +%{python3_sitelib}/%{pypi_name}-%{version}*.dist-info/ +%endif + + +%changelog +%autochangelog diff --git a/anda/apps/protontricks/update.rhai b/anda/apps/protontricks/update.rhai new file mode 100644 index 0000000000..219119c8c4 --- /dev/null +++ b/anda/apps/protontricks/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("protontricks")); diff --git a/anda/apps/rp-appset/anda.hcl b/anda/apps/rp-appset/anda.hcl new file mode 100644 index 0000000000..904fc2aab3 --- /dev/null +++ b/anda/apps/rp-appset/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rp-appset.spec" + } +} diff --git a/anda/apps/rp-appset/rp-appset.spec b/anda/apps/rp-appset/rp-appset.spec new file mode 100644 index 0000000000..c59e3cbdaf --- /dev/null +++ b/anda/apps/rp-appset/rp-appset.spec @@ -0,0 +1,51 @@ +%global commit 5b4b8f65c3d2795a61e765a01e07af9bfe3d1990 +%global commit_date 20250501 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: appset +Version: 0~%commit_date.git~%shortcommit +Release: 1%?dist +Summary: Application for customisation of appearance of Raspberry Pi Desktop +License: BSD-3-Clause +URL: https://github.com/raspberrypi-ui/appset +Source0: %url/archive/%commit.tar.gz +Packager: Owen Zimmerman + +BuildRequires: meson +BuildRequires: ninja-build +BuildRequires: gtk3-devel +BuildRequires: libxml2-devel +BuildRequires: intltool +BuildRequires: gcc + +Requires: libxml2 +Requires: gtk3 + +Provides: pipanel +Provides: rp-appset + +%description +%summary. + +%prep +%autosetup -n appset-%commit + +%build +%meson +%meson_build + +%install +%meson_install + +%find_lang pipanel + +%files -f pipanel.lang +%doc README +%license debian/copyright +%{_bindir}/pipanel +%{_datadir}/applications/pipanel.desktop +%{_datadir}/pipanel/ui/pipanel.ui + +%changelog +* Fri Aug 15 2025 Owen Zimmerman +- Package appset diff --git a/anda/apps/rp-appset/update.rhai b/anda/apps/rp-appset/update.rhai new file mode 100644 index 0000000000..341bac044f --- /dev/null +++ b/anda/apps/rp-appset/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("raspberrypi-ui/appset")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} diff --git a/anda/apps/rp-bookshelf/anda.hcl b/anda/apps/rp-bookshelf/anda.hcl new file mode 100644 index 0000000000..c17d264801 --- /dev/null +++ b/anda/apps/rp-bookshelf/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rp-bookshelf.spec" + } +} diff --git a/anda/apps/rp-bookshelf/rp-bookshelf.spec b/anda/apps/rp-bookshelf/rp-bookshelf.spec new file mode 100644 index 0000000000..1a52bd980e --- /dev/null +++ b/anda/apps/rp-bookshelf/rp-bookshelf.spec @@ -0,0 +1,50 @@ +%global commit 53102fb6f4b0324cc89635f0ef58966c6b847a74 +%global commit_date 20250327 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: rp-bookshelf +Version: 0~%commit_date.git~%shortcommit +Release: 1%?dist +Summary: Browser for Raspberry Pi Press publications in PDF format +License: BSD-3-Clause +URL: https://github.com/raspberrypi-ui/bookshelf +Source0: %url/archive/%commit.tar.gz +Packager: Owen Zimmerman + +BuildRequires: meson +BuildRequires: ninja-build +BuildRequires: gtk3-devel +BuildRequires: libcurl-devel +BuildRequires: intltool +BuildRequires: gcc + +Requires: libcurl gtk3 + +%description +%summary. + +%prep +%autosetup -n bookshelf-%commit + +%build +%meson +%meson_build + +%install +%meson_install +%find_lang %{name} + +%files -f %{name}.lang +%doc README +%license debian/copyright +%{_bindir}/rp-bookshelf +%{_datadir}/icons/hicolor/16x16/apps/bookshelf.png +%{_datadir}/icons/hicolor/24x24/apps/bookshelf.png +%{_datadir}/icons/hicolor/32x32/apps/bookshelf.png +%{_datadir}/icons/hicolor/48x48/apps/bookshelf.png +%{_datadir}/applications/rp-bookshelf.desktop +%{_datadir}/rp-bookshelf/* + +%changelog +* Fri Aug 08 2025 Owen Zimmerman +- Package bookshelf diff --git a/anda/apps/rp-bookshelf/update.rhai b/anda/apps/rp-bookshelf/update.rhai new file mode 100644 index 0000000000..40506e0928 --- /dev/null +++ b/anda/apps/rp-bookshelf/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("raspberrypi-ui/bookshelf")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} diff --git a/anda/apps/ruffle/ruffle-nightly.spec b/anda/apps/ruffle/ruffle-nightly.spec index 69b53b1aaf..9dcbbba652 100644 --- a/anda/apps/ruffle/ruffle-nightly.spec +++ b/anda/apps/ruffle/ruffle-nightly.spec @@ -1,4 +1,4 @@ -%global ver 2025-05-27 +%global ver 2025-09-01 %global goodver %(echo %ver | sed 's/-//g') %global __brp_mangle_shebangs %{nil} %bcond_without mold diff --git a/anda/apps/signal-desktop/anda.hcl b/anda/apps/signal-desktop/anda.hcl new file mode 100644 index 0000000000..630dc2924e --- /dev/null +++ b/anda/apps/signal-desktop/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "signal-desktop.spec" + } +} diff --git a/anda/apps/signal-desktop/signal-desktop.spec b/anda/apps/signal-desktop/signal-desktop.spec new file mode 100644 index 0000000000..0465fb92d7 --- /dev/null +++ b/anda/apps/signal-desktop/signal-desktop.spec @@ -0,0 +1,123 @@ +#? https://gitlab.archlinux.org/archlinux/packaging/packages/signal-desktop/-/blob/main/PKGBUILD +%define debug_package %{nil} + +# Exclude private libraries +%global __requires_exclude libffmpeg.so +%global __provides_exclude_from %{_datadir}/%{name}/.*\\.so + +%ifarch x86_64 +%define arch %{nil} +%elifarch aarch64 +%define arch arm64- +%endif + +Name: signal-desktop +Version: 7.68.0 +Release: 1%?dist +Summary: A private messenger for Windows, macOS, and Linux +URL: https://signal.org +Source0: https://github.com/signalapp/Signal-Desktop/archive/refs/tags/v%{version}.tar.gz +# signal.desktop from https://github.com/signalflatpak/signal/blob/master/org.signal.Signal.desktop +Source1: signal.desktop +License: AGPL-3.0 AND %electron_licenses +ExclusiveArch: x86_64 aarch64 +BuildRequires: pulseaudio-libs-devel libX11-devel pnpm make gcc g++ python3 +BuildRequires: git-lfs +Requires: gtk3 +Requires: libwayland-cursor +Requires: libwayland-client +Requires: libxkbcommon +Requires: gdk-pixbuf2 +Requires: libthai +Requires: nettle +Requires: avahi-libs +Requires: libXfixes +Requires: libjpeg-turbo +Requires: sqlite-libs +Requires: json-glib +Requires: libdatrie +Requires: libxml2 +Requires: libbrotli +Requires: cairo +Requires: xz-libs +Requires: libxcb +Requires: nss-util +Requires: nss +Requires: dbus-libs +Requires: mesa-libgbm +Requires: at-spi2-atk +Requires: expat +Requires: alsa-lib + +%description +Signal Desktop links with Signal on Android or iOS and lets you message from your Windows, macOS, and Linux computers. + +%prep +%autosetup -n Signal-Desktop-%{version} -p1 + +%build +pnpm install --frozen-lockfile +pnpm --prefix sticker-creator install +pnpm --prefix sticker-creator build +pnpm run build-linux --dir + +%install +install -Dm755 release/linux-%{arch}unpacked/libEGL.so %{buildroot}%{_libdir}/signal-desktop/libEGL.so +install -Dm755 release/linux-%{arch}unpacked/libGLESv2.so %{buildroot}%{_libdir}/signal-desktop/libGLESv2.so +install -Dm755 release/linux-%{arch}unpacked/libffmpeg.so %{buildroot}%{_libdir}/signal-desktop/libffmpeg.so +install -Dm755 release/linux-%{arch}unpacked/libvk_swiftshader.so %{buildroot}%{_libdir}/signal-desktop/libvk_swiftshader.so +install -Dm755 release/linux-%{arch}unpacked/libvulkan.so.1 %{buildroot}%{_libdir}/signal-desktop/libvulkan.so.1 +install -Dm644 release/linux-%{arch}unpacked/icudtl.dat %{buildroot}%{_libdir}/signal-desktop/icudtl.dat +install -Dm644 release/linux-%{arch}unpacked/v8_context_snapshot.bin %{buildroot}%{_libdir}/signal-desktop/v8_context_snapshot.bin +install -Dm644 release/linux-%{arch}unpacked/chrome_100_percent.pak %{buildroot}%{_libdir}/signal-desktop/chrome_100_percent.pak +install -Dm644 release/linux-%{arch}unpacked/chrome_200_percent.pak %{buildroot}%{_libdir}/signal-desktop/chrome_200_percent.pak +install -Dm644 release/linux-%{arch}unpacked/resources.pak %{buildroot}%{_libdir}/signal-desktop/resources.pak +install -Dm644 release/linux-%{arch}unpacked/vk_swiftshader_icd.json %{buildroot}%{_libdir}/signal-desktop/vk_swiftshader_icd.json +install -Dm644 release/linux-%{arch}unpacked/resources/app.asar %{buildroot}%{_libdir}/signal-desktop/resources/app.asar +cp -r release/linux-%{arch}unpacked/resources/app.asar.unpacked %{buildroot}%{_libdir}/signal-desktop/resources/ + +install -Dm755 release/linux-%{arch}unpacked/chrome-sandbox %{buildroot}%{_libdir}/signal-desktop/chrome-sandbox +install -Dm755 release/linux-%{arch}unpacked/chrome_crashpad_handler %{buildroot}%{_libdir}/signal-desktop/chrome_crashpad_handler + +install -Dm755 release/linux-%{arch}unpacked/signal-desktop %{buildroot}%{_libdir}/signal-desktop/signal-desktop + +install -Dm644 release/linux-%{arch}unpacked/resources/org.signalapp.view-aep.policy %{buildroot}%{_datadir}/polkit-1/rules.d/org.signalapp.view-aep.policy +install -Dm644 release/linux-%{arch}unpacked/resources/org.signalapp.enable-backups.policy %{buildroot}%{_datadir}/polkit-1/rules.d/org.signalapp.enable-backups.policy + +install -Dm644 build/icons/png/1024x1024.png %{buildroot}%{_iconsdir}/hicolor/1024x1024/apps/signal.png +install -Dm644 build/icons/png/128x128.png %{buildroot}%{_iconsdir}/hicolor/128x128/apps/signal.png +install -Dm644 build/icons/png/16x16.png %{buildroot}%{_iconsdir}/hicolor/16x16/apps/signal.png +install -Dm644 build/icons/png/24x24.png %{buildroot}%{_iconsdir}/hicolor/24x24/apps/signal.png +install -Dm644 build/icons/png/256x256.png %{buildroot}%{_iconsdir}/hicolor/256x256/apps/signal.png +install -Dm644 build/icons/png/32x32.png %{buildroot}%{_iconsdir}/hicolor/32x32/apps/signal.png +install -Dm644 build/icons/png/48x48.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/signal.png +install -Dm644 build/icons/png/512x512.png %{buildroot}%{_iconsdir}/hicolor/512x512/apps/signal.png +install -Dm644 build/icons/png/64x64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/signal.png + +install -Dm644 %{SOURCE1} %{buildroot}%{_datadir}/applications/signal.desktop +mkdir -p %buildroot%_bindir +ln -s %_libdir/signal-desktop/signal-desktop %buildroot%_bindir/signal-desktop + +%files +%license LICENSE +%doc README.md CONTRIBUTING.md ACKNOWLEDGMENTS.md +%license release/linux-%{arch}unpacked/LICENSE.electron.txt +%license release/linux-%{arch}unpacked/LICENSES.chromium.html +%{_bindir}/signal-desktop +%{_libdir}/signal-desktop/ +%{_datadir}/polkit-1/rules.d/org.signalapp.view-aep.policy +%{_datadir}/polkit-1/rules.d/org.signalapp.enable-backups.policy +%{_datadir}/applications/signal.desktop +%{_iconsdir}/hicolor/1024x1024/apps/signal.png +%{_iconsdir}/hicolor/128x128/apps/signal.png +%{_iconsdir}/hicolor/16x16/apps/signal.png +%{_iconsdir}/hicolor/24x24/apps/signal.png +%{_iconsdir}/hicolor/256x256/apps/signal.png +%{_iconsdir}/hicolor/32x32/apps/signal.png +%{_iconsdir}/hicolor/48x48/apps/signal.png +%{_iconsdir}/hicolor/512x512/apps/signal.png +%{_iconsdir}/hicolor/64x64/apps/signal.png + +%changelog +* Fri Aug 8 2025 june-fish +- Initial Package diff --git a/anda/apps/signal-desktop/signal.desktop b/anda/apps/signal-desktop/signal.desktop new file mode 100644 index 0000000000..9ed98565b9 --- /dev/null +++ b/anda/apps/signal-desktop/signal.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name=Signal +Exec=signal-desktop %U +Terminal=false +Type=Application +Icon=signal +StartupWMClass=Signal +Comment=Private messaging from your desktop +MimeType=x-scheme-handler/sgnl;x-scheme-handler/signalcaptcha; +Categories=Network;InstantMessaging;Chat; +X-Desktop-File-Install-Version=0.27 +X-Purism-FormFactor=Workstation;Mobile; +X-Flatpak-RenamedFrom=signal-desktop.desktop; diff --git a/anda/apps/signal-desktop/update.rhai b/anda/apps/signal-desktop/update.rhai new file mode 100644 index 0000000000..7fd6d29321 --- /dev/null +++ b/anda/apps/signal-desktop/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("signalapp/Signal-Desktop")); diff --git a/anda/apps/subtitleedit/subtitleedit.spec b/anda/apps/subtitleedit/subtitleedit.spec index 61d3a6fdac..22b5a06c00 100644 --- a/anda/apps/subtitleedit/subtitleedit.spec +++ b/anda/apps/subtitleedit/subtitleedit.spec @@ -2,8 +2,8 @@ %global realname subtitleedit Name: %realname.bin -Version: 4.0.12 -Release: 2%?dist +Version: 4.0.13 +Release: 1%?dist Summary: An advanced subtitle editor and converter License: GPL-3.0-only URL: https://www.nikse.dk/SubtitleEdit diff --git a/anda/apps/switcheroo-control/switcheroo-control.spec b/anda/apps/switcheroo-control/switcheroo-control.spec index 11f83f1462..c4979b42dc 100644 --- a/anda/apps/switcheroo-control/switcheroo-control.spec +++ b/anda/apps/switcheroo-control/switcheroo-control.spec @@ -1,6 +1,6 @@ Name: switcheroo-control -Version: 2.6 -Release: 9%{?dist} +Version: 3.0 +Release: 1%?dist Summary: D-Bus service to check the availability of dual-GPU License: GPLv3 diff --git a/anda/apps/throne/.gitignore b/anda/apps/throne/.gitignore new file mode 100644 index 0000000000..5905086069 --- /dev/null +++ b/anda/apps/throne/.gitignore @@ -0,0 +1,2 @@ +Throne-* +*.tar.gz diff --git a/anda/apps/throne/Sagernet.SingBox.Version.txt b/anda/apps/throne/Sagernet.SingBox.Version.txt new file mode 100644 index 0000000000..6741c5e834 --- /dev/null +++ b/anda/apps/throne/Sagernet.SingBox.Version.txt @@ -0,0 +1 @@ +v1.11.15 \ No newline at end of file diff --git a/anda/apps/nekoray/anda.hcl b/anda/apps/throne/anda.hcl similarity index 52% rename from anda/apps/nekoray/anda.hcl rename to anda/apps/throne/anda.hcl index b122b1135d..443d6eedde 100644 --- a/anda/apps/nekoray/anda.hcl +++ b/anda/apps/throne/anda.hcl @@ -1,5 +1,5 @@ project pkg { rpm { - spec = "nekoray.spec" + spec = "throne.spec" } } diff --git a/anda/apps/nekoray/nekoray.desktop b/anda/apps/throne/throne.desktop similarity index 100% rename from anda/apps/nekoray/nekoray.desktop rename to anda/apps/throne/throne.desktop diff --git a/anda/apps/nekoray/nekoray.sh b/anda/apps/throne/throne.sh similarity index 100% rename from anda/apps/nekoray/nekoray.sh rename to anda/apps/throne/throne.sh diff --git a/anda/apps/throne/throne.spec b/anda/apps/throne/throne.spec new file mode 100644 index 0000000000..3e891d37fa --- /dev/null +++ b/anda/apps/throne/throne.spec @@ -0,0 +1,104 @@ +#? https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=throne-git + +Name: throne +Version: 1.0.5 +Release: 1%?dist +Summary: Qt based cross-platform GUI proxy configuration manager (backend: sing-box) +URL: https://github.com/throneproj/Throne +License: GPLv3 + +Obsoletes: nekoray < 4.3.7-2 + +Source0: https://github.com/throneproj/Throne/archive/refs/tags/%{version}.tar.gz#/throne-%{version}.tar.gz +Packager: bunzuhbu + +Source2: Sagernet.SingBox.Version.txt +%define singbox_version $(cat %{SOURCE2}) + +Source3: %{name}.desktop +Source4: %{name}.sh + +BuildRequires: rpm_macro(cmake) +BuildRequires: rpm_macro(cmake_build) +BuildRequires: rpm_macro(cmake_install) +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(protobuf) +BuildRequires: pkgconfig(libcurl) +BuildRequires: cmake(yaml-cpp) +BuildRequires: cmake(ZXing) +BuildRequires: cmake(absl) +BuildRequires: cmake(cpr) +BuildRequires: cmake(Qt6) +BuildRequires: cmake(Qt6Svg) +BuildRequires: cmake(Qt6Linguist) +BuildRequires: cmake(Qt6Charts) +BuildRequires: patchelf +BuildRequires: sed +BuildRequires: golang +BuildRequires: rpm_macro(gobuildflags) +BuildRequires: protobuf-compiler +Requires: %{name}-core +%define core throne_core + +%package core +Summary: %{summary} + +%description +%{summary} + +%description core +%{summary} + +%prep +%autosetup -p1 -n Throne-%{version} +sed -i 's~find_package(Protobuf CONFIG REQUIRED)~find_package(Protobuf REQUIRED)~' cmake/myproto.cmake +sed -i 's~add_library(qhotkey 3rdparty/QHotkey/qhotkey.cpp)~add_library(qhotkey STATIC 3rdparty/QHotkey/qhotkey.cpp)~' cmake/QHotkey.cmake +# sed -i 's~ImageFormat::BGRA~ImageFormat::BGR~' 3rdparty/ZxingQtReader.hpp +pushd core/server +export GOBIN=$(pwd)/gobin +export PATH="${PATH}:${GOBIN}" +go install google.golang.org/protobuf/cmd/protoc-gen-go@latest +go install github.com/chai2010/protorpc/protoc-gen-protorpc@latest + +cd gen +protoc -I . --go_out=. --protorpc_out=. libcore.proto + +%build +%cmake +%cmake_build +DEST=$PWD/%{__cmake_builddir}/%{core} +pushd core/server +export GOBIN=$(pwd)/gobin +export PATH="${PATH}:${GOBIN}" +%define currentgoldflags -w -s -X github.com/sagernet/sing-box/constant.Version=%{singbox_version} +%define gomodulesmode GO111MODULE=on +%define build_ldflags %nil +export GO_LDFLAGS=' ' +export GO_BUILDTAGS="with_clash_api with_gvisor with_quic with_wireguard with_utls with_dhcp with_tailscale" +%gobuild -o $DEST -mod=readonly -modcacherw +popd + +%install +install -Dm755 %__cmake_builddir/Throne %buildroot%_libdir/%name/%name +install -Dm755 %__cmake_builddir/%core %buildroot%_libdir/%name/%core +install -Dpm755 %{SOURCE4} %{buildroot}%{_bindir}/%{name} +install -Dpm644 %{SOURCE3} %{buildroot}%{_datadir}/applications/%{name}.desktop +sed -i 's~/bin~%{_bindir}~g' %{buildroot}%{_datadir}/applications/%{name}.desktop +sed -i 's~/bin~%{_bindir}~g;s~/lib64~%{_libdir}~g' %{buildroot}%{_bindir}/%{name} +install -Dpm644 res/Throne.ico -t %buildroot%_iconsdir/ +install -Dpm644 res/public/Throne.png -t %buildroot%_datadir/pixmaps/ +patchelf --remove-rpath %{buildroot}%{_libdir}/%{name}/%{name} +patchelf --remove-rpath %{buildroot}%{_libdir}/%{name}/%{core} + +%files +%attr(0755, -, -) %{_bindir}/%{name} +%attr(0755, -, -) %{_libdir}/%{name}/%{name} +%attr(0644, -, -) %{_datadir}/icons/Throne.ico +%attr(0644, -, -) %{_datadir}/applications/%{name}.desktop +%_datadir/pixmaps/Throne.png + +%files core +%dir %{_libdir}/%{name} +%attr(0755, -, -) %{_libdir}/%{name}/%{core} + diff --git a/anda/apps/throne/update.rhai b/anda/apps/throne/update.rhai new file mode 100644 index 0000000000..0ca9d5a1a7 --- /dev/null +++ b/anda/apps/throne/update.rhai @@ -0,0 +1,3 @@ +rpm.version(find(`([\d.]+)-\d+-\d+-\d+`, gh_rawfile("throneproj/Throne", "dev", "throne_version.txt"), 1)); + +open_file("anda/apps/throne/Sagernet.SingBox.Version.txt", "w").write(gh("sagernet/sing-box")); diff --git a/anda/apps/vencord-desktop/anda.hcl b/anda/apps/vencord-desktop/anda.hcl deleted file mode 100644 index 3c5a144b6a..0000000000 --- a/anda/apps/vencord-desktop/anda.hcl +++ /dev/null @@ -1,5 +0,0 @@ -project "pkg" { - rpm { - spec = "vencord-desktop.spec" - } -} \ No newline at end of file diff --git a/anda/apps/vencord-desktop/.gitignore b/anda/apps/vesktop/.gitignore similarity index 100% rename from anda/apps/vencord-desktop/.gitignore rename to anda/apps/vesktop/.gitignore diff --git a/anda/apps/vesktop/anda.hcl b/anda/apps/vesktop/anda.hcl new file mode 100644 index 0000000000..458b87c9bc --- /dev/null +++ b/anda/apps/vesktop/anda.hcl @@ -0,0 +1,5 @@ +project "pkg" { + rpm { + spec = "vesktop.spec" + } +} diff --git a/anda/apps/vencord-desktop/update.rhai b/anda/apps/vesktop/update.rhai similarity index 100% rename from anda/apps/vencord-desktop/update.rhai rename to anda/apps/vesktop/update.rhai diff --git a/anda/apps/vencord-desktop/vencord-desktop.spec b/anda/apps/vesktop/vesktop.spec similarity index 73% rename from anda/apps/vencord-desktop/vencord-desktop.spec rename to anda/apps/vesktop/vesktop.spec index afcef180fd..cd9b00c004 100644 --- a/anda/apps/vencord-desktop/vencord-desktop.spec +++ b/anda/apps/vesktop/vesktop.spec @@ -4,10 +4,11 @@ %global __requires_exclude libffmpeg.so %global __provides_exclude_from %{_datadir}/vesktop/.*\\.so -Name: vencord-desktop -Provides: VencordDesktop = %{version}-%{release} -Version: 1.5.6 -Release: 1%?dist +Name: vesktop +Obsoletes: VencordDesktop < 1.5.8-1 +Obsoletes: vencord-desktop < 1.5.8-1 +Version: 1.5.8 +Release: 2%?dist License: GPL-3.0 Summary: Vesktop is a cross platform desktop app aiming to give you a snappier Discord experience with Vencord pre-installed URL: https://github.com/Vencord/Vesktop @@ -35,18 +36,18 @@ Name=Vesktop Comment=%summary GenericName=Internet Messenger Type=Application -Exec=/usr/bin/vencorddesktop +Exec=/usr/bin/vesktop Icon=vesktop Categories=Network;InstantMessaging; -StartupWMClass=VencordDesktop +StartupWMClass=vesktop Keywords=discord;vesktop;vencord;shelter;armcord;electron; EOF %build -npx pnpm@8 install --no-frozen-lockfile -npx pnpm@8 package:dir +npx pnpm install --no-frozen-lockfile +npx pnpm package:dir %install @@ -54,21 +55,24 @@ npx pnpm@8 package:dir mkdir -p %buildroot/usr/share/vesktop cp -r dist/*-unpacked/. %buildroot/usr/share/vesktop/. -install -Dm755 dist/*-unpacked/vencorddesktop %buildroot/usr/bin/vencorddesktop -ln -sf /usr/share/vesktop/vencorddesktop %buildroot/usr/bin/vencorddesktop +install -Dm755 dist/*-unpacked/vesktop %buildroot/usr/bin/vesktop +ln -sf /usr/share/vesktop/vesktop %buildroot/usr/bin/vesktop +ln -sf /usr/bin/vesktop %buildroot/usr/bin/vencorddesktop install -Dm644 vesktop.desktop %buildroot/usr/share/applications/vesktop.desktop install -Dm644 build/icon.png %buildroot/usr/share/pixmaps/vesktop.png %files %doc README.md %license LICENSE +/usr/bin/vesktop /usr/bin/vencorddesktop /usr/share/applications/vesktop.desktop /usr/share/pixmaps/vesktop.png /usr/share/vesktop/* %changelog +* Thu Jul 24 2025 Atmois - 1.5.8-2 +- Rename from vencord-desktop to vesktop and amend the spec file accordingly * Tue Nov 07 2023 Cappy Ishihara - 0.4.3-1 - Initial package - diff --git a/anda/apps/voicevox/voicevox.spec b/anda/apps/voicevox/voicevox.spec index 33b49aa934..8bb281d576 100644 --- a/anda/apps/voicevox/voicevox.spec +++ b/anda/apps/voicevox/voicevox.spec @@ -13,8 +13,8 @@ %global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ Name: voicevox -Version: 0.23.0 -Release: 2%?dist +Version: 0.24.2 +Release: 1%?dist Summary: Free Japanese text-to-speech editor License: LGPL-3.0 URL: https://voicevox.hiroshiba.jp diff --git a/anda/apps/vpkedit/anda.hcl b/anda/apps/vpkedit/anda.hcl new file mode 100644 index 0000000000..5d7de00c43 --- /dev/null +++ b/anda/apps/vpkedit/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "vpkedit.spec" + } +} diff --git a/anda/apps/vpkedit/update.rhai b/anda/apps/vpkedit/update.rhai new file mode 100644 index 0000000000..5dd599ac04 --- /dev/null +++ b/anda/apps/vpkedit/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("craftablescience/VPKEdit")); diff --git a/anda/apps/vpkedit/vpkedit.spec b/anda/apps/vpkedit/vpkedit.spec new file mode 100644 index 0000000000..4c16ba627b --- /dev/null +++ b/anda/apps/vpkedit/vpkedit.spec @@ -0,0 +1,55 @@ +Name: vpkedit +Version: 5.0.0.1 +Release: 1%?dist +Summary: A CLI/GUI tool to create, read, and write several pack file formats +License: MIT +URL: https://github.com/craftablescience/VPKEdit +Requires: qt6-qtbase hicolor-icon-theme +Suggests: qt6-qtwayland +Packager: madonuko +BuildRequires: cmake git-core gcc gcc-c++ binutils +BuildRequires: cmake(Qt6) +BuildRequires: cmake(Qt6Svg) +BuildRequires: cmake(Qt6Linguist) +BuildRequires: cmake(Qt6Charts) +BuildRequires: cmake(Qt6LinguistTools) +ExclusiveArch: x86_64 + +%description +VPKEdit is an open source MIT-licensed tool that can extract from, preview the +contents of and write to several pack file formats. It also supports creating +new VPKs. + + +%prep +%git_clone %url v%version + + +%build +%cmake -DCMAKE_INSTALL_PREFIX=%_libdir/%name \ + -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release +# -DVPKEDIT_BUILD_LIBC=ON +%cmake_build + + +%install +%cmake_install +pushd %buildroot%_libdir/%name +rm -rf {libQt*,*.md,LICENSE} +popd +ln -sf %_libdir/vpkedit/vpkedit %buildroot%_bindir/vpkedit +ln -sf %_libdir/vpkedit/vpkeditcli %buildroot%_bindir/vpkeditcli +sed -i 's@Exec=/opt/vpkedit/@Exec=@g' %buildroot%_datadir/applications/vpkedit.desktop + + +%files +%doc README.md CREDITS.md +%license LICENSE +%_bindir/vpkedit +%_bindir/vpkeditcli +%_libdir/%name/ +%_datadir/applications/vpkedit.desktop +%_iconsdir/hicolor/128x128/mimetypes/application-x-vpkedit.png +%_datadir/mime/packages/vpkedit.xml +%_datadir/pixmaps/vpkedit.png diff --git a/anda/apps/winetricks/git/winetricks-git.spec b/anda/apps/winetricks/git/winetricks-git.spec index 881a9d4fa8..3af3fe81c2 100644 --- a/anda/apps/winetricks/git/winetricks-git.spec +++ b/anda/apps/winetricks/git/winetricks-git.spec @@ -1,13 +1,13 @@ # Fedora sometimes sources the snapshots under stable versions and just bumps release # For user clarity I have separated these into different packages -%global commit 00427b67de70bfefd282d0abc7edd1daa442e73e +%global commit 9a399f26a42db7c0c8c9c9688c8b98ffc38d22f6 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global ver 20250102 -%global commit_date 20250504 +%global commit_date 20250826 Name: winetricks-git Version: %{ver}^%{commit_date}git.%{shortcommit} -Release: 1%{?dist} +Release: 1%?dist Summary: Work around common problems in Wine; Winetricks Git builds License: LGPL-2.1-or-later URL: https://github.com/Winetricks/winetricks diff --git a/anda/apps/woeusb-ng/WoeUSB-ng.spec b/anda/apps/woeusb-ng/WoeUSB-ng.spec index cdb0820207..ae716fe328 100644 --- a/anda/apps/woeusb-ng/WoeUSB-ng.spec +++ b/anda/apps/woeusb-ng/WoeUSB-ng.spec @@ -1,6 +1,6 @@ Name: WoeUSB-ng Version: 0.2.12 -Release: 1%?dist +Release: 2%?dist Summary: Simple tool that enable you to create your own usb stick with Windows installer License: GPL-3.0-only Requires: parted dosfstools ntfsprogs p7zip p7zip-plugins xdg-utils grub2-tools @@ -8,28 +8,44 @@ URL: https://github.com/WoeUSB/WoeUSB-ng Source: https://github.com/WoeUSB/WoeUSB-ng/archive/refs/tags/v%version.tar.gz Patch0: https://patch-diff.githubusercontent.com/raw/WoeUSB/WoeUSB-ng/pull/79.patch BuildArch: noarch -BuildRequires: python3-devel python3-installer +Requires: python3-%{name} = %{evr} +BuildRequires: anda-srpm-macros python3-devel python3-installer pyproject-rpm-macros python3dist(pip) python3dist(setuptools) python3dist(termcolor) python3dist(wxpython) python3dist(wheel) %global _description %{expand: WoeUSB-ng is a simple tool that enable you to create your own usb stick windows installer from an iso image or a real DVD. This is a rewrite of original WoeUSB.} %description %_description +%package -n python3-%{name} +Summary: Python files for %{name} +Requires: %{name} = %{evr} +BuildArch: noarch + +%description -n python3-%{name} +Python files needed for %{name}. + %prep %autosetup -p1 - +%if 0%{?fedora} > 41 %generate_buildrequires %pyproject_buildrequires - +%endif %build +%if 0%{?fedora} <= 41 +%py3_build +%else %pyproject_wheel - +%endif %install +%if 0%{?fedora} <= 41 +%py3_install +%else %pyproject_install %pyproject_save_files WoeUSB +%endif install -Dpm644 miscellaneous/WoeUSB-ng.desktop %buildroot%_datadir/applications/WoeUSB-ng.desktop install -Dpm644 miscellaneous/com.github.woeusb.woeusb-ng.policy %buildroot%_datadir/polkit-1/actions/com.github.woeusb.woeusb-ng.policy @@ -37,14 +53,21 @@ install -Dpm644 miscellaneous/com.github.woeusb.woeusb-ng.policy %buildroot%_dat %check #pyproject_check_import - -%files -f %{pyproject_files} +%files %_bindir/woeusb %_bindir/woeusbgui %_datadir/applications/WoeUSB-ng.desktop %_iconsdir/hicolor/scalable/apps/woeusb-logo.png %_datadir/polkit-1/actions/com.github.woeusb.woeusb-ng.policy +%if 0%{?fedora} <= 41 +%files -n python3-%{name} +%{python3_sitelib}/WoeUSB/ +%{python3_sitelib}/woeusb_ng-%{version}-py%{python3_version}.egg-info/ +%else +%files -n python3-%{name} -f %{pyproject_files} +%endif + %changelog %autochangelog diff --git a/anda/apps/woeusb-ng/anda.hcl b/anda/apps/woeusb-ng/anda.hcl index f729a2237e..33d5f43947 100644 --- a/anda/apps/woeusb-ng/anda.hcl +++ b/anda/apps/woeusb-ng/anda.hcl @@ -1,4 +1,5 @@ project pkg { + arches = ["x86_64"] rpm { spec = "WoeUSB-ng.spec" } diff --git a/anda/apps/youtube-music/youtube-music.spec b/anda/apps/youtube-music/youtube-music.spec index 63b273c34f..03419406ed 100644 --- a/anda/apps/youtube-music/youtube-music.spec +++ b/anda/apps/youtube-music/youtube-music.spec @@ -12,7 +12,7 @@ %global vendor_pnpm 1 Name: youtube-music -Version: 3.9.0 +Version: 3.10.0 Release: 1%?dist Summary: YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader) Source1: youtube-music.desktop @@ -53,7 +53,7 @@ git checkout v%{version} %if 0%{?vendor_pnpm} curl -fsSL https://get.pnpm.io/install.sh | sh - source $HOME/.bashrc -pnpm env use --global 20 +pnpm env use --global 22 %endif pnpm install pnpm build diff --git a/anda/desktops/compiz9/compiz9.spec b/anda/desktops/compiz9/compiz9.spec index 60c26e3f7e..cdd86817a6 100644 --- a/anda/desktops/compiz9/compiz9.spec +++ b/anda/desktops/compiz9/compiz9.spec @@ -1,4 +1,4 @@ -%define _ubuntu_rel 22.10.20220822-0ubuntu15 +%define _ubuntu_rel 22.10.20220822-0ubuntu16 %global _hardened_build 0 %global build_cflags %{__build_flags_lang_c} -Wno-incompatible-pointer-types diff --git a/anda/desktops/gnome/gnome-shell/gnome-shell.spec b/anda/desktops/gnome/gnome-shell/gnome-shell.spec index 96adf2db24..be6afac342 100644 --- a/anda/desktops/gnome/gnome-shell/gnome-shell.spec +++ b/anda/desktops/gnome/gnome-shell/gnome-shell.spec @@ -10,7 +10,7 @@ Name: gnome-shell Version: %{major_version}.%{minor_version} -Release: 1%{?dist}.switcheroo +Release: 3%{?dist}.switcheroo Summary: Window management and application launching for GNOME Provides: gnome-shell.switcheroo = %version-%release diff --git a/anda/desktops/gnome/nautilus-open-any-terminal/anda.hcl b/anda/desktops/gnome/nautilus-open-any-terminal/anda.hcl new file mode 100644 index 0000000000..9a04b951e5 --- /dev/null +++ b/anda/desktops/gnome/nautilus-open-any-terminal/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "nautilus-open-any-terminal.spec" + } +} diff --git a/anda/desktops/gnome/nautilus-open-any-terminal/nautilus-open-any-terminal.spec b/anda/desktops/gnome/nautilus-open-any-terminal/nautilus-open-any-terminal.spec new file mode 100644 index 0000000000..62b31839ba --- /dev/null +++ b/anda/desktops/gnome/nautilus-open-any-terminal/nautilus-open-any-terminal.spec @@ -0,0 +1,101 @@ +%global pypi_name nautilus_open_any_terminal + +Name: nautilus-open-any-terminal +Version: 0.6.1 +Release: 2%?dist +Summary: Context-menu entry for opening other terminal in Nautilus +License: GPL-3.0-only +URL: https://github.com/Stunkymonkey/nautilus-open-any-terminal +Source0: %{pypi_source} +Source1: https://raw.githubusercontent.com/Stunkymonkey/nautilus-open-any-terminal/refs/tags/%version/README.md +Source2: https://raw.githubusercontent.com/Stunkymonkey/nautilus-open-any-terminal/refs/tags/%version/LICENSE +Packager: madonuko + +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools-scm) +BuildRequires: python3dist(pip) +BuildRequires: gettext +Requires: python3-%{name} = %{version}-%{release} +Requires: %{name}-caja = %{version}-%{release} +Obsoletes: python3-%{name} < 0.6.1-2 + + +%global _description %{expand: +nautilus-open-any-terminal is an extension for nautilus, which adds an context-entry for opening other terminal emulators than `gnome-terminal`.} + +%description %_description + +%package -n %{name}-caja +Summary: Caja files for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description -n nautilus-open-any-terminal-caja +Python-caja files for %{name}. + + +%package -n python3-nautilus-open-any-terminal +Summary: Python files for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description -n python3-nautilus-open-any-terminal +Python files for %{name}. + + +%prep +%autosetup -n nautilus_open_any_terminal-%version +cp %{S:1} %{S:2} . + + +#generate_buildrequires +#pyproject_buildrequires + + +%build +%if 0%{?fedora} <= 41 +%py3_build +%else +%pyproject_wheel +%endif + + +%install +%if 0%{?fedora} <= 41 +%py3_install +%else +%pyproject_install +%pyproject_save_files -l %{pypi_name} +%endif + + +#check +#pyproject_check_import + +%files +%doc README.md +%license LICENSE +# These are GNOME config files +%_datadir/glib-2.0/schemas/com.github.stunkymonkey.nautilus-open-any-terminal.gschema.xml +%_datadir/locale/*/LC_MESSAGES/nautilus-open-any-terminal.mo +# As asinine as it is these don't belong in a Python subpackage because they're Nautilus files +%_datadir/nautilus-python/extensions/%{pypi_name}.py +%if 0%{?fedora} > 41 +%_datadir/nautilus-python/extensions/__pycache__/%{pypi_name}.cpython-*.pyc +%endif + +%files -n %{name}-caja +# Congratulations! You have discovered a -caja subpackage +%_datadir/caja-python/extensions/nautilus_open_any_terminal.py +%if 0%{?fedora} > 41 +%_datadir/caja-python/extensions/__pycache__/%{pypi_name}.cpython-*.pyc +%endif + +%if 0%{?fedora} <= 41 +%files -n python3-nautilus-open-any-terminal +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%files -n python3-nautilus-open-any-terminal -f %{pyproject_files} +%endif diff --git a/anda/desktops/gnome/nautilus-open-any-terminal/update.rhai b/anda/desktops/gnome/nautilus-open-any-terminal/update.rhai new file mode 100644 index 0000000000..646e43ed9b --- /dev/null +++ b/anda/desktops/gnome/nautilus-open-any-terminal/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("nautilus_open_any_terminal")); diff --git a/anda/desktops/kde/kf6-kio/anda.hcl b/anda/desktops/kde/kf6-kio/anda.hcl index 24de21b76f..c848a83927 100644 --- a/anda/desktops/kde/kf6-kio/anda.hcl +++ b/anda/desktops/kde/kf6-kio/anda.hcl @@ -5,5 +5,6 @@ project pkg { labels { subrepo = "extras" updbranch = 1 + mock = 1 } } diff --git a/anda/desktops/kde/kf6-kio/kf6-kio.spec b/anda/desktops/kde/kf6-kio/kf6-kio.spec index 6f8a8e9d29..22da5f23dc 100644 --- a/anda/desktops/kde/kf6-kio/kf6-kio.spec +++ b/anda/desktops/kde/kf6-kio/kf6-kio.spec @@ -1,20 +1,22 @@ %global framework kio %global stable_kf6 stable -%global majmin_ver_kf6 6.14 +%global majmin_ver_kf6 6.17 +%global ecm_ver 6.17.0 +%global ecm_rel 1 Name: kf6-%{framework} Version: %{majmin_ver_kf6}.0 -Release: 3%{?dist}.switcheroo +Release: 1%{?dist}.switcheroo Summary: KDE Frameworks 6 Tier 3 solution for filesystem abstraction -Provides: kf6-%{framework}.switcheroo = %version-%release -Obsoletes: kf6-%{framework}.switcheroo < 6.13.0-2 +Obsoletes: kf6-%{framework}.switcheroo < 6.14.0-4 License: BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND (GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only) AND MIT URL: https://invent.kde.org/frameworks/%{framework} Source0: https://download.kde.org/%{stable_kf6}/frameworks/%{majmin_ver_kf6}/%{framework}-%{version}.tar.xz +Source1: https://download.kde.org/%{stable_kf6}/frameworks/%{majmin_ver_kf6}/%{framework}-%{version}.tar.xz.sig # https://invent.kde.org/frameworks/kio/-/issues/26 # I'm not sending this upstream because I'm not sure it's really @@ -28,9 +30,6 @@ Patch0: 0001-Give-the-kuriikwsfiltereng_private-a-VERSION-and-SOV.patch Patch101: kio-no-help-protocol.patch %endif -# https://invent.kde.org/frameworks/kio/-/merge_requests/1556 -Patch201: 1556.patch - Provides: kf6-%{framework} BuildRequires: extra-cmake-modules BuildRequires: gcc-c++ @@ -102,7 +101,7 @@ Requires: cmake(KF6Solid) Requires: cmake(KF6XmlGui) Requires: cmake(KF6WindowSystem) Requires: qt6-qtbase-devel -Provides: kf6-kio-devel = %version-%release +Obsoletes: kf6-kio.switcheroo-devel < 6.14.0-4 %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. @@ -111,8 +110,7 @@ developing applications that use %{name}. Summary: Documentation files for %{name} Requires: %{name}-core = %{version}-%{release} BuildArch: noarch -Provides: kf6-kio-doc = %version-%release -Obsoletes: kf6-kio-doc <= %version-%release +Obsoletes: kf6-kio.switcheroo-doc < 6.14.0-4 %description doc Documentation for %{name}. @@ -123,16 +121,14 @@ Requires: %{name}-core-libs%{?_isa} = %{version}-%{release} Requires: %{name}-doc = %{version}-%{release} Requires: kf6-filesystem Recommends: switcheroo-control -Provides: kf6-kio-core = %version-%release -Obsoletes: kf6-kio-core <= %version-%release +Obsoletes: kf6-kio.switcheroo-core < 6.14.0-4 %description core KIOCore library provides core non-GUI components for working with KIO. %package core-libs Summary: Runtime libraries for KIO Core Requires: %{name}-core%{?_isa} = %{version}-%{release} -Provides: kf6-kio-core-libs = %version-%release -Obsoletes: kf6-kio-core-libs <= %version-%release +Obsoletes: kf6-kio.switcheroo-core-libs < 6.14.0-4 %description core-libs %{summary}. @@ -142,8 +138,7 @@ Summary: Widgets for KIO Framework ## included here for completeness, even those -core already has a dependency. %{?kf6_kinit_requires} Requires: %{name}-core%{?_isa} = %{version}-%{release} -Provides: kf6-kio-widgets = %version-%release -Obsoletes: kf6-kio-widgets <= %version-%release +Obsoletes: kf6-kio.switcheroo-widgets < 6.14.0-4 %description widgets KIOWidgets contains classes that provide generic job control, progress reporting, etc. @@ -151,16 +146,14 @@ reporting, etc. %package widgets-libs Summary: Runtime libraries for KIO Widgets library Requires: %{name}-widgets%{?_isa} = %{version}-%{release} -Provides: kf6-kio-widgets-libs = %version-%release -Obsoletes: kf6-kio-widgets-libs <= %version-%release +Obsoletes: kf6-kio.switcheroo-widgets-libs < 6.14.0-4 %description widgets-libs %{summary}. %package file-widgets Summary: Widgets for file-handling for KIO Framework Requires: %{name}-widgets%{?_isa} = %{version}-%{release} -Provides: kf6-kio-file-widgets = %version-%release -Obsoletes: kf6-kio-file-widgets <= %version-%release +Obsoletes: kf6-kio.switcheroo-file-widgets < 6.14.0-4 %description file-widgets The KIOFileWidgets library provides the file selection dialog and its components. @@ -169,18 +162,23 @@ its components. Summary: Gui components for the KIO Framework Requires: %{name}-core%{?_isa} = %{version}-%{release} Provides: kf6-kio-gui = %version-%release -Obsoletes: kf6-kio-gui <= %version-%release +Obsoletes: kf6-kio.switcheroo-gui < 6.14.0-4 %description gui %{summary}. %package qch-doc Summary: Developer Documentation files for %{name} BuildArch: noarch -Provides: kf6-kio-qch-doc = %version-%release -Obsoletes: kf6-kio-qch-doc <= %version-%release +Obsoletes: kf6-kio.switcheroo-qch-doc < 6.14.0-4 %description qch-doc Developer Documentation files for %{name} for use with KDevelop or QtCreator. +%package html +Summary: Developer Documentation files for %{name} +BuildArch: noarch +%description html +Developer Documentation files for %{name} in HTML format + %prep %autosetup -n %{framework}-%{version} -p1 @@ -188,11 +186,11 @@ Developer Documentation files for %{name} for use with KDevelop or QtCreator. %build %cmake_kf6 -%cmake_build +%cmake_build_kf6 %install -%cmake_install +%cmake_install_kf6 %find_lang kf6-kio --all-name --with-man --with-html %files @@ -239,11 +237,17 @@ Developer Documentation files for %{name} for use with KDevelop or QtCreator. %{_kf6_libdir}/cmake/KF6KIO/ %{_kf6_datadir}/kdevappwizard/templates/kioworker6.tar.bz2 %{_kf6_qtplugindir}/designer/kio6widgets.so -%{_qt6_docdir}/*.tags +%{_qt6_docdir}/*/*.tags +%{_qt6_docdir}/*/*.index %files qch-doc %{_qt6_docdir}/*.qch +%files html +%{_qt6_docdir}/*/* +%exclude %{_qt6_docdir}/*/*.tags +%exclude %{_qt6_docdir}/*/*.index + %changelog * Fri Feb 07 2025 Marc Deop i Argemí - 6.11.0-1 - 6.11.0 diff --git a/anda/desktops/kde/kf6-kio/update.rhai b/anda/desktops/kde/kf6-kio/update.rhai index 5825442cbd..9e455c5ee6 100644 --- a/anda/desktops/kde/kf6-kio/update.rhai +++ b/anda/desktops/kde/kf6-kio/update.rhai @@ -14,3 +14,7 @@ for entry in get(url).json().updates[0].title.split(' ') { } break; } + +let vr = bump::bodhi_vr("extra-cmake-modules", branch); +rpm.global("ecm_ver", vr[1]); +rpm.global("ecm_rel", vr[2]); diff --git a/anda/desktops/lomiri-unity/lomiri-system-settings/2002_use-Noto-font-instead-of-Ubuntu-font.patch b/anda/desktops/lomiri-unity/lomiri-system-settings/2002_use-Noto-font-instead-of-Ubuntu-font.patch new file mode 100644 index 0000000000..4b3558641e --- /dev/null +++ b/anda/desktops/lomiri-unity/lomiri-system-settings/2002_use-Noto-font-instead-of-Ubuntu-font.patch @@ -0,0 +1,26 @@ +Description: In Debian, use Noto Sans font, not Ubuntu font. +Author: Mike Gabriel +Forwarded: not needed, Debian-specific + +--- a/plugins/background/Components/ListItemsHeader.qml ++++ b/plugins/background/Components/ListItemsHeader.qml +@@ -44,7 +44,7 @@ + } + + color: theme.palette.normal.foregroundText +- font.family: "Ubuntu" ++ font.family: "Noto Sans" + fontSize: "medium" + elide: Text.ElideRight + textFormat: Text.PlainText +--- a/plugins/battery/PageComponent.qml ++++ b/plugins/battery/PageComponent.qml +@@ -138,7 +138,7 @@ + ctx.lineWidth = units.dp(2) + + var fontHeight = FontUtils.sizeToPixels("small") +- ctx.font="%1px Ubuntu".arg(fontHeight) ++ ctx.font="%1px Noto Sans".arg(fontHeight) + + ctx.translate(0, 1) + diff --git a/anda/desktops/lomiri-unity/lomiri-system-settings/2011_build-without-trust-store.patch b/anda/desktops/lomiri-unity/lomiri-system-settings/2011_build-without-trust-store.patch new file mode 100644 index 0000000000..de4dec4b0c --- /dev/null +++ b/anda/desktops/lomiri-unity/lomiri-system-settings/2011_build-without-trust-store.patch @@ -0,0 +1,121 @@ +Description: Disable all trust-store related settings. Not available in Debian. +Author: Mike Gabriel +Forwarded: not needed, Debian-specific + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,7 +53,7 @@ + pkg_check_modules(GIO REQUIRED gio-2.0 gio-unix-2.0) + pkg_check_modules(LIBSYSTEMD REQUIRED libsystemd) + pkg_check_modules(POLKIT_AGENT REQUIRED polkit-agent-1) +-pkg_check_modules(TRUST_STORE REQUIRED trust-store) ++#pkg_check_modules(TRUST_STORE REQUIRED trust-store) + pkg_search_module(UPOWER_GLIB REQUIRED upower-glib) + pkg_search_module(ACCOUNTSSERVICE REQUIRED accountsservice) + if (ENABLE_UBUNTU_ACCOUNTSSERVICE) +--- a/plugins/security-privacy/CMakeLists.txt ++++ b/plugins/security-privacy/CMakeLists.txt +@@ -18,8 +18,8 @@ + ${LIBSYSTEMD_LDFLAGS}) + + set(QML_SOURCES +- AppAccess.qml +- AppAccessControl.qml ++# AppAccess.qml ++# AppAccessControl.qml + here-terms.qml + Location.qml + LockSecurity.qml +@@ -37,8 +37,8 @@ + plugin.h + securityprivacy.cpp + securityprivacy.h +- trust-store-model.cpp +- trust-store-model.h ++# trust-store-model.cpp ++# trust-store-model.h + ) + add_library(LomiriSecurityPrivacyPanel MODULE ${PANEL_SOURCES} ${QML_SOURCES}) + +@@ -47,7 +47,7 @@ + QT_NO_KEYWORDS) + target_include_directories(LomiriSecurityPrivacyPanel PRIVATE + ${Intl_INCLUDE_DIRS} +- ${TRUST_STORE_INCLUDE_DIRS} ++# ${TRUST_STORE_INCLUDE_DIRS} + ${GLIB_INCLUDE_DIRS} + ) + target_link_libraries (LomiriSecurityPrivacyPanel +@@ -58,7 +58,7 @@ + Qt5::Quick + Qt5::DBus + LomiriSystemSettingsPrivate +- ${TRUST_STORE_LDFLAGS} ++# ${TRUST_STORE_LDFLAGS} + ${GLIB_LDFLAGS} + ) + +--- a/plugins/security-privacy/PageComponent.qml ++++ b/plugins/security-privacy/PageComponent.qml +@@ -64,15 +64,15 @@ + case 'location': + page = Qt.resolvedUrl("Location.qml"); + break; +- case 'permissions': +- page = Qt.resolvedUrl("AppAccess.qml") +- break; +- } +- } else if (pluginOptions && pluginOptions['service']) { +- // This whole else if branch will be removed once the +- // camera app asks for [1] as described in lp:1545733. +- // [1] settings:///system/permissions?service=camera +- page = Qt.resolvedUrl("AppAccess.qml"); ++// case 'permissions': ++// page = Qt.resolvedUrl("AppAccess.qml") ++// break; ++ } ++// } else if (pluginOptions && pluginOptions['service']) { ++// // This whole else if branch will be removed once the ++// // camera app asks for [1] as described in lp:1545733. ++// // [1] settings:///system/permissions?service=camera ++// page = Qt.resolvedUrl("AppAccess.qml"); + } + if (page) { + pageStack.addPageToNextColumn(root, page, opts); +@@ -222,10 +222,10 @@ + value: locationActionGroup.enabled.state + } + +- SettingsListItems.SingleValueProgression { +- text: i18n.tr("App permissions") +- onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager}) +- } ++// SettingsListItems.SingleValueProgression { ++// text: i18n.tr("App permissions") ++// onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager}) ++// } + } + } + } +--- a/plugins/security-privacy/plugin.cpp ++++ b/plugins/security-privacy/plugin.cpp +@@ -37,7 +37,7 @@ + Q_ASSERT(uri == QLatin1String("Lomiri.SystemSettings.SecurityPrivacy")); + qmlRegisterSingletonType(uri, 1, 0, "Connectivity", connectivitySingeltonProvider); + qmlRegisterType(uri, 1, 0, "LomiriSecurityPrivacyPanel"); +- qmlRegisterType(uri, 1, 0, "TrustStoreModel"); ++// qmlRegisterType(uri, 1, 0, "TrustStoreModel"); + } + + void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri) +--- a/tests/plugins/CMakeLists.txt ++++ b/tests/plugins/CMakeLists.txt +@@ -4,7 +4,7 @@ + add_subdirectory(bluetooth) + add_subdirectory(wifi) + add_subdirectory(notifications) +-add_subdirectory(security-privacy) ++#add_subdirectory(security-privacy) + + set(qmltest_DEFAULT_TARGETS qmluitests) + set(qmltest_DEFAULT_PROPERTIES ENVIRONMENT "LC_ALL=C") diff --git a/anda/desktops/lomiri-unity/lomiri-system-settings/2013_show-hotspot-on-desktop.patch b/anda/desktops/lomiri-unity/lomiri-system-settings/2013_show-hotspot-on-desktop.patch new file mode 100644 index 0000000000..2325e07504 --- /dev/null +++ b/anda/desktops/lomiri-unity/lomiri-system-settings/2013_show-hotspot-on-desktop.patch @@ -0,0 +1,24 @@ +Description: Show hotspot feature on any device, not just phones. +Author: Mike Gabriel +Forwarded: not yet, Debian-specific for now + +--- a/plugins/hotspot/hotspot.settings ++++ b/plugins/hotspot/hotspot.settings +@@ -6,7 +6,8 @@ + "category": "network", + "priority": 2, + "form-factors": [ +- "phone" ++ "phone", ++ "tablet" + ], + "keywords": [ + "network", +@@ -14,6 +15,6 @@ + "tethering" + ], + "has-dynamic-keywords": false, +- "has-dynamic-visibility": true, ++ "has-dynamic-visibility": false, + "page-component": "PageComponent.qml" + } diff --git a/anda/desktops/lomiri-unity/lomiri-system-settings/lomiri-system-settings.spec b/anda/desktops/lomiri-unity/lomiri-system-settings/lomiri-system-settings.spec index a022d19a34..7d4c10600d 100644 --- a/anda/desktops/lomiri-unity/lomiri-system-settings/lomiri-system-settings.spec +++ b/anda/desktops/lomiri-unity/lomiri-system-settings/lomiri-system-settings.spec @@ -1,5 +1,5 @@ %global forgeurl https://gitlab.com/ubports/development/core/lomiri-system-settings -%global commit 4be7393425a18bf911cf137cd86cf06589157cb0 +%global commit 392d3cda1731337264bd63ce16324c7ac10d9992 %forgemeta Name: lomiri-system-settings @@ -9,8 +9,9 @@ Summary: The system settings application for Lomiri License: GPLv3 URL: https://gitlab.com/ubports/development/core/lomiri-system-settings Source0: %{url}/-/archive/%commit/lomiri-system-settings-%commit.tar.gz -Patch0: https://sources.debian.org/data/main/l/lomiri-system-settings/1.3.1-2/debian/patches/2002_use-Noto-font-instead-of-Ubuntu-font.patch -Patch1: https://sources.debian.org/data/main/l/lomiri-system-settings/1.3.1-2/debian/patches/2011_build-without-trust-store.patch +Patch0: 2002_use-Noto-font-instead-of-Ubuntu-font.patch +Patch1: 2011_build-without-trust-store.patch +Patch2: 2013_show-hotspot-on-desktop.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -73,10 +74,10 @@ developing applications that use %{name}. %dir %{_datadir}/lomiri-system-settings %{_datadir}/lomiri-system-settings/*.settings %{_datadir}/lomiri-system-settings/*.svg -%{_datadir}/lomiri-system-settings/*.png +%dnl %{_datadir}/lomiri-system-settings/*.png %{_datadir}/lomiri-system-settings/url-map.ini -%dir %{_datadir}/lomiri-system-settings/icons -%{_datadir}/lomiri-system-settings/icons/*.svg +%dnl %dir %{_datadir}/lomiri-system-settings/icons +%dnl %{_datadir}/lomiri-system-settings/icons/*.svg %{_datadir}/lomiri-system-settings/qml-plugins/ %{_datadir}/lomiri-url-dispatcher/urls/lomiri-system-settings.url-dispatcher diff --git a/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec b/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec index 2dfbf3d923..89e4666c5b 100644 --- a/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec +++ b/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec @@ -85,7 +85,11 @@ Examples for Lomiri-ui-toolkit. %build %{qmake_qt5} 'CONFIG+=ubuntu-uitk-compat' 'CONFIG+=test' pushd tests/autopilot +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif popd %make_build @@ -97,7 +101,11 @@ rm -rf %{buildroot}%{_qt5_qmldir}/Extinct %fdupes %buildroot%_libdir/qt5/examples/%name/examples/ pushd tests/autopilot +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif mv lomiriuitoolkit/{tests,_custom_proxy_objects} -t %{buildroot}%{python3_sitelib}/lomiriuitoolkit/ popd @@ -147,7 +155,11 @@ popd %{python3_sitelib}/lomiriuitoolkit/_custom_proxy_objects/ %{python3_sitelib}/lomiriuitoolkit/__pycache__/ %{python3_sitelib}/lomiriuitoolkit/tests/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/lomiriuitoolkit-%{version}-py%{python3_version}.egg-info/ +%else %{python3_sitelib}/lomiriuitoolkit-%{version}.dist-info/ +%endif %files doc %license COPYING.CC-BY-SA-3.0 diff --git a/anda/desktops/lomiri-unity/unity-shell/unity-shell.spec b/anda/desktops/lomiri-unity/unity-shell/unity-shell.spec index db0267dd2e..b8816bd7b5 100644 --- a/anda/desktops/lomiri-unity/unity-shell/unity-shell.spec +++ b/anda/desktops/lomiri-unity/unity-shell/unity-shell.spec @@ -21,7 +21,7 @@ BuildRequires: pkgconfig(zeitgeist-2.0) BuildRequires: libappstream-glib-devel BuildRequires: libdbusmenu-devel BuildRequires: bamf-devel -BuildRequires: terra-libindicator-gtk3-devel +BuildRequires: libindicator-gtk3-devel BuildRequires: json-glib-devel BuildRequires: libnotify-devel BuildRequires: libsigc++20-devel @@ -30,6 +30,7 @@ BuildRequires: doxygen BuildRequires: pam-devel BuildRequires: boost-devel BuildRequires: python3-devel +BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: pkgconfig(libstartup-notification-1.0) BuildRequires: pkgconfig(nux-4.0) @@ -47,7 +48,7 @@ Requires: pam Requires: bamf-daemon Requires: unity-gtk-module-common Requires: compiz9 -Requires: terra-libindicator-gtk3 +Requires: libindicator-gtk3 Recommends: unity-greeter Recommends: unity-scope-home @@ -115,12 +116,20 @@ sed -i '/libgeis/d' CMakeLists.txt %cmake_build pushd uwidgets/ +%if 0%{?fedora} <= 41 %py3_build +%else +%pyproject_wheel +%endif popd %install pushd uwidgets/ +%if 0%{?fedora} <= 41 %py3_install +%else +%pyproject_install +%endif popd %cmake_install @@ -222,7 +231,11 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : %doc README %license uwidgets/LICENCE %{_bindir}/uwidgets-runner +%if 0%{?fedora} <= 41 %{python3_sitearch}/uwidgets-*.egg-info/ +%else +%{python3_sitearch}/uwidgets-*.dist-info/ +%endif %{python3_sitearch}/uwidgets/ %changelog diff --git a/anda/desktops/mate/tweak/mate-tweak.spec b/anda/desktops/mate/tweak/mate-tweak.spec index 3a84b0eea5..f7dfeb93db 100644 --- a/anda/desktops/mate/tweak/mate-tweak.spec +++ b/anda/desktops/mate/tweak/mate-tweak.spec @@ -8,7 +8,7 @@ License: GPL-2.0 URL: https://github.com/ubuntu-mate/mate-tweak Source0: %url/archive/refs/tags/%version.tar.gz Requires: python3 -BuildRequires: python3dist(setuptools) rpm_macro(py3_build) intltool desktop-file-utils +BuildRequires: python3dist(setuptools) python3-devel python3dist(pip) intltool desktop-file-utils %description This is MATE Tweak, a fork of mintDesktop. @@ -19,10 +19,21 @@ python3 -m ensurepip python3 -m pip install distutils-extra-python %build +%if 0%{?fedora} <= 41 %py3_build +%else +%pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 %py3_install +%else +%pyproject_install +desktop-file-install data/*.desktop +cp -r %{buildroot}%{python3_sitelib}%{_prefix} -t %{buildroot} --preserve=all +rm -rf %{buildroot}%{python3_sitelib}%{_prefix} +%endif %check desktop-file-validate %buildroot%_datadir/applications/*.desktop @@ -39,9 +50,13 @@ desktop-file-validate %buildroot%_datadir/applications/*.desktop %_datadir/applications/%name.desktop %_datadir/applications/marco-{glx,no-composite,xr_glx_hybrid,xrender}.desktop %_datadir/polkit-1/actions/org.mate.%name.policy -%ghost %_prefix/lib/python3.*/site-packages/__pycache__ -%ghost %_prefix/lib/python3.*/site-packages/setup.py -%ghost %_prefix/lib/python3.*/site-packages/mate_tweak-%version-py3.*.egg-info/ +%{python3_sitelib}/__pycache__/ +%{python3_sitelib}/setup.py +%if 0%{?fedora} <= 41 +%{python3_sitelib}/mate_tweak-%version-py3.*.egg-info/ +%else +%{python3_sitelib}/mate_tweak-%{version}.dist-info/ +%endif %changelog %autochangelog diff --git a/anda/desktops/swayfx/swayfx.spec b/anda/desktops/swayfx/swayfx.spec index ebfac78da7..06f88fbff5 100644 --- a/anda/desktops/swayfx/swayfx.spec +++ b/anda/desktops/swayfx/swayfx.spec @@ -1,8 +1,8 @@ %global swayVersion 1.10.1 Name: swayfx -Version: 0.5 -Release: 2%?dist +Version: 0.5.2 +Release: 1%?dist Summary: SwayFX: Sway, but with eye candy! URL: https://github.com/WillPower3309/swayfx @@ -33,8 +33,8 @@ BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-cursor) BuildRequires: pkgconfig(wayland-server) >= 1.21.0 BuildRequires: pkgconfig(wayland-protocols) >= 1.24 -BuildRequires: pkgconfig(scenefx-0.2) -BuildRequires: pkgconfig(wlroots-0.18) +BuildRequires: pkgconfig(scenefx-0.4) +BuildRequires: pkgconfig(wlroots-0.19) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xkbcommon) >= 1.5.0 @@ -149,4 +149,4 @@ install -d -m755 -pv %{buildroot}%{_sysconfdir}/sway/config.d %files wallpapers %license assets/LICENSE -%{_datadir}/backgrounds/sway \ No newline at end of file +%{_datadir}/backgrounds/sway diff --git a/anda/desktops/waylands/cliphist/golang-github-sentriz-cliphist.spec b/anda/desktops/waylands/cliphist/golang-github-sentriz-cliphist.spec index 4fdb679131..42e71bcdaf 100644 --- a/anda/desktops/waylands/cliphist/golang-github-sentriz-cliphist.spec +++ b/anda/desktops/waylands/cliphist/golang-github-sentriz-cliphist.spec @@ -23,7 +23,7 @@ Wayland clipboard manager with support for multimedia.} %global godocs CHANGELOG.md readme.md version.txt Name: cliphist -Release: 2%?dist +Release: 3%?dist Summary: Wayland clipboard manager with support for multimedia Provides: golang-github-sentriz-cliphist = %version-%release Obsoletes: golang-github-sentriz-cliphist < 0.6.1-2 @@ -40,20 +40,16 @@ BuildRequires: anda-srpm-macros %prep %goprep -A %autopatch -p1 -%go_prep_online - -#if %{without bootstrap} -#generate_buildrequires -#go_generate_buildrequires -#endif %if %{without bootstrap} %build -%go_build_online +%define gomodulesmode GO111MODULE=on +mkdir -p build/bin +%gobuild -o build/bin/%name %endif %install -#gopkginstall +%gopkginstall %if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp build/bin/%name %{buildroot}%{_bindir}/cliphist @@ -73,7 +69,7 @@ install -m 0755 -vp build/bin/%name %{buildroot}%{_bindir}/cliphist %{_bindir}/cliphist %endif -#gopkgfiles +%gopkgfiles %changelog %autochangelog diff --git a/anda/desktops/waylands/clipse/golang-github-savedra1-clipse.spec b/anda/desktops/waylands/clipse/golang-github-savedra1-clipse.spec index 5e5a464133..5df0deb132 100644 --- a/anda/desktops/waylands/clipse/golang-github-savedra1-clipse.spec +++ b/anda/desktops/waylands/clipse/golang-github-savedra1-clipse.spec @@ -24,9 +24,9 @@ Configurable TUI clipboard manager for Unix.} resources/test_data/top_secret_credentials.txt Name: clipse -Release: 2%?dist +Release: 3%?dist Summary: Configurable TUI clipboard manager for Unix -Provides: golang-github-savedra1-clipse = %version-%release +Provides: golang-github-savedra1-clipse = %evr Obsoletes: golang-github-savedra1-clipse < 1.1.0-2 Packager: madonuko License: MIT @@ -40,21 +40,17 @@ BuildRequires: anda-srpm-macros %prep %autosetup -p1 -n clipse-%version -%go_prep_online - -#if %{without bootstrap} -#generate_buildrequires -#go_generate_buildrequires -#endif +%goprep -A %if %{without bootstrap} %build mkdir -p build/bin -go build -ldflags="-linkmode=external" -o build/bin/%{name} +%define gomodulesmode GO111MODULE=on +%gobuild -o build/bin/%{name} %endif %install -#gopkginstall +%gopkginstall %if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp build/bin/%name %{buildroot}%{_bindir}/clipse @@ -74,7 +70,7 @@ install -m 0755 -vp build/bin/%name %{buildroot}%{_bindir}/clipse %{_bindir}/clipse %endif -#gopkgfiles +%gopkgfiles %changelog %autochangelog diff --git a/anda/desktops/waylands/eww/eww.spec b/anda/desktops/waylands/eww/eww.spec index 0aa2c2b179..1a8d9634df 100644 --- a/anda/desktops/waylands/eww/eww.spec +++ b/anda/desktops/waylands/eww/eww.spec @@ -1,7 +1,7 @@ # Generated by rust2rpm 27 -%global commit 98c220126d912b935987766f56650b55f3e226eb +%global commit fddb4a09b107237819e661151e007b99b5cab36d %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20250518 +%global commit_date 20250630 %global ver v0.6.0 %bcond check 0 diff --git a/anda/desktops/waylands/hyprgraphics/anda.hcl b/anda/desktops/waylands/hyprgraphics/anda.hcl new file mode 100644 index 0000000000..58781b3836 --- /dev/null +++ b/anda/desktops/waylands/hyprgraphics/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "hyprgraphics.nightly.spec" + } + labels { + nightly = 1 + subrepo = "extras" + } +} diff --git a/anda/desktops/waylands/hyprgraphics/hyprgraphics.nightly.spec b/anda/desktops/waylands/hyprgraphics/hyprgraphics.nightly.spec new file mode 100644 index 0000000000..10e40bbe9c --- /dev/null +++ b/anda/desktops/waylands/hyprgraphics/hyprgraphics.nightly.spec @@ -0,0 +1,67 @@ +#? https://src.fedoraproject.org/rpms/hyprgraphics/blob/rawhide/f/hyprgraphics.spec + +%global realname hyprgraphics +%global ver 0.1.5 +%global commit 157cc52065a104fc3b8fa542ae648b992421d1c7 +%global commit_date 20250821 +%global shortcommit %{sub %commit 1 7} + +%bcond libjxl 1 +Name: %realname.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: Graphics library for Hyprland + +License: BSD-3-Clause +URL: https://github.com/hyprwm/hyprgraphics +Source0: %url/archive/%commit.tar.gz +Packager: madonuko + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: (pkgconfig(hyprlang) with hyprlang.nightly-devel) +BuildRequires: pkgconfig(cairo) +BuildRequires: (pkgconfig(hyprutils) with hyprutils.nightly-devel) +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libwebp) +BuildRequires: pkgconfig(libmagic) +BuildRequires: pkgconfig(spng) + +%if %{with libjxl} +BuildRequires: pkgconfig(libjxl) +BuildRequires: pkgconfig(libjxl_cms) +BuildRequires: pkgconfig(libjxl_threads) +%endif + +%description +%{summary}. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +%pkg_devel_files + + +%prep +%autosetup -p1 -n %realname-%commit + +%build +%cmake +%cmake_build + +%install +%cmake_install + +%check +%ifarch s390x +rm tests/resource/images/hyprland.jpg +%endif +%ctest + +%files +%license LICENSE +%doc README.md +%{_libdir}/libhyprgraphics.so.0 +%{_libdir}/libhyprgraphics.so.%{ver} diff --git a/anda/desktops/waylands/hyprgraphics/update.rhai b/anda/desktops/waylands/hyprgraphics/update.rhai new file mode 100644 index 0000000000..6a9cc301c7 --- /dev/null +++ b/anda/desktops/waylands/hyprgraphics/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("hyprwm/hyprgraphics")); +if rpm.changed() { + rpm.global("ver", gh_rawfile("hyprwm/hyprgraphics", "main", "VERSION")); + rpm.global("commit_date", date()); +} diff --git a/anda/desktops/waylands/hypridle/anda.hcl b/anda/desktops/waylands/hypridle/anda.hcl new file mode 100644 index 0000000000..40774e84d7 --- /dev/null +++ b/anda/desktops/waylands/hypridle/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "hypridle.spec" + } +} diff --git a/anda/desktops/waylands/hypridle/ci_setup.rhai b/anda/desktops/waylands/hypridle/ci_setup.rhai new file mode 100644 index 0000000000..8d5329cfb4 --- /dev/null +++ b/anda/desktops/waylands/hypridle/ci_setup.rhai @@ -0,0 +1 @@ +sh("dnf swap sdbus-cpp sdbus-cpp.terra -y --allowerasing", #{}); diff --git a/anda/desktops/waylands/hypridle/hypridle.spec b/anda/desktops/waylands/hypridle/hypridle.spec new file mode 100644 index 0000000000..684a029052 --- /dev/null +++ b/anda/desktops/waylands/hypridle/hypridle.spec @@ -0,0 +1,45 @@ +Name: hypridle +Version: 0.1.7 +Release: 1%?dist +Summary: Hyprland's idle daemon +License: BSD-3-Clause +URL: https://github.com/hyprwm/hypridle +Source0: %url/archive/refs/tags/v%version.tar.gz +Packager: madonuko +BuildRequires: cmake gcc gcc-c++ +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-protocols) +BuildRequires: (pkgconfig(hyprland-protocols) with hyprland-protocols.nightly-devel) +BuildRequires: (pkgconfig(hyprlang) with hyprlang.nightly-devel) +BuildRequires: (pkgconfig(sdbus-c++) with sdbus-cpp.terra-devel) +BuildRequires: (pkgconfig(hyprwayland-scanner) with hyprwayland-scanner.nightly-devel) +BuildRequires: (pkgconfig(hyprutils) with hyprutils.nightly-devel) + +%description +%summary. + +%prep +%autosetup + +%build +%cmake -DCMAKE_BUILD_TYPE:STRING=Release +%cmake_build + +%install +%cmake_install + +%post +%systemd_user_post %name.service + +%preun +%systemd_user_preun %name.service + +%postun +%systemd_user_postun_with_restart %name.service + +%files +%doc README.md +%license LICENSE +%_bindir/hypridle +%_datadir/hypr/hypridle.conf +%_userunitdir/%name.service diff --git a/anda/desktops/waylands/hypridle/update.rhai b/anda/desktops/waylands/hypridle/update.rhai new file mode 100644 index 0000000000..2c18c969ae --- /dev/null +++ b/anda/desktops/waylands/hypridle/update.rhai @@ -0,0 +1,3 @@ +let v = gh_rawfile("hyprwm/hypridle", "main", "VERSION"); +v.trim(); +rpm.version(v); diff --git a/anda/desktops/waylands/hyprland-protocols/anda.hcl b/anda/desktops/waylands/hyprland-protocols/anda.hcl new file mode 100644 index 0000000000..9c18ee2a54 --- /dev/null +++ b/anda/desktops/waylands/hyprland-protocols/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "hyprland-protocols.nightly.spec" + } + labels { + nightly = 1 + subrepo = "extras" + } +} diff --git a/anda/desktops/waylands/hyprland-protocols/hyprland-protocols.nightly.spec b/anda/desktops/waylands/hyprland-protocols/hyprland-protocols.nightly.spec new file mode 100644 index 0000000000..d142180c7a --- /dev/null +++ b/anda/desktops/waylands/hyprland-protocols/hyprland-protocols.nightly.spec @@ -0,0 +1,53 @@ +#? https://src.fedoraproject.org/rpms/hyprland-protocols/blob/rawhide/f/hyprland-protocols.spec + +%global realname hyprland-protocols +%global ver 0.6.4 +%global commit 613878cb6f459c5e323aaafe1e6f388ac8a36330 +%global commit_date 20250604 +%global shortcommit %{sub %commit 1 7} + +Name: %realname.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: Wayland protocol extensions for Hyprland +BuildArch: noarch + +License: BSD-3-Clause +URL: https://github.com/hyprwm/hyprland-protocols +Source0: %url/archive/%commit.tar.gz + +BuildRequires: meson +Packager: madonuko +Provides: %realname = %evr +Conflicts: %realname + +%description +%{summary}. + +%package devel +Summary: Wayland protocol extensions for Hyprland +Provides: %realname-devel = %evr +Conflicts: %realname-devel + +%description devel +%{summary}. + + +%prep +%autosetup -p1 -n %realname-%commit + + +%build +%meson +%meson_build + + +%install +%meson_install + + +%files devel +%license LICENSE +%doc README.md +%{_datadir}/pkgconfig/%{realname}.pc +%{_datadir}/%{realname}/ diff --git a/anda/desktops/waylands/hyprland-protocols/update.rhai b/anda/desktops/waylands/hyprland-protocols/update.rhai new file mode 100644 index 0000000000..b41f30603a --- /dev/null +++ b/anda/desktops/waylands/hyprland-protocols/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("hyprwm/hyprland-protocols")); +if rpm.changed() { + rpm.global("ver", gh_rawfile("hyprwm/hyprland-protocols", "main", "VERSION")); + rpm.global("commit_date", date()); +} diff --git a/anda/desktops/waylands/hyprlang/anda.hcl b/anda/desktops/waylands/hyprlang/anda.hcl new file mode 100644 index 0000000000..155ff3d3dd --- /dev/null +++ b/anda/desktops/waylands/hyprlang/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "hyprlang.nightly.spec" + } + labels { + nightly = 1 + subrepo = "extras" + } +} diff --git a/anda/desktops/waylands/hyprlang/hyprlang.nightly.spec b/anda/desktops/waylands/hyprlang/hyprlang.nightly.spec new file mode 100644 index 0000000000..2725974aea --- /dev/null +++ b/anda/desktops/waylands/hyprlang/hyprlang.nightly.spec @@ -0,0 +1,57 @@ +#? https://src.fedoraproject.org/rpms/hyprlang/blob/rawhide/f/hyprlang.spec + +%global realname hyprlang +%global ver 0.6.3 +%global commit 23f0debd2003f17bd65f851cd3f930cff8a8c809 +%global commit_date 20250728 +%global shortcommit %{sub %commit 1 7} + +Name: %realname.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: The official implementation library for the hypr config language + +License: LGPL-3.0-only +URL: https://github.com/hyprwm/hyprlang +Source0: %url/archive/%commit.tar.gz + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: (pkgconfig(hyprutils) with hyprutils.nightly-devel) + +Provides: %realname = %evr +Conflicts: %realname + +%description +%{summary}. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: %realname-devel = %evr +Conflicts: %realname-devel +%pkg_devel_files + +%prep +%autosetup -p1 -n %realname-%commit + +%build +%cmake +%cmake_build + +%install +%cmake_install + +%check +%ctest + +%files +%license LICENSE +%doc README.md +%{_libdir}/libhyprlang.so.2 +%{_libdir}/libhyprlang.so.%{ver} + +%changelog +%autochangelog diff --git a/anda/desktops/waylands/hyprlang/update.rhai b/anda/desktops/waylands/hyprlang/update.rhai new file mode 100644 index 0000000000..bc8ee477cb --- /dev/null +++ b/anda/desktops/waylands/hyprlang/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("hyprwm/hyprlang")); +if rpm.changed() { + rpm.global("ver", gh_rawfile("hyprwm/hyprlang", "main", "VERSION")); + rpm.global("commit_date", date()); +} diff --git a/anda/desktops/waylands/hyprlock/anda.hcl b/anda/desktops/waylands/hyprlock/anda.hcl new file mode 100644 index 0000000000..20e01b64f6 --- /dev/null +++ b/anda/desktops/waylands/hyprlock/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "hyprlock.spec" + } +} diff --git a/anda/desktops/waylands/hyprlock/ci_setup.rhai b/anda/desktops/waylands/hyprlock/ci_setup.rhai new file mode 100644 index 0000000000..8d5329cfb4 --- /dev/null +++ b/anda/desktops/waylands/hyprlock/ci_setup.rhai @@ -0,0 +1 @@ +sh("dnf swap sdbus-cpp sdbus-cpp.terra -y --allowerasing", #{}); diff --git a/anda/desktops/waylands/hyprlock/hyprlock.spec b/anda/desktops/waylands/hyprlock/hyprlock.spec new file mode 100644 index 0000000000..a1b43e5187 --- /dev/null +++ b/anda/desktops/waylands/hyprlock/hyprlock.spec @@ -0,0 +1,46 @@ +Name: hyprlock +Version: 0.9.1 +Release: 1%?dist +Summary: Hyprland's GPU-accelerated screen locking utility +License: BSD-3-Clause +URL: https://github.com/hyprwm/%name +Source0: %url/archive/refs/tags/v%version.tar.gz +Packager: madonuko +BuildRequires: cmake gcc gcc-c++ +BuildRequires: pkgconfig(cairo) +BuildRequires: (pkgconfig(hyprgraphics) with hyprgraphics.nightly-devel) +BuildRequires: pkgconfig(hyprland-protocols) +BuildRequires: (pkgconfig(hyprlang) with hyprlang.nightly-devel) +BuildRequires: (pkgconfig(hyprutils) with hyprutils.nightly-devel) +BuildRequires: (pkgconfig(hyprwayland-scanner) with hyprwayland-scanner.nightly-devel) +BuildRequires: mesa-libgbm-devel +BuildRequires: mesa-libGL-devel +BuildRequires: pkgconfig(pam) +BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-protocols) +BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(sdbus-c++) >= 2.1.0 +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libwebp) +BuildRequires: pkgconfig(libmagic) + +%description +%summary. + +%prep +%autosetup + +%build +%cmake -DCMAKE_BUILD_TYPE:STRING=Release +%cmake_build + +%install +%cmake_install + +%files +%doc README.md +%license LICENSE +%_bindir/%name +%_pam_confdir/%name +%_datadir/hypr/%name.conf diff --git a/anda/desktops/waylands/hyprlock/update.rhai b/anda/desktops/waylands/hyprlock/update.rhai new file mode 100644 index 0000000000..05b9c25c0c --- /dev/null +++ b/anda/desktops/waylands/hyprlock/update.rhai @@ -0,0 +1,3 @@ +let v = gh_rawfile("hyprwm/hyprlock", "main", "VERSION"); +v.trim(); +rpm.version(v); diff --git a/anda/desktops/waylands/hyprutils/anda.hcl b/anda/desktops/waylands/hyprutils/anda.hcl new file mode 100644 index 0000000000..e60df70391 --- /dev/null +++ b/anda/desktops/waylands/hyprutils/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "hyprutils.nightly.spec" + } + labels { + nightly = 1 + subrepo = "extras" + } +} diff --git a/anda/desktops/waylands/hyprutils/hyprutils.nightly.spec b/anda/desktops/waylands/hyprutils/hyprutils.nightly.spec new file mode 100644 index 0000000000..44268ad7bb --- /dev/null +++ b/anda/desktops/waylands/hyprutils/hyprutils.nightly.spec @@ -0,0 +1,55 @@ +#? https://src.fedoraproject.org/rpms/hyprutils/blob/rawhide/f/hyprutils.spec + +%global realname hyprutils +%global ver 0.8.4 + +%global commit b2ae3204845f5f2f79b4703b441252d8ad2ecfd0 +%global commit_date 20250826 +%global shortcommit %{sub %commit 1 7} + +Name: %realname.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: Hyprland utilities library used across the ecosystem + +License: BSD-3-Clause +URL: https://github.com/hyprwm/hyprutils +Source0: %url/archive/%commit.tar.gz + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(pixman-1) + +Provides: %realname = %evr +Conflicts: %realname + +%description +%{summary}. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: %realname-devel = %evr +Conflicts: %realname-devel +%pkg_devel_files + +%prep +%autosetup -p1 -n %realname-%commit + +%build +%cmake +%cmake_build + +%install +%cmake_install + +%check +%ctest + +%files +%license LICENSE +%doc README.md +%{_libdir}/lib%{realname}.so.%{ver} +%{_libdir}/lib%{realname}.so.* diff --git a/anda/desktops/waylands/hyprutils/update.rhai b/anda/desktops/waylands/hyprutils/update.rhai new file mode 100644 index 0000000000..44759f192b --- /dev/null +++ b/anda/desktops/waylands/hyprutils/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("hyprwm/hyprutils")); +if rpm.changed() { + rpm.global("ver", gh_rawfile("hyprwm/hyprutils", "main", "VERSION")); + rpm.global("commit_date", date()); +} diff --git a/anda/desktops/waylands/hyprwayland-scanner/anda.hcl b/anda/desktops/waylands/hyprwayland-scanner/anda.hcl new file mode 100644 index 0000000000..5bf8800d86 --- /dev/null +++ b/anda/desktops/waylands/hyprwayland-scanner/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "hyprwayland-scanner.nightly.spec" + } + labels { + nightly = 1 + subrepo = "extras" + } +} diff --git a/anda/desktops/waylands/hyprwayland-scanner/hyprwayland-scanner.nightly.spec b/anda/desktops/waylands/hyprwayland-scanner/hyprwayland-scanner.nightly.spec new file mode 100644 index 0000000000..4374f029c3 --- /dev/null +++ b/anda/desktops/waylands/hyprwayland-scanner/hyprwayland-scanner.nightly.spec @@ -0,0 +1,55 @@ +#? https://src.fedoraproject.org/rpms/hyprwayland-scanner/blob/rawhide/f/hyprwayland-scanner.spec + +%global realname hyprwayland-scanner +%global ver 0.4.5 +%global commit b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d +%global shortcommit %{sub %commit 1 7} +%global commit_date 20250815 + +Name: %realname.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: A Hyprland implementation of wayland-scanner, in and for C++ + +License: BSD-3-Clause +URL: https://github.com/hyprwm/hyprwayland-scanner +Source0: %url/archive/%commit.tar.gz + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: cmake +BuildRequires: cmake(pugixml) +BuildRequires: gcc-c++ + +Provides: %realname = %evr +Conflicts: %realname +Packager: madonuko + +%description +%{summary}. + +%package devel +Summary: A Hyprland implementation of wayland-scanner, in and for C++ +Provides: %realname-devel = %evr +Conflicts: %realname-devel + +%description devel +%{summary}. + +%prep +%autosetup -p1 -n %realname-%commit + +%build +%cmake +%cmake_build + +%install +%cmake_install + +%files devel +%license LICENSE +%doc README.md +%{_bindir}/%{realname} +%{_libdir}/pkgconfig/%{realname}.pc +%{_libdir}/cmake/%{realname}/ diff --git a/anda/desktops/waylands/hyprwayland-scanner/update.rhai b/anda/desktops/waylands/hyprwayland-scanner/update.rhai new file mode 100644 index 0000000000..4d28ecb91b --- /dev/null +++ b/anda/desktops/waylands/hyprwayland-scanner/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("hyprwm/hyprwayland-scanner")); +if rpm.changed() { + rpm.global("ver", gh_rawfile("hyprwm/hyprwayland-scanner", "main", "VERSION")); + rpm.global("commit_date", date()); +} diff --git a/anda/desktops/waylands/swaylock-effects/swaylock-effects.spec b/anda/desktops/waylands/swaylock-effects/swaylock-effects.spec index c816be8f6c..e159f77edf 100644 --- a/anda/desktops/waylands/swaylock-effects/swaylock-effects.spec +++ b/anda/desktops/waylands/swaylock-effects/swaylock-effects.spec @@ -3,7 +3,7 @@ Name: swaylock-effects Version: 1.7.0.0^1.%{shortcommit} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Swaylock, with fancy effects License: MIT @@ -31,32 +31,7 @@ Conflicts: swaylock swaylock-effects is a fork of swaylock which adds built-in screenshots and image manipulation effects like blurring. -%package bash-completion -Summary: Bash completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: bash-completion -Supplements: (%{name} and bash-completion) - -%description bash-completion -Bash command-line completion support for %{name}. - -%package zsh-completion -Summary: Zsh completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: zsh -Supplements: (%{name} and zsh) - -%description zsh-completion -Zsh command-line completion support for %{name}. - -%package fish-completion -Summary: Fish completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: fish -Supplements: (%{name} and fish) - -%description fish-completion -Fish command-line completion support for %{name}. +%pkg_completion -Bfz %binary_name %prep @@ -79,15 +54,6 @@ Fish command-line completion support for %{name}. %{_mandir}/man1/%{binary_name}.1.gz %config(noreplace) %{_sysconfdir}/pam.d/%{binary_name} -%files bash-completion -%{bash_completions_dir}/%{binary_name} - -%files zsh-completion -%{zsh_completions_dir}/_%{binary_name} - -%files fish-completion -%{fish_completions_dir}/%{binary_name}.fish - %changelog * Tue Feb 04 2025 sadlerm diff --git a/anda/desktops/waylands/swww/swww.spec b/anda/desktops/waylands/swww/swww.spec index dab0d00e8a..31a49d129b 100644 --- a/anda/desktops/waylands/swww/swww.spec +++ b/anda/desktops/waylands/swww/swww.spec @@ -1,5 +1,5 @@ Name: swww -Version: 0.10.0 +Version: 0.10.3 Release: 1%?dist Summary: Wallpaper daemon for Wayland SourceLicense: GPL-3.0-only diff --git a/anda/desktops/waylands/walker/anda.hcl b/anda/desktops/waylands/walker/anda.hcl index fa8f99b62c..8d3ea474c3 100644 --- a/anda/desktops/waylands/walker/anda.hcl +++ b/anda/desktops/waylands/walker/anda.hcl @@ -1,5 +1,5 @@ project pkg { rpm { - spec = "golang-github-abenz1267-walker.spec" + spec = "walker.spec" } } diff --git a/anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec b/anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec deleted file mode 100644 index c5b9a0d39b..0000000000 --- a/anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec +++ /dev/null @@ -1,81 +0,0 @@ -# Generated by go2rpm 1.14.0 -%bcond check 0 -%bcond bootstrap 0 - -%if %{with bootstrap} -%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ -%endif - -%if 0%{?fedora} <= 40 -%global debug_package %{nil} -%endif - -# https://github.com/abenz1267/walker -%global goipath github.com/abenz1267/walker -Version: 0.12.23 - -%gometa -f - -%global common_description %{expand: -Multi-Purpose Launcher with a lot of features. Highly Customizable and fast.} - -%global golicenses LICENSE -%global godocs README.md cmd/version.txt - -Name: walker -Release: 1%?dist -Summary: Multi-Purpose Launcher with a lot of features. Highly Customizable and fast - -License: MIT -URL: %{gourl} -Source: %{gosource} -Provides: golang-github-abenz1267-walker = %version-%release -Obsoletes: golang-github-abenz1267-walker < 0.11.4-2 -Packager: madonuko -Requires: gtk4-layer-shell -BuildRequires: anda-srpm-macros -BuildRequires: gtk4-devel -BuildRequires: gtk4-layer-shell-devel -BuildRequires: gobject-introspection-devel -BuildRequires: pkgconfig(vips) - -%description %{common_description} - -%gopkg - -%prep -%goprep -A -%go_prep_online -mv {LICENSE,README.md} cmd -%setup -T -D -n %{name}-%{version}/cmd - - -%build -go build -x -o walker - -%install -#gopkginstall -%if %{without bootstrap} -install -m 0755 -vd %{buildroot}%{_bindir} -install -m 0755 -vp walker %{buildroot}%{_bindir}/walker -%endif - -%if %{without bootstrap} -%if %{with check} -%check -%gocheck -%endif -%endif - -%if %{without bootstrap} -%files -%license LICENSE -%doc README.md -%{_bindir}/walker -%endif - -#gopkgfiles - -%changelog -* Tue Dec 24 2024 madonuko - 0.11.2-1 -- Initial package diff --git a/anda/desktops/waylands/walker/update.rhai b/anda/desktops/waylands/walker/update.rhai index f71ca9aba7..f4ed6eb046 100644 --- a/anda/desktops/waylands/walker/update.rhai +++ b/anda/desktops/waylands/walker/update.rhai @@ -1 +1 @@ -rpm.version(gh("abenz1267/walker")); +rpm.global("upstream_version", gh("abenz1267/walker")); diff --git a/anda/desktops/waylands/walker/walker.spec b/anda/desktops/waylands/walker/walker.spec new file mode 100644 index 0000000000..938ca1bf99 --- /dev/null +++ b/anda/desktops/waylands/walker/walker.spec @@ -0,0 +1,78 @@ +# Generated by rust2rpm 27 +%bcond check 1 + +# prevent library files from being installed +%global cargo_install_lib 0 + +%global upstream_version v1.0.0-beta-22 +%global ver %{sub %upstream_version 2} + +Name: walker +Version: %{gsub %{gsub %ver - ~ 1} - _} +Release: %autorelease +Summary: Multi-Purpose Launcher with a lot of features. Highly Customizable and fast. + +SourceLicense: GPL-3.0 +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND CC0-1.0 AND ISC AND MIT AND (MIT OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND Zlib +# LICENSE.dependencies contains a full license breakdown + +URL: https://github.com/abenz1267/walker +Source: %url/archive/refs/tags/%upstream_version.tar.gz + +Packager: madonuko +Requires: elephant + +BuildRequires: cargo-rpm-macros >= 26 +BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(gtk4-layer-shell-0) +BuildRequires: pkgconfig(cairo) +BuildRequires: protobuf-compiler +BuildRequires: pkgconfig(poppler-glib) +%ifarch x86_64 +# BUG: fedora rustc missing this dep +BuildRequires: libedit(x86-64) +%endif + +%global _description %{expand: +%{summary}.} + +%description %{_description} + +%prep +%autosetup -n walker-%{ver} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install + +%define cfgdir %buildroot/etc/xdg/walker +%define themedir %cfgdir/themes/default + +install -Dm644 resources/config.toml %cfgdir/config.toml +install -Dm644 resources/themes/default/item.xml %themedir/item.xml +install -Dm644 resources/themes/default/item_calc.xml %themedir/item_calc.xml +install -Dm644 resources/themes/default/item_clipboard.xml %themedir/item_clipboard.xml +install -Dm644 resources/themes/default/item_dmenu.xml %themedir/item_dmenu.xml +install -Dm644 resources/themes/default/item_files.xml %themedir/item_files.xml +install -Dm644 resources/themes/default/item_providerlist.xml %themedir/item_providerlist.xml +install -Dm644 resources/themes/default/item_symbols.xml %themedir/item_symbols.xml +install -Dm644 resources/themes/default/layout.xml %themedir/layout.xml +install -Dm644 resources/themes/default/preview.xml %themedir/preview.xml +install -Dm644 resources/themes/default/style.css %themedir/style.css + + +%if %{with check} +%check +%cargo_test +%endif + +%files +%license LICENSE +%license LICENSE.dependencies +%doc README.md +%{_bindir}/walker +/etc/xdg/walker/ diff --git a/anda/desktops/waylands/wpaperd/wpaperd.spec b/anda/desktops/waylands/wpaperd/wpaperd.spec index 8764f380e9..88e02a43a1 100644 --- a/anda/desktops/waylands/wpaperd/wpaperd.spec +++ b/anda/desktops/waylands/wpaperd/wpaperd.spec @@ -1,9 +1,8 @@ -%global elvish_completions_dir %_datadir/elvish/lib/completions -%bcond check 1 +%bcond check 0 Name: wpaperd Version: 1.2.2 -Release: 1%?dist +Release: 2%?dist Summary: Modern wallpaper daemon for Wayland License: (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND (CC0-1.0 OR Apache-2.0) AND (CC0-1.0 OR Artistic-2.0) AND GPL-3.0+ AND ISC AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) SourceLicense: GPL-3.0-or-later @@ -32,41 +31,7 @@ Supplements: wpaperd %description doc Man papes for %name. -%package bash-completion -Summary: Bash completion for %name -Requires: %{name} = %{version}-%{release} -Requires: bash-completion -Supplements: (%{name} and bash-completion) - -%description bash-completion -Bash command line completion support for %{name}. - -%package elvish-completion -Summary: Elvish completion for %name -Requires: %{name} = %{version}-%{release} -Requires: elvish -Supplements: (%{name} and elvish-completion) - -%description elvish-completion -Elvish command line completion support for %{name}. - -%package fish-completion -Summary: Fish completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: fish -Supplements: (%{name} and fish) - -%description fish-completion -Fish command line completion support for %{name}. - -%package zsh-completion -Summary: Zsh completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: zsh -Supplements: (%{name} and zsh) - -%description zsh-completion -Zsh command line completion support for %{name}. +%pkg_completion -befz wpaperctl wpaperd %prep @@ -111,22 +76,6 @@ install -Dpm644 -t %buildroot%zsh_completions_dir target/rpm/completions/_* %_mandir/man1/wpaperd.1.gz %_mandir/man5/wpaperd-output.5.gz -%files bash-completion -%bash_completions_dir/wpaperctl.bash -%bash_completions_dir/wpaperd.bash - -%files elvish-completion -%elvish_completions_dir/wpaperctl.elv -%elvish_completions_dir/wpaperd.elv - -%files fish-completion -%fish_completions_dir/wpaperctl.fish -%fish_completions_dir/wpaperd.fish - -%files zsh-completion -%zsh_completions_dir/_wpaperctl -%zsh_completions_dir/_wpaperd - %changelog * Fri Dec 20 2024 madonuko - 1.1.1-1 - Initial package diff --git a/anda/devs/android-studio/stable/anda.hcl b/anda/devs/android-studio/stable/anda.hcl new file mode 100644 index 0000000000..25dfdd9494 --- /dev/null +++ b/anda/devs/android-studio/stable/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "android-studio.spec" + } +} diff --git a/anda/devs/android-studio/stable/android-studio.spec b/anda/devs/android-studio/stable/android-studio.spec new file mode 100644 index 0000000000..5b038070c7 --- /dev/null +++ b/anda/devs/android-studio/stable/android-studio.spec @@ -0,0 +1,66 @@ +%global debug_package %{nil} +%define __requires_exclude_from ^/usr/libexec/android-studio/.*$ +%define __provides_exclude_from ^/usr/libexec/android-studio/.*|libedit\\so.*$ +%global __requires_exclude ^libaaudio\\.so.*|^libandroid\\.so.*|^libmediandk\\.so.*|^liblog\\.so.*|^libc\\.so.*|^libm\\.so.*|^libdl\\.so.*|^libcrypt\\.so.*|^libstdc\\+\\+\\.so.*|^libncursesw\\.so.*|^libtinfo\\.so.*|^libnsl\\.so.*|^libpanelw\\.so.*$ + +Name: android-studio +Version: 2025.1.2.13 +Release: 2%?dist +Summary: Official IDE for Android development +License: Apache-2.0 +Packager: like-engels +URL: https://developer.android.com/studio +Source0: https://dl.google.com/dl/android/studio/ide-zips/%{version}/android-studio-%{version}-linux.tar.gz + +Requires: alsa-lib +Requires: freetype +Requires: which +Requires: libXrender +Requires: libXtst +Requires: glibc +Requires: libsecret + +%description +Android Studio is the official IDE for Android development, and includes everything you need to build Android apps. + +%prep +%setup -q -n android-studio + +%install +mkdir -p %{buildroot}%{_libexecdir}/%{name} + +cp -a * %{buildroot}%{_libexecdir}/%{name} + +mkdir -p %{buildroot}%{_bindir} +ln -s %{_libexecdir}/%{name}/bin/studio %{buildroot}%{_bindir}/%{name} + +mkdir -p %{buildroot}%{_licensedir}/%{name} +install -Dm644 LICENSE.txt %{buildroot}%{_licensedir}/%{name}/LICENSE.txt + +install -Dm644 bin/studio.png %{buildroot}%{_datadir}/pixmaps/%{name}.png + +mkdir -p %{buildroot}%{_datadir}/applications +cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << 'EOF' +[Desktop Entry] +Version=1.0 +Type=Application +Name=Android Studio +Exec=android-studio %f +Icon=android-studio +Comment=The official Android IDE +Categories=Development;IDE; +Terminal=false +StartupNotify=true +StartupWMClass=jetbrains-studio +MimeType=application/x-extension-iml; +EOF + +%files +%license %{_licensedir}/%{name}/LICENSE.txt +%{_libexecdir}/%{name} +%{_bindir}/%{name} +%{_datadir}/pixmaps/%{name}.png +%{_datadir}/applications/%{name}.desktop + +%changelog +%autochangelog diff --git a/anda/devs/android-studio/stable/update.rhai b/anda/devs/android-studio/stable/update.rhai new file mode 100644 index 0000000000..ef1c8dc082 --- /dev/null +++ b/anda/devs/android-studio/stable/update.rhai @@ -0,0 +1 @@ +rpm.version(find(`https://redirector.gvt1.com/edgedl/android/studio/ide-zips/([\d.]+)/android-studio-[\d.]+-linux.tar.gz`, get("https://developer.android.com/studio"), 1)); diff --git a/anda/devs/asar/asar.spec b/anda/devs/asar/asar.spec index 50c37c85c8..bd4143cd8b 100644 --- a/anda/devs/asar/asar.spec +++ b/anda/devs/asar/asar.spec @@ -7,7 +7,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: asar -Version: 4.0.0 +Version: 4.0.1 Release: 1%?dist Summary: Simple extensive tar-like archive format with indexing License: MIT diff --git a/anda/devs/atac/atac.spec b/anda/devs/atac/atac.spec index 98029c3cf0..e9ae8387e3 100644 --- a/anda/devs/atac/atac.spec +++ b/anda/devs/atac/atac.spec @@ -6,7 +6,7 @@ %global __brp_mangle_shebangs %{nil} Name: atac -Version: 0.20.1 +Version: 0.20.2 Release: 1%?dist Summary: Arguably a Terminal API Client @@ -37,6 +37,7 @@ and account-less.} %build %{cargo_license_summary_online} %{cargo_license_online} > LICENSE.dependencies +%{cargo_build} --locked %install -%cargo_install +%crate_install_bin diff --git a/anda/devs/backport/anda.hcl b/anda/devs/backport/anda.hcl new file mode 100644 index 0000000000..4ba8d7de29 --- /dev/null +++ b/anda/devs/backport/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + rpm { + spec = "nodejs-backport.spec" + pre_script = "setup.sh" + } +} diff --git a/anda/devs/backport/nodejs-backport.spec b/anda/devs/backport/nodejs-backport.spec new file mode 100644 index 0000000000..e17293783a --- /dev/null +++ b/anda/devs/backport/nodejs-backport.spec @@ -0,0 +1,60 @@ +%global debug_package %{nil} +%global module backport +%bcond test 1 + +Name: node-%{module} +Version: 10.0.2 +Release: 1%?dist +Summary: Backport GitHub commits +SourceLicense: Apache-2.0 +License: Apache-2.0 AND +URL: https://github.com/sorenlouv/%{module} +%dnl Source0: http://registry.npmjs.org/%{module}/-/%{module}-%{version}.tgz +# Source the tests +Source1: tests-%{version}.tar.bz2 +BuildRequires: bsdtar +BuildRequires: nodejs-devel +BuildRequires: nodejs-packaging +BuildRequires: nodejs-npm +ExclusiveArch: %{nodejs_arches} noarch +Packager: Gilver E. + +%description +A simple CLI tool that automates the process of backporting commits on a GitHub repo. + +%prep +# Maybe I should make some NodeJS online macros... +# Global flag is needed or the module WILL NOT WORK via commandline without some manual intervention +npm install -g %{module}@%{version} --prefix=. +%setup -T -D -n lib/node_modules/%{module} +tar xjf %{SOURCE1} + +%build +# Empty build section, because RPM reasons + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{module} +mkdir -p %{buildroot}%{_bindir} +cp -r ./* -t %{buildroot}%{nodejs_sitelib}/%{module} +ln -sf %{nodejs_sitelib}/%{module}/bin/%{module} %{buildroot}%{_bindir}/%{module} + +# Should maybe package this so it's easier to call... +npm install -g license-checker --prefix=. +# This could also be made into a macro maybe? +bin/license-checker | sed '/.*repository:.*/d;/.*publisher:.*/d;/.*email:.*/d;/.*url:.*/d;/.*path:.*/d;/.*licenseFile:.*/d;/.*noticeFile:.*/d' > LICENSE.modules + +%check +%if %{with test} +NODE_ENV=test %{builddir}/bin/%{module} -R tests +%endif + +%files +%doc README.md +%license LICENSE.txt +%license LICENSE.modules +%{nodejs_sitelib}/%{module}/ +%{_bindir}/%{module} + +%changelog +* Wed Jul 2 2025 Gilver E. - 9.6.6-1 +- Initial package diff --git a/anda/devs/backport/post.rhai b/anda/devs/backport/post.rhai new file mode 100644 index 0000000000..7ec2290326 --- /dev/null +++ b/anda/devs/backport/post.rhai @@ -0,0 +1 @@ +sh("rm -rfv anda/devs/backport/*.tar.bz2", #{}); diff --git a/anda/devs/backport/setup.sh b/anda/devs/backport/setup.sh new file mode 100755 index 0000000000..a6a7359998 --- /dev/null +++ b/anda/devs/backport/setup.sh @@ -0,0 +1,28 @@ +#!/usr/bin/bash + +## Some sources need to be fetched BEFORE the build process +# Also I'm just better at scripting in Bash and calling the Rhai sh function hundreds of times times sounded like hell +# Have I mentioned I hate runtime languages? + +node=backport +# Enable logs for debugging +set -x +# I guess just $PWD doesn't work for this +builddir=$(pwd)/anda/devs/$node + +# We only need the tests folder so sourcing the whole repo is overkill, Git can make a tarball of specific directories + +pushd $builddir +ver=$(cat ./*.spec | grep -P -m1 'Version:' | sed -e 's/Version://g' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') +url=$(sed -n 's/^URL:\s\(.*\)$/\1/p' ./*.spec | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e "s/%{module}/$node/") +dir=$node + +git clone --recurse-submodules -j$(nproc) $url.git + +pushd $dir +# I'm not sure why .tar.bz2 is the tar format of choice for this but it's also what Fedora does so it's what I'm doing +git archive --format=tar --prefix=tests/ v${ver}:src/test/ | bzip2 > ../tests-${ver}.tar.bz2 +popd +rm -rf $dir + +exit 0 diff --git a/anda/devs/backport/update.rhai b/anda/devs/backport/update.rhai new file mode 100644 index 0000000000..77c845c194 --- /dev/null +++ b/anda/devs/backport/update.rhai @@ -0,0 +1 @@ +rpm.version(npm("backport")); diff --git a/anda/devs/bun/bun-bin.spec b/anda/devs/bun/bun-bin.spec index a86abaabf4..61e4bac14f 100644 --- a/anda/devs/bun/bun-bin.spec +++ b/anda/devs/bun/bun-bin.spec @@ -6,8 +6,8 @@ %endif Name: bun-bin -Version: 1.2.14 -Release: 2%?dist +Version: 1.2.21 +Release: 1%?dist Summary: Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one License: MIT URL: https://bun.sh @@ -17,34 +17,7 @@ BuildRequires: unzip %description %summary. - -%package bash-completion -Summary: Bash completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: bash-completion -Supplements: (%{name} and bash-completion) - -%description bash-completion -Bash command line completion support for %{name}. - -%package fish-completion -Summary: Fish completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: fish -Supplements: (%{name} and fish) - -%description fish-completion -Fish command line completion support for %{name}. - -%package zsh-completion -Summary: Zsh completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: zsh -Supplements: (%{name} and zsh) - -%description zsh-completion -Zsh command line completion support for %{name}. - +%pkg_completion -bfz bun %prep %autosetup -n bun-linux-%a @@ -88,12 +61,3 @@ ln -s bun %buildroot%_bindir/bunx %license LICENSE %_bindir/bun %_bindir/bunx - -%files bash-completion -%bash_completions_dir/bun.bash - -%files fish-completion -%fish_completions_dir/bun.fish - -%files zsh-completion -%zsh_completions_dir/_bun diff --git a/anda/devs/codium/codium.spec b/anda/devs/codium/codium.spec index 5065273fe3..3d15d4b74c 100644 --- a/anda/devs/codium/codium.spec +++ b/anda/devs/codium/codium.spec @@ -12,7 +12,7 @@ %endif Name: codium -Version: 1.100.23258 +Version: 1.103.25610 Release: 1%?dist Summary: Code editing. Redefined. License: MIT diff --git a/anda/devs/edit/edit.spec b/anda/devs/edit/edit.spec index 99bd9d84b6..e442deab3c 100644 --- a/anda/devs/edit/edit.spec +++ b/anda/devs/edit/edit.spec @@ -1,16 +1,11 @@ %global _description %{expand: An editor that pays homage to the classic MS-DOS Editor, but with a modern interface and input controls similar to VS Code.} %global crate edit -%bcond rust_nightly 1 -%if %{with rust_nightly} -%define __cargo /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' $HOME/.cargo/bin/cargo -%define __rustc $HOME/.cargo/bin/rustc -%define __rustdoc $HOME/.cargo/bin/rustdoc -%endif +%bcond rust_nightly 0 Name: %{crate} -Version: 1.0.0 -Release: 1%{?dist} +Version: 1.2.0 +Release: 1%?dist Summary: A simple editor for simple needs. SourceLicense: MIT License: MIT AND (MIT OR Apache-2.0) @@ -29,10 +24,7 @@ Packager: Gilver E. %prep %autosetup -n %{name}-%{version} %if %{with rust_nightly} -rustup-init -y -. "$HOME/.cargo/env" -rustup toolchain install nightly -rustup override set nightly +%rustup_nightly %endif %cargo_prep_online diff --git a/anda/devs/flow/flow-control.spec b/anda/devs/flow/flow-control.spec index c1e005b0f2..08807ad404 100644 --- a/anda/devs/flow/flow-control.spec +++ b/anda/devs/flow/flow-control.spec @@ -1,6 +1,6 @@ Name: flow-control Epoch: 1 -Version: 0.3.3 +Version: 0.5.0 Release: 1%?dist Summary: A programmer's text editor License: MIT diff --git a/anda/devs/flutter/flutter.spec b/anda/devs/flutter/flutter.spec index ac94e42165..a9e63093f8 100644 --- a/anda/devs/flutter/flutter.spec +++ b/anda/devs/flutter/flutter.spec @@ -1,5 +1,5 @@ Name: flutter -Version: 3.32.0 +Version: 3.35.2 Release: 1%?dist Summary: SDK for crafting beautiful, fast user experiences from a single codebase License: BSD-3-Clause @@ -8,6 +8,7 @@ Group: Development/Building Source0: https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_%version-stable.tar.xz Requires: bash curl git file which zip xz Recommends: mesa-libGLU +AutoReqProv: no %description Flutter transforms the app development process. Build, test, and deploy @@ -16,8 +17,6 @@ beautiful mobile, web, desktop, and embedded apps from a single codebase. %prep tar xf %SOURCE0 -%build - %install mkdir -p %buildroot%_datadir %buildroot%_bindir mv %name/ %buildroot%_datadir/ diff --git a/anda/devs/ghostty/nightly/ghostty-nightly.spec b/anda/devs/ghostty/nightly/ghostty-nightly.spec index faebb09d17..41fe73eed6 100644 --- a/anda/devs/ghostty/nightly/ghostty-nightly.spec +++ b/anda/devs/ghostty/nightly/ghostty-nightly.spec @@ -1,16 +1,11 @@ -%global commit 3f6c02b49e08aed51e4be85d87b79b9dbea34a85 +%global commit 2009ea511d30efd4fb96bd8788b18767f614956d %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global fulldate 2025-05-25 +%global fulldate 2025-08-31 %global commit_date %(echo %{fulldate} | sed 's/-//g') %global public_key RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV %global ver 1.1.4 %global base_name ghostty -%global reverse_dns com.mitchellh.%{base_name} -%if 0%{?fedora} <= 40 -%global cache_dir %{_builddir}/zig-cache -%else -%global cache_dir %{builddir}/zig-cache -%endif +%global appid com.mitchellh.%{base_name} Name: %{base_name}-nightly Version: %{ver}~tip^%{commit_date}git%{shortcommit} @@ -23,6 +18,7 @@ License: MIT AND MPL-2.0 AND OFL-1.1 AND (WTFPL OR CC0-1.0) AND Apache-2. URL: https://%{base_name}.org Source0: https://github.com/%{base_name}-org/%{base_name}/releases/download/tip/%{base_name}-source.tar.gz Source1: https://github.com/%{base_name}-org/%{base_name}/releases/download/tip/%{base_name}-source.tar.gz.minisig +BuildRequires: anda-srpm-macros >= 0.2.15 BuildRequires: gettext BuildRequires: gtk4-devel BuildRequires: libadwaita-devel @@ -31,7 +27,9 @@ BuildRequires: minisign BuildRequires: ncurses BuildRequires: ncurses-devel BuildRequires: pandoc-cli -BuildRequires: zig +BuildRequires: systemd-rpm-macros +BuildRequires: zig >= 0.14.0 +BuildRequires: zig-rpm-macros BuildRequires: pkgconfig(blueprint-compiler) BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(freetype2) @@ -44,8 +42,9 @@ BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(oniguruma) BuildRequires: pkgconfig(zlib) -Requires: %{name}-terminfo -Requires: %{name}-shell-integration +Requires: %{name}-terminfo = %{evr} +Requires: %{name}-shell-integration = %{evr} +Requires: (%{name}-kio = %{evr} if kf6-kio) Requires: gtk4 Requires: gtk4-layer-shell Requires: libadwaita @@ -99,6 +98,54 @@ BuildArch: noarch %description zsh-completion Zsh shell completion for Ghostty. +%package kio +Summary: KIO support for Ghostty +Requires: %{name} = %{evr} +BuildArch: noarch + +%description kio +This package allows Ghostty to interact with KIO. + +%package nautilus +Summary: Nautilus menu support for Ghostty +Supplements: (%{name} and nautilus) +Requires: %{name} = %{evr} +BuildArch: noarch + +%description nautilus +This package enables Nautilus integration for Ghostty. + +%package vim +Summary: Vim plugins for Ghostty +Supplements: (%{name} and vim-filesystem) +Requires: %{name} = %{evr} +Requires: vim-enhanced +Requires: vim-filesystem +BuildArch: noarch + +%description vim +This package provides the Ghostty Vim plugins. + +%package neovim +Summary: Neovim plugins for Ghostty +Supplements: (%{name} and neovim) +Requires: %{name} = %{evr} +Requires: neovim +BuildArch: noarch + +%description neovim +This package provides the Neovim plugins for Ghostty. + +%package bat-syntax +Summary: Bat syntax for Ghostty +Supplements: (%{name} and bat) +Requires: %{name} = %{evr} +Requires: bat +BuildArch: noarch + +%description bat-syntax +This package provides the Bat syntax files for Ghostty. + %package shell-integration Summary: Ghostty shell integration Supplements: %{name} @@ -112,90 +159,67 @@ This package contains files allowing Ghostty to integrate with various shells. %package terminfo Summary: Ghostty terminfo +%if 0%{?fedora} >= 42 +Requires: ncurses-term >= 6.5-5.20250125 +%endif Supplements: %{name} %if 0%{?fedora} <= 41 Provides: %{name}-terminfo = %{commit_date}.%{shortcommit} %endif -%if 0%{?fedora} >= 42 -Requires: ncurses-term >= 6.5-5.20250125%{?dist} -%endif +Obsoletes: %{name}-terminfo-source < %{evr} BuildArch: noarch %description terminfo Ghostty's terminfo. Needed for basic terminal function. -%package terminfo-source -Summary: Source files for Ghostty's terminfo -Requires: %{name} -Requires: %{name}-terminfo -BuildArch: noarch - -%description terminfo-source -This package contains files for Ghostty's terminfo. Available for debugging use. - %prep /usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} %autosetup -n %{base_name}-%{ver}-main+%{shortcommit} -ZIG_GLOBAL_CACHE_DIR="%{cache_dir}" ./nix/build-support/fetch-zig-cache.sh +ZIG_GLOBAL_CACHE_DIR="%{_zig_cache_dir}" ./nix/build-support/fetch-zig-cache.sh %build %install DESTDIR="%{buildroot}" \ -zig build \ - --summary all \ - --release=fast \ - --system "%{cache_dir}/p" \ +%{zig_build_target -r fast} \ --prefix "%{_prefix}" --prefix-lib-dir "%{_libdir}" \ --prefix-exe-dir "%{_bindir}" --prefix-include-dir "%{_includedir}" \ - --verbose \ -Dversion-string="%{ver}-dev+%{shortcommit}" \ - -Dcpu=baseline \ -Dstrip=false \ -Dpie=true \ - -Demit-docs \ - -Demit-termcap \ - -Demit-terminfo + -Demit-docs -#Don't conflict with ncurses-term on F42 and up +# Don't conflict with ncurses-term on F42 and up %if 0%{?fedora} >= 42 -rm -rf %{buildroot}%{_datadir}/terminfo/g/ghostty +rm -rf %{buildroot}%{_datadir}/terminfo/g/%{base_name} %endif -%find_lang %{reverse_dns} +%find_lang %{appid} -%files -f %{reverse_dns}.lang +%files -f %{appid}.lang %doc README.md %license LICENSE %{_bindir}/%{base_name} -%{_datadir}/applications/%{reverse_dns}.desktop -%{_datadir}/bat/syntaxes/%{base_name}.sublime-syntax +%{_datadir}/applications/%{appid}.desktop %dir %{_datadir}/%{base_name} %{_datadir}/%{base_name}/doc %{_datadir}/%{base_name}/themes -%{_datadir}/kio/servicemenus/%{reverse_dns}.desktop -%{_datadir}/nautilus-python/extensions/%{base_name}.py -%{_datadir}/nvim/site/compiler/%{base_name}.vim -%{_datadir}/nvim/site/ftdetect/%{base_name}.vim -%{_datadir}/nvim/site/ftplugin/%{base_name}.vim -%{_datadir}/nvim/site/syntax/%{base_name}.vim -%{_datadir}/vim/vimfiles/compiler/%{base_name}.vim -%{_datadir}/vim/vimfiles/ftdetect/%{base_name}.vim -%{_datadir}/vim/vimfiles/ftplugin/%{base_name}.vim -%{_datadir}/vim/vimfiles/syntax/%{base_name}.vim -%{_iconsdir}/hicolor/16x16/apps/%{reverse_dns}.png -%{_iconsdir}/hicolor/16x16@2/apps/%{reverse_dns}.png -%{_iconsdir}/hicolor/32x32/apps/%{reverse_dns}.png -%{_iconsdir}/hicolor/32x32@2/apps/%{reverse_dns}.png -%{_iconsdir}/hicolor/128x128/apps/%{reverse_dns}.png -%{_iconsdir}/hicolor/128x128@2/apps/%{reverse_dns}.png -%{_iconsdir}/hicolor/256x256/apps/%{reverse_dns}.png -%{_iconsdir}/hicolor/256x256@2/apps/%{reverse_dns}.png -%{_iconsdir}/hicolor/512x512/apps/%{reverse_dns}.png -%{_iconsdir}/hicolor/1024x1024/apps/%{reverse_dns}.png +%{_datadir}/metainfo/%{appid}.metainfo.xml +%{_datadir}/dbus-1/services/%{appid}.service +%{_iconsdir}/hicolor/16x16/apps/%{appid}.png +%{_iconsdir}/hicolor/16x16@2/apps/%{appid}.png +%{_iconsdir}/hicolor/32x32/apps/%{appid}.png +%{_iconsdir}/hicolor/32x32@2/apps/%{appid}.png +%{_iconsdir}/hicolor/128x128/apps/%{appid}.png +%{_iconsdir}/hicolor/128x128@2/apps/%{appid}.png +%{_iconsdir}/hicolor/256x256/apps/%{appid}.png +%{_iconsdir}/hicolor/256x256@2/apps/%{appid}.png +%{_iconsdir}/hicolor/512x512/apps/%{appid}.png +%{_iconsdir}/hicolor/1024x1024/apps/%{appid}.png %{_mandir}/man1/%{base_name}.1.gz %{_mandir}/man5/%{base_name}.5.gz +%{_userunitdir}/app-%{appid}.service %files bash-completion %{bash_completions_dir}/%{base_name}.bash @@ -206,6 +230,27 @@ rm -rf %{buildroot}%{_datadir}/terminfo/g/ghostty %files zsh-completion %{zsh_completions_dir}/_%{base_name} +%files kio +%{_datadir}/kio/servicemenus/%{appid}.desktop + +%files nautilus +%{_datadir}/nautilus-python/extensions/%{base_name}.py + +%files vim +%{_datadir}/vim/vimfiles/compiler/%{base_name}.vim +%{_datadir}/vim/vimfiles/ftdetect/%{base_name}.vim +%{_datadir}/vim/vimfiles/ftplugin/%{base_name}.vim +%{_datadir}/vim/vimfiles/syntax/%{base_name}.vim + +%files neovim +%{_datadir}/nvim/site/compiler/%{base_name}.vim +%{_datadir}/nvim/site/ftdetect/%{base_name}.vim +%{_datadir}/nvim/site/ftplugin/%{base_name}.vim +%{_datadir}/nvim/site/syntax/%{base_name}.vim + +%files bat-syntax +%{_datadir}/bat/syntaxes/%{base_name}.sublime-syntax + %files shell-integration %dir %{_datadir}/%{base_name}/shell-integration %{_datadir}/%{base_name}/shell-integration/bash/bash-preexec.sh @@ -221,11 +266,19 @@ rm -rf %{buildroot}%{_datadir}/terminfo/g/ghostty %endif %{_datadir}/terminfo/x/xterm-%{base_name} -%files terminfo-source -%{_datadir}/terminfo/%{base_name}.termcap -%{_datadir}/terminfo/%{base_name}.terminfo +%post +%systemd_user_post app-%{appid}.service + +%preun +%systemd_user_preun app-%{appid}.service + +%postun +%systemd_user_postun app-%{appid}.service %changelog +* Sat May 31 2025 Gilver E. - 1.1.4~tip^20250531git1ff9162 +- Updated for Zig 0.14.0 +- Updated for ncurses-term compatibility in Fedora 42 and Rawhide * Wed Mar 05 2025 Gilver E. - Update to 1.1.3~tip^20250305git66e8d91-2%{?dist} * Ghostty now has localization support via gettext as well as corresponding localization files diff --git a/anda/devs/ghostty/stable/ghostty.spec b/anda/devs/ghostty/stable/ghostty.spec index 212f0db020..fb73d22007 100644 --- a/anda/devs/ghostty/stable/ghostty.spec +++ b/anda/devs/ghostty/stable/ghostty.spec @@ -1,19 +1,16 @@ # Signing key from https://github.com/ghostty-org/ghostty/blob/main/PACKAGING.md %global public_key RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV -%if 0%{?fedora} <= 40 -%global cache_dir %{_builddir}/zig-cache -%else -%global cache_dir %{builddir}/zig-cache -%endif +%global appid com.mitchellh.ghostty Name: ghostty Version: 1.1.3 -Release: 1%?dist +Release: 2%?dist Summary: A fast, native terminal emulator written in Zig. License: MIT AND MPL-2.0 AND OFL-1.1 AND (WTFPL OR CC0-1.0) AND Apache-2.0 URL: https://ghostty.org/ Source0: https://release.files.ghostty.org/%{version}/ghostty-%{version}.tar.gz Source1: https://release.files.ghostty.org/%{version}/ghostty-%{version}.tar.gz.minisig +BuildRequires: anda-srpm-macros >= 0.2.15 BuildRequires: gtk4-devel BuildRequires: libadwaita-devel BuildRequires: libX11-devel @@ -21,7 +18,8 @@ BuildRequires: minisign BuildRequires: ncurses BuildRequires: ncurses-devel BuildRequires: pandoc-cli -BuildRequires: zig +BuildRequires: zig >= 0.14.0 +BuildRequires: zig-rpm-macros BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(fontconfig) @@ -34,6 +32,7 @@ BuildRequires: pkgconfig(oniguruma) BuildRequires: pkgconfig(zlib) Requires: %{name}-terminfo = %{version}-%{release} Requires: %{name}-shell-integration = %{version}-%{release} +Requires: (%{name}-kio = %{evr} if kf6-kio) Requires: gtk4 Requires: libadwaita Conflicts: ghostty-nightly @@ -72,6 +71,54 @@ BuildArch: noarch %description zsh-completion Zsh shell completion for Ghostty. +%package kio +Summary: KIO support for Ghostty +Requires: %{name} = %{evr} +BuildArch: noarch + +%description kio +This package allows Ghostty to interact with KIO. + +%package nautilus +Summary: Nautilus menu support for Ghostty +Supplements: (%{name} and nautilus) +Requires: %{name} = %{evr} +BuildArch: noarch + +%description nautilus +This package enables Nautilus integration for Ghostty. + +%package vim +Summary: Vim plugins for Ghostty +Supplements: (%{name} and vim-filesystem) +Requires: %{name} = %{evr} +Requires: vim-enhanced +Requires: vim-filesystem +BuildArch: noarch + +%description vim +This package provides the Ghostty Vim plugins. + +%package neovim +Summary: Neovim plugins for Ghostty +Supplements: (%{name} and neovim) +Requires: %{name} = %{evr} +Requires: neovim +BuildArch: noarch + +%description neovim +This package provides the Neovim plugins for Ghostty. + +%package bat-syntax +Summary: Bat syntax for Ghostty +Supplements: (%{name} and bat) +Requires: %{name} = %{evr} +Requires: bat +BuildArch: noarch + +%description bat-syntax +This package provides the Bat syntax files for Ghostty. + %package shell-integration Summary: Ghostty shell integration Supplements: %{name} @@ -86,6 +133,7 @@ Supplements: %{name} %if 0%{?fedora} >= 42 Requires: ncurses-term >= 6.5-5.20250125%{?dist} %endif +Obsoletes: %{name}-terminfo-source < %{evr} BuildArch: noarch %description terminfo @@ -104,7 +152,7 @@ Source files for Ghostty's terminfo. Available for debugging use. /usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} %autosetup -export ZIG_GLOBAL_CACHE_DIR="%{cache_dir}" +export ZIG_GLOBAL_CACHE_DIR="%{_zig_cache_dir}" zig build --fetch zig fetch git+https://github.com/zigimg/zigimg#3a667bdb3d7f0955a5a51c8468eac83210c1439e zig fetch git+https://github.com/mitchellh/libxev#f6a672a78436d8efee1aa847a43a900ad773618b @@ -113,20 +161,13 @@ zig fetch git+https://github.com/mitchellh/libxev#f6a672a78436d8efee1aa847a43a90 %install DESTDIR="%{buildroot}" \ -zig build \ - --summary all \ - --release=fast \ - --system "%{cache_dir}/p" \ +%{zig_build_target -r fast} \ --prefix "%{_prefix}" --prefix-lib-dir "%{_libdir}" \ --prefix-exe-dir "%{_bindir}" --prefix-include-dir "%{_includedir}" \ - --verbose \ - -Dversion-string=%{version} \ - -Dcpu=baseline \ + -Dversion-string="%{version}" \ -Dstrip=false \ -Dpie=true \ - -Demit-docs \ - -Demit-termcap \ - -Demit-terminfo + -Demit-docs #Don't conflict with ncurses-term on F42 and up %if 0%{?fedora} >= 42 @@ -136,49 +177,65 @@ rm -rf %{buildroot}%{_datadir}/terminfo/g/ghostty %files %doc README.md %license LICENSE -%{_bindir}/ghostty -%{_datadir}/applications/com.mitchellh.ghostty.desktop -%{_datadir}/bat/syntaxes/ghostty.sublime-syntax -%{_datadir}/ghostty/ -%{_datadir}/kio/servicemenus/com.mitchellh.ghostty.desktop -%{_datadir}/nautilus-python/extensions/ghostty.py -%{_datadir}/nvim/site/compiler/ghostty.vim -%{_datadir}/nvim/site/ftdetect/ghostty.vim -%{_datadir}/nvim/site/ftplugin/ghostty.vim -%{_datadir}/nvim/site/syntax/ghostty.vim -%{_datadir}/vim/vimfiles/compiler/ghostty.vim -%{_datadir}/vim/vimfiles/ftdetect/ghostty.vim -%{_datadir}/vim/vimfiles/ftplugin/ghostty.vim -%{_datadir}/vim/vimfiles/syntax/ghostty.vim -%{_iconsdir}/hicolor/16x16/apps/com.mitchellh.ghostty.png -%{_iconsdir}/hicolor/16x16@2/apps/com.mitchellh.ghostty.png -%{_iconsdir}/hicolor/32x32/apps/com.mitchellh.ghostty.png -%{_iconsdir}/hicolor/32x32@2/apps/com.mitchellh.ghostty.png -%{_iconsdir}/hicolor/128x128/apps/com.mitchellh.ghostty.png -%{_iconsdir}/hicolor/128x128@2/apps/com.mitchellh.ghostty.png -%{_iconsdir}/hicolor/256x256/apps/com.mitchellh.ghostty.png -%{_iconsdir}/hicolor/256x256@2/apps/com.mitchellh.ghostty.png -%{_iconsdir}/hicolor/512x512/apps/com.mitchellh.ghostty.png -%{_iconsdir}/hicolor/1024x1024/apps/com.mitchellh.ghostty.png -%{_mandir}/man1/ghostty.1.gz -%{_mandir}/man5/ghostty.5.gz +%{_bindir}/%{name} +%{_datadir}/applications/%{appid}.desktop +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/doc +%{_datadir}/%{name}/themes +%{_datadir}/metainfo/%{appid}.metainfo.xml +%{_iconsdir}/hicolor/16x16/apps/%{appid}.png +%{_iconsdir}/hicolor/16x16@2/apps/%{appid}.png +%{_iconsdir}/hicolor/32x32/apps/%{appid}.png +%{_iconsdir}/hicolor/32x32@2/apps/%{appid}.png +%{_iconsdir}/hicolor/128x128/apps/%{appid}.png +%{_iconsdir}/hicolor/128x128@2/apps/%{appid}.png +%{_iconsdir}/hicolor/256x256/apps/%{appid}.png +%{_iconsdir}/hicolor/256x256@2/apps/%{appid}.png +%{_iconsdir}/hicolor/512x512/apps/%{appid}.png +%{_iconsdir}/hicolor/1024x1024/apps/%{appid}.png +%{_mandir}/man1/%{name}.1.gz +%{_mandir}/man5/%{name}.5.gz +%{_userunitdir}/%{appid}.service +%{_prefix}/lib/dbus-1/services/%{appid}.service %files bash-completion -%{bash_completions_dir}/ghostty.bash +%{bash_completions_dir}/%{name}.bash %files fish-completion -%{fish_completions_dir}/ghostty.fish +%{fish_completions_dir}/%{name}.fish %files zsh-completion -%{zsh_completions_dir}/_ghostty +%{zsh_completions_dir}/_%{name} + +%files kio +%{_datadir}/kio/servicemenus/%{appid}.desktop + +%files nautilus +%{_datadir}/nautilus-python/extensions/%{name}.py + +%files vim +%{_datadir}/vim/vimfiles/compiler/%{name}.vim +%{_datadir}/vim/vimfiles/ftdetect/%{name}.vim +%{_datadir}/vim/vimfiles/ftplugin/%{name}.vim +%{_datadir}/vim/vimfiles/syntax/%{name}.vim + +%files neovim +%{_datadir}/nvim/site/compiler/%{name}.vim +%{_datadir}/nvim/site/ftdetect/%{name}.vim +%{_datadir}/nvim/site/ftplugin/%{name}.vim +%{_datadir}/nvim/site/syntax/%{name}.vim + +%files bat-syntax +%{_datadir}/bat/syntaxes/%{name}.sublime-syntax %files shell-integration -%{_datadir}/ghostty/shell-integration/bash/bash-preexec.sh -%{_datadir}/ghostty/shell-integration/bash/ghostty.bash -%{_datadir}/ghostty/shell-integration/elvish/lib/ghostty-integration.elv -%{_datadir}/ghostty/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish -%{_datadir}/ghostty/shell-integration/zsh/.zshenv -%{_datadir}/ghostty/shell-integration/zsh/ghostty-integration +%dir %{_datadir}/%{name}/shell-integration +%{_datadir}/%{name}/shell-integration/bash/bash-preexec.sh +%{_datadir}/%{name}/shell-integration/bash/%{name}.bash +%{_datadir}/%{name}/shell-integration/elvish/lib/%{name}-integration.elv +%{_datadir}/%{name}/shell-integration/fish/vendor_conf.d/%{name}-shell-integration.fish +%{_datadir}/%{name}/shell-integration/zsh/.zshenv +%{_datadir}/%{name}/shell-integration/zsh/%{name}-integration %files terminfo %if 0%{?fedora} < 42 diff --git a/anda/devs/kvrocks/kvrocks.spec b/anda/devs/kvrocks/kvrocks.spec index cf3abf2561..063f438a6f 100644 --- a/anda/devs/kvrocks/kvrocks.spec +++ b/anda/devs/kvrocks/kvrocks.spec @@ -1,5 +1,5 @@ Name: kvrocks -Version: 2.12.1 +Version: 2.13.0 Release: 1%?dist Summary: Distributed key value NoSQL database that uses RocksDB License: Apache-2.0 diff --git a/anda/devs/micro/micro-nightly.spec b/anda/devs/micro/micro-nightly.spec index 2c7ac6ffbe..039f144da9 100644 --- a/anda/devs/micro/micro-nightly.spec +++ b/anda/devs/micro/micro-nightly.spec @@ -12,8 +12,8 @@ # Naming variable as something other than "commit" is necessary # to stop %%gometa from putting commit hash in release -%global commit_hash 5eddf5b85d66f95e9e61d2f0a9f972d432936979 -%global commit_date 20250527 +%global commit_hash b8057f28c6e5adef9744250643ad8cf8b5fafa18 +%global commit_date 20250826 %global shortcommit %{sub %{commit_hash} 1 7} %global ver 2.0.14 @@ -60,7 +60,6 @@ Conflicts: micro git clone --recurse-submodules -q %{gourl} micro-%{version} cd %{builddir}/micro-%{version} && git checkout -q %{commit_hash} %gomkdir -%go_prep_online %build %if %{without bootstrap} diff --git a/anda/devs/neovide/neovide.spec b/anda/devs/neovide/neovide.spec index 434ceedd95..516f1494ed 100644 --- a/anda/devs/neovide/neovide.spec +++ b/anda/devs/neovide/neovide.spec @@ -2,7 +2,7 @@ %global raw_forgeurl https://raw.githubusercontent.com/%{crate}/%{crate} Name: rust-neovide -Version: 0.14.1 +Version: 0.15.1 Release: 1%?dist Summary: No Nonsense Neovim Client in Rust diff --git a/anda/devs/rio/rio.spec b/anda/devs/rio/rio.spec index 8ec5c54948..b1c28ac14b 100644 --- a/anda/devs/rio/rio.spec +++ b/anda/devs/rio/rio.spec @@ -4,12 +4,12 @@ A hardware-accelerated terminal emulator focusing to run in desktops and browser %bcond docs 1 Name: rio -Version: 0.2.16 +Version: 0.2.29 Release: 1%?dist Summary: A hardware-accelerated terminal written in Rust. SourceLicense: MIT License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND Apache-2.0 AND BSD-2-Clause AND BSL-1.0 AND (CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND CC0-1.0 AND ISC AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND (MPL-2.0 OR GPL-3.0-only) AND MPL-2.0+ AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) AND Zlib -URL: http://rioterm.com +URL: https://rioterm.com/ Source0: https://github.com/raphamorim/%{name}/archive/refs/tags/v%{version}.tar.gz BuildRequires: anda-srpm-macros BuildRequires: cargo-rpm-macros diff --git a/anda/devs/shibuya/python-shibuya.spec b/anda/devs/shibuya/python-shibuya.spec index 1913c7225e..0b77e3d467 100644 --- a/anda/devs/shibuya/python-shibuya.spec +++ b/anda/devs/shibuya/python-shibuya.spec @@ -5,8 +5,8 @@ A responsive, good looking with modern design documentation theme for Sphinx, wi %bcond docs 0 Name: python-%{pypi_name} -Version: 2025.4.25 -Release: 2%{?dist} +Version: 2025.8.16 +Release: 1%?dist Summary: A clean, responsive, and customizable Sphinx documentation theme with light/dark mode License: BSD-3-Clause URL: https://shibuya.lepture.com @@ -27,6 +27,7 @@ BuildRequires: python3dist(myst-parser) BuildRequires: python3dist(shibuya) BuildRequires: python3dist(sphinx-copybutton) BuildRequires: python3dist(sphinx-design) +BuildRequires: python3dist(sphinx-togglebutton) %endif BuildArch: noarch Packager: Gilver E. @@ -75,7 +76,11 @@ This package contains the official docs for Shibuya. rm -rf %{pypi_name}.egg-info %build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif %if %{with docs} sphinx-build docs build/_html -b dirhtml -a @@ -88,13 +93,21 @@ done %endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{python3_sitelib}/%{pypi_name} +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else %{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif %if %{with docs} %files -n python3-%{pypi_name}-doc diff --git a/anda/devs/tracy/tracy.spec b/anda/devs/tracy/tracy.spec index 36f79cf155..7ec991aa9c 100644 --- a/anda/devs/tracy/tracy.spec +++ b/anda/devs/tracy/tracy.spec @@ -1,7 +1,7 @@ %global _desc Tracy is a real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications. Name: tracy -Version: 0.11.1 +Version: 0.12.2 Release: 1%?dist Summary: A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications. License: BSD-3-Clause diff --git a/anda/devs/yadm/yadm.spec b/anda/devs/yadm/yadm.spec index c063388855..081b8ba1e2 100644 --- a/anda/devs/yadm/yadm.spec +++ b/anda/devs/yadm/yadm.spec @@ -1,6 +1,6 @@ Name: yadm Version: 3.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Yet Another Dotfiles Manager License: GPL-3.0-only @@ -19,32 +19,7 @@ yadm supplies the ability to manage a subset of secure files, which are encrypted before they are included in the repository. -%package bash-completion -Summary: Bash completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: bash-completion -Supplements: (%{name} and bash-completion) - -%description bash-completion -Bash command line completion support for %{name}. - -%package fish-completion -Summary: Fish completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: fish -Supplements: (%{name} and fish) - -%description fish-completion -Fish command line completion support for %{name}. - -%package zsh-completion -Summary: Zsh completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: zsh -Supplements: (%{name} and zsh) - -%description zsh-completion -Zsh command line completion support for %{name}. +%pkg_completion -Bfz %prep @@ -64,15 +39,6 @@ install -Dpm644 -t %buildroot%zsh_completions_dir completion/zsh/_yadm %_bindir/yadm %_mandir/man1/yadm.1.gz -%files bash-completion -%bash_completions_dir/yadm - -%files fish-completion -%fish_completions_dir/yadm.fish - -%files zsh-completion -%zsh_completions_dir/_yadm - %changelog * Sun May 05 2024 madonuko - 0.5-1 - Initial package. diff --git a/anda/devs/zed/nightly/zed-nightly.spec b/anda/devs/zed/nightly/zed-nightly.spec index 3b6fad5ff8..ec043cb9e1 100644 --- a/anda/devs/zed/nightly/zed-nightly.spec +++ b/anda/devs/zed/nightly/zed-nightly.spec @@ -1,9 +1,10 @@ -%global commit 4a577fff4a208fa877574069c8e8725ad66dd018 +%global commit a852bcc09410b47dcabbe9b089725777024d125e %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20250527 -%global ver 0.189.0 +%global commit_date 20250901 +%global ver 0.203.0 %bcond_with check +%bcond nightly 1 # Exclude input files from mangling %global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ @@ -25,6 +26,10 @@ Source0: https://github.com/zed-industries/zed/archive/%{commit}.tar.gz Conflicts: zed Conflicts: zed-preview +%ifarch x86_64 +# BUG: fedora rustc missing this dep +BuildRequires: libedit(x86-64) +%endif BuildRequires: cargo-rpm-macros >= 24 BuildRequires: anda-srpm-macros BuildRequires: gcc @@ -37,20 +42,55 @@ BuildRequires: alsa-lib-devel BuildRequires: fontconfig-devel BuildRequires: wayland-devel BuildRequires: libxkbcommon-x11-devel +BuildRequires: openssl-devel +%if 0%{?fedora} BuildRequires: openssl-devel-engine +%endif BuildRequires: libzstd-devel BuildRequires: perl-FindBin BuildRequires: perl-IPC-Cmd BuildRequires: perl-File-Compare BuildRequires: perl-File-Copy BuildRequires: perl-lib +%if %{with nightly} +BuildRequires: rustup +%endif BuildRequires: vulkan-loader +Requires: (%name-rename-zeditor if zfs else %name-cli) +Suggests: %name-cli %description Code at the speed of thought - Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. +%package cli +Summary: Provides the /usr/bin/zed binary +Conflicts: zfs +Supplements: (%name unless zfs) +%description cli +This package provides the /usr/bin/zed binary. If you use zfs, install %name-rename-zeditor instead. +%files cli +%_bindir/zed +%{_datadir}/applications/%app_id.desktop + +%package rename-zeditor +Summary: Rename zed to zeditor to prevent collision with zfs +Provides: %name-cli +Conflicts: %name-cli +Supplements: (%name and zfs) +RemovePathPostFixes: .zeditor +%description rename-zeditor +This package provides the %_bindir/zeditor binary instead of %_bindir/zed. This avoids conflicts with the zfs package. +The normal package is %name-cli. +%files rename-zeditor +%_bindir/zeditor +%_datadir/applications/%app_id.desktop.zeditor + + %prep %autosetup -n %{crate}-%{commit} -p1 +%if %{with nightly} +%rustup_nightly +%endif %cargo_prep_online export DO_STARTUP_NOTIFY="true" @@ -75,15 +115,18 @@ export ZED_UPDATE_EXPLANATION="Run dnf up to update Zed Nightly from Terra." echo "nightly" > crates/zed/RELEASE_CHANNEL %cargo_build -- --package zed --package cli -script/generate-licenses +ALLOW_MISSING_LICENSES=1 script/generate-licenses %install install -Dm755 target/rpm/zed %{buildroot}%{_libexecdir}/zed-editor +install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zeditor install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zed %__cargo clean install -Dm644 %app_id.desktop %{buildroot}%{_datadir}/applications/%app_id.desktop +sed 's/Exec=zed/Exec=zeditor/' %app_id.desktop > %app_id.desktop.zeditor +install -Dm644 %app_id.desktop.zeditor -t %buildroot%_datadir/applications/ install -Dm644 crates/zed/resources/app-icon-nightly.png %{buildroot}%{_datadir}/pixmaps/%app_id.png install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo.xml @@ -104,7 +147,7 @@ install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo > LICENSE.dependencies mv assets/icons/LICENSES LICENSE.icons mv assets/themes/LICENSES LICENSE.themes -mv assets/fonts/plex-mono/license.txt LICENSE.fonts +mv assets/fonts/ibm-plex-sans/license.txt LICENSE.fonts %if %{with check} %check @@ -123,8 +166,6 @@ mv assets/fonts/plex-mono/license.txt LICENSE.fonts %license LICENSE.themes %license assets/licenses.md %{_libexecdir}/zed-editor -%{_bindir}/zed -%{_datadir}/applications/%app_id.desktop %{_datadir}/pixmaps/%app_id.png %{_metainfodir}/%app_id.metainfo.xml diff --git a/anda/devs/zed/preview/zed-preview.spec b/anda/devs/zed/preview/zed-preview.spec index f6bb93551c..c5202bccef 100644 --- a/anda/devs/zed/preview/zed-preview.spec +++ b/anda/devs/zed/preview/zed-preview.spec @@ -1,6 +1,6 @@ %bcond_with check -%global ver 0.188.3-pre +%global ver 0.202.4-pre # Exclude input files from mangling %global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ @@ -11,7 +11,7 @@ Name: zed-preview Version: %(echo %ver | sed 's/-/~/') -Release: pre2%?dist +Release: 4%?dist Summary: Zed is a high-performance, multiplayer code editor SourceLicense: AGPL-3.0-only AND Apache-2.0 AND GPL-3.0-or-later License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 AND ISC) AND AGPL.3.0-only AND AGPL-3.0-or-later AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND BSD-2-Clause AND (CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (CC0-1.0 OR Apache-2.0) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND CC0-1.0 AND GPL-3.0-or-later AND (ISC AND (Apache-2.0 OR ISC) AND OpenSSL) AND (ISC AND (Apache-2.0 OR ISC)) AND ISC AND (MIT AND (MIT OR Apache-2.0)) AND (MIT AND BSD-3-Clause) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) AND Zlib @@ -21,6 +21,10 @@ Source0: https://github.com/zed-industries/zed/archive/refs/tags/v%{ver}. Conflicts: zed Conflicts: zed-nightly +%ifarch x86_64 +# BUG: fedora rustc missing this dep +BuildRequires: libedit(x86-64) +%endif BuildRequires: cargo-rpm-macros >= 24 BuildRequires: anda-srpm-macros BuildRequires: gcc @@ -33,7 +37,10 @@ BuildRequires: alsa-lib-devel BuildRequires: fontconfig-devel BuildRequires: wayland-devel BuildRequires: libxkbcommon-x11-devel +BuildRequires: openssl-devel +%if 0%{?fedora} BuildRequires: openssl-devel-engine +%endif BuildRequires: libzstd-devel BuildRequires: perl-FindBin BuildRequires: perl-IPC-Cmd @@ -41,10 +48,36 @@ BuildRequires: perl-File-Compare BuildRequires: perl-File-Copy BuildRequires: perl-lib BuildRequires: vulkan-loader +Requires: (%name-rename-zeditor if zfs else %name-cli) +Suggests: %name-cli %description Code at the speed of thought - Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. +%package cli +Summary: Provides the /usr/bin/zed binary +Conflicts: zfs +Supplements: (%name unless zfs) +%description cli +This package provides the /usr/bin/zed binary. If you use zfs, install %name-rename-zeditor instead. +%files cli +%_bindir/zed +%{_datadir}/applications/%app_id.desktop + +%package rename-zeditor +Summary: Rename zed to zeditor to prevent collision with zfs +Provides: %name-cli +Conflicts: %name-cli +Supplements: (%name and zfs) +RemovePathPostFixes: .zeditor +%description rename-zeditor +This package provides the %_bindir/zeditor binary instead of %_bindir/zed. This avoids conflicts with the zfs package. +The normal package is %name-cli. +%files rename-zeditor +%_bindir/zeditor +%_datadir/applications/%app_id.desktop.zeditor + + %prep %autosetup -n %{crate}-%{ver} -p1 %cargo_prep_online @@ -71,15 +104,18 @@ export ZED_UPDATE_EXPLANATION="Run dnf up to update Zed Preview from Terra." echo "preview" > crates/zed/RELEASE_CHANNEL %cargo_build -- --package zed --package cli -script/generate-licenses +ALLOW_MISSING_LICENSES=1 script/generate-licenses %install install -Dm755 target/rpm/zed %{buildroot}%{_libexecdir}/zed-editor +install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zeditor install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zed %__cargo clean install -Dm644 %app_id.desktop %{buildroot}%{_datadir}/applications/%app_id.desktop +sed 's/Exec=zed/Exec=zeditor/' %app_id.desktop > %app_id.desktop.zeditor +install -Dm644 %app_id.desktop.zeditor -t %buildroot%_datadir/applications/ install -Dm644 crates/zed/resources/app-icon-preview.png %{buildroot}%{_datadir}/pixmaps/%app_id.png install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo.xml @@ -100,7 +136,7 @@ install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo > LICENSE.dependencies mv assets/icons/LICENSES LICENSE.icons mv assets/themes/LICENSES LICENSE.themes -mv assets/fonts/plex-mono/license.txt LICENSE.fonts +mv assets/fonts/ibm-plex-sans/license.txt LICENSE.fonts %if %{with check} %check @@ -119,8 +155,6 @@ mv assets/fonts/plex-mono/license.txt LICENSE.fonts %license LICENSE.themes %license assets/licenses.md %{_libexecdir}/zed-editor -%{_bindir}/zed -%{_datadir}/applications/%app_id.desktop %{_datadir}/pixmaps/%app_id.png %{_metainfodir}/%app_id.metainfo.xml diff --git a/anda/devs/zed/stable/zed.spec b/anda/devs/zed/stable/zed.spec index e088bf9dd8..a63aa2707d 100644 --- a/anda/devs/zed/stable/zed.spec +++ b/anda/devs/zed/stable/zed.spec @@ -9,7 +9,7 @@ %global rustflags_debuginfo 0 Name: zed -Version: 0.187.9 +Version: 0.201.8 Release: 1%?dist Summary: Zed is a high-performance, multiplayer code editor SourceLicense: AGPL-3.0-only AND Apache-2.0 AND GPL-3.0-or-later @@ -20,6 +20,10 @@ Source0: https://github.com/zed-industries/zed/archive/refs/tags/v%{versi Conflicts: zed-nightly Conflicts: zed-preview +%ifarch x86_64 +# BUG: fedora rustc missing this dep +BuildRequires: libedit(x86-64) +%endif BuildRequires: cargo-rpm-macros >= 24 BuildRequires: anda-srpm-macros BuildRequires: gcc @@ -32,7 +36,10 @@ BuildRequires: alsa-lib-devel BuildRequires: fontconfig-devel BuildRequires: wayland-devel BuildRequires: libxkbcommon-x11-devel +BuildRequires: openssl-devel +%if 0%{?fedora} BuildRequires: openssl-devel-engine +%endif BuildRequires: libzstd-devel BuildRequires: perl-FindBin BuildRequires: perl-IPC-Cmd @@ -41,10 +48,36 @@ BuildRequires: perl-File-Copy BuildRequires: perl-lib BuildRequires: vulkan-loader BuildRequires: libcurl-devel +Requires: (%name-rename-zeditor if zfs else %name-cli) +Suggests: %name-cli %description Code at the speed of thought - Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. +%package cli +Summary: Provides the /usr/bin/zed binary +Conflicts: zfs +Supplements: (%name unless zfs) +%description cli +This package provides the /usr/bin/zed binary. If you use zfs, install %name-rename-zeditor instead. +%files cli +%_bindir/zed +%{_datadir}/applications/%app_id.desktop + +%package rename-zeditor +Summary: Rename zed to zeditor to prevent collision with zfs +Provides: %name-cli +Conflicts: %name-cli +Supplements: (%name and zfs) +RemovePathPostFixes: .zeditor +%description rename-zeditor +This package provides the %_bindir/zeditor binary instead of %_bindir/zed. This avoids conflicts with the zfs package. +The normal package is %name-cli. +%files rename-zeditor +%_bindir/zeditor +%_datadir/applications/%app_id.desktop.zeditor + + %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep_online @@ -71,15 +104,18 @@ export ZED_UPDATE_EXPLANATION="Run dnf up to update Zed from Terra." echo "stable" > crates/zed/RELEASE_CHANNEL %cargo_build -- --package zed --package cli -script/generate-licenses +ALLOW_MISSING_LICENSES=1 script/generate-licenses %install install -Dm755 target/rpm/zed %{buildroot}%{_libexecdir}/zed-editor +install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zeditor install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zed %__cargo clean install -Dm644 %app_id.desktop %{buildroot}%{_datadir}/applications/%app_id.desktop +sed 's/Exec=zed/Exec=zeditor/' %app_id.desktop > %app_id.desktop.zeditor +install -Dm644 %app_id.desktop.zeditor -t %buildroot%_datadir/applications/ install -Dm644 crates/zed/resources/app-icon.png %{buildroot}%{_datadir}/pixmaps/%app_id.png install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo.xml @@ -100,7 +136,7 @@ install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo > LICENSE.dependencies mv assets/icons/LICENSES LICENSE.icons mv assets/themes/LICENSES LICENSE.themes -mv assets/fonts/plex-mono/license.txt LICENSE.fonts +mv assets/fonts/ibm-plex-sans/license.txt LICENSE.fonts %if %{with check} %check @@ -119,8 +155,6 @@ mv assets/fonts/plex-mono/license.txt LICENSE.fonts %license LICENSE.themes %license assets/licenses.md %{_libexecdir}/zed-editor -%{_bindir}/zed -%{_datadir}/applications/%app_id.desktop %{_datadir}/pixmaps/%app_id.png %{_metainfodir}/%app_id.metainfo.xml diff --git a/anda/fonts/geist/anda.hcl b/anda/fonts/geist/anda.hcl new file mode 100644 index 0000000000..0f62482d3b --- /dev/null +++ b/anda/fonts/geist/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "geist.spec" + } +} diff --git a/anda/fonts/geist/geist.spec b/anda/fonts/geist/geist.spec new file mode 100644 index 0000000000..54d8d27bae --- /dev/null +++ b/anda/fonts/geist/geist.spec @@ -0,0 +1,52 @@ +Name: geist-font +Version: 1.5.0 +Release: 1%?dist +URL: https://vercel.com/font +Source0: https://github.com/vercel/geist-font/archive/refs/tags/%version.tar.gz +License: OFL-1.1 +Summary: Geist is a new font family for Vercel, created by Vercel in collaboration with Basement Studio +BuildRequires: make python3 python3.10 python3.10-devel meson cairo cairo-devel gcc +BuildArch: noarch +Provides: geist = %evr +Packager: Owen Zimmerman + +%description +Geist is a new font family for Vercel, created by Vercel in collaboration with Basement Studio. + +Geist Sans is a sans-serif typeface designed for legibility and simplicity. It is a modern, geometric typeface +that is based on the principles of classic Swiss typography. It is designed to be used in +headlines, logos, posters, and other large display sizes. + +%package mono +Requires: %{name} = %{version}-%{release} +Summary: Geist Mono is a monospaced typeface that has been crafted to be the perfect partner to Geist Sans +Provides: geist-mono = %evr +Provides: geist-mono-fonts = %evr + +%description mono +Geist Mono is a monospaced typeface that has been crafted to be the perfect partner to Geist Sans. +It is designed to be used in code editors, diagrams, terminals, and other textbased interfaces where code is represented. + +%prep +%autosetup -n %name-%version + +%build +%make_build + +%install +mkdir -p %{buildroot}/usr/share/fonts/Geist/ +mkdir -p %{buildroot}/usr/share/fonts/GeistMono/ +install -Dm644 fonts/Geist/ttf/*.ttf %{buildroot}%{_datadir}/fonts/Geist/ +install -Dm644 fonts/GeistMono/ttf/*.ttf %{buildroot}%{_datadir}/fonts/GeistMono/ + +%files +%doc readme.md AUTHORS.txt CONTRIBUTORS.txt requirements-test.txt requirements.txt OFL.txt +%license LICENSE.txt +%{_datadir}/fonts/Geist/* + +%files mono +%{_datadir}/fonts/GeistMono/* + +%changelog +* Wed Jun 04 2025 Owen Zimmerman +- Package Geist fonts diff --git a/anda/fonts/geist/update.rhai b/anda/fonts/geist/update.rhai new file mode 100644 index 0000000000..0740bc084d --- /dev/null +++ b/anda/fonts/geist/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("vercel/geist-font")); diff --git a/anda/fonts/maple/maple-fonts.spec b/anda/fonts/maple/maple-fonts.spec index 54ad723786..97f362988f 100644 --- a/anda/fonts/maple/maple-fonts.spec +++ b/anda/fonts/maple/maple-fonts.spec @@ -1,6 +1,6 @@ %define debug_package %nil %define _ttfontsdir %{_datadir}/fonts/maple -%global upstream_ver v7.2 +%global upstream_ver v7.6 %define sanitized_ver %(echo "$( sed 's/^.//;s/-/~/' <<< "%{upstream_ver}" )") Name: maple-fonts diff --git a/anda/fonts/nerd-fonts/anda.hcl b/anda/fonts/nerd-fonts/anda.hcl index db05b8ecef..50ebcbb342 100644 --- a/anda/fonts/nerd-fonts/anda.hcl +++ b/anda/fonts/nerd-fonts/anda.hcl @@ -3,4 +3,7 @@ project pkg { rpm { spec = "nerd-fonts.spec" } + labels { + no_upload_srpms = 1 + } } diff --git a/anda/fonts/sarasa-gothic/sarasa-gothic-fonts.spec b/anda/fonts/sarasa-gothic/sarasa-gothic-fonts.spec index f158119a67..a6b01a8383 100644 --- a/anda/fonts/sarasa-gothic/sarasa-gothic-fonts.spec +++ b/anda/fonts/sarasa-gothic/sarasa-gothic-fonts.spec @@ -1,5 +1,5 @@ Name: sarasa-gothic-fonts -Version: 1.0.30 +Version: 1.0.32 Release: 1%?dist URL: https://github.com/be5invis/Sarasa-Gothic Source0: %url/releases/download/v%version/Sarasa-TTC-%version.7z diff --git a/anda/fonts/spleen/anda.hcl b/anda/fonts/spleen/anda.hcl new file mode 100644 index 0000000000..b4da366bc1 --- /dev/null +++ b/anda/fonts/spleen/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "spleen-fonts.spec" + } +} diff --git a/anda/fonts/spleen/spleen-fonts.spec b/anda/fonts/spleen/spleen-fonts.spec new file mode 100644 index 0000000000..e00030259e --- /dev/null +++ b/anda/fonts/spleen/spleen-fonts.spec @@ -0,0 +1,42 @@ +%global __make bmake +%global _make_output_sync %nil +%global fontcontact security@fyralabs.com +%global fontorg com.fyralabs.terra + +Version: 2.1.0 +Release: 1%?dist +URL: https://www.cambus.net/spleen-monospaced-bitmap-fonts/ + +%global fontlicense BSD-2-Clause +%global fontlicenses LICENSE +%global fontdocs FAQ ChangeLog AUTHORS README.md +%global fontfamily Spleen +%global fontsummary Monospaced bitmap fonts +%global fonts *.otf +%global fontdescription %fontsummary + +Source0: https://github.com/fcambus/spleen/archive/refs/tags/%version.zip + +BuildRequires: bmake fontforge +BuildRequires: bdf2sfd +BuildRequires: rpm_macro(fontpkg) + +%fontpkg + +%prep +%autosetup -n spleen-%version + +%build +%make_build sfd +%make_build otf +%fontbuild + +%install +install -Dm644 fonts.alias *.otf -t %buildroot%_fontbasedir/%name/ +%fontinstall -a + +%check +%fontcheck -a + +%fontfiles -a +%_fontbasedir/%name/fonts.alias diff --git a/anda/fonts/spleen/update.rhai b/anda/fonts/spleen/update.rhai new file mode 100644 index 0000000000..92c6f4a8cd --- /dev/null +++ b/anda/fonts/spleen/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("fcambus/spleen")); diff --git a/anda/games/chess-tui/anda.hcl b/anda/games/chess-tui/anda.hcl new file mode 100644 index 0000000000..c64d87b26e --- /dev/null +++ b/anda/games/chess-tui/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-chess-tui.spec" + } +} diff --git a/anda/games/chess-tui/rust-chess-tui.spec b/anda/games/chess-tui/rust-chess-tui.spec new file mode 100644 index 0000000000..f3c2c86236 --- /dev/null +++ b/anda/games/chess-tui/rust-chess-tui.spec @@ -0,0 +1,92 @@ +# Generated by rust2rpm 27 +%bcond check 1 + +%global crate chess-tui + +Name: rust-chess-tui +Version: 1.6.1 +Release: %autorelease +Summary: Rusty chess game in your terminal 🦀 + +License: MIT +URL: https://crates.io/crates/chess-tui +Source: %{crates_source} + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +A rusty chess game in your terminal 🦀.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND MIT AND (MIT OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND Zlib +# LICENSE.dependencies contains a full license breakdown + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%license LICENSE.dependencies +%doc CONTRIBUTING.md +%doc README.md +%{_bindir}/chess-tui + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE +%doc %{crate_instdir}/CONTRIBUTING.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+chess-tui-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+chess-tui-devel %{_description} + +This package contains library source intended for building other packages which +use the "chess-tui" feature of the "%{crate}" crate. + +%files -n %{name}+chess-tui-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/anda/games/chess-tui/update.rhai b/anda/games/chess-tui/update.rhai new file mode 100644 index 0000000000..f1c80022ed --- /dev/null +++ b/anda/games/chess-tui/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("chess-tui")); diff --git a/anda/games/emulationstation-de/emulationstation-de.spec b/anda/games/emulationstation-de/emulationstation-de.spec index 83ba65284a..93d073b2f1 100644 --- a/anda/games/emulationstation-de/emulationstation-de.spec +++ b/anda/games/emulationstation-de/emulationstation-de.spec @@ -8,18 +8,16 @@ %bcond_with kms Name: emulationstation-de -Version: 3.2.0 +Version: 3.3.0 Release: 1%?dist Summary: ES-DE is a frontend for browsing and launching games from your multi-platform collection. Packager: Cappy Ishihara License: MIT URL: https://es-de.org/ Source0: https://gitlab.com/es-de/emulationstation-de/-/archive/v%{version}/emulationstation-de-v%{version}.tar.gz -# Backport a patch to fix a build issue with libgit2 -# This patch should already be included in the next release -Patch0: https://gitlab.com/es-de/emulationstation-de/-/commit/3510a09d83949beb765c140041332583b4e70837.patch BuildRequires: gcc-c++ +BuildRequires: bluez-libs-devel BuildRequires: clang-tools-extra BuildRequires: cmake BuildRequires: gettext @@ -41,6 +39,7 @@ BuildRequires: pugixml-devel BuildRequires: alsa-lib-devel BuildRequires: mesa-libGL-devel BuildRequires: poppler-cpp-devel +BuildRequires: vulkan-loader-devel Provides: es-de = %{version}-%{release} diff --git a/anda/games/gamescope-session/gamescope-session.spec b/anda/games/gamescope-session/gamescope-session.spec index b9dc158a81..c1737193ff 100644 --- a/anda/games/gamescope-session/gamescope-session.spec +++ b/anda/games/gamescope-session/gamescope-session.spec @@ -1,8 +1,8 @@ %define debug_package %nil -%global commit 35ac9fe5f22f3e8d98a34ecb032bc601c67bfe01 +%global commit 1c14e09d2cf75c9716fb8ca808d243ea9f5e9154 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20250526 +%global commit_date 20250802 Name: gamescope-session Version: %commit_date.%shortcommit @@ -33,6 +33,7 @@ cp -r usr %buildroot/ %_userunitdir/gamescope-session-plus@.service %_datadir/gamescope-session-plus/device-quirks %_datadir/gamescope-session-plus/gamescope-session-plus +%_datadir/gamescope/scripts/50-custom/50-disable-explicit-sync.lua %changelog %autochangelog diff --git a/anda/games/heroic-games-launcher/heroic-games-launcher.spec b/anda/games/heroic-games-launcher/heroic-games-launcher.spec index a852054de3..faee1d53ec 100644 --- a/anda/games/heroic-games-launcher/heroic-games-launcher.spec +++ b/anda/games/heroic-games-launcher/heroic-games-launcher.spec @@ -5,7 +5,6 @@ %elifarch aarch64 %global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\x86_64*\\.so.*)|(.*\\x86-64*\\.so.*))$ %endif -%define _build_id_links none %global org_name Heroic-Games-Launcher %global git_name %(echo %{org_name} | sed 's/-//g') %global reverse_dns com.heroicgameslauncher.hgl @@ -16,14 +15,14 @@ %global comet_version 0.2.0 Name: %{shortname}-games-launcher -Version: 2.17.0 +Version: 2.18.1 Release: 1%?dist Summary: A games launcher for GOG, Amazon, and Epic Games License: GPL-3.0-only AND MIT AND BSD-3-Clause URL: https://heroicgameslauncher.com BuildRequires: anda-srpm-macros BuildRequires: desktop-file-utils -### Electron builder builds some things with GCC(++), Git, and Make +# Electron builder builds some things with GCC(++), Git, and Make BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: git @@ -38,7 +37,7 @@ Requires: hicolor-icon-theme Requires: nss Requires: python3 Requires: which -Recommends: gamemode +Recommends: (falcond or gamemode) Recommends: mangohud Recommends: umu-launcher Provides: bundled(comet) = %{comet_version} @@ -57,11 +56,11 @@ Heroic is a Free and Open Source Epic, GOG, and Amazon Prime Games launcher for pnpm install pnpm run download-helper-binaries pnpm dist:linux +wait %install mkdir -p %{buildroot}%{_datadir}/%{shortname} mv $(find . -iname "*LICENSE*" -not -path "./node_modules/*" -and -not -path "./public/*") . -mv LICENSE node-font-list.LICENSE rm -rf dist/linux-unpacked/resources/app.asar.unpacked/node_modules/font-list/libs/{darwin,win32} %ifarch aarch64 # Keep the x86_64 Windows binaries run through Wine just in case @@ -95,7 +94,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{reverse_dns}.deskto %license legendary.LICENSE %license LICENSES.chromium.html %license LICENSE.electron.txt -%license node-font-list.LICENSE %dir %{_datadir}/%{shortname} %{_datadir}/%{shortname}/* %{_bindir}/%{shortname} diff --git a/anda/games/inputplumber/inputplumber.spec b/anda/games/inputplumber/inputplumber.spec index c743fa9591..6fd55dec2f 100644 --- a/anda/games/inputplumber/inputplumber.spec +++ b/anda/games/inputplumber/inputplumber.spec @@ -1,7 +1,7 @@ %global __brp_mangle_shebangs %{nil} Name: inputplumber -Version: 0.58.2 +Version: 0.62.2 Release: 1%?dist Summary: Open source input router and remapper daemon for Linux License: GPL-3.0-or-later diff --git a/anda/games/opengamepadui/opengamepadui.spec b/anda/games/opengamepadui/opengamepadui.spec index 9587c1883f..420e6890ec 100644 --- a/anda/games/opengamepadui/opengamepadui.spec +++ b/anda/games/opengamepadui/opengamepadui.spec @@ -1,5 +1,5 @@ Name: opengamepadui -Version: 0.39.2 +Version: 0.41.0 Release: 1%?dist Summary: Open source gamepad-native game launcher and overlay diff --git a/anda/games/osu-lazer/osu-lazer.spec b/anda/games/osu-lazer/osu-lazer.spec index c23da15b04..12bb7b273c 100644 --- a/anda/games/osu-lazer/osu-lazer.spec +++ b/anda/games/osu-lazer/osu-lazer.spec @@ -1,17 +1,17 @@ -%define osuresver 2025.425.0 +%define osuresver 2025.819.0 %global debug_package %{nil} %define __strip /bin/true Name: osu-lazer -Version: 2025.424.0 +Version: 2025.816.0 Release: 1%?dist Summary: The future of osu! and the beginning of an open era! Commonly known by the codename osu!lazer. Pew pew. ExclusiveArch: x86_64 URL: https://osu.ppy.sh/ License: MIT AND CC-BY-NC-4.0 Requires: osu-mime fuse -Source0: https://github.com/ppy/osu/releases/download/%{version}/osu.AppImage -Source1: https://raw.githubusercontent.com/ppy/osu/%{version}/assets/lazer.png +Source0: https://github.com/ppy/osu/releases/download/%{version}-lazer/osu.AppImage +Source1: https://raw.githubusercontent.com/ppy/osu/%{version}-lazer/assets/lazer.png Source2: https://raw.githubusercontent.com/ppy/osu-resources/%{osuresver}/LICENCE.md Source3: osu-lazer.desktop Source4: osu-lazer-uri-handler.desktop diff --git a/anda/games/osu-lazer/update.rhai b/anda/games/osu-lazer/update.rhai index 23f35b7e37..6af56144f8 100644 --- a/anda/games/osu-lazer/update.rhai +++ b/anda/games/osu-lazer/update.rhai @@ -1,2 +1,8 @@ -rpm.version(gh("ppy/osu")); -rpm.define("osuresver", gh("ppy/osu-resources")); \ No newline at end of file +let v = gh("ppy/osu"); +if v.ends_with("-lazer") { + v.pop(6); + rpm.version(v); + if rpm.changed() { + rpm.define("osuresver", gh("ppy/osu-resources")); + } +} diff --git a/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec b/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec index cfbf916805..dd0ee5f0b3 100644 --- a/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec +++ b/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec @@ -1,10 +1,10 @@ %global real_name prismlauncher %global nice_name PrismLauncher -%global commit a6c93d66d407ea3cc595ba01d1b67e42b9f754d7 +%global commit 5480ce6b4418819ee0465fd96919167150a07c43 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20250527 +%global commit_date 20250822 %global snapshot_info %{commit_date}.%{shortcommit} %bcond_without qt6 diff --git a/anda/games/rpcs3/anda.hcl b/anda/games/rpcs3/anda.hcl index 392781de39..f17fc5aed0 100644 --- a/anda/games/rpcs3/anda.hcl +++ b/anda/games/rpcs3/anda.hcl @@ -2,4 +2,7 @@ project pkg { rpm { spec = "rpcs3.spec" } + labels { + mock = 1 + } } diff --git a/anda/games/rpcs3/rpcs3.spec b/anda/games/rpcs3/rpcs3.spec index 8ebdf34522..686b28eaa2 100644 --- a/anda/games/rpcs3/rpcs3.spec +++ b/anda/games/rpcs3/rpcs3.spec @@ -1,15 +1,13 @@ -%global _distro_extra_cflags -Wno-maybe-uninitialized -fuse-linker-plugin -fuse-ld=mold +%global _distro_extra_cflags -Wno-uninitialized %global _distro_extra_cxxflags -include %_includedir/c++/*/cstdint # GLIBCXX_ASSERTIONS is known to break RPCS3 %global build_cflags %(echo %{__build_flags_lang_c} | sed 's/-Wp,-D_GLIBCXX_ASSERTIONS//g') %{?_distro_extra_cflags} %global build_cxxflags %(echo %{__build_flags_lang_cxx} | sed 's/-Wp,-D_GLIBCXX_ASSERTIONS//g') %{?_distro_extra_cxxflags} -%ifarch aarch64 # Need to get rid of everything Clang can't use and undefine -Wunused-command-line-argument where possible due to the project's build flags %global build_cflags %(echo %{build_cflags} | sed 's:-Werror ::g' | sed 's:-Wunused-command-line-argument ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-package-notes ::g') -Wno-unused-command-line-argument %global build_cxxflags %(echo %{build_cxxflags} | sed 's:-Werror ::g' | sed 's:-Wunused-command-line-argument ::g' | sed 's:-specs\=/usr/lib/rpm/redhat/redhat-annobin-cc1 ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-package-notes ::g') -Wno-unused-command-line-argument -%endif -%global commit 2d9a24d1d6ef0682cfed9ee04d411a8caac9f15a -%global ver 0.0.36-17972 +%global commit 4800aa9bfc01eff958345874186eaf4163f12f6a +%global ver 0.0.37-18117 Name: rpcs3 Version: %(echo %{ver} | sed 's/-/^/g') @@ -19,11 +17,7 @@ License: GPL-2.0-only URL: https://github.com/RPCS3/rpcs3 %dnl Source0: %url/archive/refs/tags/v%version.tar.gz BuildRequires: anda-srpm-macros glew openal-soft cmake vulkan-validation-layers git-core mold -%ifarch x86_64 -BuildRequires: gcc gcc-c++ -%elifarch aarch64 BuildRequires: clang -%endif BuildRequires: cmake(FAudio) BuildRequires: cmake(OpenAL) BuildRequires: cmake(OpenCV) @@ -34,6 +28,7 @@ BuildRequires: pkgconfig(sndio) BuildRequires: pkgconfig(jack) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(glew) +BuildRequires: pkgconfig(flatbuffers) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(libevdev) @@ -42,8 +37,11 @@ BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(libffi) BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(pugixml) BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libavformat) @@ -63,29 +61,34 @@ BuildRequires: qt6-qtbase-private-devel vulkan-devel jack-audio-connection-kit- %git_clone %url %commit %build -%ifarch aarch64 # Looking at the CMakeLists.txt, this is the intended compiler and there are no fixes for GCC on aarch64 -export CC=clang -export CXX=clang++ -%endif -%cmake -DDISABLE_LTO=TRUE \ - -DZSTD_BUILD_SHARED=OFF \ - -DZSTD_BUILD_STATIC=ON \ - -DUSE_NATIVE_INSTRUCTIONS=OFF \ - -DCMAKE_C_FLAGS="$CFLAGS" \ - -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ - -DSTATIC_LINK_LLVM=OFF \ - -DUSE_SYSTEM_FAUDIO=ON \ - -DUSE_SDL=ON \ - -DUSE_SYSTEM_SDL=ON \ - -DBUILD_LLVM=OFF \ - -DUSE_PRECOMPILED_HEADERS=OFF \ - -DUSE_DISCORD_RPC=ON \ - -DUSE_SYSTEM_FFMPEG=ON \ - -DUSE_SYSTEM_OPENCV=ON \ -%if 0%{?fedora} < 43 - -DUSE_SYSTEM_CURL=ON -%endif +%cmake -DDISABLE_LTO=TRUE \ + -DZSTD_BUILD_STATIC=ON \ + -DCMAKE_SKIP_RPATH=ON \ + -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DUSE_NATIVE_INSTRUCTIONS=OFF \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DSTATIC_LINK_LLVM=OFF \ + -DUSE_SYSTEM_FAUDIO=ON \ + -DUSE_SDL=ON \ + -DUSE_SYSTEM_SDL=ON \ + -DBUILD_LLVM=OFF \ + -DUSE_PRECOMPILED_HEADERS=OFF \ + -DUSE_DISCORD_RPC=ON \ + -DUSE_SYSTEM_FFMPEG=ON \ + -DUSE_SYSTEM_LIBPNG=ON \ + -DUSE_SYSTEM_ZLIB=ON \ + -DUSE_SYSTEM_OPENCV=ON \ + -DUSE_SYSTEM_CURL=ON \ + -DUSE_SYSTEM_FLATBUFFERS=OFF \ + -DUSE_SYSTEM_PUGIXML=OFF \ + -DUSE_SYSTEM_WOLFSSL=OFF \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_LINKER=mold \ + -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -fuse-ld=mold" \ + -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -fuse-ld=mold" %cmake_build %install diff --git a/anda/games/rpcs3/update.rhai b/anda/games/rpcs3/update.rhai index b0a43bfae8..9387eb5f79 100644 --- a/anda/games/rpcs3/update.rhai +++ b/anda/games/rpcs3/update.rhai @@ -5,4 +5,5 @@ rpm.global("ver", v); if rpm.changed () { let c = find("Commit +Date: Thu, 21 Nov 2024 07:18:22 +0000 +Subject: Revert "steamcompmgr: Fix crash when using magnifier and game + recording" + +This reverts commit 611a47683f8304ae7a128347a2237df345482fcd. +--- + src/steamcompmgr.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index a8f44d1ef2da..0a1f2b263b21 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -1974,7 +1974,7 @@ paint_window_commit( const gamescope::Rc &lastCommit, steamcompmgr_win + drawYOffset += w->GetGeometry().nY * currentScaleRatio_y; + } + +- if ( cursor && zoomScaleRatio != 1.0 ) ++ if ( zoomScaleRatio != 1.0 ) + { + drawXOffset += (((int)sourceWidth / 2) - cursor->x()) * currentScaleRatio_x; + drawYOffset += (((int)sourceHeight / 2) - cursor->y()) * currentScaleRatio_y; +@@ -2200,10 +2200,10 @@ static void paint_pipewire() + s_ulLastOverrideCommitId = ulOverrideCommitId; + + // Paint the windows we have onto the Pipewire stream. +- paint_window( pFocus->focusWindow, pFocus->focusWindow, &frameInfo, global_focus.cursor, 0, 1.0f, pFocus->overrideWindow ); ++ paint_window( pFocus->focusWindow, pFocus->focusWindow, &frameInfo, nullptr, 0, 1.0f, pFocus->overrideWindow ); + + if ( pFocus->overrideWindow && !pFocus->focusWindow->isSteamStreamingClient ) +- paint_window( pFocus->overrideWindow, pFocus->focusWindow, &frameInfo, global_focus.cursor, PaintWindowFlag::NoFilter, 1.0f, pFocus->overrideWindow ); ++ paint_window( pFocus->overrideWindow, pFocus->focusWindow, &frameInfo, nullptr, PaintWindowFlag::NoFilter, 1.0f, pFocus->overrideWindow ); + + gamescope::Rc pRGBTexture = s_pPipewireBuffer->texture->isYcbcr() + ? vulkan_acquire_screenshot_texture( g_nOutputWidth, g_nOutputHeight, false, DRM_FORMAT_XRGB2101010 ) +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Joshua Ashton +Date: Thu, 21 Nov 2024 07:19:00 +0000 +Subject: backend: Hack + +--- + src/backend.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/backend.cpp b/src/backend.cpp +index 8a6bbe8ed944..2411d4ebdc48 100644 +--- a/src/backend.cpp ++++ b/src/backend.cpp +@@ -56,7 +56,7 @@ namespace gamescope + CBaseBackendFb::~CBaseBackendFb() + { + // I do not own the client buffer, but I released that in DecRef. +- assert( !HasLiveReferences() ); ++ //assert( !HasLiveReferences() ); + } + + uint32_t CBaseBackendFb::IncRef() +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Matthew Schwartz +Date: Fri, 31 Jan 2025 17:21:47 -0800 +Subject: layer: Fix 32-bit layer crash +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Some fprintf pointers added in "layer: Fix oldSwapchain when going in/out +of XWayland bypassing" will crash when executed in the 32-bit WSI layer. + +GCC also warns about the pointer usage when compiling the 32-bit layer: +"warning: format ‘%p’ expects argument of type ‘void*’, but argument 3 +has type ‘VkSwapchainKHR’ {aka ‘long long unsigned int’} [-Wformat=]" + +To keep it simple, let's just reinterpret_cast the problematic pointers +to void*. + +Closes: #1718 +Closes: #1736 +--- + layer/VkLayer_FROG_gamescope_wsi.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/layer/VkLayer_FROG_gamescope_wsi.cpp b/layer/VkLayer_FROG_gamescope_wsi.cpp +index 718a2604f318..5bd1408bf780 100644 +--- a/layer/VkLayer_FROG_gamescope_wsi.cpp ++++ b/layer/VkLayer_FROG_gamescope_wsi.cpp +@@ -1076,9 +1076,9 @@ namespace GamescopeWSILayer { + gamescope_swapchain_destroy(state->object); + } + GamescopeSwapchain::remove(swapchain); +- fprintf(stderr, "[Gamescope WSI] Destroying swapchain: %p\n", swapchain); ++ fprintf(stderr, "[Gamescope WSI] Destroying swapchain: %p\n", reinterpret_cast(swapchain)); + pDispatch->DestroySwapchainKHR(device, swapchain, pAllocator); +- fprintf(stderr, "[Gamescope WSI] Destroyed swapchain: %p\n", swapchain); ++ fprintf(stderr, "[Gamescope WSI] Destroyed swapchain: %p\n", reinterpret_cast(swapchain)); + } + + static VkResult CreateSwapchainKHR( +@@ -1160,7 +1160,7 @@ namespace GamescopeWSILayer { + + fprintf(stderr, "[Gamescope WSI] Creating swapchain for xid: 0x%0x - oldSwapchain: %p - provided minImageCount: %u - minImageCount: %u - format: %s - colorspace: %s - flip: %s\n", + gamescopeSurface->window, +- pCreateInfo->oldSwapchain, ++ reinterpret_cast(pCreateInfo->oldSwapchain), + pCreateInfo->minImageCount, + minImageCount, + vkroots::helpers::enumString(pCreateInfo->imageFormat), +@@ -1241,7 +1241,7 @@ namespace GamescopeWSILayer { + + fprintf(stderr, "[Gamescope WSI] Created swapchain for xid: 0x%0x swapchain: %p - imageCount: %u\n", + gamescopeSurface->window, +- *pSwapchain, ++ reinterpret_cast(*pSwapchain), + imageCount); + + gamescope_swapchain_swapchain_feedback( +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Matthew Schwartz +Date: Sun, 5 Jan 2025 11:05:42 +0900 +Subject: main: cleanup args + +--- + src/main.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/main.cpp b/src/main.cpp +index 9dff5c4d8560..cd251af559e1 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -70,6 +70,7 @@ const struct option *gamescope_options = (struct option[]){ + { "expose-wayland", no_argument, 0 }, + { "mouse-sensitivity", required_argument, nullptr, 's' }, + { "mangoapp", no_argument, nullptr, 0 }, ++ { "adaptive-sync", no_argument, nullptr, 0 }, + + { "backend", required_argument, nullptr, 0 }, + +@@ -88,7 +89,6 @@ const struct option *gamescope_options = (struct option[]){ + { "default-touch-mode", required_argument, nullptr, 0 }, + { "generate-drm-mode", required_argument, nullptr, 0 }, + { "immediate-flips", no_argument, nullptr, 0 }, +- { "adaptive-sync", no_argument, nullptr, 0 }, + { "framerate-limit", required_argument, nullptr, 0 }, + + // openvr options +@@ -203,6 +203,7 @@ const char usage[] = + " Default: 1000 nits, Max: 10000 nits\n" + " --framerate-limit Set a simple framerate limit. Used as a divisor of the refresh rate, rounds down eg 60 / 59 -> 60fps, 60 / 25 -> 30fps. Default: 0, disabled.\n" + " --mangoapp Launch with the mangoapp (mangohud) performance overlay enabled. You should use this instead of using mangohud on the game or gamescope.\n" ++ " --adaptive-sync Enable adaptive sync if available (variable rate refresh)\n" + "\n" + "Nested mode options:\n" + " -o, --nested-unfocused-refresh game refresh rate when unfocused\n" +@@ -213,11 +214,10 @@ const char usage[] = + " --display-index forces gamescope to use a specific display in nested mode." + "\n" + "Embedded mode options:\n" +- " -O, --prefer-output list of connectors in order of preference\n" ++ " -O, --prefer-output list of connectors in order of preference (ex: DP-1,DP-2,DP-3,HDMI-A-1)\n" + " --default-touch-mode 0: hover, 1: left, 2: right, 3: middle, 4: passthrough\n" + " --generate-drm-mode DRM mode generation algorithm (cvt, fixed)\n" + " --immediate-flips Enable immediate flips, may result in tearing\n" +- " --adaptive-sync Enable adaptive sync if available (variable rate refresh)\n" + "\n" + #if HAVE_OPENVR + "VR mode options:\n" +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Bernon?= +Date: Wed, 29 Jan 2025 11:16:47 +0100 +Subject: steamcompmgr: Set WM_STATE property on map and unmap notify events. + +This is mandated by the ICCCM specification and Wine now depends on it. +--- + src/steamcompmgr.cpp | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index 0a1f2b263b21..2544acfb0501 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -3378,6 +3378,14 @@ found:; + return vecPossibleFocusWindows; + } + ++static void set_wm_state( xwayland_ctx_t *ctx, Window win, uint32_t state ) ++{ ++ uint32_t wmState[] = { state, None }; ++ XChangeProperty(ctx->dpy, win, ctx->atoms.WMStateAtom, ctx->atoms.WMStateAtom, 32, ++ PropModeReplace, (unsigned char *)wmState, ++ sizeof(wmState) / sizeof(wmState[0])); ++} ++ + void xwayland_ctx_t::DetermineAndApplyFocus( const std::vector< steamcompmgr_win_t* > &vecPossibleFocusWindows ) + { + xwayland_ctx_t *ctx = this; +@@ -3438,10 +3446,7 @@ void xwayland_ctx_t::DetermineAndApplyFocus( const std::vector< steamcompmgr_win + { + /* Some games (e.g. DOOM Eternal) don't react well to being put back as + * iconic, so never do that. Only take them out of iconic. */ +- uint32_t wmState[] = { ICCCM_NORMAL_STATE, None }; +- XChangeProperty(ctx->dpy, ctx->focus.focusWindow->xwayland().id, ctx->atoms.WMStateAtom, ctx->atoms.WMStateAtom, 32, +- PropModeReplace, (unsigned char *)wmState, +- sizeof(wmState) / sizeof(wmState[0])); ++ set_wm_state( ctx, ctx->focus.focusWindow->xwayland().id, ICCCM_NORMAL_STATE ); + + gpuvis_trace_printf( "determine_and_apply_focus focus %lu", ctx->focus.focusWindow->xwayland().id ); + +@@ -4227,6 +4232,8 @@ map_win(xwayland_ctx_t* ctx, Window id, unsigned long sequence) + } + + MakeFocusDirty(); ++ ++ set_wm_state( ctx, w->xwayland().id, ICCCM_NORMAL_STATE ); + } + + static void +@@ -4251,6 +4258,7 @@ unmap_win(xwayland_ctx_t *ctx, Window id, bool fade) + MakeFocusDirty(); + + finish_unmap_win(ctx, w); ++ set_wm_state( ctx, w->xwayland().id, ICCCM_WITHDRAWN_STATE ); + } + + uint32_t +@@ -4817,10 +4825,7 @@ handle_wm_change_state(xwayland_ctx_t *ctx, steamcompmgr_win_t *w, XClientMessag + * agreed on it; immediately revert to normal state to avoid being + * stuck in a paused state. */ + xwm_log.debugf("Rejecting WM_CHANGE_STATE to ICONIC for window 0x%lx", w->xwayland().id); +- uint32_t wmState[] = { ICCCM_NORMAL_STATE, None }; +- XChangeProperty(ctx->dpy, w->xwayland().id, ctx->atoms.WMStateAtom, ctx->atoms.WMStateAtom, 32, +- PropModeReplace, (unsigned char *)wmState, +- sizeof(wmState) / sizeof(wmState[0])); ++ set_wm_state( ctx, w->xwayland().id, ICCCM_NORMAL_STATE ); + } else { + xwm_log.debugf("Unhandled WM_CHANGE_STATE to %ld for window 0x%lx", state, w->xwayland().id); + } +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Autumn Ashton +Date: Tue, 1 Apr 2025 23:37:29 +0100 +Subject: rendervulkan: Fix scaled YUV coming out weird + +Our linear emulation doesn't fully support unnormalized right now. +--- + src/rendervulkan.hpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/rendervulkan.hpp b/src/rendervulkan.hpp +index d8a24e93795a..a3a11a7ba96f 100644 +--- a/src/rendervulkan.hpp ++++ b/src/rendervulkan.hpp +@@ -325,6 +325,9 @@ struct FrameInfo_t + } + + bool viewConvertsToLinearAutomatically() const { ++ if (isYcbcr()) ++ return true; ++ + return colorspace == GAMESCOPE_APP_TEXTURE_COLORSPACE_LINEAR || + colorspace == GAMESCOPE_APP_TEXTURE_COLORSPACE_SCRGB || + colorspace == GAMESCOPE_APP_TEXTURE_COLORSPACE_PASSTHRU; +@@ -362,7 +365,7 @@ struct FrameInfo_t + uint32_t result = 0; + for (int i = 0; i < layerCount; i++) + { +- result |= layers[ i ].colorspace << (i * GamescopeAppTextureColorspace_Bits); ++result |= layers[ i ].colorspace << (i * GamescopeAppTextureColorspace_Bits); + } + return result; + } +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Autumn Ashton +Date: Wed, 2 Apr 2025 01:09:56 +0100 +Subject: steamcompmgr: Fix pipewire stream being incorrect size on external + displays when scaled up + +--- + src/steamcompmgr.cpp | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index 2544acfb0501..7371a3905b56 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -2199,6 +2199,17 @@ static void paint_pipewire() + s_ulLastFocusCommitId = ulFocusCommitId; + s_ulLastOverrideCommitId = ulOverrideCommitId; + ++ uint32_t uWidth = s_pPipewireBuffer->texture->width(); ++ uint32_t uHeight = s_pPipewireBuffer->texture->height(); ++ ++ const uint32_t uCompositeDebugBackup = g_uCompositeDebug; ++ const uint32_t uBackupWidth = currentOutputWidth; ++ const uint32_t uBackupHeight = currentOutputHeight; ++ ++ g_uCompositeDebug = 0; ++ currentOutputWidth = uWidth; ++ currentOutputHeight = uHeight; ++ + // Paint the windows we have onto the Pipewire stream. + paint_window( pFocus->focusWindow, pFocus->focusWindow, &frameInfo, nullptr, 0, 1.0f, pFocus->overrideWindow ); + +@@ -2206,13 +2217,11 @@ static void paint_pipewire() + paint_window( pFocus->overrideWindow, pFocus->focusWindow, &frameInfo, nullptr, PaintWindowFlag::NoFilter, 1.0f, pFocus->overrideWindow ); + + gamescope::Rc pRGBTexture = s_pPipewireBuffer->texture->isYcbcr() +- ? vulkan_acquire_screenshot_texture( g_nOutputWidth, g_nOutputHeight, false, DRM_FORMAT_XRGB2101010 ) ++ ? vulkan_acquire_screenshot_texture( uWidth, uHeight, false, DRM_FORMAT_XRGB2101010 ) + : gamescope::Rc{ s_pPipewireBuffer->texture }; + + gamescope::Rc pYUVTexture = s_pPipewireBuffer->texture->isYcbcr() ? s_pPipewireBuffer->texture : nullptr; + +- uint32_t uCompositeDebugBackup = g_uCompositeDebug; +- g_uCompositeDebug = 0; + + std::optional oPipewireSequence = vulkan_screenshot( &frameInfo, pRGBTexture, pYUVTexture ); + // If we ever want the fat compositing path, use this. +@@ -2220,6 +2229,9 @@ static void paint_pipewire() + + g_uCompositeDebug = uCompositeDebugBackup; + ++ currentOutputWidth = uBackupWidth; ++ currentOutputHeight = uBackupHeight; ++ + if ( oPipewireSequence ) + { + vulkan_wait( *oPipewireSequence, true ); +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Autumn Ashton +Date: Wed, 2 Apr 2025 01:55:47 +0100 +Subject: steamcompmgr: VRR frame limiting + +--- + src/steamcompmgr.cpp | 116 +++++++++++++++++++++++++++--------- + src/steamcompmgr_shared.hpp | 2 + + 2 files changed, 91 insertions(+), 27 deletions(-) + +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index 7371a3905b56..d91cc45b5be5 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -898,10 +898,6 @@ bool g_bChangeDynamicRefreshBasedOnGameOpenRatherThanActive = false; + + bool steamcompmgr_window_should_limit_fps( steamcompmgr_win_t *w ) + { +- // VRR + FPS Limit needs another approach. +- if ( GetBackend()->IsVRRActive() ) +- return false; +- + return w && !window_is_steam( w ) && !w->isOverlay && !w->isExternalOverlay; + } + +@@ -5076,6 +5072,8 @@ steamcompmgr_flush_frame_done( steamcompmgr_win_t *w ) + w->unlockedForFrameCallback = false; + w->receivedDoneCommit = false; + ++ w->last_commit_first_latch_time = timespec_to_nanos(now); ++ + // Acknowledge commit once. + wlserver_lock(); + +@@ -5093,35 +5091,58 @@ steamcompmgr_flush_frame_done( steamcompmgr_win_t *w ) + } + } + +-static bool steamcompmgr_should_vblank_window( bool bShouldLimitFPS, uint64_t vblank_idx ) +-{ +- if ( GetBackend()->IsVRRActive() ) +- return true; ++static std::optional s_oLowestFPSLimitScheduleVRR; + ++static bool steamcompmgr_should_vblank_window( bool bShouldLimitFPS, uint64_t vblank_idx, steamcompmgr_win_t *w = nullptr, uint64_t now = 0 ) ++{ + bool bSendCallback = true; + + int nRefreshHz = gamescope::ConvertmHzToHz( g_nNestedRefresh ? g_nNestedRefresh : g_nOutputRefresh ); + int nTargetFPS = g_nSteamCompMgrTargetFPS; +- if ( g_nSteamCompMgrTargetFPS && bShouldLimitFPS && nRefreshHz > nTargetFPS ) ++ ++ if ( GetBackend()->IsVRRActive() ) + { +- int nVblankDivisor = nRefreshHz / nTargetFPS; ++ bool bCloseEnough = std::abs( g_nSteamCompMgrTargetFPS - nRefreshHz ) < 2; ++ ++ if ( g_nSteamCompMgrTargetFPS && bShouldLimitFPS && w && !bCloseEnough ) ++ { ++ uint64_t schedule = w->last_commit_first_latch_time + g_SteamCompMgrLimitedAppRefreshCycle; ++ ++ static constexpr uint64_t k_ulVRRScheduleFudge = 200'000; // 0.2ms ++ if ( now + k_ulVRRScheduleFudge < schedule ) ++ { ++ bSendCallback = false; + +- if ( vblank_idx % nVblankDivisor != 0 ) +- bSendCallback = false; ++ if ( !s_oLowestFPSLimitScheduleVRR ) ++ s_oLowestFPSLimitScheduleVRR = schedule; ++ else ++ s_oLowestFPSLimitScheduleVRR = std::min( *s_oLowestFPSLimitScheduleVRR, schedule ); ++ } ++ } ++ } ++ else ++ { ++ if ( g_nSteamCompMgrTargetFPS && bShouldLimitFPS && nRefreshHz > nTargetFPS ) ++ { ++ int nVblankDivisor = nRefreshHz / nTargetFPS; ++ ++ if ( vblank_idx % nVblankDivisor != 0 ) ++ bSendCallback = false; ++ } + } + + return bSendCallback; + } + +-static bool steamcompmgr_should_vblank_window( steamcompmgr_win_t *w, uint64_t vblank_idx ) ++static bool steamcompmgr_should_vblank_window( steamcompmgr_win_t *w, uint64_t vblank_idx, uint64_t now ) + { +- return steamcompmgr_should_vblank_window( steamcompmgr_window_should_limit_fps( w ), vblank_idx ); ++ return steamcompmgr_should_vblank_window( steamcompmgr_window_should_limit_fps( w ), vblank_idx, w, now ); + } + + static void +-steamcompmgr_latch_frame_done( steamcompmgr_win_t *w, uint64_t vblank_idx ) ++steamcompmgr_latch_frame_done( steamcompmgr_win_t *w, uint64_t vblank_idx, uint64_t now ) + { +- if ( steamcompmgr_should_vblank_window( w, vblank_idx ) ) ++ if ( steamcompmgr_should_vblank_window( w, vblank_idx, now ) ) + { + w->unlockedForFrameCallback = true; + } +@@ -6145,12 +6166,27 @@ void handle_done_commits_xwayland( xwayland_ctx_t *ctx, bool vblank, uint64_t vb + + uint64_t now = get_time_in_nanos(); + +- vblank = vblank && steamcompmgr_should_vblank_window( true, vblank_idx ); +- + // very fast loop yes + for ( auto& entry : ctx->doneCommits.listCommitsDone ) + { +- if (entry.fifo && (!vblank || fifo_win_seqs.count(entry.winSeq) > 0)) ++ bool entry_vblank = vblank; ++ ++ if ( GetBackend()->IsVRRActive() ) ++ { ++ for ( steamcompmgr_win_t *w = ctx->list; w; w = w->xwayland().next ) ++ { ++ if (w->seq != entry.winSeq) ++ continue; ++ ++ entry_vblank = entry_vblank && steamcompmgr_should_vblank_window( true, vblank_idx, w, now ); ++ } ++ } ++ else ++ { ++ entry_vblank = entry_vblank && steamcompmgr_should_vblank_window( true, vblank_idx ); ++ } ++ ++ if (entry.fifo && (!entry_vblank || fifo_win_seqs.count(entry.winSeq) > 0)) + { + commits_before_their_time.push_back( entry ); + continue; +@@ -7414,6 +7450,11 @@ void LaunchNestedChildren( char **ppPrimaryChildArgv ) + } + } + ++static gamescope::CTimerFunction g_FPSLimitVRRTimer{ [] ++{ ++ // do nothing. ++}}; ++ + void + steamcompmgr_main(int argc, char **argv) + { +@@ -7547,6 +7588,7 @@ steamcompmgr_main(int argc, char **argv) + } + + g_SteamCompMgrWaiter.AddWaitable( &GetVBlankTimer() ); ++ g_SteamCompMgrWaiter.AddWaitable( &g_FPSLimitVRRTimer ); + GetVBlankTimer().ArmNextVBlank( true ); + + { +@@ -7722,18 +7764,20 @@ steamcompmgr_main(int argc, char **argv) + if ( vblank ) + { + { ++ uint64_t now = get_time_in_nanos(); ++ + gamescope_xwayland_server_t *server = NULL; + for (size_t i = 0; (server = wlserver_get_xwayland_server(i)); i++) + { + for (steamcompmgr_win_t *w = server->ctx->list; w; w = w->xwayland().next) + { +- steamcompmgr_latch_frame_done( w, vblank_idx ); ++ steamcompmgr_latch_frame_done( w, vblank_idx, now ); + } + } + + for ( const auto& xdg_win : g_steamcompmgr_xdg_wins ) + { +- steamcompmgr_latch_frame_done( xdg_win.get(), vblank_idx ); ++ steamcompmgr_latch_frame_done( xdg_win.get(), vblank_idx, now ); + } + } + } +@@ -7757,18 +7801,36 @@ steamcompmgr_main(int argc, char **argv) + + steamcompmgr_check_xdg(vblank, vblank_idx); + ++ if ( s_oLowestFPSLimitScheduleVRR ) ++ { ++ g_FPSLimitVRRTimer.ArmTimer( *s_oLowestFPSLimitScheduleVRR ); ++ s_oLowestFPSLimitScheduleVRR = std::nullopt; ++ } ++ + if ( vblank ) + { + vblank_idx++; + + int nRealRefreshmHz = g_nNestedRefresh ? g_nNestedRefresh : g_nOutputRefresh; +- int nRealRefreshHz = gamescope::ConvertmHzToHz( nRealRefreshmHz ); +- int nTargetFPS = g_nSteamCompMgrTargetFPS ? g_nSteamCompMgrTargetFPS : nRealRefreshHz; +- nTargetFPS = std::min( nTargetFPS, nRealRefreshHz ); +- int nVblankDivisor = nRealRefreshHz / nTargetFPS; +- + g_SteamCompMgrAppRefreshCycle = gamescope::mHzToRefreshCycle( nRealRefreshmHz ); +- g_SteamCompMgrLimitedAppRefreshCycle = g_SteamCompMgrAppRefreshCycle * nVblankDivisor; ++ g_SteamCompMgrLimitedAppRefreshCycle = g_SteamCompMgrAppRefreshCycle; ++ if ( g_nSteamCompMgrTargetFPS ) ++ { ++ int nRealRefreshHz = gamescope::ConvertmHzToHz( nRealRefreshmHz ); ++ int nTargetFPS = g_nSteamCompMgrTargetFPS; ++ nTargetFPS = std::min( nTargetFPS, nRealRefreshHz ); ++ ++ if ( GetBackend()->IsVRRActive() ) ++ { ++ g_SteamCompMgrLimitedAppRefreshCycle = gamescope::mHzToRefreshCycle( gamescope::ConvertHztomHz( nTargetFPS ) ); ++ } ++ else ++ { ++ int nVblankDivisor = nRealRefreshHz / nTargetFPS; ++ ++ g_SteamCompMgrLimitedAppRefreshCycle = g_SteamCompMgrAppRefreshCycle * nVblankDivisor; ++ } ++ } + } + + // Handle presentation-time stuff +diff --git a/src/steamcompmgr_shared.hpp b/src/steamcompmgr_shared.hpp +index 095694e4937a..f300eb94d954 100644 +--- a/src/steamcompmgr_shared.hpp ++++ b/src/steamcompmgr_shared.hpp +@@ -127,6 +127,8 @@ struct steamcompmgr_win_t { + bool maybe_a_dropdown = false; + bool outdatedInteractiveFocus = false; + ++ uint64_t last_commit_first_latch_time = 0; ++ + bool hasHwndStyle = false; + uint32_t hwndStyle = 0; + bool hasHwndStyleEx = false; +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Colin Kinloch +Date: Sat, 21 Dec 2024 17:08:12 +0000 +Subject: scripts: Derive script path from meson prefix + +--- + meson.build | 1 + + src/Script/Script.cpp | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index c4924c7afb44..00a1cb42bde4 100644 +--- a/meson.build ++++ b/meson.build +@@ -68,6 +68,7 @@ endif + add_project_arguments( + '-DHAVE_PIPEWIRE=@0@'.format(pipewire_dep.found().to_int()), + '-DHAVE_OPENVR=@0@'.format(openvr_dep.found().to_int()), ++ '-DSCRIPT_DIR="@0@"'.format(prefix / data_dir / 'gamescope/scripts'), + language: 'cpp', + ) + +diff --git a/src/Script/Script.cpp b/src/Script/Script.cpp +index a104ee993bc9..142371b33e0f 100644 +--- a/src/Script/Script.cpp ++++ b/src/Script/Script.cpp +@@ -130,7 +130,7 @@ namespace gamescope + } + else + { +- RunFolder( "/usr/share/gamescope/scripts", true ); ++ RunFolder( SCRIPT_DIR, true ); + RunFolder( "/etc/gamescope/scripts", true ); + } + +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Matthew Schwartz +Date: Wed, 30 Oct 2024 14:56:18 -0700 +Subject: script: Lenovo Legion Go LCD display configuration + +Add support for the Lenovo Legion Go handheld, which features a rotated +1600x2560 panel that reports 60Hz and 144Hz modes in the EDID. VRR and +HDR are not supported, and only one panel model is known to be in use. + +Modes other than 60Hz and 144Hz have a small chance of causing a locked +touchscreen until another modeset is performed or have artifacts during +modesetting, so extra modes are not included. The dynamic_modegen section +is filled out in case users decide to add their own refresh rates in a +local table. + +This configuration has been tested with: +* SteamOS Main 20241025.1000 with kernel 6.8.12-valve3 +* Arch Linux with kernel 6.12-rc5 + +Signed-off-by: Matthew Schwartz +--- + .../displays/lenovo.legiongo.lcd.lua | 45 +++++++++++++++++++ + 1 file changed, 45 insertions(+) + create mode 100644 scripts/00-gamescope/displays/lenovo.legiongo.lcd.lua + +diff --git a/scripts/00-gamescope/displays/lenovo.legiongo.lcd.lua b/scripts/00-gamescope/displays/lenovo.legiongo.lcd.lua +new file mode 100644 +index 000000000000..2360cfe35cb2 +--- /dev/null ++++ b/scripts/00-gamescope/displays/lenovo.legiongo.lcd.lua +@@ -0,0 +1,45 @@ ++gamescope.config.known_displays.lenovo_legiongo_lcd = { ++ pretty_name = "Lenovo Legion Go LCD", ++ dynamic_refresh_rates = { ++ 60, 144 ++ }, ++ hdr = { ++ -- Setup some fallbacks for undocking with HDR, meant ++ -- for the internal panel. It does not support HDR. ++ supported = false, ++ force_enabled = false, ++ eotf = gamescope.eotf.gamma22, ++ max_content_light_level = 500, ++ max_frame_average_luminance = 500, ++ min_content_light_level = 0.5 ++ }, ++ -- Use the EDID colorimetry for now, but someone should check ++ -- if the EDID colorimetry truly matches what the display is capable of. ++ dynamic_modegen = function(base_mode, refresh) ++ debug("Generating mode "..refresh.."Hz for Lenovo Legion Go LCD") ++ local mode = base_mode ++ ++ -- These are only tuned for 1600x2560 ++ gamescope.modegen.set_resolution(mode, 1600, 2560) ++ ++ -- Horizontal timings: Hfront, Hsync, Hback ++ gamescope.modegen.set_h_timings(mode, 60, 30, 130) ++ -- Vertical timings: Vfront, Vsync, Vback ++ gamescope.modegen.set_v_timings(mode, 30, 4, 96) ++ ++ mode.clock = gamescope.modegen.calc_max_clock(mode, refresh) ++ mode.vrefresh = gamescope.modegen.calc_vrefresh(mode) ++ ++ return mode ++ end, ++ matches = function(display) ++ -- There is only a single panel in use on the Lenovo Legion Go. ++ if display.vendor == "LEN" and display.model == "Go Display" and display.product == 0x0001 then ++ debug("[lenovo_legiongo_lcd] Matched vendor: "..display.vendor.." model: "..display.model.." product: "..display.product) ++ return 5000 ++ end ++ return -1 ++ end ++} ++debug("Registered Lenovo Legion Go LCD as a known display") ++--debug(inspect(gamescope.config.known_displays.lenovo_legiongo_lcd)) +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aarron Lee +Date: Wed, 9 Oct 2024 23:19:15 -0400 +Subject: script: GPD Win 4 display configuration + +This introduces a display configuration for the GPD Win 4 handheld. + +Most of this display configuration was derived from the edid as-is, +excluding the dynamic_refresh_rates. + +All refresh rates were all manually tested with the Steam slider, +and the device functioned as expected through multiple games. + +This was tested on two separate GPD Win 4 devices. + +Tested on: + +Model DMI + - G1618-04 +Distro + - Bazzite 40 +Kernels + - 6.9.12-210.fsync.fc40.x86_64 + - 6.11.2-201.fsync.fc40.x86_64 + +All refresh rates were tested with the following games: + +- Ghost of Tsushima +- Nier Automata +- Metaphor: ReFantazio (Demo) +- Boomerang Fu + +These games were tested with 35hz, 40hz, 50hz, +and had no observed issues: + +- Crosscode +- Cult of Lamb +- Dave the Diver +- MDA Rain Code Plus +- Shantae and the Seven Sirens +--- + .../00-gamescope/displays/gpd.win4.lcd.lua | 60 +++++++++++++++++++ + 1 file changed, 60 insertions(+) + create mode 100644 scripts/00-gamescope/displays/gpd.win4.lcd.lua + +diff --git a/scripts/00-gamescope/displays/gpd.win4.lcd.lua b/scripts/00-gamescope/displays/gpd.win4.lcd.lua +new file mode 100644 +index 000000000000..5f5eec898c3b +--- /dev/null ++++ b/scripts/00-gamescope/displays/gpd.win4.lcd.lua +@@ -0,0 +1,60 @@ ++-- colorimetry from edid ++local gpd_win4_lcd_colorimetry = { ++ r = { x = 0.6250, y = 0.3398 }, ++ g = { x = 0.2802, y = 0.5947 }, ++ b = { x = 0.1552, y = 0.0703 }, ++ w = { x = 0.2832, y = 0.2978 } ++} ++ ++gamescope.config.known_displays.gpd_win4_lcd = { ++ pretty_name = "GPD Win 4", ++ dynamic_refresh_rates = { ++ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, ++ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, ++ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60 ++ }, ++ hdr = { ++ supported = false, ++ force_enabled = false, ++ eotf = gamescope.eotf.gamma22, ++ max_content_light_level = 400, ++ max_frame_average_luminance = 400, ++ min_content_light_level = 0.5 ++ }, ++ colorimetry = gpd_win4_lcd_colorimetry, ++ dynamic_modegen = function(base_mode, refresh) ++ debug("Generating mode "..refresh.."Hz for GPD Win 4") ++ local mode = base_mode ++ ++ gamescope.modegen.set_resolution(mode, 1920, 1080) ++ ++ -- Horizontal timings: Hfront, Hsync, Hback ++ gamescope.modegen.set_h_timings(mode, 72, 8, 16) ++ -- Vertical timings: Vfront, Vsync, Vback ++ gamescope.modegen.set_v_timings(mode, 14, 3, 13) ++ ++ mode.clock = gamescope.modegen.calc_max_clock(mode, refresh) ++ mode.vrefresh = gamescope.modegen.calc_vrefresh(mode) ++ ++ return mode ++ end, ++ matches = function(display) ++ -- There are multiple revisions of the GPD Win 4 ++ -- They all should have the same panel ++ -- lcd_types is just in case there are different panels ++ local lcd_types = { ++ { vendor = "GPD", model = "G1618-04" }, ++ } ++ ++ for index, value in ipairs(lcd_types) do ++ if value.vendor == display.vendor and value.model == display.model then ++ debug("[gpd_win4_lcd] Matched vendor: "..value.vendor.." model: "..value.model) ++ return 5000 ++ end ++ end ++ ++ return -1 ++ end ++} ++debug("Registered GPD Win 4 as a known display") ++--debug(inspect(gamescope.config.known_displays.gpd_win4_lcd)) +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Autumn Ashton +Date: Wed, 2 Apr 2025 03:15:44 +0100 +Subject: DRMBackend: Read the EDID's modes for dynamic refresh rate modes by + default + +Should supercede https://github.com/ValveSoftware/gamescope/pull/1627 and allow this feature on some handhelds that just expose modes in the EDID. +--- + src/Backends/DRMBackend.cpp | 32 ++++++++++++++++++++++++++++++-- + 1 file changed, 30 insertions(+), 2 deletions(-) + +diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp +index 0b121e84167a..37185856b7ec 100644 +--- a/src/Backends/DRMBackend.cpp ++++ b/src/Backends/DRMBackend.cpp +@@ -2142,6 +2142,8 @@ namespace gamescope + bool bHasKnownColorimetry = false; + bool bHasKnownHDRInfo = false; + ++ m_Mutable.ValidDynamicRefreshRates.clear(); ++ m_Mutable.fnDynamicModeGenerator = nullptr; + { + CScriptScopedLock script; + +@@ -2155,8 +2157,6 @@ namespace gamescope + (int)oKnownDisplay->first.size(), oKnownDisplay->first.data(), + (int)psvPrettyName.size(), psvPrettyName.data() ); + +- m_Mutable.fnDynamicModeGenerator = nullptr; +- m_Mutable.ValidDynamicRefreshRates.clear(); + + sol::optional otDynamicRefreshRates = tTable["dynamic_refresh_rates"]; + sol::optional ofnDynamicModegen = tTable["dynamic_modegen"]; +@@ -2243,6 +2243,34 @@ namespace gamescope + bHasKnownHDRInfo = true; + } + } ++ else ++ { ++ // Unknown display, see if there are any other refresh rates in the EDID we can get. ++ if ( GetScreenType() == GAMESCOPE_SCREEN_TYPE_INTERNAL ) ++ { ++ const drmModeModeInfo *pPreferredMode = find_mode( m_pConnector.get(), 0, 0, 0 ); ++ ++ if ( pPreferredMode ) ++ { ++ // See if the EDID has any modes for us. ++ for (int i = 0; i < m_pConnector->count_modes; i++) ++ { ++ const drmModeModeInfo *pMode = &m_pConnector->modes[i]; ++ ++ if ( pMode->hdisplay != pPreferredMode->hdisplay || pMode->vdisplay != pPreferredMode->vdisplay ) ++ continue; ++ ++ ++ if ( !Algorithm::Contains( m_Mutable.ValidDynamicRefreshRates, pMode->vrefresh ) ) ++ { ++ m_Mutable.ValidDynamicRefreshRates.push_back( pMode->vrefresh ); ++ } ++ } ++ ++ std::sort( m_Mutable.ValidDynamicRefreshRates.begin(), m_Mutable.ValidDynamicRefreshRates.end() ); ++ } ++ } ++ } + } + + if ( !bHasKnownColorimetry ) +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: sharkautarch <128002472+sharkautarch@users.noreply.github.com> +Date: Tue, 3 Dec 2024 13:31:37 -0500 +Subject: wlserver: wlserver_run(): ensure waylock is released when + wl_event_loop_dispatch returns ret<0 + +--- + src/wlserver.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/wlserver.cpp b/src/wlserver.cpp +index 78a86ee0e2e2..4ce9511352d0 100644 +--- a/src/wlserver.cpp ++++ b/src/wlserver.cpp +@@ -1956,6 +1956,7 @@ void wlserver_run(void) + wl_display_flush_clients(wlserver.display); + int ret = wl_event_loop_dispatch(wlserver.event_loop, 0); + if (ret < 0) { ++ wlserver_unlock(); + break; + } + +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Autumn Ashton +Date: Wed, 2 Apr 2025 04:29:16 +0100 +Subject: DRMBackend: Expose data string from EDID to matches function + +--- + src/Backends/DRMBackend.cpp | 12 ++++++++++-- + src/Script/Script.cpp | 3 ++- + src/Script/Script.h | 2 +- + 3 files changed, 13 insertions(+), 4 deletions(-) + +diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp +index 37185856b7ec..06ebbe7255d4 100644 +--- a/src/Backends/DRMBackend.cpp ++++ b/src/Backends/DRMBackend.cpp +@@ -287,6 +287,7 @@ namespace gamescope + const char *GetName() const override { return m_Mutable.szName; } + const char *GetMake() const override { return m_Mutable.pszMake; } + const char *GetModel() const override { return m_Mutable.szModel; } ++ const char *GetDataString() const { return m_Mutable.szDataString; } + uint32_t GetPossibleCRTCMask() const { return m_Mutable.uPossibleCRTCMask; } + std::span GetValidDynamicRefreshRates() const override { return m_Mutable.ValidDynamicRefreshRates; } + const displaycolorimetry_t& GetDisplayColorimetry() const { return m_Mutable.DisplayColorimetry; } +@@ -392,6 +393,7 @@ namespace gamescope + char szName[32]{}; + char szMakePNP[4]{}; + char szModel[16]{}; ++ char szDataString[16]{}; + const char *pszMake = ""; // Not owned, no free. This is a pointer to pnp db or szMakePNP. + std::vector ValidDynamicRefreshRates{}; + DRMModeGenerator fnDynamicModeGenerator; +@@ -2128,13 +2130,19 @@ namespace gamescope + for ( size_t i = 0; pDescriptors[i] != nullptr; i++ ) + { + const di_edid_display_descriptor *pDesc = pDescriptors[i]; +- if ( di_edid_display_descriptor_get_tag( pDesc ) == DI_EDID_DISPLAY_DESCRIPTOR_PRODUCT_NAME ) ++ const di_edid_display_descriptor_tag eTag = di_edid_display_descriptor_get_tag( pDesc ); ++ if ( eTag == DI_EDID_DISPLAY_DESCRIPTOR_PRODUCT_NAME ) + { + // Max length of di_edid_display_descriptor_get_string is 14 + // m_szModel is 16 bytes. + const char *pszModel = di_edid_display_descriptor_get_string( pDesc ); + strncpy( m_Mutable.szModel, pszModel, sizeof( m_Mutable.szModel ) ); + } ++ else if ( eTag == DI_EDID_DISPLAY_DESCRIPTOR_DATA_STRING ) ++ { ++ const char *pszDataString = di_edid_display_descriptor_get_string( pDesc ); ++ strncpy( m_Mutable.szDataString, pszDataString, sizeof( m_Mutable.szDataString ) ); ++ } + } + + drm_log.infof("Connector %s -> %s - %s", m_Mutable.szName, m_Mutable.szMakePNP, m_Mutable.szModel ); +@@ -2147,7 +2155,7 @@ namespace gamescope + { + CScriptScopedLock script; + +- auto oKnownDisplay = script.Manager().Gamescope().Config.LookupDisplay( script, m_Mutable.szMakePNP, pProduct->product, m_Mutable.szModel ); ++ auto oKnownDisplay = script.Manager().Gamescope().Config.LookupDisplay( script, m_Mutable.szMakePNP, pProduct->product, m_Mutable.szModel, m_Mutable.szDataString ); + if ( oKnownDisplay ) + { + sol::table tTable = oKnownDisplay->second; +diff --git a/src/Script/Script.cpp b/src/Script/Script.cpp +index 142371b33e0f..ceb1f80e3a77 100644 +--- a/src/Script/Script.cpp ++++ b/src/Script/Script.cpp +@@ -247,7 +247,7 @@ namespace gamescope + // GamescopeScript_t + // + +- std::optional> GamescopeScript_t::Config_t::LookupDisplay( CScriptScopedLock &script, std::string_view psvVendor, uint16_t uProduct, std::string_view psvModel ) ++ std::optional> GamescopeScript_t::Config_t::LookupDisplay( CScriptScopedLock &script, std::string_view psvVendor, uint16_t uProduct, std::string_view psvModel, std::string_view psvDataString ) + { + int nMaxPrority = -1; + std::optional> oOutDisplay; +@@ -256,6 +256,7 @@ namespace gamescope + tDisplay["vendor"] = psvVendor; + tDisplay["product"] = uProduct; + tDisplay["model"] = psvModel; ++ tDisplay["data_string"] = psvDataString; + + for ( auto iter : KnownDisplays ) + { +diff --git a/src/Script/Script.h b/src/Script/Script.h +index 6eebb66a9f36..7c856a75e512 100644 +--- a/src/Script/Script.h ++++ b/src/Script/Script.h +@@ -30,7 +30,7 @@ namespace gamescope + + sol::table KnownDisplays; + +- std::optional> LookupDisplay( CScriptScopedLock &script, std::string_view psvVendor, uint16_t uProduct, std::string_view psvModel ); ++ std::optional> LookupDisplay( CScriptScopedLock &script, std::string_view psvVendor, uint16_t uProduct, std::string_view psvModel, std::string_view psvDataString ); + } Config; + }; + +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Pierre-Loup A. Griffais" +Date: Tue, 15 Apr 2025 15:56:02 -0700 +Subject: steamcompmgr: avoid a crash with pipewire+magnification + +It won't render the correct offset for now, but that's better than crashing. + +Probably magnification should be ignore when painting for pipewire? +--- + src/steamcompmgr.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index d91cc45b5be5..d0a069e69c60 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -1972,8 +1972,8 @@ paint_window_commit( const gamescope::Rc &lastCommit, steamcompmgr_win + + if ( zoomScaleRatio != 1.0 ) + { +- drawXOffset += (((int)sourceWidth / 2) - cursor->x()) * currentScaleRatio_x; +- drawYOffset += (((int)sourceHeight / 2) - cursor->y()) * currentScaleRatio_y; ++ drawXOffset += (((int)sourceWidth / 2) - (cursor ? cursor->x() : 0)) * currentScaleRatio_x; ++ drawYOffset += (((int)sourceHeight / 2) - (cursor ? cursor->y() : 0)) * currentScaleRatio_y; + } + } + +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Matthew Schwartz +Date: Sun, 6 Apr 2025 20:35:54 -0700 +Subject: build: add workaround to build with CMake 4.0 + +OpenVR's CMakelist does not support CMake 4.0 yet, causing build failures +in gamescope. Until a new OpenVR SDK is released, let's make sure gamescope +stays buildable in the meantime with a workaround which can be removed in +the future. + +Closes: #1785 +--- + meson.build | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 00a1cb42bde4..cc07a59ca99a 100644 +--- a/meson.build ++++ b/meson.build +@@ -55,7 +55,10 @@ if get_option('enable_openvr_support') + if not openvr_dep.found() + cmake = import('cmake') + openvr_var = cmake.subproject_options() +- openvr_var.add_cmake_defines({'USE_LIBCXX': false}) ++ openvr_var.add_cmake_defines({'USE_LIBCXX': false, ++ #HACK: remove me when openvr supports CMake 4.0 ++ 'CMAKE_POLICY_VERSION_MINIMUM': '3.5'}) ++ #ENDHACK + openvr_var.set_override_option('warning_level', '0') + openvr_proj = cmake.subproject('openvr', options : openvr_var) + openvr_dep = openvr_proj.dependency('openvr_api') +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Autumn Ashton +Date: Fri, 25 Apr 2025 16:17:00 +0100 +Subject: WaylandBackend: Fix initial scale for Wayland surfaces + +--- + src/Backends/WaylandBackend.cpp | 26 ++++++++++++++++++++++---- + 1 file changed, 22 insertions(+), 4 deletions(-) + +diff --git a/src/Backends/WaylandBackend.cpp b/src/Backends/WaylandBackend.cpp +index 08af8bca1b99..da43d03987a8 100644 +--- a/src/Backends/WaylandBackend.cpp ++++ b/src/Backends/WaylandBackend.cpp +@@ -272,6 +272,7 @@ namespace gamescope + std::vector m_pOutputs; + bool m_bNeedsDecorCommit = false; + uint32_t m_uFractionalScale = 120; ++ bool m_bHasRecievedScale = false; + + std::mutex m_PlaneStateLock; + std::optional m_oCurrentPlaneState; +@@ -1358,14 +1359,31 @@ namespace gamescope + + void CWaylandPlane::Wayland_FractionalScale_PreferredScale( wp_fractional_scale_v1 *pFractionalScale, uint32_t uScale ) + { +- if ( m_uFractionalScale != uScale ) ++ bool bDirty = false; ++ ++ static uint32_t s_uGlobalFractionalScale = 120; ++ if ( s_uGlobalFractionalScale != uScale ) + { +- g_nOutputWidth = ( g_nOutputWidth * uScale ) / m_uFractionalScale; +- g_nOutputHeight = ( g_nOutputHeight * uScale ) / m_uFractionalScale; ++ if ( m_bHasRecievedScale ) ++ { ++ g_nOutputWidth = ( g_nOutputWidth * uScale ) / m_uFractionalScale; ++ g_nOutputHeight = ( g_nOutputHeight * uScale ) / m_uFractionalScale; ++ } ++ ++ s_uGlobalFractionalScale = uScale; ++ bDirty = true; ++ } + ++ if ( m_uFractionalScale != uScale ) ++ { + m_uFractionalScale = uScale; +- force_repaint(); ++ bDirty = true; + } ++ ++ m_bHasRecievedScale = true; ++ ++ if ( bDirty ) ++ force_repaint(); + } + + //////////////// +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= +Date: Wed, 9 Apr 2025 14:01:13 -0700 +Subject: rendervulkan: Append VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA + when creating scanout VkImages +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It already appends VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA when +creating scanout images to make other Vulkan drivers works, so lets +also append VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA to make +ANV+Xe KMD work. + +Signed-off-by: José Roberto de Souza +--- + src/rendervulkan.cpp | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/src/rendervulkan.cpp b/src/rendervulkan.cpp +index 7efcc0dbd8a9..b8412b8fdf2f 100644 +--- a/src/rendervulkan.cpp ++++ b/src/rendervulkan.cpp +@@ -163,6 +163,7 @@ Target *pNextFind(const Base *base, VkStructureType sType) + } + + #define VK_STRUCTURE_TYPE_WSI_IMAGE_CREATE_INFO_MESA (VkStructureType)1000001002 ++#define VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA (VkStructureType)1000001003 + + struct wsi_image_create_info { + VkStructureType sType; +@@ -173,6 +174,11 @@ struct wsi_image_create_info { + const uint64_t *modifiers; + }; + ++struct wsi_memory_allocate_info { ++ VkStructureType sType; ++ const void *pNext; ++ bool implicit_sync; ++}; + + // DRM doesn't have 32bit floating point formats, so add our own + #define DRM_FORMAT_ABGR32323232F fourcc_code('A', 'B', '8', 'F') +@@ -2215,6 +2221,15 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, uint32_t depth, uin + VkImportMemoryFdInfoKHR importMemoryInfo = {}; + VkExportMemoryAllocateInfo memory_export_info = {}; + VkMemoryDedicatedAllocateInfo memory_dedicated_info = {}; ++ struct wsi_memory_allocate_info memory_wsi_info = {}; ++ ++ if ( flags.bFlippable == true ) ++ { ++ memory_wsi_info = { ++ .sType = VK_STRUCTURE_TYPE_WSI_MEMORY_ALLOCATE_INFO_MESA, ++ .pNext = std::exchange(allocInfo.pNext, &memory_wsi_info), ++ }; ++ } + + if ( flags.bExportable == true || pDMA != nullptr ) + { +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MithicSpirit +Date: Thu, 30 Jan 2025 15:54:26 -0500 +Subject: WaylandBackend: prevent crash after closing window + +Whenever a window was closed, gamescope would segfault due to calling +IsSurfacePlane with null (from Wayland_Pointer_Leave, and maybe a few +other places). This is addressed by having IsSurfacePlane short-circuit +if it's passed null. + +HACK: I feel like IsSurfacePlane shouldn't ever be called with a null +pointer, but this is the easiest way to solve this for now, and the code +needs refactoring anyway. +--- + src/Backends/WaylandBackend.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/Backends/WaylandBackend.cpp b/src/Backends/WaylandBackend.cpp +index da43d03987a8..22f8ee5c8fac 100644 +--- a/src/Backends/WaylandBackend.cpp ++++ b/src/Backends/WaylandBackend.cpp +@@ -75,7 +75,9 @@ static inline uint32_t WaylandScaleToLogical( uint32_t pValue, uint32_t pFactor + } + + static bool IsSurfacePlane( wl_surface *pSurface ) { +- return wl_proxy_get_tag( (wl_proxy *)pSurface ) == &GAMESCOPE_plane_tag; ++ // HACK: this probably should never be called with a null pointer, but it ++ // was happening after a window was closed. ++ return pSurface && (wl_proxy_get_tag( (wl_proxy *)pSurface ) == &GAMESCOPE_plane_tag); + } + + #define WAYLAND_NULL() [] ( void *pData, Args... args ) { } +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Matthew Schwartz +Date: Tue, 1 Apr 2025 23:03:56 -0700 +Subject: script: fixup Ally config to support BOE panels + +Also made some style fixups. Verified working on both BOE +and TMX panel models. +--- + .../displays/asus.rogally.lcd.lua | 35 ++++++++++++------- + 1 file changed, 23 insertions(+), 12 deletions(-) + +diff --git a/scripts/00-gamescope/displays/asus.rogally.lcd.lua b/scripts/00-gamescope/displays/asus.rogally.lcd.lua +index 11ba7cc30f9b..40b5188b5c73 100644 +--- a/scripts/00-gamescope/displays/asus.rogally.lcd.lua ++++ b/scripts/00-gamescope/displays/asus.rogally.lcd.lua +@@ -10,7 +10,7 @@ local rogally_lcd_refresh_rates = { + } + + gamescope.config.known_displays.rogally_lcd = { +- pretty_name = "ASUS ROG Ally/Ally X LCD", ++ pretty_name = "ASUS ROG Ally / ROG Ally X LCD", + hdr = { + -- Setup some fallbacks for undocking with HDR, meant + -- for the internal panel. It does not support HDR. +@@ -21,16 +21,14 @@ gamescope.config.known_displays.rogally_lcd = { + max_frame_average_luminance = 500, + min_content_light_level = 0.5 + }, +- -- Use the EDID colorimetry for now, but someone should check +- -- if the EDID colorimetry truly matches what the display is capable of. + dynamic_refresh_rates = rogally_lcd_refresh_rates, +- -- Follow the Steam Deck OLED style for modegen by variang the VFP (Vertical Front Porch) ++ -- Follow the Steam Deck OLED style for modegen by varying the VFP (Vertical Front Porch) + -- + -- Given that this display is VRR and likely has an FB/Partial FB in the DDIC: + -- it should be able to handle this method, and it is more optimal for latency + -- than elongating the clock. + dynamic_modegen = function(base_mode, refresh) +- debug("Generating mode "..refresh.."Hz for ROG Ally with fixed pixel clock") ++ debug("Generating mode "..refresh.."Hz for ASUS ROG Ally / ROG Ally X LCD with fixed pixel clock") + local vfps = { + 1771, 1720, 1655, 1600, 1549, + 1499, 1455, 1405, 1361, 1320, +@@ -50,7 +48,7 @@ gamescope.config.known_displays.rogally_lcd = { + } + local vfp = vfps[zero_index(refresh - 48)] + if vfp == nil then +- warn("Couldn't do refresh "..refresh.." on ROG Ally") ++ warn("Couldn't do refresh "..refresh.." on ASUS ROG Ally / ROG Ally X LCD") + return base_mode + end + +@@ -62,15 +60,28 @@ gamescope.config.known_displays.rogally_lcd = { + --debug(inspect(mode)) + return mode + end, +- -- There is only a single panel model in use across both +- -- ROG Ally + ROG Ally X. + matches = function(display) +- if display.vendor == "TMX" and display.model == "TL070FVXS01-0" and display.product == 0x0002 then +- debug("[rogally_lcd] Matched vendor: "..display.vendor.." model: "..display.model.." product:"..display.product) +- return 5000 ++ -- There are two panels used across the ROG Ally and ROG Ally X ++ -- with the same timings, but the model names are in different ++ -- parts of the EDID. ++ local lcd_types = { ++ { vendor = "TMX", model = "TL070FVXS01-0", product = 0x0002 }, ++ { vendor = "BOE", data_string = "TS070FHM-LU0", product = 0x0C33 }, ++ } ++ ++ for index, value in ipairs(lcd_types) do ++ -- We only match if the vendor and product match exactly, plus either model or data_string ++ if value.vendor == display.vendor and value.product == display.product then ++ if (value.model and value.model == display.model) ++ or (value.data_string and value.data_string == display.data_string) then ++ debug("[rogally_lcd] Matched vendor: "..value.vendor.." model: "..(value.model or value.data_string).." product: "..value.product) ++ return 5000 ++ end ++ end + end ++ + return -1 + end + } +-debug("Registered ASUS ROG Ally/Ally X LCD as a known display") ++debug("Registered ASUS ROG Ally / ROG Ally X LCD as a known display") + --debug(inspect(gamescope.config.known_displays.rogally_lcd)) +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Colin Kinloch +Date: Sat, 21 Dec 2024 17:24:31 +0000 +Subject: scripts: Search GAMESCOPE_SCRIPT_PATH for scripts + +Adds GAMESCOPE_SCRIPT_PATH as a colon separated list of paths to search for scripts in. + +It's also added to the meson devenv which allows developers to test changes by running: +`meson devenv -C _build` +--- + meson.build | 4 ++++ + src/Script/Script.cpp | 10 ++++++++++ + 2 files changed, 14 insertions(+) + +diff --git a/meson.build b/meson.build +index cc07a59ca99a..562ee1585a6b 100644 +--- a/meson.build ++++ b/meson.build +@@ -102,3 +102,7 @@ endif + + # Handle default script/config stuff + meson.add_install_script('default_scripts_install.sh') ++ ++devenv = environment() ++devenv.set('GAMESCOPE_SCRIPT_PATH', join_paths(meson.current_source_dir(), 'scripts')) ++meson.add_devenv(devenv) +diff --git a/src/Script/Script.cpp b/src/Script/Script.cpp +index ceb1f80e3a77..2d3cd47bb8ec 100644 +--- a/src/Script/Script.cpp ++++ b/src/Script/Script.cpp +@@ -124,10 +124,20 @@ namespace gamescope + + void CScriptManager::RunDefaultScripts() + { ++ const char *sScriptPathEnv = getenv("GAMESCOPE_SCRIPT_PATH"); ++ + if ( cv_script_use_local_scripts ) + { + RunFolder( "../scripts", true ); + } ++ else if ( sScriptPathEnv ) ++ { ++ std::vector sScriptPaths = gamescope::Split( sScriptPathEnv, ":" ); ++ for ( const auto &sScriptPath : sScriptPaths ) ++ { ++ RunFolder( sScriptPath, true ); ++ } ++ } + else + { + RunFolder( SCRIPT_DIR, true ); +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Paul Gofman +Date: Mon, 7 Apr 2025 17:42:30 -0600 +Subject: steamcompmgr: Set receivedDoneCommit even if the commit is not for + current surface in update_wayland_res(). + +--- + src/steamcompmgr.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index d0a069e69c60..e40f95715746 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -6469,8 +6469,7 @@ void update_wayland_res(CommitDoneList_t *doneCommits, steamcompmgr_win_t *w, Re + wlserver_lock(); + wlr_buffer_unlock( buf ); + wlserver_unlock(); +- +- // Don't mark as recieve done commit, it was for the wrong surface. ++ w->receivedDoneCommit = true; + return; + } + +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "kingstom.chen" +Date: Tue, 18 Feb 2025 08:59:06 +0800 +Subject: Force wrap file usage for stb and glm dependencies + +the `dependency()` for stb and glm first searched for system-installed versions, +which could an incompatible version (e.g. `stb_image_resize2.h`), it may break the build. + +By forcing the use of the subproject wrap files, it will prevent breaking changes +due to unpredictable system dependency versions. +--- + src/meson.build | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/meson.build b/src/meson.build +index 74fc0334d47e..f35f7ef0cb94 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -19,11 +19,14 @@ xkbcommon = dependency('xkbcommon') + thread_dep = dependency('threads') + cap_dep = dependency('libcap', required: get_option('rt_cap')) + epoll_dep = dependency('epoll-shim', required: false) +-glm_dep = dependency('glm') + sdl2_dep = dependency('SDL2', required: get_option('sdl2_backend')) +-stb_dep = dependency('stb') + avif_dep = dependency('libavif', version: '>=1.0.0', required: get_option('avif_screenshots')) + ++glm_proj = subproject('glm') ++glm_dep = glm_proj.get_variable('glm_dep') ++stb_proj = subproject('stb') ++stb_dep = stb_proj.get_variable('stb_dep') ++ + wlroots_dep = dependency( + 'wlroots', + version: ['>= 0.18.0', '< 0.19.0'], +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Matthew Schwartz +Date: Thu, 3 Apr 2025 14:08:50 -0700 +Subject: script: Lenovo Legion Go S LCD display configuration + +This configuration covers the non-VRR limiter of the Lenovo Legion Go S. +In the EDID, only 60Hz and 120Hz are listed as valid modes with different +pixel clocks. Because of this, an LCD Deck style for dynamic modegen works best. + +The refresh rates within this configuration were tested with hundreds of modesets +on my Z2 Go model with a CSW panel. +--- + .../displays/lenovo.legiongos.lcd.lua | 59 +++++++++++++++++++ + 1 file changed, 59 insertions(+) + create mode 100644 scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua + +diff --git a/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua b/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua +new file mode 100644 +index 000000000000..6263478c0517 +--- /dev/null ++++ b/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua +@@ -0,0 +1,59 @@ ++local legiongos_lcd_refresh_rates = { ++ 52, 53, 54, 56, 57, 58, 59, ++ 60, 61, 62, 63, 64, 65, 67, 68, 69, ++ 70, ++ 102, 103, 104, 105, 106, 107, 108, 109, ++ 111, 112, 113, 114, 115, 116, 117, 118, 119, ++ 120 ++} ++ ++gamescope.config.known_displays.legiongos_lcd = { ++ pretty_name = "Lenovo Legion Go S LCD", ++ hdr = { ++ -- The Legion Go S panel does not support HDR. ++ supported = false, ++ force_enabled = false, ++ eotf = gamescope.eotf.gamma22, ++ max_content_light_level = 500, ++ max_frame_average_luminance = 500, ++ min_content_light_level = 0.5 ++ }, ++ -- 60Hz has a different pixel clock than 120Hz in the EDID with VRR disabled, ++ -- and the panel is not responsive to tuning VFPs. To cover the non-VRR ++ -- limiter, an LCD Deck-style dynamic modegen method works best. ++ dynamic_refresh_rates = legiongos_lcd_refresh_rates, ++ dynamic_modegen = function(base_mode, refresh) ++ debug("Generating mode "..refresh.."Hz for Lenovo Legion Go S LCD") ++ local mode = base_mode ++ ++ -- These are only tuned for 1920x1200. ++ gamescope.modegen.set_resolution(mode, 1920, 1200) ++ ++ -- hfp, hsync, hbp ++ gamescope.modegen.set_h_timings(mode, 48, 36, 80) ++ -- vfp, vsync, vbp ++ gamescope.modegen.set_v_timings(mode, 54, 6, 4) ++ mode.clock = gamescope.modegen.calc_max_clock(mode, refresh) ++ mode.vrefresh = gamescope.modegen.calc_vrefresh(mode) ++ ++ --debug(inspect(mode)) ++ return mode ++ end, ++ matches = function(display) ++ local lcd_types = { ++ { vendor = "CSW", model = "PN8007QB1-1", product = 0x0800 }, ++ { vendor = "BOE", model = "NS080WUM-LX1", product = 0x0C00 }, ++ } ++ ++ for index,value in ipairs(lcd_types) do ++ if value.vendor == display.vendor and value.model == display.model and value.product == display.product then ++ debug("[legiongos_lcd] Matched vendor: "..display.vendor.." model: "..display.model.." product: "..display.product) ++ return 5000 ++ end ++ end ++ ++ return -1 ++ end ++} ++debug("Registered Lenovo Legion Go S LCD as a known display") ++--debug(inspect(gamescope.config.known_displays.legiongos_lcd)) +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Matthew Schwartz +Date: Wed, 9 Apr 2025 14:22:16 -0700 +Subject: script: add additional BOE panel + +Some BOE units have panels with different product codes but +identical model names. +--- + scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua b/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua +index 6263478c0517..32f776c17f3d 100644 +--- a/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua ++++ b/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua +@@ -43,6 +43,7 @@ gamescope.config.known_displays.legiongos_lcd = { + local lcd_types = { + { vendor = "CSW", model = "PN8007QB1-1", product = 0x0800 }, + { vendor = "BOE", model = "NS080WUM-LX1", product = 0x0C00 }, ++ { vendor = "BOE", model = "NS080WUM-LX1", product = 0x0CFF }, + } + + for index,value in ipairs(lcd_types) do +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Attila Fidan +Date: Wed, 29 Jan 2025 07:51:13 +0000 +Subject: WaylandBackend: Don't assert on non-xkb-v1 keymaps + +Long story short, there are some edge cases where sway may send +no_keymap to clients when a virtual keyboard is created on the seat, +in specific circumstances. It will later send the xkb keymap before any +key events are sent. Other clients simply ignore non-xkb-v1 keymaps (or +the lack of a keymap), they don't assert. So gamescope should do the +same. +--- + src/Backends/WaylandBackend.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/Backends/WaylandBackend.cpp b/src/Backends/WaylandBackend.cpp +index 22f8ee5c8fac..3207a6b9f7d4 100644 +--- a/src/Backends/WaylandBackend.cpp ++++ b/src/Backends/WaylandBackend.cpp +@@ -2748,7 +2748,8 @@ namespace gamescope + // Ideally we'd use this to influence our keymap to clients, eg. x server. + + defer( close( nFd ) ); +- assert( uFormat == WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 ); ++ if ( uFormat != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1 ) ++ return; + + char *pMap = (char *)mmap( nullptr, uSize, PROT_READ, MAP_PRIVATE, nFd, 0 ); + if ( !pMap || pMap == MAP_FAILED ) +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: M Stoeckl +Date: Tue, 21 Jan 2025 16:08:47 -0500 +Subject: main: Give error message on invalid integer or float argument + +--- + src/main.cpp | 54 +++++++++++++++++++++++++++++++++++++++------------- + 1 file changed, 41 insertions(+), 13 deletions(-) + +diff --git a/src/main.cpp b/src/main.cpp +index cd251af559e1..58bede8582fd 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -425,6 +425,34 @@ static enum gamescope::GamescopeBackend parse_backend_name(const char *str) + } + } + ++static int parse_integer(const char *str, const char *optionName) ++{ ++ auto result = gamescope::Parse(str); ++ if ( result.has_value() ) ++ { ++ return result.value(); ++ } ++ else ++ { ++ fprintf( stderr, "gamescope: invalid value for --%s, \"%s\" is either not an integer or is far too large\n", optionName, str ); ++ exit(1); ++ } ++} ++ ++static float parse_float(const char *str, const char *optionName) ++{ ++ auto result = gamescope::Parse(str); ++ if ( result.has_value() ) ++ { ++ return result.value(); ++ } ++ else ++ { ++ fprintf( stderr, "gamescope: invalid value for --%s, \"%s\" could not be interpreted as a real number\n", optionName, str ); ++ exit(1); ++ } ++} ++ + struct sigaction handle_signal_action = {}; + + void ShutdownGamescope() +@@ -677,25 +705,25 @@ int main(int argc, char **argv) + const char *opt_name; + switch (o) { + case 'w': +- g_nNestedWidth = atoi( optarg ); ++ g_nNestedWidth = parse_integer( optarg, "nested-width" ); + break; + case 'h': +- g_nNestedHeight = atoi( optarg ); ++ g_nNestedHeight = parse_integer( optarg, "nested-height" ); + break; + case 'r': +- g_nNestedRefresh = gamescope::ConvertHztomHz( atoi( optarg ) ); ++ g_nNestedRefresh = gamescope::ConvertHztomHz( parse_integer( optarg, "nested-refresh" ) ); + break; + case 'W': +- g_nPreferredOutputWidth = atoi( optarg ); ++ g_nPreferredOutputWidth = parse_integer( optarg, "output-width" ); + break; + case 'H': +- g_nPreferredOutputHeight = atoi( optarg ); ++ g_nPreferredOutputHeight = parse_integer( optarg, "output-height" ); + break; + case 'o': +- g_nNestedUnfocusedRefresh = gamescope::ConvertHztomHz( atoi( optarg ) ); ++ g_nNestedUnfocusedRefresh = gamescope::ConvertHztomHz( parse_integer( optarg, "nested-unfocused-refresh" ) ); + break; + case 'm': +- g_flMaxWindowScale = atof( optarg ); ++ g_flMaxWindowScale = parse_float( optarg, "max-scale" ); + break; + case 'S': + g_wantedUpscaleScaler = parse_upscaler_scaler(optarg); +@@ -716,7 +744,7 @@ int main(int argc, char **argv) + g_bGrabbed = true; + break; + case 's': +- g_mouseSensitivity = atof( optarg ); ++ g_mouseSensitivity = parse_float( optarg, "mouse-sensitivity" ); + break; + case 'e': + steamMode = true; +@@ -734,21 +762,21 @@ int main(int argc, char **argv) + } else if (strcmp(opt_name, "disable-color-management") == 0) { + g_bForceDisableColorMgmt = true; + } else if (strcmp(opt_name, "xwayland-count") == 0) { +- g_nXWaylandCount = atoi( optarg ); ++ g_nXWaylandCount = parse_integer( optarg, opt_name ); + } else if (strcmp(opt_name, "composite-debug") == 0) { + cv_composite_debug |= CompositeDebugFlag::Markers; + cv_composite_debug |= CompositeDebugFlag::PlaneBorders; + } else if (strcmp(opt_name, "hdr-debug-heatmap") == 0) { + cv_composite_debug |= CompositeDebugFlag::Heatmap; + } else if (strcmp(opt_name, "default-touch-mode") == 0) { +- gamescope::cv_touch_click_mode = (gamescope::TouchClickMode) atoi( optarg ); ++ gamescope::cv_touch_click_mode = (gamescope::TouchClickMode) parse_integer( optarg, opt_name ); + } else if (strcmp(opt_name, "generate-drm-mode") == 0) { + g_eGamescopeModeGeneration = parse_gamescope_mode_generation( optarg ); + } else if (strcmp(opt_name, "force-orientation") == 0) { + g_DesiredInternalOrientation = force_orientation( optarg ); + } else if (strcmp(opt_name, "sharpness") == 0 || + strcmp(opt_name, "fsr-sharpness") == 0) { +- g_upscaleFilterSharpness = atoi( optarg ); ++ g_upscaleFilterSharpness = parse_integer( optarg, opt_name ); + } else if (strcmp(opt_name, "rt") == 0) { + g_bRt = true; + } else if (strcmp(opt_name, "prefer-vk-device") == 0) { +@@ -762,7 +790,7 @@ int main(int argc, char **argv) + } else if (strcmp(opt_name, "force-grab-cursor") == 0) { + g_bForceRelativeMouse = true; + } else if (strcmp(opt_name, "display-index") == 0) { +- g_nNestedDisplayIndex = atoi( optarg ); ++ g_nNestedDisplayIndex = parse_integer( optarg, opt_name ); + } else if (strcmp(opt_name, "adaptive-sync") == 0) { + cv_adaptive_sync = true; + } else if (strcmp(opt_name, "expose-wayland") == 0) { +@@ -770,7 +798,7 @@ int main(int argc, char **argv) + } else if (strcmp(opt_name, "backend") == 0) { + eCurrentBackend = parse_backend_name( optarg ); + } else if (strcmp(opt_name, "cursor-scale-height") == 0) { +- g_nCursorScaleHeight = atoi(optarg); ++ g_nCursorScaleHeight = parse_integer(optarg, opt_name); + } else if (strcmp(opt_name, "mangoapp") == 0) { + g_bLaunchMangoapp = true; + } +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Joshua Ashton +Date: Sat, 7 Sep 2024 22:22:22 +0100 +Subject: protocol: Add gamescope-action-binding protocol + +--- + protocol/gamescope-action-binding.xml | 85 ++++++++++ + protocol/meson.build | 1 + + src/Apps/gamescope_hotkey_example.cpp | 179 +++++++++++++++++++++ + src/WaylandServer/GamescopeActionBinding.h | 163 +++++++++++++++++++ + src/WaylandServer/WaylandDecls.h | 3 + + src/meson.build | 2 + + src/wlserver.cpp | 58 ++++++- + 7 files changed, 489 insertions(+), 2 deletions(-) + create mode 100644 protocol/gamescope-action-binding.xml + create mode 100644 src/Apps/gamescope_hotkey_example.cpp + create mode 100644 src/WaylandServer/GamescopeActionBinding.h + +diff --git a/protocol/gamescope-action-binding.xml b/protocol/gamescope-action-binding.xml +new file mode 100644 +index 000000000000..2164cb87ad84 +--- /dev/null ++++ b/protocol/gamescope-action-binding.xml +@@ -0,0 +1,85 @@ ++ ++ ++ ++ ++ Copyright © 2024 Valve Corporation ++ ++ Permission is hereby granted, free of charge, to any person obtaining a ++ copy of this software and associated documentation files (the "Software"), ++ to deal in the Software without restriction, including without limitation ++ the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ and/or sell copies of the Software, and to permit persons to whom the ++ Software is furnished to do so, subject to the following conditions: ++ ++ The above copyright notice and this permission notice (including the next ++ paragraph) shall be included in all copies or substantial portions of the ++ Software. ++ ++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ DEALINGS IN THE SOFTWARE. ++ ++ ++ ++ This is a private Gamescope protocol. Regular Wayland clients must not use ++ it. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Flags that control how the action is armed. ++ ++ ++ ++ ++ ++ ++ ++ Flags that say how the action was triggered. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/protocol/meson.build b/protocol/meson.build +index dbce92edce52..9f75f188af52 100644 +--- a/protocol/meson.build ++++ b/protocol/meson.build +@@ -36,6 +36,7 @@ protocols = [ + 'gamescope-reshade.xml', + 'gamescope-swapchain.xml', + 'gamescope-private.xml', ++ 'gamescope-action-binding.xml', + + # wlroots protocols + 'wlr-layer-shell-unstable-v1.xml', +diff --git a/src/Apps/gamescope_hotkey_example.cpp b/src/Apps/gamescope_hotkey_example.cpp +new file mode 100644 +index 000000000000..ffd88bdfa2c8 +--- /dev/null ++++ b/src/Apps/gamescope_hotkey_example.cpp +@@ -0,0 +1,179 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++#include "convar.h" ++#include "Utils/Version.h" ++ ++#include ++ ++#include ++#include ++ ++// TODO: Consolidate ++#define WAYLAND_NULL() [] ( void *pData, Args... args ) { } ++#define WAYLAND_USERDATA_TO_THIS(type, name) [] ( void *pData, Args... args ) { type *pThing = (type *)pData; pThing->name( std::forward(args)... ); } ++ ++namespace gamescope ++{ ++ class CActionBinding ++ { ++ public: ++ bool Init( gamescope_action_binding_manager *pManager, std::span pKeySyms ) ++ { ++ Shutdown(); ++ ++ m_pBinding = gamescope_action_binding_manager_create_action_binding( pManager ); ++ if ( !m_pBinding ) ++ return false; ++ ++ wl_array array; ++ wl_array_init(&array); ++ for ( uint32_t uKeySym : pKeySyms ) ++ { ++ uint32_t *pKeySymPtr = (uint32_t *)wl_array_add(&array, sizeof(uint32_t) ); ++ *pKeySymPtr = uKeySym; ++ } ++ ++ gamescope_action_binding_add_listener( m_pBinding, &s_BindingListener, (void *)this ); ++ gamescope_action_binding_add_keyboard_trigger( m_pBinding, &array ); ++ gamescope_action_binding_set_description( m_pBinding, "My Example Hotkey :)" ); ++ gamescope_action_binding_arm( m_pBinding, 0 ); ++ ++ return true; ++ } ++ ++ void Shutdown() ++ { ++ if ( m_pBinding ) ++ { ++ gamescope_action_binding_destroy( m_pBinding ); ++ m_pBinding = nullptr; ++ } ++ } ++ ++ void Wayland_Triggered( gamescope_action_binding *pBinding, uint32_t uSequence, uint32_t uTriggerFlags, uint32_t uTimeLo, uint32_t uTimeHi ) ++ { ++ fprintf( stderr, "Hotkey pressed!" ); ++ } ++ ++ private: ++ gamescope_action_binding *m_pBinding = nullptr; ++ ++ static const gamescope_action_binding_listener s_BindingListener; ++ }; ++ ++ const gamescope_action_binding_listener CActionBinding::s_BindingListener = ++ { ++ .triggered = WAYLAND_USERDATA_TO_THIS( CActionBinding, Wayland_Triggered ), ++ }; ++ ++ class GamescopeHotkeyExample ++ { ++ public: ++ GamescopeHotkeyExample(); ++ ~GamescopeHotkeyExample(); ++ ++ bool Init(); ++ void Run(); ++ private: ++ wl_display *m_pDisplay = nullptr; ++ gamescope_action_binding_manager *m_pActionBindingManager = nullptr; ++ ++ void Wayland_Registry_Global( wl_registry *pRegistry, uint32_t uName, const char *pInterface, uint32_t uVersion ); ++ static const wl_registry_listener s_RegistryListener; ++ }; ++ ++ GamescopeHotkeyExample::GamescopeHotkeyExample() ++ { ++ } ++ ++ GamescopeHotkeyExample::~GamescopeHotkeyExample() ++ { ++ } ++ ++ bool GamescopeHotkeyExample::Init() ++ { ++ const char *pDisplayName = getenv( "GAMESCOPE_WAYLAND_DISPLAY" ); ++ if ( !pDisplayName || !*pDisplayName ) ++ pDisplayName = "gamescope-0"; ++ ++ if ( !( m_pDisplay = wl_display_connect( pDisplayName ) ) ) ++ { ++ fprintf( stderr, "Failed to open GAMESCOPE_WAYLAND_DISPLAY.\n" ); ++ return false; ++ } ++ ++ { ++ wl_registry *pRegistry; ++ if ( !( pRegistry = wl_display_get_registry( m_pDisplay ) ) ) ++ { ++ fprintf( stderr, "Failed to get wl_registry.\n" ); ++ return false; ++ } ++ ++ wl_registry_add_listener( pRegistry, &s_RegistryListener, (void *)this ); ++ wl_display_roundtrip( m_pDisplay ); ++ wl_display_roundtrip( m_pDisplay ); ++ ++ if ( !m_pActionBindingManager ) ++ { ++ fprintf( stderr, "Failed to get Gamescope binding manager\n" ); ++ return false; ++ } ++ ++ wl_registry_destroy( pRegistry ); ++ } ++ ++ return true; ++ } ++ ++ void GamescopeHotkeyExample::Run() ++ { ++ // Add a test hotkey of Shift + P. ++ std::vector uKeySyms = { 0xffe1, 0x0070 }; // XKB_KEY_Shift_L + XKB_KEY_p ++ ++ CActionBinding binding; ++ if ( !binding.Init( m_pActionBindingManager, uKeySyms ) ) ++ return; ++ ++ wl_display_flush( m_pDisplay ); ++ ++ for ( ;; ) ++ { ++ wl_display_dispatch( m_pDisplay ); ++ } ++ } ++ ++ void GamescopeHotkeyExample::Wayland_Registry_Global( wl_registry *pRegistry, uint32_t uName, const char *pInterface, uint32_t uVersion ) ++ { ++ if ( !strcmp( pInterface, gamescope_action_binding_manager_interface.name ) ) ++ { ++ m_pActionBindingManager = (decltype(m_pActionBindingManager)) wl_registry_bind( pRegistry, uName, &gamescope_action_binding_manager_interface, uVersion ); ++ } ++ } ++ ++ const wl_registry_listener GamescopeHotkeyExample::s_RegistryListener = ++ { ++ .global = WAYLAND_USERDATA_TO_THIS( GamescopeHotkeyExample, Wayland_Registry_Global ), ++ .global_remove = WAYLAND_NULL(), ++ }; ++ ++ static int RunHotkeyExample( int argc, char *argv[] ) ++ { ++ gamescope::GamescopeHotkeyExample hotkeyExample; ++ if ( !hotkeyExample.Init() ) ++ return 1; ++ ++ hotkeyExample.Run(); ++ ++ return 0; ++ } ++} ++ ++int main( int argc, char *argv[] ) ++{ ++ return gamescope::RunHotkeyExample( argc, argv ); ++} +diff --git a/src/WaylandServer/GamescopeActionBinding.h b/src/WaylandServer/GamescopeActionBinding.h +new file mode 100644 +index 000000000000..81aab05dcd22 +--- /dev/null ++++ b/src/WaylandServer/GamescopeActionBinding.h +@@ -0,0 +1,163 @@ ++#pragma once ++ ++#include "WaylandProtocol.h" ++ ++#include "gamescope-action-binding-protocol.h" ++ ++#include ++#include ++#include ++ ++#include "convar.h" ++#include "Utils/Algorithm.h" ++ ++#include "wlr_begin.hpp" ++#include ++#include ++#include "wlr_end.hpp" ++ ++using namespace std::literals; ++ ++uint64_t get_time_in_nanos(); ++ ++namespace gamescope::WaylandServer ++{ ++ struct Keybind_t ++ { ++ std::unordered_set setKeySyms; ++ }; ++ ++ /////////////////////////// ++ // CGamescopeActionBinding ++ /////////////////////////// ++ class CGamescopeActionBinding : public CWaylandResource ++ { ++ public: ++ WL_PROTO_DEFINE( gamescope_action_binding, 1 ); ++ ++ CGamescopeActionBinding( WaylandResourceDesc_t desc ) ++ : CWaylandResource( desc ) ++ { ++ s_Bindings.push_back( this ); ++ } ++ ++ ~CGamescopeActionBinding() ++ { ++ std::erase_if( s_Bindings, [this]( CGamescopeActionBinding *pBinding ){ return pBinding == this; } ); ++ } ++ ++ // gamescope_action_binding ++ ++ void SetDescription( const char *pszDescription ) ++ { ++ m_sDescription = pszDescription; ++ } ++ ++ void AddKeyboardTrigger( wl_array *pKeysymsArray ) ++ { ++ size_t zKeysymCount = pKeysymsArray->size / sizeof( xkb_keysym_t ); ++ ++ std::span pKeysyms = std::span { ++ reinterpret_cast( pKeysymsArray->data ), ++ zKeysymCount }; ++ ++ std::unordered_set setKeySyms; ++ for ( xkb_keysym_t uKeySym : pKeysyms ) ++ { ++ setKeySyms.emplace( uKeySym ); ++ } ++ ++ m_KeyboardTriggers.emplace_back( std::move( setKeySyms ) ); ++ } ++ ++ void ClearTriggers() ++ { ++ m_KeyboardTriggers.clear(); ++ } ++ ++ void Arm( uint32_t uArmFlags ) ++ { ++ m_ouArmFlags = uArmFlags; ++ } ++ ++ void Disarm() ++ { ++ m_ouArmFlags = std::nullopt; ++ } ++ ++ // ++ ++ bool IsArmed() { return m_ouArmFlags != std::nullopt; } ++ std::span GetKeyboardTriggers() { return m_KeyboardTriggers; } ++ ++ bool Execute() ++ { ++ if ( !IsArmed() ) ++ return false; ++ ++ uint32_t uArmFlags = *m_ouArmFlags; ++ bool bBlockInput = !!( uArmFlags & GAMESCOPE_ACTION_BINDING_ARM_FLAG_NO_BLOCK ); ++ ++ uint32_t uTriggerFlags = GAMESCOPE_ACTION_BINDING_TRIGGER_FLAG_KEYBOARD; ++ ++ uint64_t ulNow = get_time_in_nanos(); ++ ++ static uint32_t s_uSequence = 0; ++ uint32_t uTimeLo = static_cast( ulNow & 0xffffffff ); ++ uint32_t uTimeHi = static_cast( ulNow >> 32 ); ++ gamescope_action_binding_send_triggered( GetResource(), s_uSequence++, uTriggerFlags, uTimeLo, uTimeHi ); ++ ++ if ( uArmFlags & GAMESCOPE_ACTION_BINDING_ARM_FLAG_ONE_SHOT ) ++ Disarm(); ++ ++ return bBlockInput; ++ } ++ ++ static std::span GetBindings() ++ { ++ return s_Bindings; ++ } ++ ++ private: ++ std::string m_sDescription; ++ std::vector m_KeyboardTriggers; ++ ++ std::optional m_ouArmFlags; ++ ++ static std::vector s_Bindings; ++ }; ++ ++ const struct gamescope_action_binding_interface CGamescopeActionBinding::Implementation = ++ { ++ .destroy = WL_PROTO_DESTROY(), ++ .set_description = WL_PROTO( CGamescopeActionBinding, SetDescription ), ++ .add_keyboard_trigger = WL_PROTO( CGamescopeActionBinding, AddKeyboardTrigger ), ++ .clear_triggers = WL_PROTO( CGamescopeActionBinding, ClearTriggers ), ++ .arm = WL_PROTO( CGamescopeActionBinding, Arm ), ++ .disarm = WL_PROTO( CGamescopeActionBinding, Disarm ), ++ }; ++ ++ std::vector CGamescopeActionBinding::s_Bindings; ++ ++ ////////////////////////////////// ++ // CGamescopeActionBindingManager ++ ////////////////////////////////// ++ class CGamescopeActionBindingManager : public CWaylandResource ++ { ++ public: ++ WL_PROTO_DEFINE( gamescope_action_binding_manager, 1 ); ++ WL_PROTO_DEFAULT_CONSTRUCTOR(); ++ ++ void CreateActionBinding( uint32_t uId ) ++ { ++ CWaylandResource::Create( m_pClient, m_uVersion, uId ); ++ } ++ }; ++ ++ const struct gamescope_action_binding_manager_interface CGamescopeActionBindingManager::Implementation = ++ { ++ .destroy = WL_PROTO_DESTROY(), ++ .create_action_binding = WL_PROTO( CGamescopeActionBindingManager, CreateActionBinding ), ++ }; ++ ++} +diff --git a/src/WaylandServer/WaylandDecls.h b/src/WaylandServer/WaylandDecls.h +index e8fd9343192b..e43623aa6a74 100644 +--- a/src/WaylandServer/WaylandDecls.h ++++ b/src/WaylandServer/WaylandDecls.h +@@ -15,4 +15,7 @@ namespace gamescope::WaylandServer + class CReshadeManager; + using CReshade = CWaylandProtocol; + ++ class CGamescopeActionBindingManager; ++ using CGamescopeActionBindingProtocol = CWaylandProtocol; ++ + } +diff --git a/src/meson.build b/src/meson.build +index f35f7ef0cb94..842768ce7ce4 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -222,3 +222,5 @@ executable('gamescope_color_microbench', ['color_bench.cpp', 'color_helpers.cpp' + executable('gamescope_color_tests', ['color_tests.cpp', 'color_helpers.cpp'], gamescope_core_src, gamescope_version, dependencies:[glm_dep]) + + executable('gamescopectl', ['Apps/gamescopectl.cpp'], gamescope_core_src, gamescope_version, protocols_client_src, dependencies: [dep_wayland], install:true ) ++ ++executable('gamescope_hotkey_example', ['Apps/gamescope_hotkey_example.cpp'], gamescope_core_src, gamescope_version, protocols_client_src, dependencies: [dep_wayland, xkbcommon], install: false ) +diff --git a/src/wlserver.cpp b/src/wlserver.cpp +index 4ce9511352d0..ffaf7aff7343 100644 +--- a/src/wlserver.cpp ++++ b/src/wlserver.cpp +@@ -20,6 +20,7 @@ + #include "WaylandServer/WaylandProtocol.h" + #include "WaylandServer/LinuxDrmSyncobj.h" + #include "WaylandServer/Reshade.h" ++#include "WaylandServer/GamescopeActionBinding.h" + + #include "wlr_begin.hpp" + #include +@@ -108,6 +109,7 @@ static void wlserver_update_cursor_constraint(); + static void handle_pointer_constraint(struct wl_listener *listener, void *data); + static void wlserver_constrain_cursor( struct wlr_pointer_constraint_v1 *pNewConstraint ); + struct wlr_surface *wlserver_surface_to_main_surface( struct wlr_surface *pSurface ); ++void wlserver_process_hotkeys( wlr_keyboard *keyboard, uint32_t key, bool press ); + + std::vector& gamescope_xwayland_server_t::retrieve_commits() + { +@@ -306,6 +308,9 @@ static void wlserver_handle_key(struct wl_listener *listener, void *data) + } + #endif + ++ // TODO: Remove the below hack when Steam is shipping ++ // `gamescope_action_binding_manager` in Steam Stable ++ // as it can just use a keybind to grab these always. + bool forbidden_key = + keysym == XKB_KEY_XF86AudioLowerVolume || + keysym == XKB_KEY_XF86AudioRaiseVolume || +@@ -324,6 +329,8 @@ static void wlserver_handle_key(struct wl_listener *listener, void *data) + return; + } + } ++ ++ wlserver_process_hotkeys( keyboard->wlr, event->state == WL_KEYBOARD_KEY_STATE_PRESSED, event->time_msec ); + + wlr_seat_set_keyboard( wlserver.wlr.seat, keyboard->wlr ); + wlr_seat_keyboard_notify_key( wlserver.wlr.seat, event->time_msec, event->keycode, event->state ); +@@ -1748,6 +1755,8 @@ bool wlserver_init( void ) { + + create_reshade(); + ++ new gamescope::WaylandServer::CGamescopeActionBindingProtocol( wlserver.display ); ++ + create_gamescope_xwayland(); + + create_gamescope_swapchain_factory_v2(); +@@ -2038,12 +2047,57 @@ void wlserver_keyboardfocus( struct wlr_surface *surface, bool bConstrain ) + } + } + ++void wlserver_process_hotkeys( wlr_keyboard *keyboard, uint32_t key, bool press ) ++{ ++ xkb_keycode_t keycode = key + 8; ++ xkb_keysym_t keysym = xkb_state_key_get_one_sym( keyboard->xkb_state, keycode ); ++ ++ static std::unordered_set s_setPressedKeySyms; ++ if ( press ) ++ { ++ s_setPressedKeySyms.emplace( keysym ); ++ } ++ else ++ { ++ s_setPressedKeySyms.erase( keysym ); ++ } ++ ++ { ++ using namespace gamescope::WaylandServer; ++ ++ std::span ppBindings = CGamescopeActionBinding::GetBindings(); ++ ++ for ( CGamescopeActionBinding *pBinding : ppBindings ) ++ { ++ if ( !pBinding->IsArmed() ) ++ continue; ++ ++ std::span pKeybinds = pBinding->GetKeyboardTriggers(); ++ for ( const Keybind_t &keybind : pKeybinds ) ++ { ++ if ( !pBinding->IsArmed() ) ++ break; ++ ++ if ( s_setPressedKeySyms != keybind.setKeySyms ) ++ continue; ++ ++ if ( pBinding->Execute() ) ++ return; ++ } ++ } ++ } ++} ++ + void wlserver_key( uint32_t key, bool press, uint32_t time ) + { + assert( wlserver_is_lock_held() ); + +- assert( wlserver.wlr.virtual_keyboard_device != nullptr ); +- wlr_seat_set_keyboard( wlserver.wlr.seat, wlserver.wlr.virtual_keyboard_device ); ++ wlr_keyboard *keyboard = wlserver.wlr.virtual_keyboard_device; ++ ++ wlserver_process_hotkeys( keyboard, key, press ); ++ ++ assert( keyboard != nullptr ); ++ wlr_seat_set_keyboard( wlserver.wlr.seat, keyboard ); + wlr_seat_keyboard_notify_key( wlserver.wlr.seat, time, key, press ); + + bump_input_counter(); +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Dionne-Riel +Date: Mon, 14 Oct 2024 20:50:45 -0400 +Subject: wlserver: Re-hook pausing on session pause + +During the refactor in 88eb1b477d8b1efbe6d7087dcde74052dad84049, the +handle_session_active function lost the ultimate role of *causing a +pause* when the session became inactive. + +The duty of pausing the session was given the `DirtyState` function on +the backend, which now uses the same "moral" condition to set the paused +state (`g_DRM.paused = !wlsession_active();`)... + +... except that now `DirtyState` state is only called when the session +is resumed. In turn, this means that on session suspend, nothing ends-up +pausing the DRM backend anymore! + +This change unconditionally calls `DirtyState`, which in turn does the +accounting for pausing the backend. Actually, it conditionally passes +`false` to the argument to force nothing. + +This fixes what ends-up causing `drmModeAtomicCommit: Permission denied` +when moving to another VT from gamescope's. +--- + src/wlserver.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/wlserver.cpp b/src/wlserver.cpp +index ffaf7aff7343..bb87703162be 100644 +--- a/src/wlserver.cpp ++++ b/src/wlserver.cpp +@@ -1347,8 +1347,7 @@ bool wlsession_active() + + static void handle_session_active( struct wl_listener *listener, void *data ) + { +- if (wlserver.wlr.session->active) +- GetBackend()->DirtyState( true, true ); ++ GetBackend()->DirtyState( wlserver.wlr.session->active, wlserver.wlr.session->active ); + wl_log.infof( "Session %s", wlserver.wlr.session->active ? "resumed" : "paused" ); + } + #endif +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Autumn Ashton +Date: Sat, 1 Mar 2025 22:35:56 +0000 +Subject: steamcompmgr: Fix icon/title being spam set + +Overlays should not get an appid, that's just for focus id logic. +--- + src/steamcompmgr.cpp | 23 ++++++++++++++++++++--- + src/steamcompmgr_shared.hpp | 6 ++++++ + 2 files changed, 26 insertions(+), 3 deletions(-) + +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index e40f95715746..f718832ea5c2 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -3961,8 +3961,10 @@ determine_and_apply_focus() + if ( global_focus.focusWindow ) + { + GetBackend()->GetNestedHints()->SetVisible( true ); +- GetBackend()->GetNestedHints()->SetTitle( global_focus.focusWindow->title ); +- GetBackend()->GetNestedHints()->SetIcon( global_focus.focusWindow->icon ); ++ if ( global_focus.focusWindow != previous_focus.focusWindow ) { ++ GetBackend()->GetNestedHints()->SetTitle( global_focus.focusWindow->title ); ++ GetBackend()->GetNestedHints()->SetIcon( global_focus.focusWindow->icon ); ++ } + } + else + { +@@ -4200,9 +4202,15 @@ map_win(xwayland_ctx_t* ctx, Window id, unsigned long sequence) + { + w->appID = w->xwayland().id; + } ++ + w->isOverlay = get_prop(ctx, w->xwayland().id, ctx->atoms.overlayAtom, 0); + w->isExternalOverlay = get_prop(ctx, w->xwayland().id, ctx->atoms.externalOverlayAtom, 0); + ++ // misyl: Disable appID for overlay types, as parts of the code don't expect that focus-wise. ++ // Fixes mangoapp usage when nested, and not in SteamOS. ++ if ( w->IsAnyOverlay() ) ++ w->appID = 0; ++ + get_size_hints(ctx, w); + + get_net_wm_state(ctx, w); +@@ -4462,6 +4470,9 @@ add_win(xwayland_ctx_t *ctx, Window id, Window prev, unsigned long sequence) + new_win->appID = id; + } + ++ if ( new_win->IsAnyOverlay() ) ++ new_win->appID = 0; ++ + Window transientFor = None; + if ( XGetTransientForHint( ctx->dpy, id, &transientFor ) ) + { +@@ -4693,7 +4704,7 @@ damage_win(xwayland_ctx_t *ctx, XDamageNotifyEvent *de) + if (!w) + return; + +- if ((w->isOverlay || w->isExternalOverlay) && !w->opacity) ++ if (w->IsAnyOverlay() && !w->opacity) + return; + + // First damage event we get, compute focus; we only want to focus damaged +@@ -5295,6 +5306,8 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) + xwm_log.errorf( "appid clash was %u now %u", w->appID, appID ); + } + w->appID = appID; ++ if ( w->IsAnyOverlay() ) ++ w->appID = 0; + + MakeFocusDirty(); + } +@@ -5305,6 +5318,8 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) + if (w) + { + w->isOverlay = get_prop(ctx, w->xwayland().id, ctx->atoms.overlayAtom, 0); ++ if ( w->IsAnyOverlay() ) ++ w->appID = 0; + MakeFocusDirty(); + } + } +@@ -5314,6 +5329,8 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) + if (w) + { + w->isExternalOverlay = get_prop(ctx, w->xwayland().id, ctx->atoms.externalOverlayAtom, 0); ++ if ( w->IsAnyOverlay() ) ++ w->appID = 0; + MakeFocusDirty(); + } + } +diff --git a/src/steamcompmgr_shared.hpp b/src/steamcompmgr_shared.hpp +index f300eb94d954..989d09d50c4a 100644 +--- a/src/steamcompmgr_shared.hpp ++++ b/src/steamcompmgr_shared.hpp +@@ -116,6 +116,12 @@ struct steamcompmgr_win_t { + uint32_t appID = 0; + bool isOverlay = false; + bool isExternalOverlay = false; ++ ++ bool IsAnyOverlay() const ++ { ++ return isOverlay || isExternalOverlay; ++ } ++ + bool isFullscreen = false; + bool isSysTrayIcon = false; + bool sizeHintsSpecified = false; +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Autumn Ashton +Date: Sun, 2 Mar 2025 00:36:38 +0000 +Subject: steamcompmgr: Fix Steam sidebars with recent icon fix + +--- + src/steamcompmgr.cpp | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index f718832ea5c2..e46c34bbfbc0 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -4208,7 +4208,7 @@ map_win(xwayland_ctx_t* ctx, Window id, unsigned long sequence) + + // misyl: Disable appID for overlay types, as parts of the code don't expect that focus-wise. + // Fixes mangoapp usage when nested, and not in SteamOS. +- if ( w->IsAnyOverlay() ) ++ if ( w->isExternalOverlay ) + w->appID = 0; + + get_size_hints(ctx, w); +@@ -4470,7 +4470,7 @@ add_win(xwayland_ctx_t *ctx, Window id, Window prev, unsigned long sequence) + new_win->appID = id; + } + +- if ( new_win->IsAnyOverlay() ) ++ if ( new_win->isExternalOverlay ) + new_win->appID = 0; + + Window transientFor = None; +@@ -5306,7 +5306,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) + xwm_log.errorf( "appid clash was %u now %u", w->appID, appID ); + } + w->appID = appID; +- if ( w->IsAnyOverlay() ) ++ if ( w->isExternalOverlay ) + w->appID = 0; + + MakeFocusDirty(); +@@ -5318,7 +5318,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) + if (w) + { + w->isOverlay = get_prop(ctx, w->xwayland().id, ctx->atoms.overlayAtom, 0); +- if ( w->IsAnyOverlay() ) ++ if ( w->isExternalOverlay ) + w->appID = 0; + MakeFocusDirty(); + } +@@ -5329,7 +5329,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) + if (w) + { + w->isExternalOverlay = get_prop(ctx, w->xwayland().id, ctx->atoms.externalOverlayAtom, 0); +- if ( w->IsAnyOverlay() ) ++ if ( w->isExternalOverlay ) + w->appID = 0; + MakeFocusDirty(); + } +-- +2.50.1 + + From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Fri, 22 Nov 2024 01:37:48 +0100 @@ -10,7 +2583,7 @@ Subject: [NA] add dev script diff --git a/sync.sh b/sync.sh new file mode 100755 -index 0000000..878bf6c +index 000000000000..8dd5815d4aeb --- /dev/null +++ b/sync.sh @@ -0,0 +1,21 @@ @@ -25,7 +2598,7 @@ index 0000000..878bf6c + +set -e + -+meson build/ -Dforce_fallback_for=stb,libdisplay-info,libliftoff,wlroots,vkroots ++meson build/ -Dforce_fallback_for=stb,libdisplay-info,libliftoff,wlroots,vkroots -Denable_openvr_support=false +ninja -C build/ +scp build/src/gamescope ${HOST}:gamescope + @@ -36,7 +2609,7 @@ index 0000000..878bf6c + # sudo reboot +EOF -- -2.47.1 +2.50.1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 @@ -50,29 +2623,29 @@ move by Antheas. Co-authored-by: Kyle Gospodnetich Co-authored-by: Antheas Kapenekakis --- - src/Backends/DRMBackend.cpp | 5 +++++ + src/Backends/DRMBackend.cpp | 4 +++- src/main.cpp | 31 +++++++++++++++++++++++++++++++ src/main.hpp | 2 ++ - 3 files changed, 38 insertions(+) + 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp -index 0b121e8..75c3258 100644 +index 06ebbe7255d4..ffce5d7d8448 100644 --- a/src/Backends/DRMBackend.cpp +++ b/src/Backends/DRMBackend.cpp -@@ -2243,6 +2243,11 @@ namespace gamescope - bHasKnownHDRInfo = true; - } +@@ -2253,8 +2253,10 @@ namespace gamescope } -+ else if ( g_customRefreshRates.size() > 0 && GetScreenType() == GAMESCOPE_SCREEN_TYPE_INTERNAL ) { -+ // Only apply custom refresh rates as a fallback, allowing a graceful transition to the new system. -+ m_Mutable.ValidDynamicRefreshRates = g_customRefreshRates; -+ return; -+ } - } + else + { ++ if ( g_customRefreshRates.size() > 0 && GetScreenType() == GAMESCOPE_SCREEN_TYPE_INTERNAL ) ++ m_Mutable.ValidDynamicRefreshRates = g_customRefreshRates; + // Unknown display, see if there are any other refresh rates in the EDID we can get. +- if ( GetScreenType() == GAMESCOPE_SCREEN_TYPE_INTERNAL ) ++ else if ( GetScreenType() == GAMESCOPE_SCREEN_TYPE_INTERNAL ) + { + const drmModeModeInfo *pPreferredMode = find_mode( m_pConnector.get(), 0, 0, 0 ); - if ( !bHasKnownColorimetry ) diff --git a/src/main.cpp b/src/main.cpp -index 9dff5c4..8381889 100644 +index 58bede8582fd..1443f49b51e9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -129,6 +129,7 @@ const struct option *gamescope_options = (struct option[]){ @@ -89,9 +2662,9 @@ index 9dff5c4..8381889 100644 " --framerate-limit Set a simple framerate limit. Used as a divisor of the refresh rate, rounds down eg 60 / 59 -> 60fps, 60 / 25 -> 30fps. Default: 0, disabled.\n" + " --custom-refresh-rates Set custom refresh rates for the output. eg: 60,90,110-120\n" " --mangoapp Launch with the mangoapp (mangohud) performance overlay enabled. You should use this instead of using mangohud on the game or gamescope.\n" + " --adaptive-sync Enable adaptive sync if available (variable rate refresh)\n" "\n" - "Nested mode options:\n" -@@ -425,6 +427,33 @@ static enum gamescope::GamescopeBackend parse_backend_name(const char *str) +@@ -453,6 +455,33 @@ static float parse_float(const char *str, const char *optionName) } } @@ -125,7 +2698,7 @@ index 9dff5c4..8381889 100644 struct sigaction handle_signal_action = {}; void ShutdownGamescope() -@@ -746,6 +775,8 @@ int main(int argc, char **argv) +@@ -774,6 +803,8 @@ int main(int argc, char **argv) g_eGamescopeModeGeneration = parse_gamescope_mode_generation( optarg ); } else if (strcmp(opt_name, "force-orientation") == 0) { g_DesiredInternalOrientation = force_orientation( optarg ); @@ -133,9 +2706,9 @@ index 9dff5c4..8381889 100644 + g_customRefreshRates = parse_custom_refresh_rates( optarg ); } else if (strcmp(opt_name, "sharpness") == 0 || strcmp(opt_name, "fsr-sharpness") == 0) { - g_upscaleFilterSharpness = atoi( optarg ); + g_upscaleFilterSharpness = parse_integer( optarg, opt_name ); diff --git a/src/main.hpp b/src/main.hpp -index 2e6fb83..390c04a 100644 +index 2e6fb833af12..390c04a63ecd 100644 --- a/src/main.hpp +++ b/src/main.hpp @@ -3,6 +3,7 @@ @@ -155,100 +2728,7 @@ index 2e6fb83..390c04a 100644 enum class GamescopeUpscaleFilter : uint32_t { -- -2.47.1 - - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Alesh Slovak -Date: Thu, 26 Sep 2024 07:13:24 -0400 -Subject: fix(vrr): Revert "steamcompmgr: Move outdatedInteractiveFocus to - window" - -This reverts commit 299bc3410dcfd46da5e3c988354b60ed3a356900. ---- - src/steamcompmgr.cpp | 39 +++++++++++++++++++++++-------------- - src/steamcompmgr_shared.hpp | 1 - - 2 files changed, 24 insertions(+), 16 deletions(-) - -diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp -index 11a7cad..df7616d 100644 ---- a/src/steamcompmgr.cpp -+++ b/src/steamcompmgr.cpp -@@ -3299,7 +3299,7 @@ found:; - if ( window_has_commits( focus ) ) - out->focusWindow = focus; - else -- focus->outdatedInteractiveFocus = true; -+ out->outdatedInteractiveFocus = true; - - // Always update X's idea of focus, but still dirty - // the it being outdated so we can resolve that globally later. -@@ -6044,28 +6044,37 @@ bool handle_done_commit( steamcompmgr_win_t *w, xwayland_ctx_t *ctx, uint64_t co - // Window just got a new available commit, determine if that's worth a repaint - - // If this is an overlay that we're presenting, repaint -- if ( w == global_focus.overlayWindow && w->opacity != TRANSLUCENT ) -+ if ( gameFocused ) - { -- hasRepaintNonBasePlane = true; -- } -+ if ( w == global_focus.overlayWindow && w->opacity != TRANSLUCENT ) -+ { -+ hasRepaintNonBasePlane = true; -+ } - -- if ( w == global_focus.notificationWindow && w->opacity != TRANSLUCENT ) -- { -- hasRepaintNonBasePlane = true; -+ if ( w == global_focus.notificationWindow && w->opacity != TRANSLUCENT ) -+ { -+ hasRepaintNonBasePlane = true; -+ } - } -- -- // If this is an external overlay, repaint -- if ( w == global_focus.externalOverlayWindow && w->opacity != TRANSLUCENT ) -+ if ( ctx ) - { -- hasRepaintNonBasePlane = true; -+ if ( ctx->focus.outdatedInteractiveFocus ) -+ { -+ MakeFocusDirty(); -+ ctx->focus.outdatedInteractiveFocus = false; -+ } - } -- -- if ( w->outdatedInteractiveFocus ) -+ if ( global_focus.outdatedInteractiveFocus ) - { - MakeFocusDirty(); -- w->outdatedInteractiveFocus = false; -- } -+ global_focus.outdatedInteractiveFocus = false; - -+ // If this is an external overlay, repaint -+ if ( w == global_focus.externalOverlayWindow && w->opacity != TRANSLUCENT ) -+ { -+ hasRepaintNonBasePlane = true; -+ } -+ } - // If this is the main plane, repaint - if ( w == global_focus.focusWindow && !w->isSteamStreamingClient ) - { -diff --git a/src/steamcompmgr_shared.hpp b/src/steamcompmgr_shared.hpp -index 095694e..e41fad9 100644 ---- a/src/steamcompmgr_shared.hpp -+++ b/src/steamcompmgr_shared.hpp -@@ -125,7 +125,6 @@ struct steamcompmgr_win_t { - unsigned int requestedHeight = 0; - bool is_dialog = false; - bool maybe_a_dropdown = false; -- bool outdatedInteractiveFocus = false; - - bool hasHwndStyle = false; - uint32_t hwndStyle = 0; --- -2.47.1 +2.50.1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 @@ -261,14 +2741,14 @@ allows for CTRL for a smooth transition. Suggested-by: Antheas Kapenekakis --- - src/wlserver.cpp | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) + src/wlserver.cpp | 27 +++++++++++++++++++++++++-- + 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/wlserver.cpp b/src/wlserver.cpp -index 78a86ee..99df8aa 100644 +index bb87703162be..8b58050fd6d7 100644 --- a/src/wlserver.cpp +++ b/src/wlserver.cpp -@@ -290,6 +290,9 @@ static void wlserver_handle_modifiers(struct wl_listener *listener, void *data) +@@ -292,6 +292,9 @@ static void wlserver_handle_modifiers(struct wl_listener *listener, void *data) bump_input_counter(); } @@ -278,7 +2758,7 @@ index 78a86ee..99df8aa 100644 static void wlserver_handle_key(struct wl_listener *listener, void *data) { struct wlserver_keyboard *keyboard = wl_container_of( listener, keyboard, key ); -@@ -310,7 +313,14 @@ static void wlserver_handle_key(struct wl_listener *listener, void *data) +@@ -315,7 +318,14 @@ static void wlserver_handle_key(struct wl_listener *listener, void *data) keysym == XKB_KEY_XF86AudioLowerVolume || keysym == XKB_KEY_XF86AudioRaiseVolume || keysym == XKB_KEY_XF86PowerOff; @@ -294,192 +2774,32 @@ index 78a86ee..99df8aa 100644 { // Always send volume+/- to root server only, to avoid it reaching the game. struct wlr_surface *old_kb_surf = wlserver.kb_focus_surface; -@@ -319,6 +329,13 @@ static void wlserver_handle_key(struct wl_listener *listener, void *data) +@@ -323,9 +333,22 @@ static void wlserver_handle_key(struct wl_listener *listener, void *data) + if ( new_kb_surf ) { wlserver_keyboardfocus( new_kb_surf, false ); - wlr_seat_set_keyboard( wlserver.wlr.seat, keyboard->wlr ); +- wlr_seat_set_keyboard( wlserver.wlr.seat, keyboard->wlr ); ++ wlr_seat_set_keyboard( wlserver.wlr.seat, wlserver.wlr.virtual_keyboard_device ); ++ + if (is_steamshortcut) + { + // send ctrl down modifier to trigger the overlay + wlr_keyboard_modifiers ctrl_down_modifier; + ctrl_down_modifier.depressed = WLR_MODIFIER_CTRL; ++ ctrl_down_modifier.latched = WLR_MODIFIER_CTRL; ++ ctrl_down_modifier.locked = WLR_MODIFIER_CTRL; + wlr_seat_keyboard_notify_modifiers(wlserver.wlr.seat, &ctrl_down_modifier); + } ++ wlr_seat_keyboard_notify_key( wlserver.wlr.seat, event->time_msec, event->keycode, event->state ); wlserver_keyboardfocus( old_kb_surf, false ); ++ wlr_seat_set_keyboard( wlserver.wlr.seat, keyboard->wlr ); ++ return; --- -2.47.1 - - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Antheas Kapenekakis -Date: Fri, 11 Oct 2024 17:52:48 +0200 -Subject: fix: allow for disabling touch atom click - -Causes issues in certain devices (or not anymore?). - -Parameter option by Kyle. - -Co-authored-by: Kyle Gospodnetich ---- - src/main.cpp | 2 ++ - src/steamcompmgr.cpp | 5 ++++- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/main.cpp b/src/main.cpp -index 8381889..a76b51b 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -128,6 +128,7 @@ const struct option *gamescope_options = (struct option[]){ - { "disable-xres", no_argument, nullptr, 'x' }, - { "fade-out-duration", required_argument, nullptr, 0 }, - { "force-orientation", required_argument, nullptr, 0 }, -+ { "disable-touch-click", no_argument, nullptr, 0 }, - { "force-windows-fullscreen", no_argument, nullptr, 0 }, - { "custom-refresh-rates", required_argument, nullptr, 0 }, - -@@ -188,6 +189,7 @@ const char usage[] = - " -T, --stats-path write statistics to path\n" - " -C, --hide-cursor-delay hide cursor image after delay\n" - " -e, --steam enable Steam integration\n" -+ " --disable-touch-click disable touchscreen tap acting as a click\n" - " --xwayland-count create N xwayland servers\n" - " --prefer-vk-device prefer Vulkan device for compositing (ex: 1002:7300)\n" - " --force-orientation rotate the internal display (left, right, normal, upsidedown)\n" -diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp -index df7616d..4a17499 100644 ---- a/src/steamcompmgr.cpp -+++ b/src/steamcompmgr.cpp -@@ -197,6 +197,7 @@ update_runtime_info(); - gamescope::ConVar cv_adaptive_sync( "adaptive_sync", false, "Whether or not adaptive sync is enabled if available." ); - gamescope::ConVar cv_adaptive_sync_ignore_overlay( "adaptive_sync_ignore_overlay", false, "Whether or not to ignore overlay planes for pushing commits with adaptive sync." ); - gamescope::ConVar cv_adaptive_sync_overlay_cycles( "adaptive_sync_overlay_cycles", 1, "Number of vblank cycles to ignore overlay repaints before forcing a commit with adaptive sync." ); -+gamescope::ConVar cv_disable_touch_click{ "disable_touch_click", false, "Prevents touchscreen taps acting as clicks" }; - - uint64_t g_SteamCompMgrLimitedAppRefreshCycle = 16'666'666; - uint64_t g_SteamCompMgrAppRefreshCycle = 16'666'666; -@@ -5185,7 +5186,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) - MakeFocusDirty(); } } -- if (ev->atom == ctx->atoms.steamTouchClickModeAtom ) -+ if (ev->atom == ctx->atoms.steamTouchClickModeAtom && !cv_disable_touch_click ) - { - gamescope::cv_touch_click_mode = (gamescope::TouchClickMode) get_prop(ctx, ctx->root, ctx->atoms.steamTouchClickModeAtom, 0u ); - } -@@ -7476,6 +7477,8 @@ steamcompmgr_main(int argc, char **argv) - g_reshade_technique_idx = atoi(optarg); - } else if (strcmp(opt_name, "mura-map") == 0) { - set_mura_overlay(optarg); -+ } else if (strcmp(opt_name, "disable-touch-click") == 0) { -+ cv_disable_touch_click = true; - } - break; - case '?': -- -2.47.1 - - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Antheas Kapenekakis -Date: Fri, 11 Oct 2024 21:56:54 +0200 -Subject: fix(intel-gpu): allow for (enabling) hacky texture - -Disabling hacky texture will use more hardware planes, causing some devices to composite yielding lower fps. Required for intel to work ---- - src/main.cpp | 2 ++ - src/steamcompmgr.cpp | 5 ++++- - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/main.cpp b/src/main.cpp -index a76b51b..84e05a9 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -128,6 +128,7 @@ const struct option *gamescope_options = (struct option[]){ - { "disable-xres", no_argument, nullptr, 'x' }, - { "fade-out-duration", required_argument, nullptr, 0 }, - { "force-orientation", required_argument, nullptr, 0 }, -+ { "enable-hacky-texture", no_argument, nullptr, 0 }, - { "disable-touch-click", no_argument, nullptr, 0 }, - { "force-windows-fullscreen", no_argument, nullptr, 0 }, - { "custom-refresh-rates", required_argument, nullptr, 0 }, -@@ -189,6 +190,7 @@ const char usage[] = - " -T, --stats-path write statistics to path\n" - " -C, --hide-cursor-delay hide cursor image after delay\n" - " -e, --steam enable Steam integration\n" -+ " --enable-hacky-texture enable hacky texture on hw that support it\n" - " --disable-touch-click disable touchscreen tap acting as a click\n" - " --xwayland-count create N xwayland servers\n" - " --prefer-vk-device prefer Vulkan device for compositing (ex: 1002:7300)\n" -diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp -index 4a17499..da3115f 100644 ---- a/src/steamcompmgr.cpp -+++ b/src/steamcompmgr.cpp -@@ -147,6 +147,7 @@ static lut3d_t g_tmpLut3d; - extern int g_nDynamicRefreshHz; - - bool g_bForceHDRSupportDebug = false; -+bool g_bHackyEnabled = false; - extern float g_flInternalDisplayBrightnessNits; - extern float g_flHDRItmSdrNits; - extern float g_flHDRItmTargetNits; -@@ -2412,7 +2413,7 @@ paint_all(bool async) - if ( overlay == global_focus.inputFocusWindow ) - update_touch_scaling( &frameInfo ); - } -- else if ( !GetBackend()->UsesVulkanSwapchain() && GetBackend()->IsSessionBased() ) -+ else if ( g_bHackyEnabled && !GetBackend()->UsesVulkanSwapchain() && GetBackend()->IsSessionBased() ) - { - auto tex = vulkan_get_hacky_blank_texture(); - if ( tex != nullptr ) -@@ -7479,6 +7480,8 @@ steamcompmgr_main(int argc, char **argv) - set_mura_overlay(optarg); - } else if (strcmp(opt_name, "disable-touch-click") == 0) { - cv_disable_touch_click = true; -+ } else if (strcmp(opt_name, "enable-hacky-texture") == 0) { -+ g_bHackyEnabled = true; - } - break; - case '?': --- -2.47.1 - - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Antheas Kapenekakis -Date: Fri, 11 Oct 2024 23:01:13 +0200 -Subject: fix: re-add external orientation options to not break current - sessions (incl. applying ext. orientation) - ---- - src/main.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/main.cpp b/src/main.cpp -index 84e05a9..2398535 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -129,6 +129,8 @@ const struct option *gamescope_options = (struct option[]){ - { "fade-out-duration", required_argument, nullptr, 0 }, - { "force-orientation", required_argument, nullptr, 0 }, - { "enable-hacky-texture", no_argument, nullptr, 0 }, -+ { "force-panel-type", required_argument, nullptr, 0 }, -+ { "force-external-orientation", required_argument, nullptr, 0 }, - { "disable-touch-click", no_argument, nullptr, 0 }, - { "force-windows-fullscreen", no_argument, nullptr, 0 }, - { "custom-refresh-rates", required_argument, nullptr, 0 }, -@@ -777,7 +779,7 @@ int main(int argc, char **argv) - gamescope::cv_touch_click_mode = (gamescope::TouchClickMode) atoi( optarg ); - } else if (strcmp(opt_name, "generate-drm-mode") == 0) { - g_eGamescopeModeGeneration = parse_gamescope_mode_generation( optarg ); -- } else if (strcmp(opt_name, "force-orientation") == 0) { -+ } else if (strcmp(opt_name, "force-orientation") == 0 || strcmp(opt_name, "force-external-orientation") == 0) { - g_DesiredInternalOrientation = force_orientation( optarg ); - } else if (strcmp(opt_name, "custom-refresh-rates") == 0) { - g_customRefreshRates = parse_custom_refresh_rates( optarg ); --- -2.47.1 +2.50.1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 @@ -492,10 +2812,10 @@ Subject: fix(external): fix crash when using external touchscreens 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/wlserver.cpp b/src/wlserver.cpp -index 99df8aa..5e8f516 100644 +index 8b58050fd6d7..0b99c498e55d 100644 --- a/src/wlserver.cpp +++ b/src/wlserver.cpp -@@ -2492,8 +2492,12 @@ static void apply_touchscreen_orientation(double *x, double *y ) +@@ -2552,8 +2552,12 @@ static void apply_touchscreen_orientation(double *x, double *y ) double tx = 0; double ty = 0; @@ -511,196 +2831,7 @@ index 99df8aa..5e8f516 100644 default: case GAMESCOPE_PANEL_ORIENTATION_AUTO: -- -2.47.1 - - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Antheas Kapenekakis -Date: Fri, 11 Oct 2024 23:47:59 +0200 -Subject: feat(vrr): allow for setting refresh rate if the internal display - allows - -For the Ally, we have a set of VFP that work to set the refresh rate. -They can also be used for VRR but gamescope does not currently allow for -it. Therefore, bypass some checks to allow it to work just for this usecase. ---- - src/main.cpp | 2 ++ - src/steamcompmgr.cpp | 7 +++++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/main.cpp b/src/main.cpp -index 2398535..0621c65 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -132,6 +132,7 @@ const struct option *gamescope_options = (struct option[]){ - { "force-panel-type", required_argument, nullptr, 0 }, - { "force-external-orientation", required_argument, nullptr, 0 }, - { "disable-touch-click", no_argument, nullptr, 0 }, -+ { "enable-vrr-modesetting", no_argument, nullptr, 0 }, - { "force-windows-fullscreen", no_argument, nullptr, 0 }, - { "custom-refresh-rates", required_argument, nullptr, 0 }, - -@@ -194,6 +195,7 @@ const char usage[] = - " -e, --steam enable Steam integration\n" - " --enable-hacky-texture enable hacky texture on hw that support it\n" - " --disable-touch-click disable touchscreen tap acting as a click\n" -+ " --enable-vrr-modesetting enable setting framerate while VRR is on in the internal display\n" - " --xwayland-count create N xwayland servers\n" - " --prefer-vk-device prefer Vulkan device for compositing (ex: 1002:7300)\n" - " --force-orientation rotate the internal display (left, right, normal, upsidedown)\n" -diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp -index da3115f..69fd348 100644 ---- a/src/steamcompmgr.cpp -+++ b/src/steamcompmgr.cpp -@@ -148,6 +148,7 @@ extern int g_nDynamicRefreshHz; - - bool g_bForceHDRSupportDebug = false; - bool g_bHackyEnabled = false; -+bool g_bVRRModesetting = false; - extern float g_flInternalDisplayBrightnessNits; - extern float g_flHDRItmSdrNits; - extern float g_flHDRItmTargetNits; -@@ -899,7 +900,7 @@ bool g_bChangeDynamicRefreshBasedOnGameOpenRatherThanActive = false; - bool steamcompmgr_window_should_limit_fps( steamcompmgr_win_t *w ) - { - // VRR + FPS Limit needs another approach. -- if ( GetBackend()->IsVRRActive() ) -+ if ( GetBackend()->IsVRRActive() && !(g_bVRRModesetting && GetBackend()->GetScreenType() == gamescope::GAMESCOPE_SCREEN_TYPE_INTERNAL) ) - return false; - - return w && !window_is_steam( w ) && !w->isOverlay && !w->isExternalOverlay; -@@ -923,7 +924,7 @@ steamcompmgr_user_has_any_game_open() - - bool steamcompmgr_window_should_refresh_switch( steamcompmgr_win_t *w ) - { -- if ( GetBackend()->IsVRRActive() ) -+ if ( GetBackend()->IsVRRActive() && !(g_bVRRModesetting && GetBackend()->GetScreenType() == gamescope::GAMESCOPE_SCREEN_TYPE_INTERNAL)) - return false; - - if ( g_bChangeDynamicRefreshBasedOnGameOpenRatherThanActive ) -@@ -7480,6 +7481,8 @@ steamcompmgr_main(int argc, char **argv) - set_mura_overlay(optarg); - } else if (strcmp(opt_name, "disable-touch-click") == 0) { - cv_disable_touch_click = true; -+ } else if (strcmp(opt_name, "enable-vrr-modesetting") == 0) { -+ g_bVRRModesetting = true; - } else if (strcmp(opt_name, "enable-hacky-texture") == 0) { - g_bHackyEnabled = true; - } --- -2.47.1 - - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Antheas Kapenekakis -Date: Fri, 11 Oct 2024 19:09:05 +0200 -Subject: feat: add external option that now only lies to steam - -Previously, there was a force-panel option that allowed for VRR. -However, this is no longer the case and VRR works fine. -This option still allows for scaling the display though. So, create a -variant of the patch that only does that. ---- - src/main.cpp | 16 ++++++++++++++++ - src/steamcompmgr.cpp | 2 +- - src/steamcompmgr.hpp | 1 + - src/wlserver.cpp | 2 +- - src/wlserver.hpp | 1 + - 5 files changed, 20 insertions(+), 2 deletions(-) - -diff --git a/src/main.cpp b/src/main.cpp -index 0621c65..056e1c1 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -199,6 +199,7 @@ const char usage[] = - " --xwayland-count create N xwayland servers\n" - " --prefer-vk-device prefer Vulkan device for compositing (ex: 1002:7300)\n" - " --force-orientation rotate the internal display (left, right, normal, upsidedown)\n" -+ " --force-panel-type lie to steam that the screen is external\n" - " --force-windows-fullscreen force windows inside of gamescope to be the size of the nested display (fullscreen)\n" - " --cursor-scale-height if specified, sets a base output height to linearly scale the cursor against.\n" - " --hdr-enabled enable HDR output (needs Gamescope WSI layer enabled for support from clients)\n" -@@ -373,6 +374,19 @@ static GamescopePanelOrientation force_orientation(const char *str) - } - } - -+bool g_FakeExternal = false; -+static bool force_panel_type_external(const char *str) -+{ -+ if (strcmp(str, "internal") == 0) { -+ return false; -+ } else if (strcmp(str, "external") == 0) { -+ return true; -+ } else { -+ fprintf( stderr, "gamescope: invalid value for --force-panel-type\n" ); -+ exit(1); -+ } -+} -+ - static enum GamescopeUpscaleScaler parse_upscaler_scaler(const char *str) - { - if (strcmp(str, "auto") == 0) { -@@ -783,6 +797,8 @@ int main(int argc, char **argv) - g_eGamescopeModeGeneration = parse_gamescope_mode_generation( optarg ); - } else if (strcmp(opt_name, "force-orientation") == 0 || strcmp(opt_name, "force-external-orientation") == 0) { - g_DesiredInternalOrientation = force_orientation( optarg ); -+ } else if (strcmp(opt_name, "force-panel-type") == 0) { -+ g_FakeExternal = force_panel_type_external( optarg ); - } else if (strcmp(opt_name, "custom-refresh-rates") == 0) { - g_customRefreshRates = parse_custom_refresh_rates( optarg ); - } else if (strcmp(opt_name, "sharpness") == 0 || -diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp -index 69fd348..3dd64f8 100644 ---- a/src/steamcompmgr.cpp -+++ b/src/steamcompmgr.cpp -@@ -7192,7 +7192,7 @@ void update_mode_atoms(xwayland_ctx_t *root_ctx, bool* needs_flush = nullptr) - if (needs_flush) - *needs_flush = true; - -- if ( GetBackend()->GetCurrentConnector() && GetBackend()->GetCurrentConnector()->GetScreenType() == gamescope::GAMESCOPE_SCREEN_TYPE_INTERNAL ) -+ if ( !g_FakeExternal && GetBackend()->GetCurrentConnector() && GetBackend()->GetCurrentConnector()->GetScreenType() == gamescope::GAMESCOPE_SCREEN_TYPE_INTERNAL ) - { - XDeleteProperty(root_ctx->dpy, root_ctx->root, root_ctx->atoms.gamescopeDisplayModeListExternal); - -diff --git a/src/steamcompmgr.hpp b/src/steamcompmgr.hpp -index 9f384c4..30e48e8 100644 ---- a/src/steamcompmgr.hpp -+++ b/src/steamcompmgr.hpp -@@ -127,6 +127,7 @@ extern float focusedWindowScaleY; - extern float focusedWindowOffsetX; - extern float focusedWindowOffsetY; - -+extern bool g_FakeExternal; - extern bool g_bFSRActive; - - extern uint32_t inputCounter; -diff --git a/src/wlserver.cpp b/src/wlserver.cpp -index 5e8f516..1eeaa25 100644 ---- a/src/wlserver.cpp -+++ b/src/wlserver.cpp -@@ -1078,7 +1078,7 @@ static uint32_t get_conn_display_info_flags() - return 0; - - uint32_t flags = 0; -- if ( pConn->GetScreenType() == gamescope::GAMESCOPE_SCREEN_TYPE_INTERNAL ) -+ if ( pConn->GetScreenType() == gamescope::GAMESCOPE_SCREEN_TYPE_INTERNAL && !g_FakeExternal ) - flags |= GAMESCOPE_CONTROL_DISPLAY_FLAG_INTERNAL_DISPLAY; - if ( pConn->SupportsVRR() ) - flags |= GAMESCOPE_CONTROL_DISPLAY_FLAG_SUPPORTS_VRR; -diff --git a/src/wlserver.hpp b/src/wlserver.hpp -index 0569472..104f7a2 100644 ---- a/src/wlserver.hpp -+++ b/src/wlserver.hpp -@@ -190,6 +190,7 @@ struct wlserver_t { - }; - - extern struct wlserver_t wlserver; -+extern bool g_FakeExternal; - - std::vector wlserver_xdg_commit_queue(); - --- -2.47.1 +2.50.1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 @@ -716,10 +2847,10 @@ custom modeline generation has been provided. 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp -index 75c3258..f014be9 100644 +index ffce5d7d8448..c4f358fbc933 100644 --- a/src/Backends/DRMBackend.cpp +++ b/src/Backends/DRMBackend.cpp -@@ -2161,7 +2161,9 @@ namespace gamescope +@@ -2169,7 +2169,9 @@ namespace gamescope sol::optional otDynamicRefreshRates = tTable["dynamic_refresh_rates"]; sol::optional ofnDynamicModegen = tTable["dynamic_modegen"]; @@ -731,104 +2862,33 @@ index 75c3258..f014be9 100644 m_Mutable.ValidDynamicRefreshRates = TableToVector( *otDynamicRefreshRates ); -- -2.47.1 - - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Antheas Kapenekakis -Date: Fri, 25 Oct 2024 21:22:10 +0200 -Subject: fix(vrr): allow frame limiter to work with VRR enabled - -Down to 48hz, modeset the correct framerate. Below 48hz, -disable VRR and use the classic frame limiter. ---- - src/steamcompmgr.cpp | 30 ++++++++++++++++++++++++++++-- - 1 file changed, 28 insertions(+), 2 deletions(-) - -diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp -index 3dd64f8..7dacfe7 100644 ---- a/src/steamcompmgr.cpp -+++ b/src/steamcompmgr.cpp -@@ -165,6 +165,7 @@ uint32_t g_reshade_technique_idx = 0; - - bool g_bSteamIsActiveWindow = false; - bool g_bForceInternal = false; -+bool g_bVRRRequested = false; - - static std::vector< steamcompmgr_win_t* > GetGlobalPossibleFocusWindows(); - static bool -@@ -827,6 +828,28 @@ static void _update_app_target_refresh_cycle() - { - auto rates = GetBackend()->GetCurrentConnector()->GetValidDynamicRefreshRates(); - -+ if (g_bVRRModesetting) { -+ if (g_bVRRRequested) { -+ // If modeset VRR, go upwards to match the refresh rate 1-1. Refresh -+ // doubling would hurt us here by breaking the frame limiter. -+ for ( auto rate = rates.begin(); rate != rates.end(); rate++ ) -+ { -+ if ((int)*rate == target_fps) -+ { -+ g_nDynamicRefreshRate[ type ] = *rate; -+ // Enable VRR as we have the correct refresh rate -+ cv_adaptive_sync = true; -+ return; -+ } -+ } -+ // Otherwise, disable VRR as we can't match the refresh rate 1-1 -+ // (e.g., below 48hz). -+ cv_adaptive_sync = false; -+ } else { -+ cv_adaptive_sync = false; -+ } -+ } -+ - // Find highest mode to do refresh doubling with. - for ( auto rate = rates.rbegin(); rate != rates.rend(); rate++ ) - { -@@ -5522,8 +5545,11 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) - } - if ( ev->atom == ctx->atoms.gamescopeVRREnabled ) - { -- bool enabled = !!get_prop( ctx, ctx->root, ctx->atoms.gamescopeVRREnabled, 0 ); -- cv_adaptive_sync = enabled; -+ g_bVRRRequested = !!get_prop( ctx, ctx->root, ctx->atoms.gamescopeVRREnabled, 0 ); -+ // Try to match refresh rate and have that set the cv_adaptive_sync only if it can -+ if (g_bVRRModesetting) update_app_target_refresh_cycle(); -+ // otherwise, fall back to original behavior -+ else cv_adaptive_sync = g_bVRRRequested; - } - if ( ev->atom == ctx->atoms.gamescopeDisplayForceInternal ) - { --- -2.47.1 +2.50.1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Wed, 30 Oct 2024 00:39:03 +0100 -Subject: fix(battery): run at half hz while at steamUI and disable VRR V2 + - param +Subject: fix(battery): run at half hz while at steamUI with atom --- - src/steamcompmgr.cpp | 43 ++++++++++++++++++++++++++++++++----------- - 1 file changed, 32 insertions(+), 11 deletions(-) + src/steamcompmgr.cpp | 44 ++++++++++++++++++++++++++++++++++---------- + src/xwayland_ctx.hpp | 2 ++ + 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp -index 7dacfe7..4098c44 100644 +index e46c34bbfbc0..3b3a106b13e9 100644 --- a/src/steamcompmgr.cpp +++ b/src/steamcompmgr.cpp -@@ -166,6 +166,9 @@ uint32_t g_reshade_technique_idx = 0; +@@ -165,6 +165,8 @@ uint32_t g_reshade_technique_idx = 0; + bool g_bSteamIsActiveWindow = false; bool g_bForceInternal = false; - bool g_bVRRRequested = false; -+bool g_bVRRCanEnable = false; +bool b_bForceFrameLimit = false; +bool g_bRefreshHalveEnable = false; static std::vector< steamcompmgr_win_t* > GetGlobalPossibleFocusWindows(); static bool -@@ -793,6 +796,7 @@ uint64_t g_uCurrentBasePlaneCommitID = 0; +@@ -791,6 +793,7 @@ uint64_t g_uCurrentBasePlaneCommitID = 0; bool g_bCurrentBasePlaneIsFifo = false; static int g_nSteamCompMgrTargetFPS = 0; @@ -836,7 +2896,7 @@ index 7dacfe7..4098c44 100644 static uint64_t g_uDynamicRefreshEqualityTime = 0; static int g_nDynamicRefreshRate[gamescope::GAMESCOPE_SCREEN_TYPE_COUNT] = { 0, 0 }; // Delay to stop modes flickering back and forth. -@@ -812,7 +816,7 @@ static void _update_app_target_refresh_cycle() +@@ -810,7 +813,7 @@ static void _update_app_target_refresh_cycle() int target_fps = g_nCombinedAppRefreshCycleOverride[type]; g_nDynamicRefreshRate[ type ] = 0; @@ -845,7 +2905,7 @@ index 7dacfe7..4098c44 100644 if ( !target_fps ) { -@@ -821,7 +825,7 @@ static void _update_app_target_refresh_cycle() +@@ -819,7 +822,7 @@ static void _update_app_target_refresh_cycle() if ( g_nCombinedAppRefreshCycleChangeFPS[ type ] ) { @@ -854,26 +2914,7 @@ index 7dacfe7..4098c44 100644 } if ( g_nCombinedAppRefreshCycleChangeRefresh[ type ] ) -@@ -838,15 +842,15 @@ static void _update_app_target_refresh_cycle() - { - g_nDynamicRefreshRate[ type ] = *rate; - // Enable VRR as we have the correct refresh rate -- cv_adaptive_sync = true; -+ g_bVRRCanEnable = true; - return; - } - } - // Otherwise, disable VRR as we can't match the refresh rate 1-1 - // (e.g., below 48hz). -- cv_adaptive_sync = false; -+ g_bVRRCanEnable = false; - } else { -- cv_adaptive_sync = false; -+ g_bVRRCanEnable = false; - } - } - -@@ -864,9 +868,9 @@ static void _update_app_target_refresh_cycle() +@@ -840,9 +843,9 @@ static void _update_app_target_refresh_cycle() static void update_app_target_refresh_cycle() { @@ -885,7 +2926,7 @@ index 7dacfe7..4098c44 100644 update_runtime_info(); } -@@ -5052,7 +5056,7 @@ update_runtime_info() +@@ -5052,7 +5055,7 @@ update_runtime_info() if ( g_nRuntimeInfoFd < 0 ) return; @@ -894,16 +2935,25 @@ index 7dacfe7..4098c44 100644 pwrite( g_nRuntimeInfoFd, &limiter_enabled, sizeof( limiter_enabled ), 0 ); } -@@ -5109,7 +5113,7 @@ static bool steamcompmgr_should_vblank_window( bool bShouldLimitFPS, uint64_t vb - - int nRefreshHz = gamescope::ConvertmHzToHz( g_nNestedRefresh ? g_nNestedRefresh : g_nOutputRefresh ); - int nTargetFPS = g_nSteamCompMgrTargetFPS; -- if ( g_nSteamCompMgrTargetFPS && bShouldLimitFPS && nRefreshHz > nTargetFPS ) -+ if ( g_nSteamCompMgrTargetFPS && (bShouldLimitFPS || b_bForceFrameLimit) && nRefreshHz > nTargetFPS ) +@@ -5115,7 +5118,7 @@ static bool steamcompmgr_should_vblank_window( bool bShouldLimitFPS, uint64_t vb { - int nVblankDivisor = nRefreshHz / nTargetFPS; + bool bCloseEnough = std::abs( g_nSteamCompMgrTargetFPS - nRefreshHz ) < 2; -@@ -5485,7 +5489,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) +- if ( g_nSteamCompMgrTargetFPS && bShouldLimitFPS && w && !bCloseEnough ) ++ if ( g_nSteamCompMgrTargetFPS && (bShouldLimitFPS || b_bForceFrameLimit) && w && !bCloseEnough ) + { + uint64_t schedule = w->last_commit_first_latch_time + g_SteamCompMgrLimitedAppRefreshCycle; + +@@ -5133,7 +5136,7 @@ static bool steamcompmgr_should_vblank_window( bool bShouldLimitFPS, uint64_t vb + } + else + { +- if ( g_nSteamCompMgrTargetFPS && bShouldLimitFPS && nRefreshHz > nTargetFPS ) ++ if ( g_nSteamCompMgrTargetFPS && (bShouldLimitFPS || b_bForceFrameLimit) && nRefreshHz > nTargetFPS ) + { + int nVblankDivisor = nRefreshHz / nTargetFPS; + +@@ -5516,7 +5519,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) } if ( ev->atom == ctx->atoms.gamescopeFPSLimit ) { @@ -912,58 +2962,7 @@ index 7dacfe7..4098c44 100644 update_runtime_info(); } for (int i = 0; i < gamescope::GAMESCOPE_SCREEN_TYPE_COUNT; i++) -@@ -5549,7 +5553,7 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) - // Try to match refresh rate and have that set the cv_adaptive_sync only if it can - if (g_bVRRModesetting) update_app_target_refresh_cycle(); - // otherwise, fall back to original behavior -- else cv_adaptive_sync = g_bVRRRequested; -+ else g_bVRRCanEnable = g_bVRRRequested; - } - if ( ev->atom == ctx->atoms.gamescopeDisplayForceInternal ) - { -@@ -7628,6 +7632,23 @@ steamcompmgr_main(int argc, char **argv) - // as a question. - const bool bIsVBlankFromTimer = vblank; - -+ if ( g_bRefreshHalveEnable && window_is_steam( global_focus.focusWindow ) ) { -+ // Halve refresh rate and disable vrr on SteamUI -+ cv_adaptive_sync = false; -+ int nRealRefreshHz = gamescope::ConvertmHzToHz( g_nNestedRefresh ? g_nNestedRefresh : g_nOutputRefresh ); -+ if (nRealRefreshHz > 100 && g_nSteamCompMgrTargetFPSreq > 34) { -+ g_nSteamCompMgrTargetFPS = nRealRefreshHz / 2; -+ b_bForceFrameLimit = true; -+ } else { -+ g_nSteamCompMgrTargetFPS = g_nSteamCompMgrTargetFPSreq; -+ b_bForceFrameLimit = false; -+ } -+ } else { -+ cv_adaptive_sync = g_bVRRCanEnable; -+ g_nSteamCompMgrTargetFPS = g_nSteamCompMgrTargetFPSreq; -+ b_bForceFrameLimit = false; -+ } -+ - // We can always vblank if VRR. - const bool bVRR = GetBackend()->IsVRRActive(); - if ( bVRR ) --- -2.47.1 - - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Antheas Kapenekakis -Date: Fri, 1 Nov 2024 17:27:54 +0100 -Subject: feat(battery): add atom for controlling frame halving - ---- - src/steamcompmgr.cpp | 6 ++++++ - src/xwayland_ctx.hpp | 2 ++ - 2 files changed, 8 insertions(+) - -diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp -index 4098c44..6c8ce74 100644 ---- a/src/steamcompmgr.cpp -+++ b/src/steamcompmgr.cpp -@@ -5919,6 +5919,10 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) +@@ -5943,6 +5946,10 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) MakeFocusDirty(); } } @@ -974,7 +2973,16 @@ index 4098c44..6c8ce74 100644 } static int -@@ -7089,6 +7093,8 @@ void init_xwayland_ctx(uint32_t serverId, gamescope_xwayland_server_t *xwayland_ +@@ -6300,7 +6307,7 @@ void handle_presented_for_window( steamcompmgr_win_t* w ) + + uint64_t next_refresh_time = g_SteamCompMgrVBlankTime.schedule.ulTargetVBlank; + +- uint64_t refresh_cycle = g_nSteamCompMgrTargetFPS && steamcompmgr_window_should_limit_fps( w ) ++ uint64_t refresh_cycle = g_nSteamCompMgrTargetFPS && (steamcompmgr_window_should_limit_fps( w ) || b_bForceFrameLimit) + ? g_SteamCompMgrLimitedAppRefreshCycle + : g_SteamCompMgrAppRefreshCycle; + +@@ -7124,6 +7131,8 @@ void init_xwayland_ctx(uint32_t serverId, gamescope_xwayland_server_t *xwayland_ ctx->atoms.primarySelection = XInternAtom(ctx->dpy, "PRIMARY", false); ctx->atoms.targets = XInternAtom(ctx->dpy, "TARGETS", false); @@ -983,8 +2991,39 @@ index 4098c44..6c8ce74 100644 ctx->root_width = DisplayWidth(ctx->dpy, ctx->scr); ctx->root_height = DisplayHeight(ctx->dpy, ctx->scr); +@@ -7542,7 +7551,7 @@ steamcompmgr_main(int argc, char **argv) + } else if (strcmp(opt_name, "hdr-itm-target-nits") == 0) { + g_flHDRItmTargetNits = atof(optarg); + } else if (strcmp(opt_name, "framerate-limit") == 0) { +- g_nSteamCompMgrTargetFPS = atoi(optarg); ++ g_nSteamCompMgrTargetFPSreq = atoi(optarg); + } else if (strcmp(opt_name, "reshade-effect") == 0) { + g_reshade_effect = optarg; + } else if (strcmp(opt_name, "reshade-technique-idx") == 0) { +@@ -7667,6 +7676,21 @@ steamcompmgr_main(int argc, char **argv) + // as a question. + const bool bIsVBlankFromTimer = vblank; + ++ if ( g_bRefreshHalveEnable && window_is_steam( global_focus.focusWindow ) ) { ++ // Halve refresh rate on SteamUI ++ int nRealRefreshHz = gamescope::ConvertmHzToHz( g_nNestedRefresh ? g_nNestedRefresh : g_nOutputRefresh ); ++ if (nRealRefreshHz > 100 && (g_nSteamCompMgrTargetFPSreq > 50 || !g_nSteamCompMgrTargetFPSreq)) { ++ g_nSteamCompMgrTargetFPS = nRealRefreshHz / 2; ++ b_bForceFrameLimit = true; ++ } else { ++ g_nSteamCompMgrTargetFPS = g_nSteamCompMgrTargetFPSreq; ++ b_bForceFrameLimit = false; ++ } ++ } else { ++ g_nSteamCompMgrTargetFPS = g_nSteamCompMgrTargetFPSreq; ++ b_bForceFrameLimit = false; ++ } ++ + // We can always vblank if VRR. + const bool bVRR = GetBackend()->IsVRRActive(); + if ( bVRR ) diff --git a/src/xwayland_ctx.hpp b/src/xwayland_ctx.hpp -index df2af70..e4eec9f 100644 +index df2af70d19ae..e4eec9fa0c48 100644 --- a/src/xwayland_ctx.hpp +++ b/src/xwayland_ctx.hpp @@ -246,6 +246,8 @@ struct xwayland_ctx_t final : public gamescope::IWaitable @@ -997,7 +3036,7 @@ index df2af70..e4eec9f 100644 bool HasQueuedEvents(); -- -2.47.1 +2.50.1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 @@ -1013,10 +3052,10 @@ Subject: feat: add DPMS support through an Atom 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp -index f014be9..6bb0b88 100644 +index c4f358fbc933..856b03fc3747 100644 --- a/src/Backends/DRMBackend.cpp +++ b/src/Backends/DRMBackend.cpp -@@ -2669,6 +2669,9 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI +@@ -2702,6 +2702,9 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI drm->needs_modeset = true; } @@ -1026,7 +3065,7 @@ index f014be9..6bb0b88 100644 drm_colorspace uColorimetry = DRM_MODE_COLORIMETRY_DEFAULT; const bool bWantsHDR10 = g_bOutputHDREnabled && frameInfo->outputEncodingEOTF == EOTF_PQ; -@@ -2724,7 +2727,7 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI +@@ -2757,7 +2760,7 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI uint32_t flags = DRM_MODE_ATOMIC_NONBLOCK; // We do internal refcounting with these events @@ -1035,7 +3074,7 @@ index f014be9..6bb0b88 100644 flags |= DRM_MODE_PAGE_FLIP_EVENT; if ( async || g_bForceAsyncFlips ) -@@ -2797,7 +2800,13 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI +@@ -2830,7 +2833,13 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI if ( drm->pCRTC ) { @@ -1050,7 +3089,7 @@ index f014be9..6bb0b88 100644 drm->pCRTC->GetProperties().MODE_ID->SetPendingValue( drm->req, drm->pending.mode_id ? drm->pending.mode_id->GetBlobValue() : 0lu, true ); if ( drm->pCRTC->GetProperties().VRR_ENABLED ) -@@ -2828,7 +2837,7 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI +@@ -2861,7 +2870,7 @@ int drm_prepare( struct drm_t *drm, bool async, const struct FrameInfo_t *frameI drm->flags = flags; int ret; @@ -1059,7 +3098,7 @@ index f014be9..6bb0b88 100644 ret = 0; } else if ( drm->bUseLiftoff ) { ret = drm_prepare_liftoff( drm, frameInfo, needs_modeset ); -@@ -3391,6 +3400,7 @@ namespace gamescope +@@ -3424,6 +3433,7 @@ namespace gamescope FrameInfo_t presentCompFrameInfo = {}; presentCompFrameInfo.allowVRR = pFrameInfo->allowVRR; @@ -1068,7 +3107,7 @@ index f014be9..6bb0b88 100644 if ( bNeedsFullComposite ) diff --git a/src/rendervulkan.hpp b/src/rendervulkan.hpp -index b537170..ccabd88 100644 +index a3a11a7ba96f..0f8cba8516c0 100644 --- a/src/rendervulkan.hpp +++ b/src/rendervulkan.hpp @@ -281,6 +281,8 @@ struct FrameInfo_t @@ -1081,11 +3120,11 @@ index b537170..ccabd88 100644 struct Layer_t { diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp -index 6c8ce74..dfee904 100644 +index 3b3a106b13e9..fcdc9ac1559f 100644 --- a/src/steamcompmgr.cpp +++ b/src/steamcompmgr.cpp -@@ -169,6 +169,8 @@ bool g_bVRRRequested = false; - bool g_bVRRCanEnable = false; +@@ -167,6 +167,8 @@ bool g_bSteamIsActiveWindow = false; + bool g_bForceInternal = false; bool b_bForceFrameLimit = false; bool g_bRefreshHalveEnable = false; +bool g_bDPMS = false; @@ -1093,16 +3132,16 @@ index 6c8ce74..dfee904 100644 static std::vector< steamcompmgr_win_t* > GetGlobalPossibleFocusWindows(); static bool -@@ -2271,7 +2273,7 @@ bool ShouldDrawCursor() +@@ -2254,7 +2256,7 @@ bool ShouldDrawCursor() } static void -paint_all(bool async) -+paint_all(bool async, bool dpms) ++paint_all( bool async, bool dpms ) { gamescope_xwayland_server_t *root_server = wlserver_get_xwayland_server(0); xwayland_ctx_t *root_ctx = root_server->ctx.get(); -@@ -2322,6 +2324,7 @@ paint_all(bool async) +@@ -2305,6 +2307,7 @@ paint_all(bool async) frameInfo.outputEncodingEOTF = g_ColorMgmt.pending.outputEncodingEOTF; frameInfo.allowVRR = cv_adaptive_sync; frameInfo.bFadingOut = fadingOut; @@ -1110,7 +3149,7 @@ index 6c8ce74..dfee904 100644 // If the window we'd paint as the base layer is the streaming client, // find the video underlay and put it up first in the scenegraph -@@ -5923,6 +5926,10 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) +@@ -5950,6 +5953,10 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) { g_bRefreshHalveEnable = !!get_prop( ctx, ctx->root, ctx->atoms.gamescopeFrameHalveAtom, 0 ); } @@ -1121,7 +3160,7 @@ index 6c8ce74..dfee904 100644 } static int -@@ -7094,6 +7101,7 @@ void init_xwayland_ctx(uint32_t serverId, gamescope_xwayland_server_t *xwayland_ +@@ -7132,6 +7139,7 @@ void init_xwayland_ctx(uint32_t serverId, gamescope_xwayland_server_t *xwayland_ ctx->atoms.targets = XInternAtom(ctx->dpy, "TARGETS", false); ctx->atoms.gamescopeFrameHalveAtom = XInternAtom( ctx->dpy, "GAMESCOPE_STEAMUI_HALFHZ", false );; @@ -1129,21 +3168,21 @@ index 6c8ce74..dfee904 100644 ctx->root_width = DisplayWidth(ctx->dpy, ctx->scr); ctx->root_height = DisplayHeight(ctx->dpy, ctx->scr); -@@ -8061,9 +8069,10 @@ steamcompmgr_main(int argc, char **argv) - bShouldPaint = false; +@@ -8127,9 +8135,10 @@ steamcompmgr_main(int argc, char **argv) + bShouldPaint = true; } - if ( bShouldPaint ) -+ if (bShouldPaint || (g_bDPMS != g_bDPMS_set && vblank)) ++ if ( bShouldPaint || (g_bDPMS != g_bDPMS_set && vblank) ) { - paint_all( eFlipType == FlipType::Async ); + g_bDPMS_set = g_bDPMS; -+ paint_all( eFlipType == FlipType::Async, g_bDPMS ); ++ paint_all( eFlipType == FlipType::Async, g_bDPMS ); hasRepaint = false; hasRepaintNonBasePlane = false; diff --git a/src/xwayland_ctx.hpp b/src/xwayland_ctx.hpp -index e4eec9f..2347cbb 100644 +index e4eec9fa0c48..2347cbb3340c 100644 --- a/src/xwayland_ctx.hpp +++ b/src/xwayland_ctx.hpp @@ -248,6 +248,7 @@ struct xwayland_ctx_t final : public gamescope::IWaitable @@ -1155,45 +3194,67 @@ index e4eec9f..2347cbb 100644 bool HasQueuedEvents(); -- -2.47.1 +2.50.1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Joshua Tam <297250+joshuatam@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:51:02 +0800 -Subject: feat: add rotation shader for rotating output +Subject: feat(intel): add rotation shader for rotating output --- - src/Backends/DRMBackend.cpp | 29 +++++++- - src/main.cpp | 6 ++ - src/main.hpp | 1 + + src/Backends/DRMBackend.cpp | 35 +++++++++- + src/main.cpp | 7 ++ + src/main.hpp | 2 + src/meson.build | 1 + src/rendervulkan.cpp | 126 ++++++++++++++++++++++++++++++----- src/rendervulkan.hpp | 6 +- src/shaders/cs_rotation.comp | 53 +++++++++++++++ src/wlserver.cpp | 5 ++ - 8 files changed, 208 insertions(+), 19 deletions(-) + 8 files changed, 216 insertions(+), 19 deletions(-) create mode 100644 src/shaders/cs_rotation.comp diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp -index 6bb0b88..506963d 100644 +index 856b03fc3747..e1547f4a1a9b 100644 --- a/src/Backends/DRMBackend.cpp +++ b/src/Backends/DRMBackend.cpp -@@ -1752,7 +1752,7 @@ LiftoffStateCacheEntry FrameInfoToLiftoffStateCacheEntry( struct drm_t *drm, con +@@ -1530,6 +1530,10 @@ static void update_drm_effective_orientations( struct drm_t *drm, const drmModeM + if ( pDRMInternalConnector != drm->pConnector ) + pInternalMode = find_mode( pDRMInternalConnector->GetModeConnector(), 0, 0, 0 ); + ++ if ( g_bUseRotationShader ) { ++ g_bEnableDRMRotationShader = true; ++ } ++ + pDRMInternalConnector->UpdateEffectiveOrientation( pInternalMode ); + } + +@@ -1541,6 +1545,10 @@ static void update_drm_effective_orientations( struct drm_t *drm, const drmModeM + if ( pDRMExternalConnector != drm->pConnector ) + pExternalMode = find_mode( pDRMExternalConnector->GetModeConnector(), 0, 0, 0 ); + ++ if ( g_bUseRotationShader ) { ++ g_bEnableDRMRotationShader = false; ++ } ++ + pDRMExternalConnector->UpdateEffectiveOrientation( pExternalMode ); + } + } +@@ -1754,7 +1762,7 @@ LiftoffStateCacheEntry FrameInfoToLiftoffStateCacheEntry( struct drm_t *drm, con uint64_t crtcW = srcWidth / frameInfo->layers[ i ].scale.x; uint64_t crtcH = srcHeight / frameInfo->layers[ i ].scale.y; - if (g_bRotated) -+ if (g_bRotated && !g_bUseRotationShader) ++ if (g_bRotated && !g_bEnableDRMRotationShader) { int64_t imageH = frameInfo->layers[ i ].tex->contentHeight() / frameInfo->layers[ i ].scale.y; -@@ -2045,6 +2045,17 @@ namespace gamescope +@@ -2047,6 +2055,17 @@ namespace gamescope void CDRMConnector::UpdateEffectiveOrientation( const drmModeModeInfo *pMode ) { -+ if (g_bUseRotationShader) -+ { ++ if (g_bEnableDRMRotationShader) ++ { + drm_log.infof("Using rotation shader"); + if (g_DesiredInternalOrientation == GAMESCOPE_PANEL_ORIENTATION_270) { + m_ChosenOrientation = GAMESCOPE_PANEL_ORIENTATION_180; @@ -1206,27 +3267,25 @@ index 6bb0b88..506963d 100644 if ( this->GetScreenType() == GAMESCOPE_SCREEN_TYPE_INTERNAL && g_DesiredInternalOrientation != GAMESCOPE_PANEL_ORIENTATION_AUTO ) { m_ChosenOrientation = g_DesiredInternalOrientation; -@@ -3035,6 +3046,15 @@ bool drm_set_mode( struct drm_t *drm, const drmModeModeInfo *mode ) +@@ -3068,6 +3087,13 @@ bool drm_set_mode( struct drm_t *drm, const drmModeModeInfo *mode ) g_bRotated = false; g_nOutputWidth = mode->hdisplay; g_nOutputHeight = mode->vdisplay; + -+ if (g_bUseRotationShader && drm->pConnector->GetScreenType() == gamescope::GAMESCOPE_SCREEN_TYPE_INTERNAL) { ++ if (g_bEnableDRMRotationShader) { + g_bRotated = true; + g_nOutputWidth = mode->vdisplay; + g_nOutputHeight = mode->hdisplay; -+ } else { -+ g_bUseRotationShader = false; + } + break; case GAMESCOPE_PANEL_ORIENTATION_90: case GAMESCOPE_PANEL_ORIENTATION_270: -@@ -3294,6 +3314,11 @@ namespace gamescope +@@ -3327,6 +3353,11 @@ namespace gamescope bNeedsFullComposite |= !!(g_uCompositeDebug & CompositeDebugFlag::Heatmap); -+ if (g_bUseRotationShader) ++ if (g_bEnableDRMRotationShader) + { + bNeedsFullComposite = true; + } @@ -1234,17 +3293,17 @@ index 6bb0b88..506963d 100644 bool bDoComposite = true; if ( !bNeedsFullComposite && !bWantsPartialComposite ) { -@@ -3384,7 +3409,7 @@ namespace gamescope +@@ -3417,7 +3448,7 @@ namespace gamescope if ( bDefer && !!( g_uCompositeDebug & CompositeDebugFlag::Markers ) ) g_uCompositeDebug |= CompositeDebugFlag::Markers_Partial; - std::optional oCompositeResult = vulkan_composite( &compositeFrameInfo, nullptr, !bNeedsFullComposite ); -+ std::optional oCompositeResult = vulkan_composite( &compositeFrameInfo, nullptr, !bNeedsFullComposite, nullptr, true, nullptr, g_bUseRotationShader ); ++ std::optional oCompositeResult = vulkan_composite( &compositeFrameInfo, nullptr, !bNeedsFullComposite, nullptr, true, nullptr, g_bEnableDRMRotationShader ); m_bWasCompositing = true; diff --git a/src/main.cpp b/src/main.cpp -index 056e1c1..f61c88f 100644 +index 1443f49b51e9..c96b8f0ac39e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -127,6 +127,7 @@ const struct option *gamescope_options = (struct option[]){ @@ -1253,51 +3312,53 @@ index 056e1c1..f61c88f 100644 { "fade-out-duration", required_argument, nullptr, 0 }, + { "use-rotation-shader", required_argument, nullptr, 0 }, { "force-orientation", required_argument, nullptr, 0 }, - { "enable-hacky-texture", no_argument, nullptr, 0 }, - { "force-panel-type", required_argument, nullptr, 0 }, -@@ -198,6 +199,7 @@ const char usage[] = - " --enable-vrr-modesetting enable setting framerate while VRR is on in the internal display\n" + { "force-windows-fullscreen", no_argument, nullptr, 0 }, + { "custom-refresh-rates", required_argument, nullptr, 0 }, +@@ -190,6 +191,7 @@ const char usage[] = + " -e, --steam enable Steam integration\n" " --xwayland-count create N xwayland servers\n" " --prefer-vk-device prefer Vulkan device for compositing (ex: 1002:7300)\n" + " --use-rotation-shader use rotation shader for rotating the screen\n" " --force-orientation rotate the internal display (left, right, normal, upsidedown)\n" - " --force-panel-type lie to steam that the screen is external\n" " --force-windows-fullscreen force windows inside of gamescope to be the size of the nested display (fullscreen)\n" -@@ -357,6 +359,8 @@ static gamescope::GamescopeModeGeneration parse_gamescope_mode_generation( const + " --cursor-scale-height if specified, sets a base output height to linearly scale the cursor against.\n" +@@ -348,6 +350,9 @@ static gamescope::GamescopeModeGeneration parse_gamescope_mode_generation( const } } +bool g_bUseRotationShader = false; ++bool g_bEnableDRMRotationShader = false; + GamescopePanelOrientation g_DesiredInternalOrientation = GAMESCOPE_PANEL_ORIENTATION_AUTO; static GamescopePanelOrientation force_orientation(const char *str) { -@@ -797,6 +801,8 @@ int main(int argc, char **argv) +@@ -803,6 +808,8 @@ int main(int argc, char **argv) g_eGamescopeModeGeneration = parse_gamescope_mode_generation( optarg ); - } else if (strcmp(opt_name, "force-orientation") == 0 || strcmp(opt_name, "force-external-orientation") == 0) { + } else if (strcmp(opt_name, "force-orientation") == 0) { g_DesiredInternalOrientation = force_orientation( optarg ); + } else if (strcmp(opt_name, "use-rotation-shader") == 0) { + g_bUseRotationShader = true; - } else if (strcmp(opt_name, "force-panel-type") == 0) { - g_FakeExternal = force_panel_type_external( optarg ); } else if (strcmp(opt_name, "custom-refresh-rates") == 0) { + g_customRefreshRates = parse_custom_refresh_rates( optarg ); + } else if (strcmp(opt_name, "sharpness") == 0 || diff --git a/src/main.hpp b/src/main.hpp -index 390c04a..2464afa 100644 +index 390c04a63ecd..e7b857d44b0d 100644 --- a/src/main.hpp +++ b/src/main.hpp -@@ -22,6 +22,7 @@ extern bool g_bForceRelativeMouse; +@@ -22,6 +22,8 @@ extern bool g_bForceRelativeMouse; extern int g_nOutputRefresh; // mHz extern bool g_bOutputHDREnabled; extern bool g_bForceInternal; +extern bool g_bUseRotationShader; ++extern bool g_bEnableDRMRotationShader; extern bool g_bFullscreen; diff --git a/src/meson.build b/src/meson.build -index 74fc033..d4ff3ea 100644 +index 842768ce7ce4..0a0e958ba313 100644 --- a/src/meson.build +++ b/src/meson.build -@@ -70,6 +70,7 @@ shader_src = [ +@@ -73,6 +73,7 @@ shader_src = [ 'shaders/cs_nis.comp', 'shaders/cs_nis_fp16.comp', 'shaders/cs_rgb_to_nv12.comp', @@ -1306,7 +3367,7 @@ index 74fc033..d4ff3ea 100644 spirv_shaders = glsl_generator.process(shader_src) diff --git a/src/rendervulkan.cpp b/src/rendervulkan.cpp -index 54d7608..10d6c78 100644 +index b8412b8fdf2f..d833d0093830 100644 --- a/src/rendervulkan.cpp +++ b/src/rendervulkan.cpp @@ -48,6 +48,7 @@ @@ -1317,7 +3378,7 @@ index 54d7608..10d6c78 100644 #define A_CPU #include "shaders/ffx_a.h" -@@ -898,6 +899,7 @@ bool CVulkanDevice::createShaders() +@@ -904,6 +905,7 @@ bool CVulkanDevice::createShaders() SHADER(NIS, cs_nis); } SHADER(RGB_TO_NV12, cs_rgb_to_nv12); @@ -1325,7 +3386,7 @@ index 54d7608..10d6c78 100644 #undef SHADER for (uint32_t i = 0; i < shaderInfos.size(); i++) -@@ -1128,6 +1130,7 @@ void CVulkanDevice::compileAllPipelines() +@@ -1134,6 +1136,7 @@ void CVulkanDevice::compileAllPipelines() SHADER(EASU, 1, 1, 1); SHADER(NIS, 1, 1, 1); SHADER(RGB_TO_NV12, 1, 1, 1); @@ -1333,14 +3394,14 @@ index 54d7608..10d6c78 100644 #undef SHADER for (auto& info : pipelineInfos) { -@@ -3214,8 +3217,16 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) +@@ -3229,8 +3232,16 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) uint32_t uDRMFormat = pOutput->uOutputFormat; + uint32_t l_nOutputWidth = g_nOutputWidth; + uint32_t l_nOutputHeight = g_nOutputHeight; + -+ if (g_bUseRotationShader) { ++ if (g_bEnableDRMRotationShader) { + l_nOutputWidth = g_nOutputHeight; + l_nOutputHeight = g_nOutputWidth; + } @@ -1351,7 +3412,7 @@ index 54d7608..10d6c78 100644 if ( bSuccess != true ) { vk_log.errorf( "failed to allocate buffer for KMS" ); -@@ -3223,7 +3234,7 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) +@@ -3238,7 +3249,7 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) } pOutput->outputImages[1] = new CVulkanTexture(); @@ -1360,7 +3421,7 @@ index 54d7608..10d6c78 100644 if ( bSuccess != true ) { vk_log.errorf( "failed to allocate buffer for KMS" ); -@@ -3231,7 +3242,7 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) +@@ -3246,7 +3257,7 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) } pOutput->outputImages[2] = new CVulkanTexture(); @@ -1369,7 +3430,7 @@ index 54d7608..10d6c78 100644 if ( bSuccess != true ) { vk_log.errorf( "failed to allocate buffer for KMS" ); -@@ -3246,7 +3257,7 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) +@@ -3261,7 +3272,7 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) uint32_t uPartialDRMFormat = pOutput->uOutputFormatOverlay; pOutput->outputImagesPartialOverlay[0] = new CVulkanTexture(); @@ -1378,7 +3439,7 @@ index 54d7608..10d6c78 100644 if ( bSuccess != true ) { vk_log.errorf( "failed to allocate buffer for KMS" ); -@@ -3254,7 +3265,7 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) +@@ -3269,7 +3280,7 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) } pOutput->outputImagesPartialOverlay[1] = new CVulkanTexture(); @@ -1387,7 +3448,7 @@ index 54d7608..10d6c78 100644 if ( bSuccess != true ) { vk_log.errorf( "failed to allocate buffer for KMS" ); -@@ -3262,7 +3273,7 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) +@@ -3277,7 +3288,7 @@ static bool vulkan_make_output_images( VulkanOutput_t *pOutput ) } pOutput->outputImagesPartialOverlay[2] = new CVulkanTexture(); @@ -1396,7 +3457,7 @@ index 54d7608..10d6c78 100644 if ( bSuccess != true ) { vk_log.errorf( "failed to allocate buffer for KMS" ); -@@ -3392,6 +3403,28 @@ static void update_tmp_images( uint32_t width, uint32_t height ) +@@ -3407,6 +3418,28 @@ static void update_tmp_images( uint32_t width, uint32_t height ) } } @@ -1425,16 +3486,16 @@ index 54d7608..10d6c78 100644 static bool init_nis_data() { -@@ -3856,7 +3889,7 @@ std::optional vulkan_screenshot( const struct FrameInfo_t *frameInfo, - extern std::string g_reshade_effect; - extern uint32_t g_reshade_technique_idx; +@@ -3873,7 +3906,7 @@ extern uint32_t g_reshade_technique_idx; + + ReshadeEffectPipeline *g_pLastReshadeEffect = nullptr; -std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamescope::Rc pPipewireTexture, bool partial, gamescope::Rc pOutputOverride, bool increment, std::unique_ptr pInCommandBuffer ) +std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamescope::Rc pPipewireTexture, bool partial, gamescope::Rc pOutputOverride, bool increment, std::unique_ptr pInCommandBuffer, bool applyRotation ) { EOTF outputTF = frameInfo->outputEncodingEOTF; if (!frameInfo->applyOutputColorMgmt) -@@ -3928,7 +3961,15 @@ std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamesco +@@ -3948,7 +3981,15 @@ std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamesco cmdBuffer->setTextureSrgb(0, true); cmdBuffer->setSamplerUnnormalized(0, false); cmdBuffer->setSamplerNearest(0, false); @@ -1451,7 +3512,7 @@ index 54d7608..10d6c78 100644 cmdBuffer->uploadConstants(frameInfo, g_upscaleFilterSharpness / 10.0f); cmdBuffer->dispatch(div_roundup(currentOutputWidth, pixelsPerGroup), div_roundup(currentOutputHeight, pixelsPerGroup)); -@@ -3971,7 +4012,15 @@ std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamesco +@@ -3991,7 +4032,15 @@ std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamesco cmdBuffer->bindPipeline( g_device.pipeline(SHADER_TYPE_BLIT, nisFrameInfo.layerCount, nisFrameInfo.ycbcrMask(), 0u, nisFrameInfo.colorspaceMask(), outputTF )); bind_all_layers(cmdBuffer.get(), &nisFrameInfo); @@ -1468,7 +3529,7 @@ index 54d7608..10d6c78 100644 cmdBuffer->uploadConstants(&nisFrameInfo); int pixelsPerGroup = 8; -@@ -4009,7 +4058,15 @@ std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamesco +@@ -4029,7 +4078,15 @@ std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamesco type = frameInfo->blurLayer0 == BLUR_MODE_COND ? SHADER_TYPE_BLUR_COND : SHADER_TYPE_BLUR; cmdBuffer->bindPipeline(g_device.pipeline(type, frameInfo->layerCount, frameInfo->ycbcrMask(), blur_layer_count, frameInfo->colorspaceMask(), outputTF )); bind_all_layers(cmdBuffer.get(), frameInfo); @@ -1485,7 +3546,7 @@ index 54d7608..10d6c78 100644 cmdBuffer->bindTexture(VKR_BLUR_EXTRA_SLOT, g_output.tmpOutput); cmdBuffer->setTextureSrgb(VKR_BLUR_EXTRA_SLOT, !useSrgbView); // Inverted because it chooses whether to view as linear (sRGB view) or sRGB (raw view). It's horrible. I need to change it. cmdBuffer->setSamplerUnnormalized(VKR_BLUR_EXTRA_SLOT, true); -@@ -4019,14 +4076,51 @@ std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamesco +@@ -4039,14 +4096,51 @@ std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamesco } else { @@ -1544,10 +3605,10 @@ index 54d7608..10d6c78 100644 if ( pPipewireTexture != nullptr ) diff --git a/src/rendervulkan.hpp b/src/rendervulkan.hpp -index ccabd88..51a62bc 100644 +index 0f8cba8516c0..911ca7ea208c 100644 --- a/src/rendervulkan.hpp +++ b/src/rendervulkan.hpp -@@ -393,7 +393,7 @@ gamescope::OwningRc vulkan_create_texture_from_dmabuf( struct wl +@@ -396,7 +396,7 @@ gamescope::OwningRc vulkan_create_texture_from_dmabuf( struct wl gamescope::OwningRc vulkan_create_texture_from_bits( uint32_t width, uint32_t height, uint32_t contentWidth, uint32_t contentHeight, uint32_t drmFormat, CVulkanTexture::createFlags texCreateFlags, void *bits ); gamescope::OwningRc vulkan_create_texture_from_wlr_buffer( struct wlr_buffer *buf, gamescope::OwningRc pBackendFb ); @@ -1556,7 +3617,7 @@ index ccabd88..51a62bc 100644 void vulkan_wait( uint64_t ulSeqNo, bool bReset ); gamescope::Rc vulkan_get_last_output_image( bool partial, bool defer ); gamescope::Rc vulkan_acquire_screenshot_texture(uint32_t width, uint32_t height, bool exportable, uint32_t drmFormat, EStreamColorspace colorspace = k_EStreamColorspace_Unknown); -@@ -522,6 +522,9 @@ struct VulkanOutput_t +@@ -533,6 +533,9 @@ struct VulkanOutput_t // NIS gamescope::OwningRc nisScalerImage; gamescope::OwningRc nisUsmImage; @@ -1566,7 +3627,7 @@ index ccabd88..51a62bc 100644 }; -@@ -534,6 +537,7 @@ enum ShaderType { +@@ -545,6 +548,7 @@ enum ShaderType { SHADER_TYPE_RCAS, SHADER_TYPE_NIS, SHADER_TYPE_RGB_TO_NV12, @@ -1576,7 +3637,7 @@ index ccabd88..51a62bc 100644 }; diff --git a/src/shaders/cs_rotation.comp b/src/shaders/cs_rotation.comp new file mode 100644 -index 0000000..1a47fd5 +index 000000000000..1a47fd505748 --- /dev/null +++ b/src/shaders/cs_rotation.comp @@ -0,0 +1,53 @@ @@ -1634,14 +3695,14 @@ index 0000000..1a47fd5 + imageStore(dst, rotatedCoord, outputValue); +} diff --git a/src/wlserver.cpp b/src/wlserver.cpp -index 1eeaa25..5aa986a 100644 +index 0b99c498e55d..d3ae7beb7b1f 100644 --- a/src/wlserver.cpp +++ b/src/wlserver.cpp -@@ -2519,6 +2519,11 @@ static void apply_touchscreen_orientation(double *x, double *y ) +@@ -2579,6 +2579,11 @@ static void apply_touchscreen_orientation(double *x, double *y ) break; } -+ if (g_bUseRotationShader) { ++ if (g_bEnableDRMRotationShader) { + tx = 1.0 - *y; + ty = *x; + } @@ -1650,750 +3711,121 @@ index 1eeaa25..5aa986a 100644 *y = ty; } -- -2.47.1 +2.50.1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: "Ruan E. Formigoni" -Date: Thu, 2 Jan 2025 17:07:36 +0100 -Subject: feat: implement bicubic downscaling +From: Antheas Kapenekakis +Date: Thu, 13 Mar 2025 19:04:51 +0100 +Subject: fix(hdr): remove PQ from internal panels and allow disabling for + externals -From https://github.com/ValveSoftware/gamescope/pull/740 +New steam update forces HDR mode. The cursed patching gamescope does is +not supported for all displays, especially internal ones. So disable by +default on internal panels and allow disabling on externals. --- - README.md | 1 + - src/Backends/DRMBackend.cpp | 1 + - src/Backends/OpenVRBackend.cpp | 1 + - src/Backends/SDLBackend.cpp | 4 + - src/Backends/WaylandBackend.cpp | 1 + - src/main.cpp | 54 +++++++++- - src/main.hpp | 15 +++ - src/meson.build | 1 + - src/rendervulkan.cpp | 61 ++++++++++- - src/rendervulkan.hpp | 2 + - src/shaders/bicubic.h | 44 ++++++++ - src/shaders/cs_bicubic.comp | 177 ++++++++++++++++++++++++++++++++ - src/shaders/descriptor_set.h | 1 + - src/steamcompmgr.cpp | 23 +++++ - src/steamcompmgr.hpp | 1 + - src/xwayland_ctx.hpp | 1 + - 16 files changed, 386 insertions(+), 2 deletions(-) - create mode 100644 src/shaders/bicubic.h - create mode 100644 src/shaders/cs_bicubic.comp + src/Backends/DRMBackend.cpp | 2 +- + src/main.cpp | 1 + + src/steamcompmgr.cpp | 3 +++ + src/steamcompmgr.hpp | 1 + + 4 files changed, 6 insertions(+), 1 deletion(-) -diff --git a/README.md b/README.md -index 97dea45..fefb2a0 100644 ---- a/README.md -+++ b/README.md -@@ -66,6 +66,7 @@ See `gamescope --help` for a full list of options. - * `-o`: set a frame-rate limit for the game when unfocused. Specified in frames per second. Defaults to unlimited. - * `-F fsr`: use AMD FidelityFX™ Super Resolution 1.0 for upscaling - * `-F nis`: use NVIDIA Image Scaling v1.0.3 for upscaling -+* `-F bicubic`: use a bicubic filter for downscaling - * `-S integer`: use integer scaling. - * `-S stretch`: use stretch scaling, the game will fill the window. (e.g. 4:3 to 16:9) - * `-b`: create a border-less window. diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp -index 506963d..98bdb71 100644 +index e1547f4a1a9b..d7107325ad59 100644 --- a/src/Backends/DRMBackend.cpp +++ b/src/Backends/DRMBackend.cpp -@@ -3293,6 +3293,7 @@ namespace gamescope - bNeedsFullComposite |= bWasFirstFrame; - bNeedsFullComposite |= pFrameInfo->useFSRLayer0; - bNeedsFullComposite |= pFrameInfo->useNISLayer0; -+ bNeedsFullComposite |= pFrameInfo->useBICUBICLayer0; - bNeedsFullComposite |= pFrameInfo->blurLayer0; - bNeedsFullComposite |= bNeedsCompositeFromFilter; - bNeedsFullComposite |= !k_bUseCursorPlane && bDrewCursor; -diff --git a/src/Backends/OpenVRBackend.cpp b/src/Backends/OpenVRBackend.cpp -index c39caa5..96a3d01 100644 ---- a/src/Backends/OpenVRBackend.cpp -+++ b/src/Backends/OpenVRBackend.cpp -@@ -554,6 +554,7 @@ namespace gamescope - bNeedsFullComposite |= cv_composite_force; - bNeedsFullComposite |= pFrameInfo->useFSRLayer0; - bNeedsFullComposite |= pFrameInfo->useNISLayer0; -+ bNeedsFullComposite |= pFrameInfo->useBICUBICLayer0; - bNeedsFullComposite |= pFrameInfo->blurLayer0; - bNeedsFullComposite |= bNeedsCompositeFromFilter; - bNeedsFullComposite |= g_bColorSliderInUse; -diff --git a/src/Backends/SDLBackend.cpp b/src/Backends/SDLBackend.cpp -index 6d50f8d..c24b864 100644 ---- a/src/Backends/SDLBackend.cpp -+++ b/src/Backends/SDLBackend.cpp -@@ -719,6 +719,10 @@ namespace gamescope - case KEY_B: - g_wantedUpscaleFilter = GamescopeUpscaleFilter::LINEAR; - break; -+ case KEY_K: -+ g_wantedDownscaleFilter = (g_wantedDownscaleFilter == GamescopeDownscaleFilter::BICUBIC) ? -+ GamescopeDownscaleFilter::LINEAR : GamescopeDownscaleFilter::BICUBIC; -+ break; - case KEY_U: - g_wantedUpscaleFilter = (g_wantedUpscaleFilter == GamescopeUpscaleFilter::FSR) ? - GamescopeUpscaleFilter::LINEAR : GamescopeUpscaleFilter::FSR; -diff --git a/src/Backends/WaylandBackend.cpp b/src/Backends/WaylandBackend.cpp -index 3226400..7ae273f 100644 ---- a/src/Backends/WaylandBackend.cpp -+++ b/src/Backends/WaylandBackend.cpp -@@ -1614,6 +1614,7 @@ namespace gamescope - bNeedsFullComposite |= cv_composite_force; - bNeedsFullComposite |= pFrameInfo->useFSRLayer0; - bNeedsFullComposite |= pFrameInfo->useNISLayer0; -+ bNeedsFullComposite |= pFrameInfo->useBICUBICLayer0; - bNeedsFullComposite |= pFrameInfo->blurLayer0; - bNeedsFullComposite |= bNeedsCompositeFromFilter; - bNeedsFullComposite |= g_bColorSliderInUse; +@@ -2367,7 +2367,7 @@ namespace gamescope + } + } + +- if ( pColorimetry && pColorimetry->bt2020_rgb && ++ if ( g_bHDRPqEnable && GetScreenType() != GAMESCOPE_SCREEN_TYPE_INTERNAL && pColorimetry && pColorimetry->bt2020_rgb && + pHDRStaticMetadata && pHDRStaticMetadata->eotfs && pHDRStaticMetadata->eotfs->pq ) + { + m_Mutable.HDR.bExposeHDRSupport = true; diff --git a/src/main.cpp b/src/main.cpp -index f61c88f..06a3bca 100644 +index c96b8f0ac39e..58230054ce53 100644 --- a/src/main.cpp +++ b/src/main.cpp -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - #include - #if defined(__linux__) - #include -@@ -303,11 +304,14 @@ bool g_bGrabbed = false; - float g_mouseSensitivity = 1.0; - - GamescopeUpscaleFilter g_upscaleFilter = GamescopeUpscaleFilter::LINEAR; -+GamescopeDownscaleFilter g_downscaleFilter = GamescopeDownscaleFilter::LINEAR; - GamescopeUpscaleScaler g_upscaleScaler = GamescopeUpscaleScaler::AUTO; - - GamescopeUpscaleFilter g_wantedUpscaleFilter = GamescopeUpscaleFilter::LINEAR; -+GamescopeDownscaleFilter g_wantedDownscaleFilter = GamescopeDownscaleFilter::LINEAR; - GamescopeUpscaleScaler g_wantedUpscaleScaler = GamescopeUpscaleScaler::AUTO; - int g_upscaleFilterSharpness = 2; -+GamescopeBicubicParams g_bicubicParams; - - gamescope::GamescopeModeGeneration g_eGamescopeModeGeneration = gamescope::GAMESCOPE_MODE_GENERATE_CVT; - -@@ -427,6 +431,54 @@ static enum GamescopeUpscaleFilter parse_upscaler_filter(const char *str) - } - } - -+static enum GamescopeDownscaleFilter parse_downscaler_filter(const char *str) -+{ -+ std::string_view arg{str}; -+ -+ // If the string is just 'bicubic' use default values -+ if ( arg == "bicubic" ) { -+ return GamescopeDownscaleFilter::BICUBIC; -+ } -+ -+ // Arguments start after ':' -+ if ( auto search = arg.find(':'); search == std::string::npos ) { -+ fprintf( stderr, "gamescope: invalid argument for --filter=bicubic:float,float\n" ); -+ exit(1); -+ } else { -+ arg = std::string_view(arg.data() + search + 1); -+ } -+ -+ // Push arguments to stream -+ std::stringstream ss; -+ ss << arg; -+ -+ // Validate arguments from stream -+ double b, c; -+ char comma; -+ if ((ss >> b >> comma >> c) && (comma == ',')) { -+ // clamp values -+ b = std::clamp(b, 0.0, 1.0); -+ c = std::clamp(c, 0.0, 1.0); -+ // Ovewrite default global parameters -+ g_bicubicParams.b = b; -+ g_bicubicParams.c = c; -+ // Set downscaler filters -+ return GamescopeDownscaleFilter::BICUBIC; -+ } -+ -+ fprintf( stderr, "gamescope: invalid value for --filter\n" ); -+ exit(1); -+} -+ -+static void parse_filter(const char *str) -+{ -+ if (std::string_view{str}.starts_with("bicubic")) { -+ g_wantedDownscaleFilter = parse_downscaler_filter(str); -+ } else { -+ g_wantedUpscaleFilter = parse_upscaler_filter(str); -+ } -+} -+ - static enum gamescope::GamescopeBackend parse_backend_name(const char *str) - { - if (strcmp(str, "auto") == 0) { -@@ -756,7 +808,7 @@ int main(int argc, char **argv) - g_wantedUpscaleScaler = parse_upscaler_scaler(optarg); - break; - case 'F': -- g_wantedUpscaleFilter = parse_upscaler_filter(optarg); -+ parse_filter(optarg); - break; - case 'b': - g_bBorderlessOutputWindow = true; -diff --git a/src/main.hpp b/src/main.hpp -index 2464afa..040d04c 100644 ---- a/src/main.hpp -+++ b/src/main.hpp -@@ -43,6 +43,18 @@ enum class GamescopeUpscaleFilter : uint32_t - FROM_VIEW = 0xF, // internal - }; - -+enum class GamescopeDownscaleFilter : uint32_t -+{ -+ LINEAR = 0, -+ BICUBIC, -+}; -+ -+struct GamescopeBicubicParams -+{ -+ float b = 0.3f; -+ float c = 0.3f; -+}; -+ - static constexpr bool DoesHardwareSupportUpscaleFilter( GamescopeUpscaleFilter eFilter ) - { - // Could do nearest someday... AMDGPU DC supports custom tap placement to an extent. -@@ -60,10 +72,13 @@ enum class GamescopeUpscaleScaler : uint32_t - }; - - extern GamescopeUpscaleFilter g_upscaleFilter; -+extern GamescopeDownscaleFilter g_downscaleFilter; - extern GamescopeUpscaleScaler g_upscaleScaler; - extern GamescopeUpscaleFilter g_wantedUpscaleFilter; -+extern GamescopeDownscaleFilter g_wantedDownscaleFilter; - extern GamescopeUpscaleScaler g_wantedUpscaleScaler; - extern int g_upscaleFilterSharpness; -+extern GamescopeBicubicParams g_bicubicParams; - - extern bool g_bBorderlessOutputWindow; - -diff --git a/src/meson.build b/src/meson.build -index d4ff3ea..341bace 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -66,6 +66,7 @@ shader_src = [ - 'shaders/cs_composite_rcas.comp', - 'shaders/cs_easu.comp', - 'shaders/cs_easu_fp16.comp', -+ 'shaders/cs_bicubic.comp', - 'shaders/cs_gaussian_blur_horizontal.comp', - 'shaders/cs_nis.comp', - 'shaders/cs_nis_fp16.comp', -diff --git a/src/rendervulkan.cpp b/src/rendervulkan.cpp -index 10d6c78..8b31c1e 100644 ---- a/src/rendervulkan.cpp -+++ b/src/rendervulkan.cpp -@@ -44,6 +44,7 @@ - #include "cs_composite_rcas.h" - #include "cs_easu.h" - #include "cs_easu_fp16.h" -+#include "cs_bicubic.h" - #include "cs_gaussian_blur_horizontal.h" - #include "cs_nis.h" - #include "cs_nis_fp16.h" -@@ -53,6 +54,7 @@ - #define A_CPU - #include "shaders/ffx_a.h" - #include "shaders/ffx_fsr1.h" -+#include "shaders/bicubic.h" - - #include "reshade_effect_manager.hpp" - -@@ -888,6 +890,7 @@ bool CVulkanDevice::createShaders() - SHADER(BLUR_COND, cs_composite_blur_cond); - SHADER(BLUR_FIRST_PASS, cs_gaussian_blur_horizontal); - SHADER(RCAS, cs_composite_rcas); -+ SHADER(BICUBIC, cs_bicubic); - if (m_bSupportsFp16) - { - SHADER(EASU, cs_easu_fp16); -@@ -1128,6 +1131,7 @@ void CVulkanDevice::compileAllPipelines() - SHADER(BLUR_FIRST_PASS, 1, 2, 1); - SHADER(RCAS, k_nMaxLayers, k_nMaxYcbcrMask_ToPreCompile, 1); - SHADER(EASU, 1, 1, 1); -+ SHADER(BICUBIC, 1, 1, 1); - SHADER(NIS, 1, 1, 1); - SHADER(RGB_TO_NV12, 1, 1, 1); - SHADER(ROTATION, k_nMaxLayers, k_nMaxYcbcrMask_ToPreCompile, k_nMaxBlurLayers); -@@ -3724,6 +3728,17 @@ struct EasuPushData_t - } - }; - -+struct BicubicPushData_t -+{ -+ uvec4_t Const0; -+ uvec4_t Const1; -+ -+ BicubicPushData_t(float B, float C, uint32_t inputX, uint32_t inputY, uint32_t tempX, uint32_t tempY, uint32_t winX, uint32_t winY) -+ { -+ BicubicCon(&Const0.x, &Const1.x, B*10, C*10, inputX, inputY, tempX, tempY, winX, winY); -+ } -+}; -+ - struct RcasPushData_t - { - uvec2_t u_layer0Offset; -@@ -3933,7 +3948,51 @@ std::optional vulkan_composite( struct FrameInfo_t *frameInfo, gamesco - for (uint32_t i = 0; i < EOTF_Count; i++) - cmdBuffer->bindColorMgmtLuts(i, frameInfo->shaperLut[i], frameInfo->lut3D[i]); - -- if ( frameInfo->useFSRLayer0 ) -+ if ( frameInfo->useBICUBICLayer0 ) -+ { -+ uint32_t inputX = frameInfo->layers[0].tex->width(); -+ uint32_t inputY = frameInfo->layers[0].tex->height(); -+ -+ uint32_t tempX = frameInfo->layers[0].integerWidth(); -+ uint32_t tempY = frameInfo->layers[0].integerHeight(); -+ -+ update_tmp_images(tempX, tempY); -+ -+ cmdBuffer->bindPipeline( g_device.pipeline(SHADER_TYPE_BICUBIC, frameInfo->layerCount, frameInfo->ycbcrMask())); -+ cmdBuffer->bindTarget(g_output.tmpOutput); -+ cmdBuffer->bindTexture(0, frameInfo->layers[0].tex); -+ cmdBuffer->setTextureSrgb(0, true); -+ cmdBuffer->setSamplerUnnormalized(0, false); -+ cmdBuffer->setSamplerNearest(0, false); -+ cmdBuffer->uploadConstants(g_bicubicParams.b -+ , g_bicubicParams.c -+ , inputX -+ , inputY -+ , tempX -+ , tempY -+ , currentOutputWidth -+ , currentOutputHeight -+ ); -+ -+ int pixelsPerGroup = 16; -+ -+ cmdBuffer->dispatch(div_roundup(tempX, pixelsPerGroup), div_roundup(tempY, pixelsPerGroup)); -+ -+ struct FrameInfo_t bicFrameInfo = *frameInfo; -+ bicFrameInfo.layers[0].tex = g_output.tmpOutput; -+ bicFrameInfo.layers[0].scale.x = 1.0f; -+ bicFrameInfo.layers[0].scale.y = 1.0f; -+ -+ cmdBuffer->bindPipeline( g_device.pipeline(SHADER_TYPE_BLIT, bicFrameInfo.layerCount, bicFrameInfo.ycbcrMask())); -+ bind_all_layers(cmdBuffer.get(), &bicFrameInfo); -+ cmdBuffer->bindTarget(compositeImage); -+ cmdBuffer->uploadConstants(&bicFrameInfo); -+ -+ pixelsPerGroup = 8; -+ -+ cmdBuffer->dispatch(div_roundup(currentOutputWidth, pixelsPerGroup), div_roundup(currentOutputHeight, pixelsPerGroup)); -+ } -+ else if ( frameInfo->useFSRLayer0 ) - { - uint32_t inputX = frameInfo->layers[0].tex->width(); - uint32_t inputY = frameInfo->layers[0].tex->height(); -diff --git a/src/rendervulkan.hpp b/src/rendervulkan.hpp -index 51a62bc..eeb304c 100644 ---- a/src/rendervulkan.hpp -+++ b/src/rendervulkan.hpp -@@ -270,6 +270,7 @@ struct FrameInfo_t - { - bool useFSRLayer0; - bool useNISLayer0; -+ bool useBICUBICLayer0; - bool bFadingOut; - BlurMode blurLayer0; - int blurRadius; -@@ -536,6 +537,7 @@ enum ShaderType { - SHADER_TYPE_EASU, - SHADER_TYPE_RCAS, - SHADER_TYPE_NIS, -+ SHADER_TYPE_BICUBIC, - SHADER_TYPE_RGB_TO_NV12, - SHADER_TYPE_ROTATION, - -diff --git a/src/shaders/bicubic.h b/src/shaders/bicubic.h -new file mode 100644 -index 0000000..8117e87 ---- /dev/null -+++ b/src/shaders/bicubic.h -@@ -0,0 +1,44 @@ -+//_____________________________________________________________/\_______________________________________________________________ -+//============================================================================================================================== -+// -+// -+// BICUBIC IMAGE SCALING -+// -+// -+//------------------------------------------------------------------------------------------------------------------------------ -+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -+//_____________________________________________________________/\_______________________________________________________________ -+//============================================================================================================================== -+// CONSTANT SETUP -+//============================================================================================================================== -+// Call to setup required constant values (works on CPU or GPU). -+A_STATIC void BicubicCon( -+outAU4 con0, -+outAU4 con1, -+// Configurable parameters -+AU1 B, -+AU1 C, -+// This the rendered image resolution -+AF1 inputRenderedSizeX, -+AF1 inputRenderedSizeY, -+// This is the resolution of the resource containing the input image (useful for dynamic resolution) -+AF1 inputCurrentSizeX, -+AF1 inputCurrentSizeY, -+// This is the window width / height -+AF1 outputTargetSizeX, -+AF1 outputTargetSizeY) -+{ -+ // Input/Output size information -+ con0[0]=AU1_AF1(inputRenderedSizeX); -+ con0[1]=AU1_AF1(inputRenderedSizeY); -+ con0[2]=AU1_AF1(inputCurrentSizeX); -+ con0[3]=AU1_AF1(inputCurrentSizeY); -+ -+ // Viewport pixel position to normalized image space. -+ con1[0]=AU1_AF1(outputTargetSizeX); -+ con1[1]=AU1_AF1(outputTargetSizeY); -+ con1[2]=B; -+ con1[3]=C; -+} -diff --git a/src/shaders/cs_bicubic.comp b/src/shaders/cs_bicubic.comp -new file mode 100644 -index 0000000..2b6dfb8 ---- /dev/null -+++ b/src/shaders/cs_bicubic.comp -@@ -0,0 +1,177 @@ -+// References -+// https://www.codeproject.com/Articles/236394/Bi-Cubic-and-Bi-Linear-Interpolation-with-GLSL -+// https://stackoverflow.com/questions/13501081/efficient-bicubic-filtering-code-in-glsl -+// https://web.archive.org/web/20180927181721/http://www.java-gaming.org/index.php?topic=35123.0 -+// https://gist.github.com/TheRealMJP/c83b8c0f46b63f3a88a5986f4fa982b1 -+ -+#version 460 -+ -+#extension GL_GOOGLE_include_directive : require -+#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require -+#extension GL_EXT_scalar_block_layout : require -+ -+#include "descriptor_set.h" -+ -+layout( -+ local_size_x = 64, -+ local_size_y = 1, -+ local_size_z = 1) in; -+ -+// Push constant is a mechanism in modern OpenGL that allows passing small amounts of frequently -+// updated data to the shader without needing to bind a buffer -+layout(binding = 0, scalar) -+uniform layers_t { -+ uvec4 c0, c1; -+}; -+ -+#define A_GPU 1 -+#define A_GLSL 1 -+#define A_HALF 1 -+#include "ffx_a.h" -+#include "bicubic.h" -+ -+// The Mitchell–Netravali filters or BC-splines -+// https://en.wikipedia.org/wiki/Mitchell%E2%80%93Netravali_filters -+// Conditionals are slow in GPU code, so to represent 0 <= f < 1 and 1 <= f < 2 -+// the P(d) form shown in the wikipedia page is used -+vec4 mitchellNetravaliWeights(float f, float B, float C) -+{ -+ float w0 = ((12.0 - 9.0 * B - 6.0 * C) * pow(f, 3.0)) + -+ ((-18.0 + 12.0 * B + 6.0 * C) * pow(f, 2.0)) + -+ (6.0 - 2.0 * B); -+ -+ float w1 = ((-B - 6.0 * C) * pow(f - 1.0, 3.0)) + -+ ((6.0 * B + 30.0 * C) * pow(f - 1.0, 2.0)) + -+ ((-12.0 * B - 48.0 * C) * (f - 1.0)) + -+ (8.0 * B + 24.0 * C); -+ -+ float w2 = ((12.0 - 9.0 * B - 6.0 * C) * pow(1.0 - f, 3.0)) + -+ ((-18.0 + 12.0 * B + 6.0 * C) * pow(1.0 - f, 2.0)) + -+ (6.0 - 2.0 * B); -+ -+ float w3 = ((-B - 6.0 * C) * pow(2.0 - f, 3.0)) + -+ ((6.0 * B + 30.0 * C) * pow(2.0 - f, 2.0)) + -+ ((-12.0 * B - 48.0 * C) * (2.0 - f)) + -+ (8.0 * B + 24.0 * C); -+ -+ return vec4(w0, w1, w2, w3); -+} -+ -+// https://stackoverflow.com/questions/13501081/efficient-bicubic-filtering-code-in-glsl -+// https://web.archive.org/web/20180927181721/http://www.java-gaming.org/index.php?topic=35123.0 -+// This is an efficient method to implement bicubic filtering, it takes -+// advantage of the fact that the bilinear approach gives the weighted average -+// of a 2x2 area. -+vec4 textureBicubic(sampler2D splr, vec2 texCoords) -+{ -+ vec2 texSize = textureSize(splr, 0); -+ vec2 invTexSize = 1.0 / texSize; -+ -+ // Converts normalized coordinates into pixel-space coordinate -+ // Example: If texCoords is (0.5, 0.5), and the texture size is (1920, 1080), the result will be -+ // (960, 540)—the center of the texture in pixel space. -+ // Subtracting 0.5 ensures that you're sampling from the center of the texel rather than its corner -+ // Example: Assume we have a 3x3 texture and texCoords = (0.5, 0.5): -+ // [0,0][1,0][2,0] -+ // [0,1][1,1][2,1] -+ // [0,2][1,2][2,2] -+ // texCoords * texSize - 0.5 maps to (1.5, 1.5), which is between (1,1) and (2,2), then -+ // subtracts 0.5 to move it to (1.0, 1.0)—the center of the texel -+ texCoords = texCoords * texSize - 0.5; -+ -+ // Get B and C that were pushed from the user input (or default values) -+ float B = c1[2] / 10.0f; -+ float C = c1[3] / 10.0f; -+ -+ // Get the fractional part of the coordinates -+ // They are used in Mitchell Netravali's strategy to calculate the interpolation weights, -+ // i.e., how much influence the neighboring vertices have on the final pixel value -+ vec2 fxy = fract(texCoords); -+ texCoords -= fxy; -+ -+ // Calculate bicubic weights -+ // These weights represent how much influence each neighboring texel in the 4x4 grid will have -+ // on the final interpolated pixel value -+ vec4 xweights = mitchellNetravaliWeights(fxy.x, B, C); -+ vec4 yweights = mitchellNetravaliWeights(fxy.y, B, C); -+ -+ // Modify the current texture coordinates to have an offset in texels for each coordinate -+ // E.g. texCoords + vec(-1.0, 0.0) is a texel to the left -+ // texCoords + vec(1.0, 0.0) is a texel to the right -+ // texCoords + vec(0.0, 1.0) is a texel downwards -+ // texCoords + vec(0.0, -1.0) is a texel upwards -+ vec4 offsetTexels = texCoords.xxyy; -+ offsetTexels += vec2 (-1.0, +1.0).xyxy; -+ // Normalize weights to range between (0,1) -+ // vec4 sumWeights = vec4(xweights.xz + xweights.yw, yweights.xz + yweights.yw); -+ // vec4 normalizedWeights = vec4 (xweights.yw, yweights.yw) / sumWeights; -+ vec4 sumWeights = vec4(xweights.x + xweights.y, xweights.z + xweights.w, yweights.x + yweights.y, yweights.z + yweights.w); -+ vec4 normalizedWeights = vec4 (xweights.y, xweights.w, yweights.y, yweights.w) / sumWeights; -+ // Use the weights to influence the sampling position inside each texel -+ // Each texel has a size from (0,1) -+ vec4 offsetSampler = offsetTexels + normalizedWeights; -+ // Go back to normalized space -+ offsetSampler *= invTexSize.xxyy; -+ // Perform the sampling -+ vec4 sample0 = texture(splr, offsetSampler.xz); -+ vec4 sample1 = texture(splr, offsetSampler.yz); -+ vec4 sample2 = texture(splr, offsetSampler.xw); -+ vec4 sample3 = texture(splr, offsetSampler.yw); -+ -+ // Now we perform linear interpolation in the selected points -+ // The mix(a, b, t) function in GLSL performs linear interpolation between a and b based on the -+ // parameter t, t is between 0 and 1 -+ // https://registry.khronos.org/OpenGL-Refpages/gl4/html/mix.xhtml -+ -+ // Here we want to normalize sx and sy to between 0 and 1 (t value) -+ float sx = sumWeights.x / (sumWeights.x + sumWeights.y); -+ float sy = sumWeights.z / (sumWeights.z + sumWeights.w); -+ -+ return mix( -+ mix(sample3, sample2, sx), mix(sample1, sample0, sx) -+ , sy); -+} -+ -+void bicPass(uvec2 pos) -+{ -+ // Retrieve pushed values -+ AF2 inputRenderedSize = AF2_AU2(c0.xy); -+ AF2 inputCurrentSize = AF2_AU2(c0.zw); -+ AF2 outputTargetSize = AF2_AU2(c1.xy); -+ -+ // ARcpF1(x) == 1.0 / x -+ // scaleFactor is the division between the rendered image and the size it should have at the end -+ // E.g.: Rendered 1920x1080, window size is 960x540, then scaleFactor is 2x2 -+ AF2 scaleFactor = inputRenderedSize * vec2(ARcpF1(inputCurrentSize.x), ARcpF1(inputCurrentSize.y)); -+ -+ // The parameter pos of this function is used to iterate over the output image (e.g. 960x540) -+ // The position of the processed pixel should be taken from the rendered image (e.g. 1920x1080) -+ // 10x10 in the output, corresponds to 20x20 in the original image -+ AF2 positionPixel=AF2(pos)*scaleFactor; -+ -+ // Normalize the image space to be between [0,1] -+ positionPixel=positionPixel*vec2(ARcpF1(inputRenderedSize.x),ARcpF1(inputRenderedSize.y)); -+ -+ // Apply the bicubic algorithm in the normalized pixel position -+ vec4 bicPass = textureBicubic(s_samplers[0], positionPixel); -+ -+ imageStore(dst, ivec2(pos), bicPass); -+} -+ -+ -+void main() -+{ -+ // AMD recommends to use this swizzle and to process 4 pixel per invocation -+ // for better cache utilisation -+ uvec2 pos = ARmp8x8(gl_LocalInvocationID.x) + uvec2(gl_WorkGroupID.x << 4u, gl_WorkGroupID.y << 4u); -+ -+ bicPass(pos); -+ pos.x += 8u; -+ bicPass(pos); -+ pos.y += 8u; -+ bicPass(pos); -+ pos.x -= 8u; -+ bicPass(pos); -+} -+ -+/* vim: set expandtab ft=cpp fdm=marker ts=4 sw=4 tw=100 et :*/ -diff --git a/src/shaders/descriptor_set.h b/src/shaders/descriptor_set.h -index f2b8527..64cc1c9 100644 ---- a/src/shaders/descriptor_set.h -+++ b/src/shaders/descriptor_set.h -@@ -21,6 +21,7 @@ const int filter_nearest = 1; - const int filter_fsr = 2; - const int filter_nis = 3; - const int filter_pixel = 4; -+const int filter_bicubic = 5; - const int filter_from_view = 255; - - const int EOTF_Gamma22 = 0; +@@ -199,6 +199,7 @@ const char usage[] = + " If this is not set, and there is a HDR client, it will be tonemapped SDR.\n" + " --sdr-gamut-wideness Set the 'wideness' of the gamut for SDR comment. 0 - 1.\n" + " --hdr-sdr-content-nits set the luminance of SDR content in nits. Default: 400 nits.\n" ++ " --hdr-pq-disable disable HDR metadata detection for PQ EOTFs. IE disable HDR for external panels but not ones added through config. \n" + " --hdr-itm-enabled enable SDR->HDR inverse tone mapping. only works for SDR input.\n" + " --hdr-itm-sdr-nits set the luminance of SDR content in nits used as the input for the inverse tone mapping process.\n" + " Default: 100 nits, Max: 1000 nits\n" diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp -index dfee904..c2111d2 100644 +index fcdc9ac1559f..86df7eaf681f 100644 --- a/src/steamcompmgr.cpp +++ b/src/steamcompmgr.cpp -@@ -906,6 +906,7 @@ gamescope::ConCommand cc_debug_set_fps_limit( "debug_set_fps_limit", "Set refres - static int g_nRuntimeInfoFd = -1; +@@ -363,6 +363,7 @@ bool g_bVRRInUse_CachedValue = false; + bool g_bSupportsHDR_CachedValue = false; + bool g_bForceHDR10OutputDebug = false; + gamescope::ConVar cv_hdr_enabled{ "hdr_enabled", false, "Whether or not HDR is enabled if it is available." }; ++bool g_bHDRPqEnable = true; + bool g_bHDRItmEnable = false; + int g_nCurrentRefreshRate_CachedValue = 0; - bool g_bFSRActive = false; -+bool g_bBicubicActive = false; - - BlurMode g_BlurMode = BLUR_MODE_OFF; - BlurMode g_BlurModeOld = BLUR_MODE_OFF; -@@ -2389,6 +2390,10 @@ paint_all(bool async, bool dpms) - paint_window(w, w, &frameInfo, global_focus.cursor, PaintWindowFlag::BasePlane | PaintWindowFlag::DrawBorders, 1.0f, override); - - bool needsScaling = frameInfo.layers[0].scale.x < 0.999f && frameInfo.layers[0].scale.y < 0.999f; -+ // Temporarily allow upscaling as well -+ // bool needsDownScaling = frameInfo.layers[0].scale.x > 1.001f && frameInfo.layers[0].scale.y > 1.001f; -+ bool needsDownScaling = true; -+ frameInfo.useBICUBICLayer0 = g_downscaleFilter == GamescopeDownscaleFilter::BICUBIC && needsDownScaling; - frameInfo.useFSRLayer0 = g_upscaleFilter == GamescopeUpscaleFilter::FSR && needsScaling; - frameInfo.useNISLayer0 = g_upscaleFilter == GamescopeUpscaleFilter::NIS && needsScaling; - } -@@ -2521,10 +2526,12 @@ paint_all(bool async, bool dpms) - } - - frameInfo.useFSRLayer0 = false; -+ frameInfo.useBICUBICLayer0 = false; - frameInfo.useNISLayer0 = false; - } - - g_bFSRActive = frameInfo.useFSRLayer0; -+ g_bBicubicActive = frameInfo.useBICUBICLayer0; - - g_bFirstFrame = false; - -@@ -5445,6 +5452,9 @@ handle_property_notify(xwayland_ctx_t *ctx, XPropertyEvent *ev) - g_wantedUpscaleScaler = GamescopeUpscaleScaler::AUTO; - g_wantedUpscaleFilter = GamescopeUpscaleFilter::NIS; - break; -+ case 5: -+ g_wantedDownscaleFilter = GamescopeDownscaleFilter::BICUBIC; -+ break; - } - hasRepaint = true; - } -@@ -7017,6 +7027,7 @@ void init_xwayland_ctx(uint32_t serverId, gamescope_xwayland_server_t *xwayland_ - ctx->atoms.gamescopeLowLatency = XInternAtom( ctx->dpy, "GAMESCOPE_LOW_LATENCY", false ); - - ctx->atoms.gamescopeFSRFeedback = XInternAtom( ctx->dpy, "GAMESCOPE_FSR_FEEDBACK", false ); -+ ctx->atoms.gamescopeBicubicFeedback = XInternAtom( ctx->dpy, "GAMESCOPE_BICUBIC_FEEDBACK", false ); - - ctx->atoms.gamescopeBlurMode = XInternAtom( ctx->dpy, "GAMESCOPE_BLUR_MODE", false ); - ctx->atoms.gamescopeBlurRadius = XInternAtom( ctx->dpy, "GAMESCOPE_BLUR_RADIUS", false ); -@@ -7275,6 +7286,7 @@ extern int g_nPreferredOutputWidth; - extern int g_nPreferredOutputHeight; - - static bool g_bWasFSRActive = false; -+static bool g_bWasBicubicActive = false; - - bool g_bAppWantsHDRCached = false; - -@@ -7689,6 +7701,16 @@ steamcompmgr_main(int argc, char **argv) - flush_root = true; - } - -+ if ( g_bBicubicActive != g_bWasBicubicActive ) -+ { -+ uint32_t active = g_bBicubicActive ? 1 : 0; -+ XChangeProperty( root_ctx->dpy, root_ctx->root, root_ctx->atoms.gamescopeBicubicFeedback, XA_CARDINAL, 32, PropModeReplace, -+ (unsigned char *)&active, 1 ); -+ -+ g_bWasBicubicActive = g_bBicubicActive; -+ flush_root = true; -+ } -+ - if (global_focus.IsDirty()) - determine_and_apply_focus(); - -@@ -7925,6 +7947,7 @@ steamcompmgr_main(int argc, char **argv) - g_bSteamIsActiveWindow = false; - g_upscaleScaler = g_wantedUpscaleScaler; - g_upscaleFilter = g_wantedUpscaleFilter; -+ g_downscaleFilter = g_wantedDownscaleFilter; - } - - // If we're in the middle of a fade, then keep us +@@ -7548,6 +7549,8 @@ steamcompmgr_main(int argc, char **argv) + g_bForceHDRSupportDebug = true; + } else if (strcmp(opt_name, "hdr-debug-force-output") == 0) { + g_bForceHDR10OutputDebug = true; ++ } else if (strcmp(opt_name, "hdr-pq-disabled") == 0 || strcmp(opt_name, "hdr-pq-disable") == 0) { ++ g_bHDRPqEnable = false; + } else if (strcmp(opt_name, "hdr-itm-enabled") == 0 || strcmp(opt_name, "hdr-itm-enable") == 0) { + g_bHDRItmEnable = true; + } else if (strcmp(opt_name, "sdr-gamut-wideness") == 0) { diff --git a/src/steamcompmgr.hpp b/src/steamcompmgr.hpp -index 30e48e8..5679a0c 100644 +index 9f384c461ca4..0df01c0ed0e3 100644 --- a/src/steamcompmgr.hpp +++ b/src/steamcompmgr.hpp -@@ -129,6 +129,7 @@ extern float focusedWindowOffsetY; +@@ -38,6 +38,7 @@ static const uint32_t g_zposOverlay = 3; + static const uint32_t g_zposCursor = 4; + static const uint32_t g_zposMuraCorrection = 5; - extern bool g_FakeExternal; - extern bool g_bFSRActive; -+extern bool g_bBicubicActive; ++extern bool g_bHDRPqEnable; + extern bool g_bHDRItmEnable; + extern bool g_bForceHDRSupportDebug; - extern uint32_t inputCounter; - extern uint64_t g_lastWinSeq; -diff --git a/src/xwayland_ctx.hpp b/src/xwayland_ctx.hpp -index 2347cbb..bc38c98 100644 ---- a/src/xwayland_ctx.hpp -+++ b/src/xwayland_ctx.hpp -@@ -164,6 +164,7 @@ struct xwayland_ctx_t final : public gamescope::IWaitable - Atom gamescopeLowLatency; - - Atom gamescopeFSRFeedback; -+ Atom gamescopeBicubicFeedback; - - Atom gamescopeBlurMode; - Atom gamescopeBlurRadius; -- -2.47.1 +2.50.1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: brainantifreeze Date: Thu, 19 Dec 2024 09:16:15 +0000 -Subject: fix(nvidia): allow disabling Vulkan extension for nvidia to work +Subject: feat(nvidia): fix crash with current driver -This adds a workaround for #1592 which removes the -VkPhysicalDevicePresentWaitFeaturesKHR extension in -the layer if the environment variable -GAMESCOPE_WSI_HIDE_PRESENT_WAIT_EXT is set. +add layer env var to hide present wait ext -This resolves the current freezing issue on nVidia -in dx12 (without having to set -VKD3D_DISABLE_EXTENSIONS), dx11 (without having -to patch DXVK not to use the extension) and in -native vulkan games. +see: https://github.com/ValveSoftware/gamescope/pull/1671 --- layer/VkLayer_FROG_gamescope_wsi.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/layer/VkLayer_FROG_gamescope_wsi.cpp b/layer/VkLayer_FROG_gamescope_wsi.cpp -index c817880..407dae8 100644 +index 5bd1408bf780..495bbc070ff8 100644 --- a/layer/VkLayer_FROG_gamescope_wsi.cpp +++ b/layer/VkLayer_FROG_gamescope_wsi.cpp -@@ -496,7 +496,11 @@ namespace GamescopeWSILayer { +@@ -183,6 +183,16 @@ namespace GamescopeWSILayer { + return s_ensureMinImageCount; + } + ++ static bool getHidePresentWait() { ++ static bool s_hidePresentWait = []() -> bool { ++ if (auto hide = parseEnv("GAMESCOPE_WSI_HIDE_PRESENT_WAIT_EXT")) { ++ return *hide; ++ } ++ return false; ++ }(); ++ return s_hidePresentWait; ++ } ++ + // Taken from Mesa, licensed under MIT. + // + // No real reason to rewrite this code, +@@ -588,7 +598,11 @@ namespace GamescopeWSILayer { createInfo.ppEnabledExtensionNames = enabledExts.data(); setenv("vk_xwayland_wait_ready", "false", 0); @@ -2406,7 +3838,7 @@ index c817880..407dae8 100644 VkResult result = pfnCreateInstanceProc(&createInfo, pAllocator, pInstance); if (result != VK_SUCCESS) -@@ -801,6 +805,10 @@ namespace GamescopeWSILayer { +@@ -893,6 +907,10 @@ namespace GamescopeWSILayer { const vkroots::VkInstanceDispatch* pDispatch, VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { @@ -2417,23 +3849,589 @@ index c817880..407dae8 100644 pDispatch->GetPhysicalDeviceFeatures2(physicalDevice, pFeatures); } -@@ -1015,6 +1023,16 @@ namespace GamescopeWSILayer { - return value; - } - -+ static bool getHidePresentWait() { -+ static bool s_hidePresentWait = []() -> bool { -+ if (auto hide = parseEnv("GAMESCOPE_WSI_HIDE_PRESENT_WAIT_EXT")) { -+ return *hide == 1; -+ } -+ return false; -+ }(); -+ return s_hidePresentWait; -+ } -+ - static uint32_t getMinImageCount() { - static uint32_t s_minImageCount = []() -> uint32_t { - if (auto minCount = parseEnv("GAMESCOPE_WSI_MIN_IMAGE_COUNT")) { -- -2.47.1 +2.50.1 + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sun, 23 Feb 2025 02:16:55 +0100 +Subject: feat(display): add asus z13 + +--- + .../00-gamescope/displays/asus.z13.lcd.lua | 57 +++++++++++++++++++ + 1 file changed, 57 insertions(+) + create mode 100644 scripts/00-gamescope/displays/asus.z13.lcd.lua + +diff --git a/scripts/00-gamescope/displays/asus.z13.lcd.lua b/scripts/00-gamescope/displays/asus.z13.lcd.lua +new file mode 100644 +index 000000000000..891f1ea9ca6f +--- /dev/null ++++ b/scripts/00-gamescope/displays/asus.z13.lcd.lua +@@ -0,0 +1,57 @@ ++gamescope.config.known_displays.asusz13_lcd = { ++ pretty_name = "Asus Z13 LCD", ++ dynamic_refresh_rates = { ++ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, ++ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, ++ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, ++ 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, ++ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, ++ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, ++ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, ++ 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, ++ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180 ++ }, ++ ++ -- Detailed Timing Descriptors: ++ -- DTD 1: 1920x1200 120.002 Hz 8:5 151.683 kHz 315.500 MHz (172 mm x 107 mm) ++ -- Modeline "1920x1200_120.00" 315.500 1920 1968 2000 2080 1200 1254 1260 1264 -HSync -VSync ++ -- DTD 2: 1920x1200 60.001 Hz 8:5 75.841 kHz 157.750 MHz (172 mm x 107 mm) ++ -- Modeline "1920x1200_60.00" 157.750 1920 1968 2000 2080 1200 1254 1260 1264 -HSync -VSync ++ dynamic_modegen = function(base_mode, refresh) ++ debug("Generating mode "..refresh.."Hz with fixed pixel clock") ++ local vfps = { ++ 4886, 4751, 4620, 4495, 4375, 4259, 4147, 4040, 3936, 3836, 3739, 3646, ++ 3556, 3468, 3384, 3302, 3223, 3146, 3072, 2999, 2929, 2861, 2795, 2731, ++ 2668, 2608, 2548, 2491, 2435, 2380, 2327, 2275, 2225, 2175, 2127, 2080, ++ 2035, 1990, 1946, 1903, 1862, 1821, 1781, 1742, 1704, 1667, 1630, 1594, ++ 1559, 1525, 1491, 1458, 1426, 1395, 1364, 1333, 1303, 1274, 1245, 1217, ++ 1190, 1162, 1136, 1110, 1084, 1059, 1034, 1010, 986, 962, 939, 916, 894, ++ 872, 850, 829, 808, 787, 767, 747, 727, 708, 689, 670, 652, 634, 616, ++ 598, 581, 563, 547, 530, 513, 497, 481, 466, 450, 435, 420, 405, 390, ++ 376, 361, 347, 333, 320, 306, 293, 279, 266, 254, 241, 228, 216, 204, ++ 192, 180, 168, 156, 145, 133, 122, 111, 100, 89, 78, 68, 57, 47, 36, ++ 26, 16, 6 ++ } ++ local vfp = vfps[zero_index(refresh - 48)] ++ if vfp == nil then ++ warn("Couldn't do refresh "..refresh.." on ROG Ally") ++ return base_mode ++ end ++ ++ local mode = base_mode ++ ++ gamescope.modegen.adjust_front_porch(mode, vfp) ++ mode.vrefresh = gamescope.modegen.calc_vrefresh(mode) ++ ++ --debug(inspect(mode)) ++ return mode ++ end, ++ matches = function(display) ++ if display.vendor == "TMA" and display.model == "TL134ADXP03" then ++ debug("[z13] Matched vendor: "..display.vendor.." model: "..display.model.." product:"..display.product) ++ return 5000 ++ end ++ return -1 ++ end ++} ++debug("Registered Lenovo Legion Go S LCD as a known display") +\ No newline at end of file +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Wed, 23 Apr 2025 22:51:54 +0200 +Subject: feat(display): consider vporch to avoid timing issues + +--- + src/Backends/DRMBackend.cpp | 8 ++++++++ + src/main.cpp | 1 + + src/main.hpp | 1 + + src/vblankmanager.cpp | 6 +----- + 4 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp +index d7107325ad59..bcfc56dcbe20 100644 +--- a/src/Backends/DRMBackend.cpp ++++ b/src/Backends/DRMBackend.cpp +@@ -114,6 +114,11 @@ namespace gamescope + return nRefresh; + } + ++ static int32_t GetVblankNs(const drmModeModeInfo *mode) ++ { ++ return (mode->vsync_start - mode->vdisplay) * 1'000'000'000ll / mode->vrefresh / mode->vtotal; ++ } ++ + template + using CAutoDeletePtr = std::unique_ptr; + +@@ -3077,6 +3082,9 @@ bool drm_set_mode( struct drm_t *drm, const drmModeModeInfo *mode ) + g_nOutputRefresh = gamescope::GetModeRefresh( mode ); + g_nDynamicRefreshHz = 0; + ++ g_nsVsync = gamescope::GetVblankNs( mode ); ++ drm_log.infof("Vblank ns: %lu", g_nsVsync); ++ + update_drm_effective_orientations(drm, mode); + + switch ( drm->pConnector->GetCurrentOrientation() ) +diff --git a/src/main.cpp b/src/main.cpp +index 58230054ce53..b11e67c0c9b7 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -285,6 +285,7 @@ int g_nNestedDisplayIndex = 0; + uint32_t g_nOutputWidth = 0; + uint32_t g_nOutputHeight = 0; + int g_nOutputRefresh = 0; ++long g_nsVsync = 0; + bool g_bOutputHDREnabled = false; + + bool g_bFullscreen = false; +diff --git a/src/main.hpp b/src/main.hpp +index e7b857d44b0d..e6f8ff133689 100644 +--- a/src/main.hpp ++++ b/src/main.hpp +@@ -20,6 +20,7 @@ extern uint32_t g_nOutputWidth; + extern uint32_t g_nOutputHeight; + extern bool g_bForceRelativeMouse; + extern int g_nOutputRefresh; // mHz ++extern long g_nsVsync; // ns + extern bool g_bOutputHDREnabled; + extern bool g_bForceInternal; + extern bool g_bUseRotationShader; +diff --git a/src/vblankmanager.cpp b/src/vblankmanager.cpp +index 2fd0ec45ef81..ceb7829127c3 100644 +--- a/src/vblankmanager.cpp ++++ b/src/vblankmanager.cpp +@@ -95,8 +95,6 @@ namespace gamescope + + VBlankScheduleTime CVBlankTimer::CalcNextWakeupTime( bool bPreemptive ) + { +- const GamescopeScreenType eScreenType = GetBackend()->GetScreenType(); +- + const int nRefreshRate = GetRefresh(); + const uint64_t ulRefreshInterval = mHzToRefreshCycle( nRefreshRate ); + +@@ -113,9 +111,7 @@ namespace gamescope + // to not account for vertical front porch when dealing with the vblank + // drm_commit is going to target? + // Need to re-test that. +- const uint64_t ulRedZone = eScreenType == GAMESCOPE_SCREEN_TYPE_INTERNAL +- ? m_ulVBlankDrawBufferRedZone +- : std::min( m_ulVBlankDrawBufferRedZone, ( m_ulVBlankDrawBufferRedZone * 60'000 * nRefreshRate ) / 60'000 ); ++ const uint64_t ulRedZone = m_ulVBlankDrawBufferRedZone + g_nsVsync; + + const uint64_t ulDecayAlpha = m_ulVBlankRateOfDecayPercentage; // eg. 980 = 98% + +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sun, 4 May 2025 22:45:14 +0200 +Subject: Revert "Force wrap file usage for stb and glm dependencies" + +This reverts commit b01717437797ee97a6a9810ddfc69153b3861df1. +--- + src/meson.build | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/src/meson.build b/src/meson.build +index 0a0e958ba313..8a3a7237c787 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -19,14 +19,11 @@ xkbcommon = dependency('xkbcommon') + thread_dep = dependency('threads') + cap_dep = dependency('libcap', required: get_option('rt_cap')) + epoll_dep = dependency('epoll-shim', required: false) ++glm_dep = dependency('glm') + sdl2_dep = dependency('SDL2', required: get_option('sdl2_backend')) ++stb_dep = dependency('stb') + avif_dep = dependency('libavif', version: '>=1.0.0', required: get_option('avif_screenshots')) + +-glm_proj = subproject('glm') +-glm_dep = glm_proj.get_variable('glm_dep') +-stb_proj = subproject('stb') +-stb_dep = stb_proj.get_variable('stb_dep') +- + wlroots_dep = dependency( + 'wlroots', + version: ['>= 0.18.0', '< 0.19.0'], +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sat, 17 May 2025 03:06:20 +0200 +Subject: fix: prevent external overlays from pulling focus + +--- + src/steamcompmgr.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index 86df7eaf681f..be69ce4b391f 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -6132,8 +6132,8 @@ bool handle_done_commit( steamcompmgr_win_t *w, xwayland_ctx_t *ctx, uint64_t co + hasRepaintNonBasePlane = true; + } + +- // If this is an external overlay, repaint +- if ( w == global_focus.externalOverlayWindow && w->opacity != TRANSLUCENT ) ++ // External overlays, e.g., mangohud, should not be able to repaint when VRR is on ++ if ( !GetBackend()->IsVRRActive() && w == global_focus.externalOverlayWindow && w->opacity != TRANSLUCENT ) + { + hasRepaintNonBasePlane = true; + } +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sun, 22 Jun 2025 15:18:19 +0200 +Subject: feat: add Legion Go S display with all framerates + +--- + .../displays/lenovo.legiongos.lcd.lua | 71 +++++++++++-------- + 1 file changed, 42 insertions(+), 29 deletions(-) + +diff --git a/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua b/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua +index 32f776c17f3d..057850f374f8 100644 +--- a/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua ++++ b/scripts/00-gamescope/displays/lenovo.legiongos.lcd.lua +@@ -1,44 +1,58 @@ +-local legiongos_lcd_refresh_rates = { +- 52, 53, 54, 56, 57, 58, 59, +- 60, 61, 62, 63, 64, 65, 67, 68, 69, +- 70, +- 102, 103, 104, 105, 106, 107, 108, 109, +- 111, 112, 113, 114, 115, 116, 117, 118, 119, +- 120 +-} +- + gamescope.config.known_displays.legiongos_lcd = { + pretty_name = "Lenovo Legion Go S LCD", + hdr = { +- -- The Legion Go S panel does not support HDR. ++ -- Setup some fallbacks for undocking with HDR, meant ++ -- for the internal panel. It does not support HDR. + supported = false, + force_enabled = false, +- eotf = gamescope.eotf.gamma22, +- max_content_light_level = 500, +- max_frame_average_luminance = 500, +- min_content_light_level = 0.5 ++ eotf = gamescope.eotf.gamma22, ++ max_content_light_level = 500, ++ max_frame_average_luminance = 500, ++ min_content_light_level = 0.5 + }, +- -- 60Hz has a different pixel clock than 120Hz in the EDID with VRR disabled, +- -- and the panel is not responsive to tuning VFPs. To cover the non-VRR +- -- limiter, an LCD Deck-style dynamic modegen method works best. +- dynamic_refresh_rates = legiongos_lcd_refresh_rates, ++ ++ dynamic_refresh_rates = { ++ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, ++ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, ++ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ++ 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, ++ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, ++ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, ++ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, ++ 118, 119, 120 ++ }, ++ ++ -- Detailed Timing Descriptors: ++ -- DTD 1: 1920x1200 120.002 Hz 8:5 151.683 kHz 315.500 MHz (172 mm x 107 mm) ++ -- Modeline "1920x1200_120.00" 315.500 1920 1968 2000 2080 1200 1254 1260 1264 -HSync -VSync ++ -- DTD 2: 1920x1200 60.001 Hz 8:5 75.841 kHz 157.750 MHz (172 mm x 107 mm) ++ -- Modeline "1920x1200_60.00" 157.750 1920 1968 2000 2080 1200 1254 1260 1264 -HSync -VSync + dynamic_modegen = function(base_mode, refresh) +- debug("Generating mode "..refresh.."Hz for Lenovo Legion Go S LCD") +- local mode = base_mode ++ debug("Generating mode "..refresh.."Hz with fixed pixel clock") ++ local vfps = { ++ 1950, 1885, 1824, 1764, 1707, 1652, 1599, 1548, 1499, 1451, 1405, ++ 1361, 1318, 1277, 1237, 1198, 1160, 1124, 1088, 1054, 1021, 988, ++ 957, 927, 897, 868, 840, 813, 786, 760, 735, 710, 686, 663, 640, ++ 618, 596, 575, 554, 534, 514, 495, 476, 457, 439, 421, 404, 387, ++ 370, 354, 338, 322, 307, 292, 277, 263, 249, 235, 221, 208, 195, ++ 182, 169, 157, 145, 133, 121, 109, 98, 87, 76, 65, 54 ++ } ++ local vfp = vfps[zero_index(refresh - 48)] ++ if vfp == nil then ++ warn("Couldn't do refresh "..refresh.." on ROG Ally") ++ return base_mode ++ end + +- -- These are only tuned for 1920x1200. +- gamescope.modegen.set_resolution(mode, 1920, 1200) ++ local mode = base_mode + +- -- hfp, hsync, hbp +- gamescope.modegen.set_h_timings(mode, 48, 36, 80) +- -- vfp, vsync, vbp +- gamescope.modegen.set_v_timings(mode, 54, 6, 4) +- mode.clock = gamescope.modegen.calc_max_clock(mode, refresh) ++ gamescope.modegen.adjust_front_porch(mode, vfp) + mode.vrefresh = gamescope.modegen.calc_vrefresh(mode) + + --debug(inspect(mode)) + return mode + end, ++ ++ + matches = function(display) + local lcd_types = { + { vendor = "CSW", model = "PN8007QB1-1", product = 0x0800 }, +@@ -56,5 +70,4 @@ gamescope.config.known_displays.legiongos_lcd = { + return -1 + end + } +-debug("Registered Lenovo Legion Go S LCD as a known display") +---debug(inspect(gamescope.config.known_displays.legiongos_lcd)) ++debug("Registered Lenovo Legion Go S LCD as a known display") +\ No newline at end of file +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sun, 29 Jun 2025 13:16:59 +0200 +Subject: update misyltoad urls + +--- + .gitmodules | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/.gitmodules b/.gitmodules +index ec7d4e430ee8..17ba783f809b 100644 +--- a/.gitmodules ++++ b/.gitmodules +@@ -1,12 +1,12 @@ + [submodule "subprojects/wlroots"] + path = subprojects/wlroots +- url = https://github.com/Joshua-Ashton/wlroots.git ++ url = https://github.com/misyltoad/wlroots.git + [submodule "subprojects/libliftoff"] + path = subprojects/libliftoff + url = https://gitlab.freedesktop.org/emersion/libliftoff.git + [submodule "subprojects/vkroots"] + path = subprojects/vkroots +- url = https://github.com/Joshua-Ashton/vkroots ++ url = https://github.com/misyltoad/vkroots + [submodule "subprojects/libdisplay-info"] + path = subprojects/libdisplay-info + url = https://gitlab.freedesktop.org/emersion/libdisplay-info +@@ -15,7 +15,7 @@ + url = https://github.com/ValveSoftware/openvr.git + [submodule "src/reshade"] + path = src/reshade +- url = https://github.com/Joshua-Ashton/reshade ++ url = https://github.com/misyltoad/reshade + [submodule "thirdparty/SPIRV-Headers"] + path = thirdparty/SPIRV-Headers + url = https://github.com/KhronosGroup/SPIRV-Headers/ +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sun, 29 Jun 2025 13:17:14 +0200 +Subject: switch to bazzite fork for wlroots + +--- + .gitmodules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/.gitmodules b/.gitmodules +index 17ba783f809b..2ae6cd101faf 100644 +--- a/.gitmodules ++++ b/.gitmodules +@@ -1,6 +1,6 @@ + [submodule "subprojects/wlroots"] + path = subprojects/wlroots +- url = https://github.com/misyltoad/wlroots.git ++ url = https://github.com/bazzite-org/wlroots.git + [submodule "subprojects/libliftoff"] + path = subprojects/libliftoff + url = https://gitlab.freedesktop.org/emersion/libliftoff.git +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Matthew Schwartz +Date: Sun, 22 Jun 2025 10:39:19 -0700 +Subject: steamcompmgr: track FSR state with preemptive upscaling + +g_bFSRActive was only being applied to the first frame of preemptive +upscaling, which meant that the FSR badge would quickly flicker from on +to off when preemptive upscaling was active. + +To account for this, track the state of preemptive upscaling and use +it to activate g_bFSRActive when applicable. +--- + src/steamcompmgr.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp +index be69ce4b391f..f867335557f9 100644 +--- a/src/steamcompmgr.cpp ++++ b/src/steamcompmgr.cpp +@@ -2509,6 +2509,9 @@ paint_all( bool async, bool dpms ) + } + + g_bFSRActive = frameInfo.useFSRLayer0; ++ if ( const auto& heldCommit = g_HeldCommits[HELD_COMMIT_BASE]; heldCommit && heldCommit->upscaledTexture ) { ++ g_bFSRActive = ( heldCommit->upscaledTexture->eFilter == GamescopeUpscaleFilter::FSR ); ++ } + + g_bFirstFrame = false; + +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Georg Lehmann +Date: Mon, 7 Aug 2023 18:54:01 +0200 +Subject: rendervulkan: account for ycbcr descriptor count when creating + descriptor pool + +--- + src/rendervulkan.cpp | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/src/rendervulkan.cpp b/src/rendervulkan.cpp +index d833d0093830..ac5c16dab035 100644 +--- a/src/rendervulkan.cpp ++++ b/src/rendervulkan.cpp +@@ -847,6 +847,25 @@ bool CVulkanDevice::createPools() + return false; + } + ++ VkPhysicalDeviceImageFormatInfo2 imageFormatInfo = { ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, ++ .format = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM, ++ .type = VK_IMAGE_TYPE_2D, ++ .tiling = VK_IMAGE_TILING_OPTIMAL, ++ .usage = VK_IMAGE_USAGE_SAMPLED_BIT, ++ }; ++ ++ VkSamplerYcbcrConversionImageFormatProperties ycbcrProps = { ++ .sType = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES, ++ }; ++ ++ VkImageFormatProperties2 imageFormatProps = { ++ .sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, ++ .pNext = &ycbcrProps, ++ }; ++ ++ res = vk.GetPhysicalDeviceImageFormatProperties2( physDev(), &imageFormatInfo, &imageFormatProps ); ++ + VkDescriptorPoolSize poolSizes[3] { + { + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, +@@ -858,7 +877,7 @@ bool CVulkanDevice::createPools() + }, + { + VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, +- uint32_t(m_descriptorSets.size()) * ((2 * VKR_SAMPLER_SLOTS) + (2 * VKR_LUT3D_COUNT)), ++ uint32_t(m_descriptorSets.size()) * (((ycbcrProps.combinedImageSamplerDescriptorCount + 1) * VKR_SAMPLER_SLOTS) + (2 * VKR_LUT3D_COUNT)), + }, + }; + +-- +2.50.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Wed, 20 Aug 2025 22:07:52 +0200 +Subject: feat: add Ayaneo 3 display + +--- + .../displays/ayaneo.ayaneo3.oled.lua | 69 +++++++++++++++++++ + 1 file changed, 69 insertions(+) + create mode 100644 scripts/00-gamescope/displays/ayaneo.ayaneo3.oled.lua + +diff --git a/scripts/00-gamescope/displays/ayaneo.ayaneo3.oled.lua b/scripts/00-gamescope/displays/ayaneo.ayaneo3.oled.lua +new file mode 100644 +index 000000000000..9f6f725560b6 +--- /dev/null ++++ b/scripts/00-gamescope/displays/ayaneo.ayaneo3.oled.lua +@@ -0,0 +1,69 @@ ++local panel_id = "aya_fhd_oled" ++local panel_name = "AYA FHD OLED Panel" ++ ++local panel_models = { ++ { vendor = "AYA", model = "AYAOLED_FHD" }, ++} ++ ++local panel_refresh_rates = { 60, 90, 120, 144 } ++ ++local panel_hdr = { ++ supported = true, ++ force_enabled = true, ++ eotf = gamescope.eotf.ST2084, ++ max_content_light_level = 993.486, ++ max_frame_average_luminance = 400, ++ min_content_light_level = 0.007 ++} ++ ++ ++gamescope.config.known_displays[panel_id] = { ++ pretty_name = panel_name, ++ ++ -- These tables are optional ++ colorimetry = (panel_colorimetry ~= nil) and panel_colorimetry, ++ dynamic_refresh_rates = (panel_refresh_rates ~= nil) and panel_refresh_rates, ++ hdr = (panel_hdr ~= nil) and panel_hdr, ++ ++ dynamic_modegen = function(base_mode, refresh) ++ local mode = base_mode ++ debug("["..panel_id.."] Switching mode to "..mode.hdisplay.."x"..mode.vdisplay.."@"..refresh.."Hz") ++ ++ -- Override blanking intervals if defined ++ if panel_resolutions ~= nil then ++ for i, res in ipairs(panel_resolutions) do ++ if res.width == mode.hdisplay and res.height == mode.vdisplay then ++ ++ if res.hfp ~= nil and res.hsync ~= nil and res.hbp ~= nil then ++ gamescope.modegen.set_h_timings(mode, set_res.hfp, set_res.hsync, set_res.hbp) ++ debug("["..panel_id.."] Overriding horizontal blanking interval") ++ end ++ ++ if res.vfp ~= nil and res.vsync ~= nil and res.vbp ~= nil then ++ gamescope.modegen.set_v_timings(mode, set_res.vfp, set_res.vsync, set_res.vbp) ++ debug("["..panel_id.."] Overriding vertical blanking interval") ++ end ++ ++ -- No need to iterate anymore ++ break ++ end ++ end ++ end ++ ++ mode.clock = gamescope.modegen.calc_max_clock(mode, refresh) ++ mode.vrefresh = gamescope.modegen.calc_vrefresh(mode) ++ ++ return mode ++ end, ++ ++ matches = function(display) ++ for i, panel in ipairs(panel_models) do ++ if panel.vendor == display.vendor and panel.model == display.model then ++ debug("["..panel_id.."] Matched vendor: "..display.vendor.." model: "..display.model) ++ return 4000 ++ end ++ end ++ ++ return -1 ++ end ++} +\ No newline at end of file +-- +2.50.1 diff --git a/anda/games/terra-gamescope/terra-gamescope.spec b/anda/games/terra-gamescope/terra-gamescope.spec index 6bdb023131..c5630e35a4 100755 --- a/anda/games/terra-gamescope/terra-gamescope.spec +++ b/anda/games/terra-gamescope/terra-gamescope.spec @@ -3,12 +3,12 @@ %global _default_patch_fuzz 2 %global build_timestamp %(date +"%Y%m%d") #global gamescope_tag 3.15.11 -%global gamescope_commit d3174928d47f7e353e7daca63cf882d65660cc7c +%global gamescope_commit f873ec7868fe84d2850e91148bcbd6d6b19a7443 %define short_commit %(echo %{gamescope_commit} | cut -c1-8) Name: terra-gamescope #Version: 100.%{gamescope_tag} -Version: 104.%{short_commit} +Version: 127.%{short_commit} Release: 1%?dist Summary: Micro-compositor for video games on Wayland @@ -27,6 +27,8 @@ Patch0: 0001-cstdint.patch # https://github.com/ChimeraOS/gamescope Patch1: handheld.patch +#Patch2: https://github.com/ValveSoftware/gamescope/pull/1867.patch + BuildRequires: meson >= 0.54.0 BuildRequires: ninja-build BuildRequires: cmake @@ -86,7 +88,9 @@ BuildRequires: git Requires: libliftoff%{?_isa} >= %{libliftoff_minver} Requires: xorg-x11-server-Xwayland Requires: terra-gamescope-libs = %{version}-%{release} +%ifarch x86_64 Requires: terra-gamescope-libs(x86-32) = %{version}-%{release} +%endif Recommends: mesa-dri-drivers Recommends: mesa-vulkan-drivers @@ -99,9 +103,9 @@ Summary: libs for %{name} %summary %prep +%setup -Tc # git clone --depth 1 --branch %%{gamescope_tag} %%{url}.git -git clone %{url}.git -cd gamescope +git clone %{url}.git $PWD git checkout %{gamescope_commit} git submodule update --init --recursive mkdir -p pkgconfig @@ -113,7 +117,6 @@ sed -i 's^../thirdparty/SPIRV-Headers/include/spirv/^/usr/include/spirv/^' src/m %autopatch -p1 %build -cd gamescope export PKG_CONFIG_PATH=pkgconfig %meson \ --auto-features=enabled \ @@ -121,12 +124,11 @@ export PKG_CONFIG_PATH=pkgconfig %meson_build %install -cd gamescope %meson_install --skip-subprojects %files -%license gamescope/LICENSE -%doc gamescope/README.md +%license LICENSE +%doc README.md %caps(cap_sys_nice=eip) %{_bindir}/gamescope %{_bindir}/gamescopectl %{_bindir}/gamescopestream diff --git a/anda/games/umu/umu-launcher.spec b/anda/games/umu/umu-launcher.spec index 0b16997b93..66fec63446 100644 --- a/anda/games/umu/umu-launcher.spec +++ b/anda/games/umu/umu-launcher.spec @@ -1,6 +1,6 @@ Name: umu-launcher -Version: 1.2.6 -Release: 2%?dist +Version: 1.2.9 +Release: 1%?dist Summary: A tool for launching non-steam games with proton License: GPL-3.0-only diff --git a/anda/langs/crystal/crystal/crystal.spec b/anda/langs/crystal/crystal/crystal.spec index f09d13c172..2413d2e9d1 100644 --- a/anda/langs/crystal/crystal/crystal.spec +++ b/anda/langs/crystal/crystal/crystal.spec @@ -1,7 +1,7 @@ %define debug_package %nil Name: crystal -Version: 1.16.3 +Version: 1.17.1 Release: 1%?dist Summary: The Crystal Programming Language License: Apache-2.0 diff --git a/anda/langs/dart/dart.spec b/anda/langs/dart/dart.spec index e7619b0ebb..5d1faf93dc 100644 --- a/anda/langs/dart/dart.spec +++ b/anda/langs/dart/dart.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: dart -Version: 3.8.0 +Version: 3.9.2 Release: 1%?dist Summary: The Dart Language License: BSD-3-Clause diff --git a/anda/langs/go/albius/albius.spec b/anda/langs/go/albius/albius.spec index 84760fad7a..c9a4a44aa2 100644 --- a/anda/langs/go/albius/albius.spec +++ b/anda/langs/go/albius/albius.spec @@ -1,6 +1,6 @@ %define debug_package %nil -%global commit e540d74a68f824996afad62cb9bbe17089b4fb3a -%global commit_date 20250306 +%global commit 7409af7329c51416703c512f5e049368dfb3e710 +%global commit_date 20250613 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: albius diff --git a/anda/langs/go/chezmoi/chezmoi.spec b/anda/langs/go/chezmoi/chezmoi.spec index 59a0922821..6059988604 100644 --- a/anda/langs/go/chezmoi/chezmoi.spec +++ b/anda/langs/go/chezmoi/chezmoi.spec @@ -4,7 +4,7 @@ # https://github.com/twpayne/chezmoi %global goipath github.com/twpayne/chezmoi -Version: 2.62.5 +Version: 2.65.0 %gometa -f @@ -43,12 +43,19 @@ Source: %{gosource} %build %define gomodulesmode GO111MODULE=on +%define __gobuild_extldflags -X main.version=%version -X main.builtBy=%vendor +go clean -modcache +rm go.sum +go mod tidy %gobuild -o %{gobuilddir}/bin/chezmoi . %install #gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +install -m 0644 -Dvp completions/chezmoi-completion.bash %{buildroot}%{bash_completions_dir}/chezmoi +install -m 0644 -Dvp completions/chezmoi.fish -t %{buildroot}%{fish_completions_dir}/ +install -m 0644 -Dvp completions/chezmoi.zsh %{buildroot}%{zsh_completions_dir}/_chezmoi %if %{without bootstrap} %if %{with check} @@ -62,4 +69,6 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %doc README.md %{_bindir}/chezmoi +%pkg_completion -Bfz + #gopkgfiles diff --git a/anda/langs/go/elephant/anda.hcl b/anda/langs/go/elephant/anda.hcl new file mode 100644 index 0000000000..d680d83d66 --- /dev/null +++ b/anda/langs/go/elephant/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "golang-github-abenz1267-elephant.spec" + } +} diff --git a/anda/langs/go/elephant/golang-github-abenz1267-elephant.spec b/anda/langs/go/elephant/golang-github-abenz1267-elephant.spec new file mode 100644 index 0000000000..ad0b0ffb56 --- /dev/null +++ b/anda/langs/go/elephant/golang-github-abenz1267-elephant.spec @@ -0,0 +1,100 @@ +# Generated by go2rpm 1.17.1 +%bcond check 1 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +%if %{with bootstrap} +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ +%endif + +%global upstream_version v1.0.0-beta-8 +%global ver %{sub %upstream_version 2} +%global providers archlinuxpkgs calc clipboard desktopapplications files menus providerlist runner symbols websearch + +# https://github.com/abenz1267/elephant +%global goipath github.com/abenz1267/elephant +Version: %{gsub %{gsub %ver - ~ 1} - _} + +%gometa -f + +%global common_description %{expand: +Elephant - cuz it's phat - is a powerful data provider service and backend for building custom application launchers and desktop utilities. It provides various data sources and actions through a plugin-based architecture, communicating via Unix sockets and Protocol Buffers. +} + +%global golicenses LICENSE +%global godocs NIX.md README.md cmd/version.txt + +Name: elephant +Release: %autorelease +Summary: None + +License: GPL-3.0-only +URL: %{gourl} +Source: %{gourl}/archive/refs/tags/%upstream_version.tar.gz + +Provides: golang-github-abenz1267-elephant = %evr +Packager: madonuko + +%description %{common_description} + +%gopkg + +%{lua: +for prov in string.gmatch(macros.providers, "%S+") do + print("%package "..prov.."\n") + print("Summary: "..prov.." provider for elephant\n") + print("\n%description "..prov.."\n"..prov.." provider for elephant.\n") + print("%files "..prov.."\n") + print("/etc/xdg/elephant/providers/"..prov..".so\n\n") +end +} + +%prep +%autosetup -n %name-%ver +%goprep -Ae +%autopatch -p1 + +%if %{without bootstrap} +%build +%define gomodulesmode GO111MODULE=on +pushd cmd +(%{gobuild -o %{gobuilddir}/bin/elephant elephant.go}) & +popd +for prov in internal/providers/*/; do + pushd $prov + (%{gobuild -buildmode=plugin}) & + popd +done +wait +%endif + +%install +%gopkginstall +%if %{without bootstrap} +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +install -Dm755 internal/providers/*/*.so -t %buildroot/etc/xdg/elephant/providers/ +%endif + +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif + +%if %{without bootstrap} +%files +%license LICENSE +%doc NIX.md README.md cmd/version.txt +%{_bindir}/elephant +%ghost /etc/xdg/elephant/ +%endif + +%gopkgfiles + +%changelog +%autochangelog diff --git a/anda/langs/go/elephant/update.rhai b/anda/langs/go/elephant/update.rhai new file mode 100644 index 0000000000..a81e944d08 --- /dev/null +++ b/anda/langs/go/elephant/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_rawfile("abenz1267/elephant", "master", "cmd/version.txt")); diff --git a/anda/langs/go/gh-act/gh-act.spec b/anda/langs/go/gh-act/gh-act.spec index 4aa6dd5d88..72df0e52fc 100644 --- a/anda/langs/go/gh-act/gh-act.spec +++ b/anda/langs/go/gh-act/gh-act.spec @@ -12,7 +12,7 @@ # https://github.com/nektos/act %global goipath github.com/nektos/act -Version: 0.2.77 +Version: 0.2.81 %gometa -f @@ -39,7 +39,6 @@ BuildRequires: anda-srpm-macros %prep %autosetup -p1 -n act-%{version} -%go_prep_online %if %{without bootstrap} %build diff --git a/anda/langs/go/glow/golang-github-charmbracelet-glow.spec b/anda/langs/go/glow/golang-github-charmbracelet-glow.spec index f841edabe6..fc26d74694 100644 --- a/anda/langs/go/glow/golang-github-charmbracelet-glow.spec +++ b/anda/langs/go/glow/golang-github-charmbracelet-glow.spec @@ -3,7 +3,7 @@ # https://github.com/charmbracelet/glow %global goipath github.com/charmbracelet/glow -Version: 2.1.0 +Version: 2.1.1 %gometa -f diff --git a/anda/langs/go/google-grpc/anda.hcl b/anda/langs/go/google-grpc/anda.hcl new file mode 100644 index 0000000000..c697e9b806 --- /dev/null +++ b/anda/langs/go/google-grpc/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "golang-google-grpc.terra.spec" + } +} diff --git a/anda/langs/go/google-grpc/golang-google-grpc.terra.spec b/anda/langs/go/google-grpc/golang-google-grpc.terra.spec new file mode 100644 index 0000000000..afa28a0a9b --- /dev/null +++ b/anda/langs/go/google-grpc/golang-google-grpc.terra.spec @@ -0,0 +1,106 @@ +#? https://src.fedoraproject.org/rpms/golang-google-grpc/blob/rawhide/f/golang-google-grpc.spec + +# Generated by go2rpm 1.14.0 +%bcond check 0 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +# https://github.com/grpc/grpc-go +%global goipath google.golang.org/grpc +%global forgeurl https://github.com/grpc/grpc-go +Version: 1.75.0 + +%gometa -L + +%global common_description %{expand: +The Go language implementation of gRPC. HTTP/2 based RPC.} + +%global golicenses LICENSE NOTICE.txt +%global godocs examples AUTHORS CODE-OF-CONDUCT.md CONTRIBUTING.md\\\ + GOVERNANCE.md MAINTAINERS.md README.md SECURITY.md\\\ + Documentation + +Name: golang-google-grpc.terra +Release: 1%?dist +Summary: The Go language implementation of gRPC. HTTP/2 based RPC + +License: Apache-2.0 +URL: %{gourl} +Source: %{gosource} +Conflicts: golang-google-grpc + +%description %{common_description} + +%{lua: + local s = rpm.expand("%gopkg"):gsub("golang%-google%-grpc", "golang-google-grpc.terra") + print(s) +} + +%prep +%goprep -A +%autopatch -p1 + +# Remove dependency on stackdriver due to dependency issues +# golang-contrib-opencensus-exporter-stackdriver-devel +rm -rf gcp/observability interop/observability/ + +%dnl %if %{without bootstrap} +%dnl %generate_buildrequires +%dnl %go_generate_buildrequires +%dnl %endif + +%if %{without bootstrap} +%build +%define gomodulesmode GO111MODULE=on +for cmd in cmd/* ; do + pushd $cmd + %gobuild -o %{gobuilddir}/bin/$(basename $cmd) . + popd +done +%endif + +%install +%gopkginstall +%if %{without bootstrap} +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +%endif + +%if %{without bootstrap} +%if %{with check} +%check + +for test in "InvalidMetadata" \ + "SvrWriteStatusEarlyWrite" \ + "AuthorizationEngineEvaluate" \ + "HealthWatchServiceStatusSetBeforeStartingServer" \ + "PolicyEngineEvaluate" \ + "IdentityEncoding" \ + "Fallback" \ + "HealthCheckOff" \ + "ControlChannelCredsFailure" \ +; do +awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) +done +%gocheck -d google.golang.org/grpc/security/advancedtls +%endif +%endif + +%if %{without bootstrap} +%files +%license LICENSE NOTICE.txt +%doc examples AUTHORS CODE-OF-CONDUCT.md CONTRIBUTING.md GOVERNANCE.md +%doc MAINTAINERS.md README.md SECURITY.md Documentation +%{_bindir}/protoc-gen-go-grpc +%endif + +%{lua: + local s = rpm.expand("%gopkgfiles"):gsub("golang%-google%-grpc", "golang-google-grpc.terra", 1) + print(s) +} + +%changelog +%autochangelog diff --git a/anda/langs/go/google-grpc/update.rhai b/anda/langs/go/google-grpc/update.rhai new file mode 100644 index 0000000000..bbc89947ff --- /dev/null +++ b/anda/langs/go/google-grpc/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("grpc/grpc-go")); diff --git a/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec b/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec index e541135eba..80a98cc347 100644 --- a/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec +++ b/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec @@ -2,7 +2,7 @@ # https://github.com/jesseduffield/lazygit %global goipath github.com/jesseduffield/lazygit -Version: 0.51.1 +Version: 0.54.2 %gometa -f @@ -13,7 +13,7 @@ Simple terminal UI for git commands.} %global godocs docs README.md VISION.md Name: golang-github-jesseduffield-lazygit -Release: 1%?dist +Release: 2%?dist Summary: Simple terminal UI for git commands License: MIT @@ -30,18 +30,12 @@ Provides: lazygit = %{version}-%{release} %gopkg %prep -%goprep -%go_prep_online +%goprep -A %build -go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ - -ldflags "-X main.version=%{version} \ - -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ - -compressdwarf=false -linkmode=external \ - -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ - -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ - -Wl,--build-id=sha1'" \ - -o %{gobuilddir}/bin/lazygit %{goipath} +%define currentgoldflags -X main.version=%version +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/lazygit %{goipath} %install install -m 0755 -vd %{buildroot}%{_bindir} @@ -51,4 +45,3 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %license LICENSE %doc docs README.md VISION.md %{_bindir}/lazygit - diff --git a/anda/langs/go/prs/golang-github-dhth-prs.spec b/anda/langs/go/prs/golang-github-dhth-prs.spec index 6c90ba3335..f84aae66d4 100644 --- a/anda/langs/go/prs/golang-github-dhth-prs.spec +++ b/anda/langs/go/prs/golang-github-dhth-prs.spec @@ -13,7 +13,7 @@ Stay updated on PRs from your terminal.} %global godocs README.md ui/assets/help.md Name: golang-github-dhth-prs -Release: %autorelease +Release: 2%?dist Summary: Stay updated on PRs from your terminal License: MIT @@ -31,16 +31,11 @@ Packager: sadlerm %prep %git_clone https://%{goipath} v%{version} -%go_prep_online +%goprep -A %build -go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ - -ldflags "-B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ - -compressdwarf=false -linkmode=external \ - -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ - -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ - -Wl,--build-id=sha1'" \ - -o %{_builddir}/bin/prs . +%define gomodulesmode GO111MODULE=on +%gobuild -o %{_builddir}/bin/prs . %install install -m 0755 -vd %{buildroot}%{_bindir} diff --git a/anda/langs/go/u-root/golang-github-u-root.spec b/anda/langs/go/u-root/golang-github-u-root.spec index 44e5b9abcd..7a2e4333ad 100644 --- a/anda/langs/go/u-root/golang-github-u-root.spec +++ b/anda/langs/go/u-root/golang-github-u-root.spec @@ -1,33 +1,40 @@ -# Generated by go2rpm 1.9.0 -%bcond_without check -%define debug_package %nil +# Generated by go2rpm 1.16.0 +%bcond check 0 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +%if %{with bootstrap} +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ +%endif # https://github.com/u-root/u-root %global goipath github.com/u-root/u-root -Version: 0.14.0 +Version: 0.15.0 +%global commit 5721ed3ad38a5c889e6c1ed5bbf5242f98a4b591 %gometa -f - %global common_description %{expand: A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go.} %global golicenses LICENSE -%global godocs docs examples AUTHORS SECURITY.md tricksandtips.md\\\ - CONTRIBUTING.md README.md roadmap.md\\\ - cmds/core/tail/test_samples/read_backwards.txt\\\ - cmds/core/tail/test_samples/read_from_beginning.txt\\\ - cmds/exp/esxiboot/README.md\\\ - configs/README.md\\\ - configs/amd64_config.txt configs/arm_config.txt\\\ - configs/generic_config.txt integration/README.md\\\ - pkg/boot/systembooter/README.md pkg/smbios/README.md\\\ - pkg/tarutil/test2.txt pkg/tarutil/test0/a.txt\\\ - pkg/tarutil/test0/dir/b.txt pkg/tarutil/test1/a1.txt\\\ - tools/golang_patched_dce/README.md +%global godocs docs examples AUTHORS CONTRIBUTING.md README.md\\\ + SECURITY.md roadmap.md tricksandtips.md\\\ + cmds/exp/esxiboot/README.md cmds/exp/tftpd/README.md\\\ + cmds/exp/uefiboot/README.md cmds/exp/vmboot/README.md\\\ + configs/README.md configs/amd64_config.txt\\\ + configs/arm_config.txt configs/generic_config.txt\\\ + integration/README.md pkg/boot/systembooter/README.md\\\ + pkg/netcat/doc.md pkg/netstat/doc.md\\\ + pkg/smbios/README.md pkg/tc/readme.md\\\ + tools/golang_patched_dce/README.md tools/tinygo-\\\ + buildstatus/README.md tools/tinygobb/README.md -Name: %{goname} +Name: golang-github-u-root Release: 1%?dist Summary: A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go @@ -35,40 +42,42 @@ License: BSD-3-Clause URL: %{gourl} Source: %{gosource} -BuildRequires: anda-srpm-macros - %description %{common_description} %gopkg %prep -%goprep +%goprep -A %autopatch -p1 -go mod download - +%if %{without bootstrap} %build -go build -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -s -w -extldflags '--static-pie'" -buildmode=pie -tags 'osusergo,netgo,static_build' -v -x -o %{gobuilddir}/bin/u-root %{goipath} +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/u-root %{goipath} +%endif %install %gopkginstall +%if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +%endif -# if {with check} -# check -# gocheck -# endif +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif +%if %{without bootstrap} %files %license LICENSE -%doc docs examples AUTHORS SECURITY.md tricksandtips.md CONTRIBUTING.md -%doc README.md roadmap.md cmds/core/tail/test_samples/read_backwards.txt -%doc cmds/core/tail/test_samples/read_from_beginning.txt -%doc configs/README.md tools/golang_patched_dce/README.md +%doc docs examples AUTHORS CONTRIBUTING.md README.md SECURITY.md roadmap.md +%doc tricksandtips.md %doc configs/amd64_config.txt configs/arm_config.txt configs/generic_config.txt -%doc integration/README.md pkg/boot/systembooter/README.md pkg/smbios/README.md -%{_bindir}/* +%{_bindir}/u-root +%endif %gopkgfiles diff --git a/anda/langs/groovy/groovy-docs/groovy-docs.spec b/anda/langs/groovy/groovy-docs/groovy-docs.spec index f6804f829c..d4acca8d41 100644 --- a/anda/langs/groovy/groovy-docs/groovy-docs.spec +++ b/anda/langs/groovy/groovy-docs/groovy-docs.spec @@ -1,5 +1,5 @@ Name: groovy-docs -Version: 4.0.27 +Version: 5.0.0 Release: 1%?dist Summary: Documentation for the Groovy programming language URL: https://groovy-lang.org/ diff --git a/anda/langs/groovy/groovy.spec b/anda/langs/groovy/groovy.spec index 31bf79d898..23498cd17a 100644 --- a/anda/langs/groovy/groovy.spec +++ b/anda/langs/groovy/groovy.spec @@ -1,5 +1,5 @@ Name: groovy -Version: 4.0.27 +Version: 5.0.0 Release: 1%?dist Summary: A multi-faceted language for the Java platform BuildArch: noarch diff --git a/anda/langs/kotlin/kotlin-native/kotlin-native.spec b/anda/langs/kotlin/kotlin-native/kotlin-native.spec index 15d99f676f..ed1193dc7c 100644 --- a/anda/langs/kotlin/kotlin-native/kotlin-native.spec +++ b/anda/langs/kotlin/kotlin-native/kotlin-native.spec @@ -2,7 +2,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Name: kotlin-native -Version: 2.1.21 +Version: 2.2.10 Release: 1%?dist Summary: LLVM backend for the Kotlin compiler ExclusiveArch: x86_64 diff --git a/anda/langs/kotlin/kotlin/kotlin.spec b/anda/langs/kotlin/kotlin/kotlin.spec index d534b1e225..704a440611 100644 --- a/anda/langs/kotlin/kotlin/kotlin.spec +++ b/anda/langs/kotlin/kotlin/kotlin.spec @@ -1,7 +1,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Name: kotlin -Version: 2.1.21 +Version: 2.2.10 Release: 1%?dist Summary: Statically typed programming language diff --git a/anda/langs/nim/choosenim/choosenim.spec b/anda/langs/nim/choosenim/choosenim.spec index b5316aae49..0f9840ac43 100644 --- a/anda/langs/nim/choosenim/choosenim.spec +++ b/anda/langs/nim/choosenim/choosenim.spec @@ -1,13 +1,10 @@ - Name: choosenim -Version: 0.8.12 +Version: 0.8.16 Release: 1%?dist Summary: Easily install and manage multiple versions of the Nim programming language License: BSD-3-Clause URL: https://github.com/nim-lang/choosenim Source0: %url/archive/refs/tags/v%version.tar.gz -# Fix for https://github.com/nim-lang/choosenim/issues/13 -Patch0: https://patch-diff.githubusercontent.com/raw/nim-lang/choosenim/pull/38.patch Packager: madonuko BuildRequires: nim BuildRequires: git-core anda-srpm-macros diff --git a/anda/langs/nim/grabnim/anda.hcl b/anda/langs/nim/grabnim/anda.hcl new file mode 100644 index 0000000000..c1d3337617 --- /dev/null +++ b/anda/langs/nim/grabnim/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "grabnim.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/langs/nim/grabnim/grabnim.spec b/anda/langs/nim/grabnim/grabnim.spec new file mode 100644 index 0000000000..8c147c8d51 --- /dev/null +++ b/anda/langs/nim/grabnim/grabnim.spec @@ -0,0 +1,30 @@ +%global commit b610436355c1440dcdb54fb486431359ee7e2a40 +%global commit_date 20250817 +%global shortcommit %{sub %commit 1 7} + +Name: grabnim +Version: 0~%{commit_date}git.%{shortcommit} +Release: 1%?dist +Summary: Simple tool to install and manage multiple nim compiler versions +License: MIT +URL: https://codeberg.org/janAkali/grabnim +Source0: %url/archive/%commit.tar.gz +Packager: madonuko +BuildRequires: nim + +%description +GrabNim is a simple tool to install, manage and switch between different versions of the Nim compiler. + +%prep +%autosetup -n %name + +%build +%nim_c %name + +%install +install -Dm755 %name -t %buildroot%_bindir + +%files +%doc README.md +%license LICENSE +%_bindir/%name diff --git a/anda/langs/nim/grabnim/update.rhai b/anda/langs/nim/grabnim/update.rhai new file mode 100644 index 0000000000..75f215ef43 --- /dev/null +++ b/anda/langs/nim/grabnim/update.rhai @@ -0,0 +1,6 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.global("commit", bump::codeberg_commit("janAkali/grabnim")); +if rpm.changed() { + rpm.global("commit_date", date()); +} diff --git a/anda/langs/nim/netto/anda.hcl b/anda/langs/nim/netto/anda.hcl new file mode 100644 index 0000000000..19833fbde7 --- /dev/null +++ b/anda/langs/nim/netto/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "netto.spec" + } +} diff --git a/anda/langs/nim/netto/netto.spec b/anda/langs/nim/netto/netto.spec new file mode 100644 index 0000000000..4f16887c14 --- /dev/null +++ b/anda/langs/nim/netto/netto.spec @@ -0,0 +1,34 @@ +Name: netto +Version: 0.1.1 +Release: 2%?dist +Summary: 📡 GUI Network Applet +License: GPL-3.0-or-later +URL: https://github.com/madonuko/netto +Source0: %url/archive/refs/tags/v%version.tar.gz +BuildRequires: anda-srpm-macros nim +BuildRequires: pkgconfig(libhelium-1) +BuildRequires: pkgconfig(libnm) + +%description +ネット (codename 🫘 納豆) is the new solution for setting up a new network. +Written proudly in libhelium and Nim, using libnm. + +%prep +%autosetup -Sgit + +%build +atlas init +atlas rep atlas.lock +%nim_c src/netto + +%install +install -Dpm755 src/netto -t %buildroot%_bindir +install -Dpm644 assets/netto.desktop -t %buildroot%_datadir/applications/ +install -Dpm644 assets/netto.svg -t %buildroot%_iconsdir/hicolor/scalable/apps/ + +%files +%doc README.md +%license LICENSE.md +%_bindir/netto +%_datadir/applications/netto.desktop +%_iconsdir/hicolor/scalable/apps/netto.svg diff --git a/anda/langs/nim/netto/update.rhai b/anda/langs/nim/netto/update.rhai new file mode 100644 index 0000000000..baa2d71031 --- /dev/null +++ b/anda/langs/nim/netto/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("madonuko/netto")); diff --git a/anda/langs/nim/nim-nightly/nim-nightly.spec b/anda/langs/nim/nim-nightly/nim-nightly.spec index ff1171c78b..727e02c88c 100644 --- a/anda/langs/nim/nim-nightly/nim-nightly.spec +++ b/anda/langs/nim/nim-nightly/nim-nightly.spec @@ -1,8 +1,8 @@ %global csrc_commit 561b417c65791cd8356b5f73620914ceff845d10 -%global commit 241edaf0c0dc8a7e6a67abb16cb9796bf2f16c4a +%global commit 065c4b443bcbeee02c6c6bb18cb1cc651e3fcf2b %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global ver 2.3.1 -%global commit_date 20250527 +%global commit_date 20250829 %global debug_package %nil Name: nim-nightly @@ -14,14 +14,14 @@ URL: https://nim-lang.org Source0: https://github.com/nim-lang/Nim/archive/%commit.tar.gz Source1: nim.1 Source2: nimgrep.1 -Source3: nimble.1 Source4: nimsuggest.1 BuildRequires: gcc mold git gcc-c++ nodejs openssl-devel pkgconfig(bash-completion) gc-devel pcre pcre-devel Requires: redhat-rpm-config gcc Conflicts: choosenim # somehow wrong name and never noticed -Provides: nim-nightly = %version-%release Obsoletes: nim-nighlty < 2.1.1^20240404.9e1b170-2 +Conflicts: nim +Recommends: nim-nightly-tools nimble %description @@ -34,6 +34,7 @@ order of priority). Summary: Tools for Nim programming language Provides: nim-nightly-tools = %version-%release Obsoletes: nim-nighlty-tools < 2.1.1^20240404.9e1b170-2 +Conflicts: nim-tools %description tools Nim is a compiled, garbage-collected systems programming language with a @@ -103,8 +104,7 @@ sh ./install.sh %buildroot/usr/bin mkdir -p %buildroot/%_bindir %buildroot/%_datadir/bash-completion/completions %buildroot/usr/lib/nim %buildroot%_datadir install -Dpm755 bin/nim{grep,suggest,pretty} %buildroot/%_bindir install -Dpm644 tools/nim.bash-completion %buildroot/%_datadir/bash-completion/completions/nim -install -Dpm644 dist/nimble/nimble.bash-completion %buildroot/%_datadir/bash-completion/completions/nimble -install -Dpm644 -t%buildroot/%_mandir/man1 %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 +install -Dpm644 -t%buildroot/%_mandir/man1 %SOURCE1 %SOURCE2 %SOURCE4 mv %buildroot%_bindir/nim %buildroot%_datadir/ ln -s %_datadir/nim/bin/nim %buildroot%_bindir/nim @@ -132,9 +132,9 @@ cp -r %buildroot%_prefix/lib/nim/dist %buildroot%_datadir/nim/ %files %license copying.txt dist/nimble/license.txt %doc doc/readme.txt -%_bindir/nim{,ble} -%_mandir/man1/nim{,ble}.1* -%_datadir/bash-completion/completions/nim{,ble} +%_bindir/nim +%_mandir/man1/nim.1.* +%_datadir/bash-completion/completions/nim %_datadir/nim/ %_prefix/lib/nim/ %_sysconfdir/nim/ diff --git a/anda/langs/nim/nim/nim.spec b/anda/langs/nim/nim/nim.spec index 2b4be8494f..4ab05fb44f 100644 --- a/anda/langs/nim/nim/nim.spec +++ b/anda/langs/nim/nim/nim.spec @@ -3,7 +3,7 @@ Name: nim Version: 2.2.4 -Release: 1%?dist +Release: 3%?dist Summary: Imperative, multi-paradigm, compiled programming language License: MIT and BSD URL: https://nim-lang.org @@ -14,6 +14,8 @@ Source4: nimsuggest.1 BuildRequires: gcc mold git-core gcc-c++ nodejs openssl-devel pkgconfig(bash-completion) gc-devel pcre-devel BuildRequires: redhat-rpm-config anda-srpm-macros Requires: gcc +Recommends: nim-tools +Conflicts: nimble %description @@ -22,6 +24,8 @@ design that focuses on efficiency, expressiveness, and elegance (in that order of priority). +%pkg_completion -B nim nimble + %package tools Summary: Tools for Nim programming language %description tools @@ -138,8 +142,6 @@ cp -r %buildroot%_prefix/lib/nim/dist %buildroot%_datadir/nim/ %_includedir/cycle.h %_includedir/nimbase.h %_datadir/nim -%bash_completions_dir/nim -%bash_completions_dir/nimble %files tools %license copying.txt diff --git a/anda/langs/nim/nimble/anda.hcl b/anda/langs/nim/nimble/anda.hcl new file mode 100644 index 0000000000..02159784ac --- /dev/null +++ b/anda/langs/nim/nimble/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "nimble.spec" + } +} diff --git a/anda/langs/nim/nim-nightly/nimble.1 b/anda/langs/nim/nimble/nimble.1 similarity index 100% rename from anda/langs/nim/nim-nightly/nimble.1 rename to anda/langs/nim/nimble/nimble.1 diff --git a/anda/langs/nim/nimble/nimble.spec b/anda/langs/nim/nimble/nimble.spec new file mode 100644 index 0000000000..05fb826ffd --- /dev/null +++ b/anda/langs/nim/nimble/nimble.spec @@ -0,0 +1,35 @@ +Name: nimble +Version: 0.20.1 +Release: 1%?dist +Summary: Package manager for the Nim programming language +License: BSD +URL: https://github.com/nim-lang/nimble +Source0: %url/archive/refs/tags/v%version.tar.gz +Source1: nimble.1 +# We use `nim` to get `nimble`… to build `nimble` +BuildRequires: nim anda-srpm-macros git-core rpm_macro(bash_completions_dir) +Conflicts: nim + +%description +%summary. + +%prep +%autosetup +%nim_prep + +%build +%nim_build src/nimble + +%install +install -Dpm755 src/nimble %buildroot%_bindir/nimble +install -Dpm644 -t%buildroot%_mandir/man1 %SOURCE1 +install -Dpm644 nimble.bash-completion %buildroot%bash_completions_dir/nimble +install -Dpm644 nimble.zsh-completion %buildroot%zsh_completions_dir/_nimble.zsh + +%files +%doc readme.markdown +%license license.txt +%_bindir/nimble +%_mandir/man1/nimble.1.gz +%bash_completions_dir/nimble +%zsh_completions_dir/_nimble.zsh diff --git a/anda/langs/nim/nimble/update.rhai b/anda/langs/nim/nimble/update.rhai new file mode 100644 index 0000000000..e32050a122 --- /dev/null +++ b/anda/langs/nim/nimble/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("nim-lang/nimble")); diff --git a/anda/langs/python/colorz/python-colorz.spec b/anda/langs/python/colorz/python-colorz.spec index 2e0ab064c2..5dd228c483 100644 --- a/anda/langs/python/colorz/python-colorz.spec +++ b/anda/langs/python/colorz/python-colorz.spec @@ -34,10 +34,18 @@ A k-means color scheme generator. rm -rf %{pypi_name}.egg-info %build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif %files -n python3-%{pypi_name} %doc PKG-INFO @@ -45,7 +53,11 @@ rm -rf %{pypi_name}.egg-info %{_bindir}/colorz %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}.py +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else %{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif %changelog * Thu May 22 2025 Gilver - 1.0.3-1 diff --git a/anda/langs/python/fast-colorthief/python-fast-colorthief.spec b/anda/langs/python/fast-colorthief/python-fast-colorthief.spec index 599e5af6b3..69529d2df6 100644 --- a/anda/langs/python/fast-colorthief/python-fast-colorthief.spec +++ b/anda/langs/python/fast-colorthief/python-fast-colorthief.spec @@ -1,6 +1,8 @@ %global pypi_name fast-colorthief %global debug_package %{nil} %bcond docs 1 +# Fedora packages pybind11 but not the test module kill me +%bcond test 0 Name: python-%{pypi_name} Version: 0.0.5 @@ -14,9 +16,16 @@ BuildRequires: doxygen BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: pybind11-devel +BuildRequires: pyproject-rpm-macros BuildRequires: python3-devel +# This package is not buildable on EL due to this dep. There's unfortunately not much I can do about this. BuildRequires: python3-sphinxcontrib-rsvgconverter BuildRequires: python3dist(breathe) +%if %{with test} +BuildRequires: python3dist(colorthief) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pybind11-tests) +%endif BuildRequires: python3dist(furo) BuildRequires: python3dist(numpy) BuildRequires: python3dist(pillow) @@ -58,21 +67,32 @@ Documentation files for %{pypi_name} rm -rf %{pypi_name}.egg-info %build -### This is not a fully Python project and is mostly C++ -## Disable PIC -# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_pie -sed -i 's/CMAKE_POSITION_INDEPENDENT_CODE ON/CMAKE_POSITION_INDEPENDENT_CODE OFF/' CMakeLists.txt +## This is not a fully Python project and is mostly C++ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif %if %{with docs} -# generate docs -PYTHONPATH=${PWD} sphinx-build pybind11/docs html -# remove the sphinx-build leftovers +# Generate docs +# Only works in English currently. Sad. +PYTHONPATH=${PWD} sphinx-build pybind11/docs html -D language=en +# Remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif + +%if %{with test} +%check +%pytest +%endif %files -n python3-%{pypi_name} %license pybind11/LICENSE @@ -82,7 +102,11 @@ rm -rf html/.{doctrees,buildinfo} %{python3_sitearch}/fast_colorthief.py %{python3_sitearch}/version.py %{python3_sitearch}/fast_colorthief_backend.cpython-*-%{_arch}-linux-gnu.so -%{python3_sitearch}/fast_colorthief-%{version}.dist-info +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitearch}/fast_colorthief-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitearch}/fast_colorthief-%{version}.dist-info/ +%endif %if %{with docs} %files -n python3-%{pypi_name}-doc diff --git a/anda/langs/python/haishoku/python-haishoku.spec b/anda/langs/python/haishoku/python-haishoku.spec index c64dfab648..d7187805f3 100644 --- a/anda/langs/python/haishoku/python-haishoku.spec +++ b/anda/langs/python/haishoku/python-haishoku.spec @@ -33,17 +33,29 @@ Requires: python3dist(pillow) rm -rf %{pypi_name}.egg-info %build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif %files -n python3-%{pypi_name} # This project does have README files but they are not included in the PyPi source %doc PKG-INFO %license LICENSE %{python3_sitelib}/%{pypi_name}/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else %{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif %changelog * Thu May 22 2025 Gilver E. - 1.1.8-1 diff --git a/anda/langs/python/ignis/python-ignis.spec b/anda/langs/python/ignis/python-ignis.spec index 2148b85600..b5074acdc0 100644 --- a/anda/langs/python/ignis/python-ignis.spec +++ b/anda/langs/python/ignis/python-ignis.spec @@ -1,13 +1,14 @@ Name: python-ignis -Version: 0.5 -Release: 2%{?dist} +Version: 0.5.1 +Release: 2%?dist Summary: A widget framework for building desktop shells, written and configurable in Python License: LGPL-2.1-or-later -URL: https://linkfrg.github.io/ignis +URL: https://ignis-sh.github.io/ignis Source: https://github.com/linkfrg/ignis/archive/v%{version}/ignis-%{version}.tar.gz Packager: madonuko +BuildRequires: pyproject-rpm-macros BuildRequires: python3-devel BuildRequires: gcc git-core BuildRequires: pkgconfig(glib-2.0) diff --git a/anda/langs/python/materialyoucolor/anda.hcl b/anda/langs/python/materialyoucolor/anda.hcl new file mode 100644 index 0000000000..3e4457e184 --- /dev/null +++ b/anda/langs/python/materialyoucolor/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "python-materialyoucolor.spec" + } +} diff --git a/anda/langs/python/materialyoucolor/python-materialyoucolor.spec b/anda/langs/python/materialyoucolor/python-materialyoucolor.spec new file mode 100644 index 0000000000..cccdaeafe5 --- /dev/null +++ b/anda/langs/python/materialyoucolor/python-materialyoucolor.spec @@ -0,0 +1,70 @@ +%global pypi_name materialyoucolor +%bcond test 0 + +Name: python-%{pypi_name} +Version: 2.0.10 +Release: 1%{?dist} +Summary: Material You color generation algorithms in pure python! +License: MIT +URL: https://github.com/T-Dynamos/materialyoucolor-python +Source0: %{pypi_source} +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(pillow) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(rich) +BuildRequires: python3dist(setuptools) +Packager: Gilver E. + +%description +Material You color generation algorithms in Python. + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +Material You color generation algorithms in Python. + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else +%pyproject_wheel +%endif + +%install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else +%pyproject_install +%endif + +# Test image isn't included and I'm not supplying one +%if %{with test} +%check +%pytest test_image.jpg 1 +%endif + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{python3_sitearch}/%{pypi_name}/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitearch}/%{pypi_name}-%{version}.dist-info/ +%endif + + +%changelog +* Wed May 28 2025 Gilver E. - 2.0.10-1 +- Initial package. diff --git a/anda/langs/python/materialyoucolor/update.rhai b/anda/langs/python/materialyoucolor/update.rhai new file mode 100644 index 0000000000..b258c2de3d --- /dev/null +++ b/anda/langs/python/materialyoucolor/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("materialyoucolor")); diff --git a/anda/langs/python/pillow-heif/python3-pillow-heif.spec b/anda/langs/python/pillow-heif/python3-pillow-heif.spec index 07524a6dc2..4e017729ed 100644 --- a/anda/langs/python/pillow-heif/python3-pillow-heif.spec +++ b/anda/langs/python/pillow-heif/python3-pillow-heif.spec @@ -6,8 +6,8 @@ %bcond_with doc Name: python-%{srcname} -Version: 0.22.0 -Release: 2%?dist +Version: 1.1.0 +Release: 1%?dist Summary: Python library for working with HEIF images and plugin for Pillow License: BSD-3-Clause @@ -73,7 +73,11 @@ Documentation for %{srcname}. %build # Native build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif # Doc build %if %{with doc} @@ -84,7 +88,11 @@ rm -f docs/_build_py3/html/.buildinfo %install # Native build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif %check # Check Python 3 modules @@ -98,7 +106,11 @@ popd %doc README.md CHANGELOG.md %license LICENSE.txt %{python3_sitearch}/pillow_heif/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitearch}/pillow_heif-%{version}-py%{python3_version}.egg-info/ +%else %{python3_sitearch}/pillow_heif-%{version}.dist-info/ +%endif %{python3_sitearch}/_pillow_heif.*.so %files -n python%{python3_pkgversion}-%{srcname}-devel diff --git a/anda/langs/python/pip-system-certs/python-pip-system-certs.spec b/anda/langs/python/pip-system-certs/python-pip-system-certs.spec index 6dfc694f2c..c301b56d5d 100644 --- a/anda/langs/python/pip-system-certs/python-pip-system-certs.spec +++ b/anda/langs/python/pip-system-certs/python-pip-system-certs.spec @@ -1,6 +1,6 @@ # Created by pyp2rpm-3.3.10 %global pypi_name pip-system-certs -%global pypi_version 4.0 +%global pypi_version 5.2 Name: python-%{pypi_name} Version: %{pypi_version} diff --git a/anda/langs/python/protobuf/python3-protobuf.spec b/anda/langs/python/protobuf/python3-protobuf.spec index 6a1a5099c9..8ab35d3a6f 100644 --- a/anda/langs/python/protobuf/python3-protobuf.spec +++ b/anda/langs/python/protobuf/python3-protobuf.spec @@ -2,7 +2,7 @@ %global pypi_name protobuf Name: python-%{pypi_name} -Version: 6.31.0 +Version: 6.32.0 Release: 1%?dist Summary: Protocol Buffers @@ -31,15 +31,27 @@ Protocol Buffers are Google's data interchange format rm -rf %{pypi_name}.egg-info %build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else %pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else %pyproject_install +%endif %files -n python3-%{pypi_name} %doc README.md %{python3_sitearch}/google/ -%{python3_sitearch}/protobuf-%{version}.dist-info/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitearch}/%{pypi_name}-%{version}.dist-info/ +%endif %changelog * Sun Feb 19 2023 windowsboy111 - 4.22.0-1 diff --git a/anda/langs/python/pywal16/anda.hcl b/anda/langs/python/pywal16/anda.hcl new file mode 100644 index 0000000000..f98544e892 --- /dev/null +++ b/anda/langs/python/pywal16/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "python-pywal16.spec" + } +} diff --git a/anda/langs/python/pywal16/python-pywal16.spec b/anda/langs/python/pywal16/python-pywal16.spec new file mode 100644 index 0000000000..1393fb3ef7 --- /dev/null +++ b/anda/langs/python/pywal16/python-pywal16.spec @@ -0,0 +1,83 @@ +%global pypi_name pywal16 +%global _description %{expand: +Pywal is a tool that generates a color palette from the dominant colors in an image. It then applies the colors system-wide and on-the-fly in all of your favourite programs.} + +Name: python-%{pypi_name} +Version: 3.8.9 +Release: 1%?dist +Summary: 16 color fork of the original Pywal +License: MIT +URL: https://github.com/eylles/pywal16 +Source0: %{pypi_source} +BuildRequires: ImageMagick +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(colorama) +BuildRequires: python3dist(colorthief) +BuildRequires: python3dist(colorz) +BuildRequires: python3dist(fast-colorthief) +BuildRequires: python3dist(haishoku) +BuildRequires: python3dist(modern-colorthief) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(setuptools) +Obsoletes: python3-pywal < 3.5.0-1 +BuildArch: noarch +Packager: Gilver E. + +%description +This project is a 16 colors fork of Pywal. + +%package -n python3-%{pypi_name} +Summary: %{summary} +Requires: ImageMagick +Requires: python3dist(colorz) +Requires: python3dist(haishoku) +Requires: (python3dist(modern-colorthief) or python3dist(fast-colorthief) or python3dist(colorthief)) +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %_description + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else +%pyproject_wheel +%endif + +%install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else +%pyproject_install +%endif + +install -Dm644 data/man/man1/wal.1 -t %{buildroot}%{_mandir}/man1 + +# For some reason this is where the project tries to install the manpage? +rm -rf %{buildroot}%{_prefix}/man + +%check +%pytest + +%files -n python3-%{pypi_name} +%doc PKG-INFO +%doc README.md +%license LICENSE.md +%{_bindir}/wal +%{_mandir}/man1/wal.1.* +%{python3_sitelib}/pywal/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif + +%changelog +* Wed May 28 2025 Gilver E. - 3.8.6-1 +- Initial package. diff --git a/anda/langs/python/pywal16/update.rhai b/anda/langs/python/pywal16/update.rhai new file mode 100644 index 0000000000..6c50d87f70 --- /dev/null +++ b/anda/langs/python/pywal16/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("pywal16")); diff --git a/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec b/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec index 439dbf8fec..4df803be99 100644 --- a/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec +++ b/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec @@ -3,6 +3,13 @@ %global pypi_name sphinxcontrib_moderncmakedomain %global real_name sphinxcontrib-moderncmakedomain +# Tests fail on EL even with Pytest due to the package versions +%if 0%{?rhel} +%bcond test 0 +%else +%bcond test 1 +%endif + Name: python-%{real_name} Version: 3.29.0 Release: 2%{?dist} @@ -45,10 +52,8 @@ Modern CMake domain entries, originally from Kitware. %install %pyproject_install +%if %{with test} %check -%if 0%{?rhel} -%pytest tests/*.py -%else nox -s tests %endif @@ -57,7 +62,7 @@ nox -s tests %doc README.md %license LICENSE %{python3_sitelib}/sphinxcontrib/moderncmakedomain -%{python3_sitelib}/%{pypi_name}-%{version}.dist-info +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ %changelog * Sat May 10 2025 Gilver E. - 3.29.0-1 diff --git a/anda/langs/rust/bottom/rust-bottom.spec b/anda/langs/rust/bottom/rust-bottom.spec index bc557d41a1..9f3ca65a4d 100644 --- a/anda/langs/rust/bottom/rust-bottom.spec +++ b/anda/langs/rust/bottom/rust-bottom.spec @@ -4,8 +4,8 @@ %global crate bottom Name: rust-bottom -Version: 0.10.2 -Release: %autorelease +Version: 0.11.1 +Release: 1%?dist Summary: Customizable cross-platform graphical process/system monitor for the terminal License: MIT diff --git a/anda/langs/rust/eza/eza-fix-metadata-auto.diff b/anda/langs/rust/eza/eza-fix-metadata-auto.diff index 0db687abb9..4e79a65459 100644 --- a/anda/langs/rust/eza/eza-fix-metadata-auto.diff +++ b/anda/langs/rust/eza/eza-fix-metadata-auto.diff @@ -1,11 +1,11 @@ ---- eza-0.21.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ eza-0.21.0/Cargo.toml 2025-04-16T03:47:21.617301+00:00 -@@ -231,12 +231,6 @@ +--- eza-0.23.0/Cargo.toml 1970-01-01 08:00:01.000000000 +0800 ++++ eza-0.23.0/Cargo.toml 2025-07-23 12:49:16.775971979 +0800 +@@ -225,12 +225,5 @@ [target.'cfg(target_os = "linux")'.dependencies.proc-mounts] version = "0.3" -[target.'cfg(target_os = "windows")'.dependencies.windows-sys] --version = "0.59.0" +-version = "0.60.2" -features = [ - "Win32_System_Console", - "Win32_Foundation", @@ -13,4 +13,3 @@ - [target."cfg(unix)".dependencies.uzers] version = "0.12.1" -+ diff --git a/anda/langs/rust/eza/rust-eza.spec b/anda/langs/rust/eza/rust-eza.spec index 4965c1b63b..ed9f936655 100644 --- a/anda/langs/rust/eza/rust-eza.spec +++ b/anda/langs/rust/eza/rust-eza.spec @@ -4,7 +4,7 @@ %global crate eza Name: rust-eza -Version: 0.21.3 +Version: 0.23.1 Release: 1%?dist Summary: Modern replacement for ls @@ -15,6 +15,7 @@ Source: %{crates_source} Patch: eza-fix-metadata-auto.diff BuildRequires: anda-srpm-macros cargo-rpm-macros >= 24 +BuildRequires: pandoc %global _description %{expand: A modern replacement for ls.} @@ -40,6 +41,10 @@ License: (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apa %doc SECURITY.md %doc TESTING.md %{_bindir}/eza +%{_mandir}/man1/eza.1.gz +%{_mandir}/man5/eza_colors{,-explanation}.5.gz + +%pkg_completion -Bfzn %{crate} %package devel Summary: %{summary} @@ -178,9 +183,20 @@ use the "vendored-openssl" feature of the "%{crate}" crate. %{cargo_license_summary_online} %{cargo_license_online} > LICENSE.dependencies +pandoc --standalone -f markdown -t man man/eza.1.md > man/eza.1 +pandoc --standalone -f markdown -t man man/eza_colors.5.md > man/eza_colors.5 +pandoc --standalone -f markdown -t man man/eza_colors-explanation.5.md > man/eza_colors-explanation.5 + %install %cargo_install +install -Dpm 0644 completions/bash/eza -t %{buildroot}%{bash_completions_dir}/ +install -Dpm 0644 completions/fish/eza.fish -t %{buildroot}%{fish_completions_dir}/ +install -Dpm 0644 completions/zsh/_eza -t %{buildroot}%{zsh_completions_dir}/ +install -Dpm 0644 man/eza.1 -t %{buildroot}%{_mandir}/man1/ +install -Dpm 0644 man/eza_colors.5 -t %{buildroot}%{_mandir}/man5/ +install -Dpm 0644 man/eza_colors-explanation.5 -t %{buildroot}%{_mandir}/man5/ + %if %{with check} %check %cargo_test diff --git a/anda/langs/rust/gitoxide/rust-gitoxide.spec b/anda/langs/rust/gitoxide/rust-gitoxide.spec index 0082107900..26d08644b3 100644 --- a/anda/langs/rust/gitoxide/rust-gitoxide.spec +++ b/anda/langs/rust/gitoxide/rust-gitoxide.spec @@ -5,7 +5,7 @@ %global crate gitoxide Name: rust-gitoxide -Version: 0.44.0 +Version: 0.45.0 Release: 1%?dist Summary: Command-line application for interacting with git repositories diff --git a/anda/langs/rust/gping/rust-gping.spec b/anda/langs/rust/gping/rust-gping.spec index 3adb117a78..09fab69825 100644 --- a/anda/langs/rust/gping/rust-gping.spec +++ b/anda/langs/rust/gping/rust-gping.spec @@ -6,8 +6,8 @@ %global crate gping Name: rust-gping -Version: 1.19.0 -Release: 2%?dist +Version: 1.20.1 +Release: 1%?dist Summary: Ping, but with a graph License: MIT diff --git a/anda/langs/rust/lan-mouse/anda.hcl b/anda/langs/rust/lan-mouse/anda.hcl new file mode 100644 index 0000000000..177426ceb2 --- /dev/null +++ b/anda/langs/rust/lan-mouse/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "lan-mouse.spec" + } +} diff --git a/anda/langs/rust/lan-mouse/lan-mouse.spec b/anda/langs/rust/lan-mouse/lan-mouse.spec new file mode 100644 index 0000000000..4e360c1414 --- /dev/null +++ b/anda/langs/rust/lan-mouse/lan-mouse.spec @@ -0,0 +1,73 @@ +# Generated by rust2rpm 27 +%bcond check 1 +%global rustflags_debuginfo 1 + +Name: lan-mouse +Version: 0.10.0 +Release: %autorelease +Summary: Software KVM Switch / mouse & keyboard sharing software for Local Area Networks + +License: GPL-3.0-or-later +URL: https://github.com/feschber/lan-mouse +Source0: %{url}/archive/refs/tags/v%version.tar.gz +Packager: ayykamp + +Requires: gtk4 +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: anda-srpm-macros +BuildRequires: cargo mold +BuildRequires: pkgconfig(glib-2.0) >= 2.66 +BuildRequires: pkgconfig(gtk4) >= 4.2 +BuildRequires: pkgconfig(libadwaita-1) >= 1.1 +BuildRequires: libXtst-devel + +%description +Software KVM Switch / mouse & keyboard sharing software for Local Area Networks. + +%prep +%autosetup -n lan-mouse-%{version} -p1 +%cargo_prep_online + + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + + +%install +%cargo_install + +# install app icon +install -D -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps +install -p -m 0644 %{_builddir}/%{name}-%{version}/lan-mouse-gtk/resources/de.feschber.LanMouse.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps + +# install desktop entry +install -D -d -m 0755 %{buildroot}%{_datadir}/applications +install -p -m 0644 %{_builddir}/%{name}-%{version}/de.feschber.LanMouse.desktop %{buildroot}%{_datadir}/applications + +# when using firewalld: install firewall rule +install -D -d -m 0755 %{buildroot}%{_prefix}/lib/firewalld/services +install -p -m 0644 %{_builddir}/%{name}-%{version}/firewall/lan-mouse.xml %{buildroot}%{_prefix}/lib/firewalld/services + +%if %{with check} +%check +%cargo_test +%endif + + +%files +%license LICENSE +%license LICENSE.dependencies +%doc DOC.md +%doc README.md +%{_bindir}/%{name} +%{_datadir}/icons/hicolor/scalable/apps/de.feschber.LanMouse.svg +%{_datadir}/applications/de.feschber.LanMouse.desktop +%dir %{_prefix}/lib/firewalld +%dir %{_prefix}/lib/firewalld/services +%{_prefix}/lib/firewalld/services/lan-mouse.xml + + +%changelog +* Fri Jun 27 2025 ayykamp +- Initial package diff --git a/anda/langs/rust/lan-mouse/update.rhai b/anda/langs/rust/lan-mouse/update.rhai new file mode 100644 index 0000000000..b8b3d3f067 --- /dev/null +++ b/anda/langs/rust/lan-mouse/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("feschber/lan-mouse")); diff --git a/anda/langs/rust/onefetch/anda.hcl b/anda/langs/rust/onefetch/anda.hcl deleted file mode 100644 index bd7888580c..0000000000 --- a/anda/langs/rust/onefetch/anda.hcl +++ /dev/null @@ -1,5 +0,0 @@ -project pkg { - rpm { - spec = "rust-onefetch.spec" - } -} diff --git a/anda/langs/rust/onefetch/onefetch-fix-metadata-auto.diff b/anda/langs/rust/onefetch/onefetch-fix-metadata-auto.diff deleted file mode 100644 index 60b7ecb7a4..0000000000 --- a/anda/langs/rust/onefetch/onefetch-fix-metadata-auto.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- onefetch-2.21.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ onefetch-2.21.0/Cargo.toml 2024-07-23T17:12:11.234589+00:00 -@@ -164,8 +164,3 @@ - [features] - fail-on-deprecated = [] - --[target."cfg(windows)".dependencies.enable-ansi-support] --version = "0.2.1" -- --[target."cfg(windows)".build-dependencies.winres] --version = "0.1" diff --git a/anda/langs/rust/onefetch/rust-onefetch.spec b/anda/langs/rust/onefetch/rust-onefetch.spec deleted file mode 100644 index eb3788fc03..0000000000 --- a/anda/langs/rust/onefetch/rust-onefetch.spec +++ /dev/null @@ -1,103 +0,0 @@ -# Generated by rust2rpm 26 -%bcond_without check - -%global crate onefetch - -Name: rust-onefetch -Version: 2.24.0 -Release: 1%?dist -Summary: Command-line Git information tool - -License: MIT -URL: https://crates.io/crates/onefetch -Source: %{crates_source} -# Automatically generated patch to strip dependencies and normalize metadata -Patch: onefetch-fix-metadata-auto.diff - -BuildRequires: anda-srpm-macros cargo-rpm-macros >= 24 -BuildRequires: cmake mold - -%global _description %{expand: -Command-line Git information tool.} - -%description %{_description} - -%package -n %{crate} -Summary: %{summary} -License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) - -%description -n %{crate} %{_description} - -%files -n %{crate} -%license LICENSE.md -%license resources/license.cache.zstd -%license src/info/license.rs -%license LICENSE.dependencies -%doc CHANGELOG.md -%doc CONTRIBUTING.md -%doc README.md -%{_bindir}/onefetch - -%package devel -Summary: %{summary} -BuildArch: noarch - -%description devel %{_description} - -This package contains library source intended for building other packages which -use the "%{crate}" crate. - -%files devel -%license %{crate_instdir}/LICENSE.md -%license %{crate_instdir}/resources/license.cache.zstd -%license %{crate_instdir}/src/info/license.rs -%doc %{crate_instdir}/CHANGELOG.md -%doc %{crate_instdir}/CONTRIBUTING.md -%doc %{crate_instdir}/README.md -%{crate_instdir}/ - -%package -n %{name}+default-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+default-devel %{_description} - -This package contains library source intended for building other packages which -use the "default" feature of the "%{crate}" crate. - -%files -n %{name}+default-devel -%ghost %{crate_instdir}/Cargo.toml - -%package -n %{name}+fail-on-deprecated-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+fail-on-deprecated-devel %{_description} - -This package contains library source intended for building other packages which -use the "fail-on-deprecated" feature of the "%{crate}" crate. - -%files -n %{name}+fail-on-deprecated-devel -%ghost %{crate_instdir}/Cargo.toml - -%prep -%autosetup -n %{crate}-%{version} -p1 -%cargo_prep_online - -%build -cat< license.sh -%{cargo_license} > LICENSE.dependencies -EOF -sed -i "s/--offline//g" license.sh -bash license.sh - -%install -%cargo_install - -%if %{with check} -%check -%cargo_test -%endif - -%changelog -%autochangelog diff --git a/anda/langs/rust/onefetch/update.rhai b/anda/langs/rust/onefetch/update.rhai deleted file mode 100644 index bb9a2f71ec..0000000000 --- a/anda/langs/rust/onefetch/update.rhai +++ /dev/null @@ -1 +0,0 @@ -rpm.version(crates("onefetch")); diff --git a/anda/langs/rust/rnote/rnote.spec b/anda/langs/rust/rnote/rnote.spec index 0167730e79..4641617a5a 100644 --- a/anda/langs/rust/rnote/rnote.spec +++ b/anda/langs/rust/rnote/rnote.spec @@ -1,15 +1,17 @@ -%global build_rustflags %build_rustflags -C link-arg=-fuse-ld=mold %global rustflags_debuginfo 1 Name: rnote Version: 0.12.0 -Release: 1%?dist -Summary: Sketch and take handwritten notes. +Release: 2%?dist +Summary: Sketch and take handwritten notes License: GPL-3.0 URL: https://github.com/flxzt/rnote +Packager: madonuko Source0: %{url}/archive/refs/tags/v%version.tar.gz -Requires: gtk4 -BuildRequires: cargo meson cmake libappstream-glib gcc-c++ pkgconfig(alsa) alsa-lib clang-devel python desktop-file-utils mold +Recommends: rnote-cli = %evr +BuildRequires: rust-packaging +BuildRequires: cargo meson cmake libappstream-glib gcc-c++ alsa-lib clang-devel python desktop-file-utils mold +BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(glib-2.0) >= 2.66 BuildRequires: pkgconfig(gtk4) >= 4.7 BuildRequires: pkgconfig(libadwaita-1) >= 1.2 @@ -21,12 +23,22 @@ notes and to annotate documents and pictures. Targeted at students, teachers and those who own a drawing tablet, it provides features like PDF and picture import/export, an infinite canvas and an adaptive UI for big and small screens. +%package cli +Summary: The cli version of rnote (`rnote-cli`) +License: GPL-3.0 + +%description cli +This provides the `rnote-cli` binary. For more information, see the `rnote` package. + + %prep %autosetup -n rnote-%{version} - +%cargo_prep_online %build %meson +%cargo_license_summary_online +%{cargo_license_online} > LICENSE.dependencies %meson_build @@ -36,8 +48,7 @@ import/export, an infinite canvas and an adaptive UI for big and small screens. %files %doc README.md -%license LICENSE -%_bindir/rnote-cli +%license LICENSE LICENSE.dependencies %_bindir/rnote %_datadir/thumbnailers/rnote.thumbnailer %_datadir/applications/com.github.flxzt.rnote.desktop @@ -51,10 +62,7 @@ import/export, an infinite canvas and an adaptive UI for big and small screens. %_datadir/rnote/ %_datadir/fonts/rnote-fonts/ - -%changelog -* Wed Nov 2 2022 windowsboy111 - 0.5.7-1 -- Fix requires - -* Sun Oct 23 2022 windowsboy111 - 0.5.7-1 -- Initial package +%files cli +%doc README.md +%license LICENSE LICENSE.dependencies +%_bindir/rnote-cli diff --git a/anda/langs/rust/television/anda.hcl b/anda/langs/rust/television/anda.hcl new file mode 100644 index 0000000000..8201056b96 --- /dev/null +++ b/anda/langs/rust/television/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-television.spec" + } +} diff --git a/anda/langs/rust/television/rust-television.spec b/anda/langs/rust/television/rust-television.spec new file mode 100644 index 0000000000..6a3fe71cf4 --- /dev/null +++ b/anda/langs/rust/television/rust-television.spec @@ -0,0 +1,79 @@ +# Generated by rust2rpm 27 +%bcond check 1 + +%global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ +%global crate television + +Name: rust-television +Version: 0.13.3 +Release: 1%?dist +Summary: Cross-platform, fast and extensible general purpose fuzzy finder TUI + +License: MIT +URL: https://crates.io/crates/television +Source: %{crates_source} +# Automatically generated patch to strip dependencies and normalize metadata +Patch: television-fix-metadata-auto.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +Cross-platform, fast and extensible general purpose fuzzy finder TUI.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 AND ISC) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CDLA-Permissive-2.0 AND ISC AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND Zlib +# LICENSE.dependencies contains a full license breakdown + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%license LICENSE.dependencies +%doc CHANGELOG.md +%doc CODE_OF_CONDUCT.md +%doc CONTRIBUTING.md +%doc README.md +%{_bindir}/tv + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/CODE_OF_CONDUCT.md +%doc %{crate_instdir}/CONTRIBUTING.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install diff --git a/anda/langs/rust/television/television-fix-metadata-auto.diff b/anda/langs/rust/television/television-fix-metadata-auto.diff new file mode 100644 index 0000000000..e330561bec --- /dev/null +++ b/anda/langs/rust/television/television-fix-metadata-auto.diff @@ -0,0 +1,27 @@ +--- television-0.13.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ television-0.13.2/Cargo.toml 2025-08-12T10:41:15.727396+00:00 +@@ -227,19 +227,6 @@ + version = "0.28" + features = ["serde"] + +-[target.'cfg(target_os = "macos")'.dependencies.crossterm] +-version = "0.28.1" +-features = [ +- "serde", +- "use-dev-tty", +-] +- +-[target."cfg(windows)".dependencies.clipboard-win] +-version = "5.4.0" +- +-[target."cfg(windows)".dependencies.winapi-util] +-version = "0.1.9" +- + [lints.clippy] + cast_precision_loss = "allow" + float_cmp = "allow" +@@ -277,3 +264,4 @@ + lto = false + debug = 2 + inherits = "dev" ++ diff --git a/anda/langs/rust/television/update.rhai b/anda/langs/rust/television/update.rhai new file mode 100644 index 0000000000..fc8ddc11f9 --- /dev/null +++ b/anda/langs/rust/television/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("television")); diff --git a/anda/langs/rust/typst/rust-typst.spec b/anda/langs/rust/typst/rust-typst.spec index d6b435d967..d8633cc5e6 100644 --- a/anda/langs/rust/typst/rust-typst.spec +++ b/anda/langs/rust/typst/rust-typst.spec @@ -5,7 +5,7 @@ Name: rust-typst Version: 0.13.1 -Release: %autorelease +Release: 2%?dist Summary: New markup-based typesetting system that is powerful and easy to learn License: Apache-2.0 @@ -43,42 +43,7 @@ Provides: %crate-cli = %version-%release %_mandir/man1/typst.1.gz -%package bash-completion -Summary: Bash completion for %{crate} -Requires: %{crate} = %{version}-%{release} -Requires: bash-completion -Supplements: (%{crate} and bash-completion) - -%description bash-completion -Bash command line completion support for %{crate}. - -%package fish-completion -Summary: Fish completion for %{crate} -Requires: %{crate} = %{version}-%{release} -Requires: fish -Supplements: (%{crate} and fish) - -%description fish-completion -Fish command line completion support for %{crate}. - -%package zsh-completion -Summary: Zsh completion for %{crate} -Requires: %{crate} = %{version}-%{release} -Requires: zsh -Supplements: (%{crate} and zsh) - -%description zsh-completion -Zsh command line completion support for %{crate}. - - -%files bash-completion -%{bash_completions_dir}/%{crate} - -%files fish-completion -%{fish_completions_dir}/%{crate}.fish - -%files zsh-completion -%{zsh_completions_dir}/_%{crate} +%pkg_completion -Bfzn %crate %prep diff --git a/anda/langs/rust/usage/rust-usage-cli.spec b/anda/langs/rust/usage/rust-usage-cli.spec index e9bfe17d65..676da76bb1 100644 --- a/anda/langs/rust/usage/rust-usage-cli.spec +++ b/anda/langs/rust/usage/rust-usage-cli.spec @@ -4,8 +4,8 @@ %global crate usage-cli Name: rust-usage-cli -Version: 2.1.1 -Release: %autorelease +Version: 2.2.2 +Release: 1%?dist Summary: CLI for working with usage-based CLIs License: MIT diff --git a/anda/langs/rust/wild/anda.hcl b/anda/langs/rust/wild/anda.hcl new file mode 100644 index 0000000000..45e6b694f5 --- /dev/null +++ b/anda/langs/rust/wild/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-wild-linker.spec" + } +} diff --git a/anda/langs/rust/wild/rust-wild-linker.spec b/anda/langs/rust/wild/rust-wild-linker.spec new file mode 100644 index 0000000000..049c86f0d1 --- /dev/null +++ b/anda/langs/rust/wild/rust-wild-linker.spec @@ -0,0 +1,54 @@ +# Generated by rust2rpm 27 +%bcond check 0 + +%global crate wild-linker + +Name: rust-wild-linker +Version: 0.5.0 +Release: 1%?dist +Summary: Very fast linker for Linux + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/wild-linker +Source: %{crates_source} +Source1: https://github.com/davidlattimore/wild/archive/refs/tags/%version.tar.gz + +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: gcc-c++ + +%global _description %{expand: +A very fast linker for Linux.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR NCSA) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) +# LICENSE.dependencies contains a full license breakdown +Provides: wild = %evr + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE-APACHE LICENSE-MIT +%license LICENSE.dependencies +%doc README.md +%{_bindir}/wild + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online +tar xf %{S:1} +cp wild-%version/LICENSE-* . + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif diff --git a/anda/langs/rust/wild/update.rhai b/anda/langs/rust/wild/update.rhai new file mode 100644 index 0000000000..ea2dd2af4d --- /dev/null +++ b/anda/langs/rust/wild/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("wild-linker")); diff --git a/anda/langs/rust/xplr/rust-xplr.spec b/anda/langs/rust/xplr/rust-xplr.spec index f2c9d23fa9..bd5aa919a0 100644 --- a/anda/langs/rust/xplr/rust-xplr.spec +++ b/anda/langs/rust/xplr/rust-xplr.spec @@ -4,7 +4,7 @@ %global crate xplr Name: rust-xplr -Version: 1.0.0 +Version: 1.0.1 Release: 1%?dist Summary: Hackable, minimal, fast TUI file explorer diff --git a/anda/langs/rust/xwayland-satellite/xwayland-satellite.spec b/anda/langs/rust/xwayland-satellite/xwayland-satellite.spec index 0886763050..69dfaf030e 100644 --- a/anda/langs/rust/xwayland-satellite/xwayland-satellite.spec +++ b/anda/langs/rust/xwayland-satellite/xwayland-satellite.spec @@ -1,5 +1,5 @@ Name: xwayland-satellite -Version: 0.5.1 +Version: 0.7 Release: 1%?dist Summary: Xwayland outside your Wayland. License: MPL-2.0 diff --git a/anda/langs/rust/youki/youki.spec b/anda/langs/rust/youki/youki.spec index ab3dc5ec9b..75cb7b5f4b 100644 --- a/anda/langs/rust/youki/youki.spec +++ b/anda/langs/rust/youki/youki.spec @@ -1,5 +1,5 @@ Name: youki -Version: 0.5.3 +Version: 0.5.5 Release: 1%?dist Summary: A container runtime written in Rust diff --git a/anda/langs/rust/zellij/rust-zellij.spec b/anda/langs/rust/zellij/rust-zellij.spec index 7f607f892c..a5d0da32c4 100644 --- a/anda/langs/rust/zellij/rust-zellij.spec +++ b/anda/langs/rust/zellij/rust-zellij.spec @@ -5,7 +5,7 @@ %global crate zellij Name: rust-zellij -Version: 0.42.2 +Version: 0.43.1 Release: 1%?dist Summary: Terminal workspace with batteries included diff --git a/anda/langs/vala/vala-language-server-nightly/vala-language-server-nightly.spec b/anda/langs/vala/vala-language-server-nightly/vala-language-server-nightly.spec index e2ad4311e8..df48184a9f 100644 --- a/anda/langs/vala/vala-language-server-nightly/vala-language-server-nightly.spec +++ b/anda/langs/vala/vala-language-server-nightly/vala-language-server-nightly.spec @@ -1,9 +1,9 @@ %global real_name vala-language-server -%global commit 31cb5116a4a138365feb709ebb7b8670db604991 +%global commit a5d24a8cf7b61d0d2082234034905f0f8ed96726 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20240605 +%global commit_date 20250606 %global snapshot_info %{commit_date}.%{shortcommit} %global verrel 0.48.7 diff --git a/anda/langs/vala/vala-lint-nightly/vala-lint-nightly.spec b/anda/langs/vala/vala-lint-nightly/vala-lint-nightly.spec index d28f4ed86f..c1d4c11cd7 100644 --- a/anda/langs/vala/vala-lint-nightly/vala-lint-nightly.spec +++ b/anda/langs/vala/vala-lint-nightly/vala-lint-nightly.spec @@ -1,9 +1,9 @@ %global real_name vala-lint -%global commit 4ed1443c35a8a84445fb59292d539358365d8263 +%global commit a1d1a7bc0f740920e592fd788a836c402fd9825c %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20240829 +%global commit_date 20250804 %global snapshot_info %{commit_date}.%{shortcommit} Name: vala-lint-nightly diff --git a/anda/langs/vala/vala-nightly/vala-nightly.spec b/anda/langs/vala/vala-nightly/vala-nightly.spec index 85a69cedec..4ecdd2b05e 100644 --- a/anda/langs/vala/vala-nightly/vala-nightly.spec +++ b/anda/langs/vala/vala-nightly/vala-nightly.spec @@ -3,11 +3,11 @@ %global priority 90 %global real_name vala -%global commit 6054231d4e756a8184bf7cbd11125b1d9b608582 +%global commit ba1b29121791c2a2235f33cf87a11563ac7da945 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global repo https://gitlab.gnome.org/GNOME/%{real_name}.git -%global commit_date 20250512 +%global commit_date 20250806 %global snapshot_info %{commit_date}.%{shortcommit} Name: vala-nightly diff --git a/anda/langs/vala/vala-panel-appmenu/vala-panel-appmenu.spec b/anda/langs/vala/vala-panel-appmenu/vala-panel-appmenu.spec index fe4751fae3..2c668bb758 100644 --- a/anda/langs/vala/vala-panel-appmenu/vala-panel-appmenu.spec +++ b/anda/langs/vala/vala-panel-appmenu/vala-panel-appmenu.spec @@ -1,5 +1,5 @@ %global forgeurl https://gitlab.com/vala-panel-project/vala-panel-appmenu -%global commit f05d28d805a22a7564895aa178772361c44b6b7a +%global commit 6665f7708ef15baa5538f5582b81ceb75a104a24 %forgemeta Name: vala-panel-appmenu diff --git a/anda/langs/zig/bootstrap/0001-increase-upper-bounds-of-main-zig-executable-to-10G.patch b/anda/langs/zig/bootstrap/0001-increase-upper-bounds-of-main-zig-executable-to-10G.patch deleted file mode 100644 index f2e22e1bf0..0000000000 --- a/anda/langs/zig/bootstrap/0001-increase-upper-bounds-of-main-zig-executable-to-10G.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build.zig 2025-05-21 00:23:29.485933582 -0500 -+++ b/build.zig 2025-05-21 00:25:06.001631897 -0500 -@@ -690,7 +690,7 @@ - fn addCompilerStep(b: *std.Build, options: AddCompilerModOptions) *std.Build.Step.Compile { - const exe = b.addExecutable(.{ - .name = "zig", -- .max_rss = 7_800_000_000, -+ .max_rss = 10_000_000_000, - .root_module = addCompilerMod(b, options), - }); - exe.stack_size = stack_size; diff --git a/anda/langs/zig/bootstrap/0002-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch b/anda/langs/zig/bootstrap/0002-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch deleted file mode 100644 index 21438943cc..0000000000 --- a/anda/langs/zig/bootstrap/0002-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/build.zig 2025-04-25 05:56:25.033100994 -0500 -+++ b/build.zig 2025-04-25 05:57:16.965173352 -0500 -@@ -1392,7 +1392,14 @@ - // in a temporary directory - "--cache-root", b.cache_root.path orelse ".", - }); -- cmd.addArgs(&.{ "--zig-lib-dir", b.fmt("{}", .{b.graph.zig_lib_directory}) }); -+ if (b.graph.zig_lib_directory.path) |zig_lib_dir| { -+ cmd.addArgs(&.{"--zig-lib-dir"}); -+ if (fs.path.isAbsolute(zig_lib_dir)) { -+ cmd.addArgs(&.{zig_lib_dir}); -+ } else { -+ cmd.addDirectoryArg(b.path(zig_lib_dir)); -+ } -+ } - cmd.addArgs(&.{"-i"}); - cmd.addFileArg(b.path(b.fmt("doc/langref/{s}", .{entry.name}))); - diff --git a/anda/langs/zig/bootstrap/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch b/anda/langs/zig/bootstrap/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch new file mode 100644 index 0000000000..d4dd5bb4eb --- /dev/null +++ b/anda/langs/zig/bootstrap/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch @@ -0,0 +1,43 @@ +From 1796a91063dc5ed71418f164bb7d98ca65c33d4a Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Mon, 16 Jun 2025 20:46:25 +0200 +Subject: [PATCH] link.Elf: add root directory of libraries to linker path + +All the given dynamic shared objects will be linked with an absolute +path however they may link to other dynamic shared objects which won't +have an absolute path, for this we need to add the library path so that +lld can resolve it. + +Signed-off-by: Jan200101 +--- + src/link/Lld.zig | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/link/Lld.zig b/src/link/Lld.zig +index 4ea809428e..b8421dd60a 100644 +--- a/src/link/Lld.zig ++++ b/src/link/Lld.zig +@@ -1109,9 +1109,19 @@ fn elfLink(lld: *Lld, arena: Allocator) !void { + // Positional arguments to the linker such as object files. + var whole_archive = false; + ++ var lib_directories = std.StringArrayHashMap(void).init(gpa); ++ defer lib_directories.deinit(); ++ + for (base.comp.link_inputs) |link_input| switch (link_input) { + .res => unreachable, // Windows-only +- .dso => continue, ++ .dso => |dso| { ++ if (dso.path.root_dir.path) |root_dir| { ++ const lib_dir = try lib_directories.getOrPut(root_dir); ++ if (lib_dir.found_existing) continue; ++ try argv.append("-L"); ++ try argv.append(root_dir); ++ } ++ }, + .object, .archive => |obj| { + if (obj.must_link and !whole_archive) { + try argv.append("-whole-archive"); +-- +2.49.0 + diff --git a/anda/langs/zig/bootstrap/zig-master-bootstrap.spec b/anda/langs/zig/bootstrap/zig-master-bootstrap.spec index 10df165cbb..b32891c43c 100644 --- a/anda/langs/zig/bootstrap/zig-master-bootstrap.spec +++ b/anda/langs/zig/bootstrap/zig-master-bootstrap.spec @@ -7,7 +7,7 @@ %define llvm_compat 20 %endif %global llvm_version 20.0.0 -%global ver 0.15.0-dev.646+ef35c3d5f +%global ver 0.16.0-dev.70+73a0b5441 %bcond bootstrap 1 %bcond docs %{without bootstrap} %bcond test 1 @@ -36,6 +36,8 @@ %global zig_install_options %zig_build_options %{shrink: \ --prefix "%{_prefix}" \ } +%global zig_mirrors ("https://pkg.machengine.org/zig" "https://zigmirror.hryx.net/zig" "https://zig.linus.dev/zig" "https://zig.squirl.dev" "https://zig.florent.dev") +%global mirror_url %(mirrors=%{zig_mirrors}; index=$(( RANDOM % ${#mirrors[@]} )); echo ${mirrors[$index]}) Name: zig-master-bootstrap Version: %(echo %{ver} | sed 's/-/~/g') @@ -43,11 +45,10 @@ Release: 1%?dist Summary: Boostrap builds for Zig. License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND Inner-Net-2.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND GFDL-1.1-or-later AND ZPL-2.1 URL: https://ziglang.org -Source0: %{url}/builds/zig-%{ver}.tar.xz -Source1: %{url}/builds/zig-%{ver}.tar.xz.minisig +Source0: %{mirror_url}/zig-%{ver}.tar.xz +Source1: %{mirror_url}/zig-%{ver}.tar.xz.minisig Patch0: 0000-remove-native-lib-directories-from-rpath.patch -Patch1: 0001-increase-upper-bounds-of-main-zig-executable-to-10G.patch -Patch2: 0002-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch +Patch3: 0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ @@ -61,14 +62,12 @@ BuildRequires: help2man # for signature verification BuildRequires: minisign %if %{without bootstrap} -BuildRequires: %{name} <= %{version} +BuildRequires: %{name} = %{version} %endif %if %{with test} BuildRequires: elfutils-libelf-devel BuildRequires: libstdc++-static %endif -# Zig invokes the C compiler to figure out system info -Requires: gcc Requires: %{name}-libs = %{version} # Apache-2.0 WITH LLVM-exception OR NCSA OR MIT Provides: bundled(compiler-rt) = %{llvm_version} diff --git a/anda/langs/zig/master/0001-increase-upper-bounds-of-main-zig-executable-to-10G.patch b/anda/langs/zig/master/0001-increase-upper-bounds-of-main-zig-executable-to-10G.patch deleted file mode 100644 index f2e22e1bf0..0000000000 --- a/anda/langs/zig/master/0001-increase-upper-bounds-of-main-zig-executable-to-10G.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/build.zig 2025-05-21 00:23:29.485933582 -0500 -+++ b/build.zig 2025-05-21 00:25:06.001631897 -0500 -@@ -690,7 +690,7 @@ - fn addCompilerStep(b: *std.Build, options: AddCompilerModOptions) *std.Build.Step.Compile { - const exe = b.addExecutable(.{ - .name = "zig", -- .max_rss = 7_800_000_000, -+ .max_rss = 10_000_000_000, - .root_module = addCompilerMod(b, options), - }); - exe.stack_size = stack_size; diff --git a/anda/langs/zig/master/0002-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch b/anda/langs/zig/master/0002-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch deleted file mode 100644 index 21438943cc..0000000000 --- a/anda/langs/zig/master/0002-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/build.zig 2025-04-25 05:56:25.033100994 -0500 -+++ b/build.zig 2025-04-25 05:57:16.965173352 -0500 -@@ -1392,7 +1392,14 @@ - // in a temporary directory - "--cache-root", b.cache_root.path orelse ".", - }); -- cmd.addArgs(&.{ "--zig-lib-dir", b.fmt("{}", .{b.graph.zig_lib_directory}) }); -+ if (b.graph.zig_lib_directory.path) |zig_lib_dir| { -+ cmd.addArgs(&.{"--zig-lib-dir"}); -+ if (fs.path.isAbsolute(zig_lib_dir)) { -+ cmd.addArgs(&.{zig_lib_dir}); -+ } else { -+ cmd.addDirectoryArg(b.path(zig_lib_dir)); -+ } -+ } - cmd.addArgs(&.{"-i"}); - cmd.addFileArg(b.path(b.fmt("doc/langref/{s}", .{entry.name}))); - diff --git a/anda/langs/zig/master/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch b/anda/langs/zig/master/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch new file mode 100644 index 0000000000..d4dd5bb4eb --- /dev/null +++ b/anda/langs/zig/master/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch @@ -0,0 +1,43 @@ +From 1796a91063dc5ed71418f164bb7d98ca65c33d4a Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Mon, 16 Jun 2025 20:46:25 +0200 +Subject: [PATCH] link.Elf: add root directory of libraries to linker path + +All the given dynamic shared objects will be linked with an absolute +path however they may link to other dynamic shared objects which won't +have an absolute path, for this we need to add the library path so that +lld can resolve it. + +Signed-off-by: Jan200101 +--- + src/link/Lld.zig | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/link/Lld.zig b/src/link/Lld.zig +index 4ea809428e..b8421dd60a 100644 +--- a/src/link/Lld.zig ++++ b/src/link/Lld.zig +@@ -1109,9 +1109,19 @@ fn elfLink(lld: *Lld, arena: Allocator) !void { + // Positional arguments to the linker such as object files. + var whole_archive = false; + ++ var lib_directories = std.StringArrayHashMap(void).init(gpa); ++ defer lib_directories.deinit(); ++ + for (base.comp.link_inputs) |link_input| switch (link_input) { + .res => unreachable, // Windows-only +- .dso => continue, ++ .dso => |dso| { ++ if (dso.path.root_dir.path) |root_dir| { ++ const lib_dir = try lib_directories.getOrPut(root_dir); ++ if (lib_dir.found_existing) continue; ++ try argv.append("-L"); ++ try argv.append(root_dir); ++ } ++ }, + .object, .archive => |obj| { + if (obj.must_link and !whole_archive) { + try argv.append("-whole-archive"); +-- +2.49.0 + diff --git a/anda/langs/zig/master/zig-master.spec b/anda/langs/zig/master/zig-master.spec index fbe5cf0d27..032e77ce59 100644 --- a/anda/langs/zig/master/zig-master.spec +++ b/anda/langs/zig/master/zig-master.spec @@ -11,18 +11,19 @@ %bcond docs %{without bootstrap} %bcond test 1 %global zig_cache_dir %{builddir}/zig-cache +%global zig_mirrors ("https://pkg.machengine.org/zig" "https://zigmirror.hryx.net/zig" "https://zig.linus.dev/zig" "https://zig.squirl.dev" "https://zig.florent.dev") +%global mirror_url %(mirrors=%{zig_mirrors}; index=$(( RANDOM % ${#mirrors[@]} )); echo ${mirrors[$index]}) Name: zig-master -Version: 0.15.0~dev.646+ef35c3d5f +Version: 0.16.0~dev.70+73a0b5441 Release: 1%?dist Summary: Master builds of the Zig language License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND Inner-Net-2.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND GFDL-1.1-or-later AND ZPL-2.1 URL: https://ziglang.org -Source0: %{url}/builds/zig-%{version_no_tilde}.tar.xz -Source1: %{url}/builds/zig-%{version_no_tilde}.tar.xz.minisig +Source0: %{mirror_url}/zig-%{version_no_tilde}.tar.xz +Source1: %{mirror_url}/zig-%{version_no_tilde}.tar.xz.minisig Patch0: 0000-remove-native-lib-directories-from-rpath.patch -Patch1: 0001-increase-upper-bounds-of-main-zig-executable-to-10G.patch -Patch2: 0002-build-pass-zig-lib-dir-as-directory-instead-of-as-st.patch +Patch3: 0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ @@ -44,8 +45,6 @@ BuildRequires: libstdc++-static %endif # For the version_no_tilde macro BuildRequires: rust-srpm-macros -# Zig invokes the C compiler to figure out system info -Requires: gcc Requires: %{name}-libs = %{version} # Apache-2.0 WITH LLVM-exception OR NCSA OR MIT Provides: bundled(compiler-rt) = %{llvm_version} diff --git a/anda/lib/apparmor/apparmor.spec b/anda/lib/apparmor/apparmor.spec index 50286362a1..f913501fc6 100644 --- a/anda/lib/apparmor/apparmor.spec +++ b/anda/lib/apparmor/apparmor.spec @@ -6,7 +6,7 @@ %bcond_with tests Name: apparmor -Version: 4.1.0 +Version: 5.0.0~alpha1 Release: 1%?dist Summary: AppArmor userspace components diff --git a/anda/lib/astal/ags/ags.spec b/anda/lib/astal/ags/ags.spec index 33dd2d9e69..83a419872a 100644 --- a/anda/lib/astal/ags/ags.spec +++ b/anda/lib/astal/ags/ags.spec @@ -1,4 +1,4 @@ -# Generated by go2rpm 1.15.0 +# Generated by go2rpm 1.17.1 %bcond check 0 %bcond bootstrap 0 @@ -23,46 +23,30 @@ Scaffolding CLI for Astal+TypeScript.} %global godocs docs README.md Name: ags -Release: %autorelease +Release: 2%?dist Summary: Scaffolding CLI for Astal+TypeScript License: GPL-3.0-only URL: %{gourl} Source: %{gosource} -Provides: golang-github-aylur-ags = %version-%release +Provides: golang-github-aylur-ags = %evr Packager: madonuko -BuildRequires: anda-srpm-macros %description %{common_description} %gopkg %prep -%goprep # -A -#autopatch -p1 -%go_prep_online +%goprep -A +%autopatch -p1 %build -%dnl for cmd in cmd/* ; do -%dnl go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ -%dnl -ldflags "-X main.version=%{version} \ -%dnl -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ -%dnl -compressdwarf=false -linkmode=external \ -%dnl -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ -%dnl -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ -%dnl -Wl,--build-id=sha1'" \ -%dnl -o %{gobuilddir}/bin/$(basename $cmd) $cmd -%dnl done -go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ - -ldflags "-X main.version=%{version} \ - -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ - -compressdwarf=false -linkmode=external \ - -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ - -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ - -Wl,--build-id=sha1'" \ - -o %{gobuilddir}/bin/ags . +%define currentgoldflags -X main.version=%version +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/ags . %install +%gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ @@ -80,5 +64,7 @@ install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %{_bindir}/ags %endif +%gopkgfiles + %changelog %autochangelog diff --git a/anda/lib/astal/astal-gtk/astal-gtk.spec b/anda/lib/astal/astal-gtk/astal-gtk.spec index eeb29e1952..76d9f3f4d0 100644 --- a/anda/lib/astal/astal-gtk/astal-gtk.spec +++ b/anda/lib/astal/astal-gtk/astal-gtk.spec @@ -1,5 +1,6 @@ -%global commit 4820a3e -%global commit_date 20250513 +%global commit 20bd8318e4136fbd3d4eb2d64dbabc3acbc915dd +%global shortcommit 20bd831 +%global commit_date 20250830 Name: astal Version: 0^%commit_date.%commit diff --git a/anda/lib/astal/astal-gtk/update.rhai b/anda/lib/astal/astal-gtk/update.rhai index add3305056..2a83ebdd48 100644 --- a/anda/lib/astal/astal-gtk/update.rhai +++ b/anda/lib/astal/astal-gtk/update.rhai @@ -1,8 +1,12 @@ import "andax/bump_extras.rhai" as bump; +import "andax/spec.rhai" as spec; let mg = bump::madoguchi_json("astal", labels.branch); rpm.global("commit_date", `0\^(\d+)\.([[:xdigit:]]+)`.find(mg.ver, 1)); -rpm.global("commit", `0\^(\d+)\.([[:xdigit:]]+)`.find(mg.ver, 2)); +rpm.global("shortcommit", `0\^(\d+)\.([[:xdigit:]]+)`.find(mg.ver, 2)); if rpm.changed() { rpm.release(`^(\d+)\.`.find(mg.rel, 1)); + rpm.global("commit", spec::get_global(#{ + f: open_file("anda/lib/astal/astal/astal.spec").read_string() + }, "commit")); } diff --git a/anda/lib/astal/astal/astal.spec b/anda/lib/astal/astal/astal.spec index 92f1e7d74a..05e9937caf 100644 --- a/anda/lib/astal/astal/astal.spec +++ b/anda/lib/astal/astal/astal.spec @@ -1,7 +1,7 @@ -%global commit 4820a3e37cc8eb81db6ed991528fb23472a8e4de +%global commit 20bd8318e4136fbd3d4eb2d64dbabc3acbc915dd %global shortcommit %{sub %commit 1 7} -%global commit_date 20250513 +%global commit_date 20250830 Name: astal Version: 0^%commit_date.%shortcommit diff --git a/anda/lib/cmake-extras/cmake-extras.spec b/anda/lib/cmake-extras/cmake-extras.spec index ea2682442e..ac7a1a9375 100644 --- a/anda/lib/cmake-extras/cmake-extras.spec +++ b/anda/lib/cmake-extras/cmake-extras.spec @@ -3,7 +3,7 @@ %forgemeta Name: cmake-extras -Version: 1.8 +Version: 1.9 Release: 1%?dist Summary: A collection of add-ons for the CMake build tool License: GPL-3.0 diff --git a/anda/lib/directxshadercompiler/DirectXShaderCompiler.spec b/anda/lib/directxshadercompiler/DirectXShaderCompiler.spec new file mode 100644 index 0000000000..98a8837bc1 --- /dev/null +++ b/anda/lib/directxshadercompiler/DirectXShaderCompiler.spec @@ -0,0 +1,152 @@ +# Disable in-source build. +%undefine __cmake_in_source_build + +# Metadata. +Name: DirectXShaderCompiler +Version: 1.8.2505.1 +Release: 5%?dist +Summary: A Direct X Shader compiler. +License: MIT +Packager: libffi + +# Project URL. +URL: https://github.com/microsoft/DirectXShaderCompiler + +# Build dependencies - tooling. +BuildRequires: gcc-c++ +BuildRequires: cmake >= 3.17.2 +BuildRequires: python3 +BuildRequires: git + +Provides: dxc = %{version}-%{release} +Requires: %{name}-libs + +# Sub-packages. + +%package devel +Summary: Development files for %{name}. +Requires: %{name}-libs +Requires: %{name}-static + +%package libs +Summary: Runtime shared libraries for %{name}. + +%package static +Summary: Static libraries for %{name}. + +# Descriptions. + +%description +The DirectX Shader Compiler project includes a compiler and related tools used +to compile High-Level Shader Language (HLSL) programs into DirectX Intermediate +Language (DXIL) representation. Applications that make use of DirectX for +graphics, games, and computation can use it to generate shader programs. + +%description devel +This package contains library and header files needed to develop new native +programs that use %{name}. + +%description libs +This package contains runtime shared libraries needed to link with native +programs that use %{name}. + +Provided files include: +* libdxcompiler.so, a .so providing a componentized compiler, assembler, +disassembler, and validator. +* and some other ones! + +%description static +Static libraries / binaries to link with applications at compile-time +for %{name}. + +# Prepare. + +%prep +%git_clone %{url} v%{version} + +# Build. +# Attribution: https://github.com/gentoo/guru/blob/master/dev-util/DirectXShaderCompiler/DirectXShaderCompiler-1.8.2407.ebuild +# Attribution: https://github.com/negativo17/DirectXShaderCompiler/blob/master/DirectXShaderCompiler.spec +%build +%cmake \ + -C ./cmake/caches/PredefinedParams.cmake \ + -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ + -DSPIRV_BUILD_TESTS=OFF \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_BUILD_TYPE=Fedora + +%cmake_build + +# Install. +# Attribution: https://github.com/negativo17/DirectXShaderCompiler/blob/master/DirectXShaderCompiler.spec +%install +mkdir %{buildroot}%{_bindir} -p +# Binaries. +install -m755 %{_vpath_builddir}/bin/dx{a,c,l,opt,r,v} \ + %{buildroot}%{_bindir}/ + +# Static libraries. +mkdir -p %{buildroot}%{_libdir} +for STATIC in libdxclib libdxcvalidator; do +install -m644 %{_vpath_builddir}/lib/$STATIC.a \ + %{buildroot}%{_libdir}/; done + +# Shared libraries. +install -m755 %{_vpath_builddir}/lib/*.so \ + %{buildroot}%{_libdir}/ + +# Headers. +mkdir -p %{buildroot}%{_includedir}/dxc +install -m644 include/dxc/*.h \ + %{buildroot}%{_includedir}/dxc/ + +# Test. +%check +%ctest + +# Files. +%files +%license LICENSE.TXT +%doc CONTRIBUTING.md README.md SECURITY.md ThirdPartyNotices.txt +%{_bindir}/dxa +%{_bindir}/dxc +%{_bindir}/dxl +%{_bindir}/dxopt +%{_bindir}/dxr +%{_bindir}/dxv + +%files libs +%{_libdir}/libdxcompiler.so +%{_libdir}/libdxil.so +%{_libdir}/libdxildll.so + +%files static +%{_libdir}/*.a + +%files devel +%{_includedir}/dxc/*.h + +# Changelog. +%changelog +* Sun Jul 20 2025 libffi - 1.8.2505.1-5 +- Removed support for building with external libraries. +- Internal changes to the build process. + +* Fri Jul 18 2025 libffi - 1.8.2505.1-4 +- Remove the `tools` and `cmake-utils` subpackages. +- Make the package provide the `dxc` package. +- Add license and some docs. +- Internal package changes. +- Bump upstream. + +* Mon May 5 2025 libffi - 1.8.2502-3 +- Provide unsupported build conditional for building with(out) + external libraries. + +* Sun May 4 2025 libffi - 1.8.2502-2 +- Refactor. +- Use subpackages. + +* Wed Apr 30 2025 libffi - 1.8.2502-1 +- Initial build. diff --git a/anda/lib/directxshadercompiler/anda.hcl b/anda/lib/directxshadercompiler/anda.hcl new file mode 100644 index 0000000000..75129ebe52 --- /dev/null +++ b/anda/lib/directxshadercompiler/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "DirectXShaderCompiler.spec" + } +} diff --git a/anda/lib/directxshadercompiler/update.rhai b/anda/lib/directxshadercompiler/update.rhai new file mode 100644 index 0000000000..ab0688829d --- /dev/null +++ b/anda/lib/directxshadercompiler/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("microsoft/DirectXShaderCompiler")); diff --git a/anda/lib/dwarfs/dwarfs.spec b/anda/lib/dwarfs/dwarfs.spec index 13c01aeaf1..3510673a1d 100644 --- a/anda/lib/dwarfs/dwarfs.spec +++ b/anda/lib/dwarfs/dwarfs.spec @@ -4,7 +4,7 @@ The Deduplicating Warp-speed Advanced Read-only File System. A fast high compression read-only file system for Linux and Windows.} Name: dwarfs -Version: 0.12.4 +Version: 0.13.0 Release: 1%?dist Summary: A fast high compression read-only file system for Linux, Windows and macOS License: GPL-3.0-or-later diff --git a/anda/lib/ipu6-camera-bins/ipu6-camera-bins.spec b/anda/lib/ipu6-camera-bins/ipu6-camera-bins.spec index d166633d46..1ae3f79089 100644 --- a/anda/lib/ipu6-camera-bins/ipu6-camera-bins.spec +++ b/anda/lib/ipu6-camera-bins/ipu6-camera-bins.spec @@ -1,6 +1,6 @@ %global debug_package %{nil} -%global commit eff4a63c32b3ce4ac86d521d924b9973bbec8b99 -%global commit_date 20250521 +%global commit 30e87664829782811a765b0ca9eea3a878a7ff29 +%global commit_date 20250627 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global ver 1.0.0 diff --git a/anda/lib/libhelium/libhelium.spec b/anda/lib/libhelium/libhelium.spec index c4b4cdda18..6048fbdbf1 100644 --- a/anda/lib/libhelium/libhelium.spec +++ b/anda/lib/libhelium/libhelium.spec @@ -1,4 +1,4 @@ -%global ver 1.8.29 +%global ver 1.8.54 %global sanitized_ver %(echo %{ver} | sed -E 's/-/~/g') Summary: The Application Framework for tauOS apps Name: libhelium diff --git a/anda/lib/lovely-injector/lovely-injector.spec b/anda/lib/lovely-injector/lovely-injector.spec index a5e3e6761e..a8a8a05a51 100644 --- a/anda/lib/lovely-injector/lovely-injector.spec +++ b/anda/lib/lovely-injector/lovely-injector.spec @@ -1,5 +1,5 @@ # Generated by rust2rpm 27 -%bcond check 1 +%bcond check 0 %bcond rust_nightly 1 %global debug_package %{nil} %if %{with rust_nightly} @@ -8,11 +8,8 @@ %define __rustdoc $HOME/.cargo/bin/rustdoc %endif -# todo: update for 0.8 because dobby-sys is now a submodule -# I'm going to git clone the repo to prepare for 0.8 - Name: lovely-injector -Version: 0.7.1 +Version: 0.8.0 Release: 1%?dist Summary: A runtime lua injector for games built with LÖVE @@ -21,6 +18,8 @@ License: MIT URL: https://github.com/ethangreen-dev/lovely-injector Requires: love +BuildRequires: cmake +BuildRequires: gcc-c++ Packager: Cappy Ishihara BuildRequires: mold anda-srpm-macros cargo-rpm-macros >= 24 @@ -67,7 +66,7 @@ popd %license LICENSE.md # Only include dobby-sys license for versions >= 0.8 # Manually uncomment the next line when updating to 0.8 or later -# %license crates/dobby-sys/LICENSE +%license crates/dobby-sys/LICENSE %license LICENSE.dependencies %{_libdir}/liblovely.so %doc README.md diff --git a/anda/lib/lovely-injector/update.rhai b/anda/lib/lovely-injector/update.rhai index 67a429e59d..c5ffa15a57 100644 --- a/anda/lib/lovely-injector/update.rhai +++ b/anda/lib/lovely-injector/update.rhai @@ -1 +1 @@ -rpm.global("ver",gh("ethangreen-dev/lovely-injector")); +rpm.version(gh("ethangreen-dev/lovely-injector")); diff --git a/anda/lib/lsp-dsp/liblsp-dsp.spec b/anda/lib/lsp-dsp/liblsp-dsp.spec index e5010714ea..488e144b11 100644 --- a/anda/lib/lsp-dsp/liblsp-dsp.spec +++ b/anda/lib/lsp-dsp/liblsp-dsp.spec @@ -3,7 +3,7 @@ #define _empty_manifest_terminate_build 0 Name: liblsp-dsp -Version: 1.0.30 +Version: 1.0.31 Release: 1%?dist Summary: DSP library for signal processing License: LGPL-3.0 diff --git a/anda/lib/mesa/0001-Revert-kopper-Explicitly-choose-zink.patch b/anda/lib/mesa/0001-Revert-kopper-Explicitly-choose-zink.patch deleted file mode 100644 index d595c30c5f..0000000000 --- a/anda/lib/mesa/0001-Revert-kopper-Explicitly-choose-zink.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 24f85c06c28736b73c14208a0ffa6657d2aee9cd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= -Date: Mon, 21 Apr 2025 13:52:14 +0200 -Subject: [PATCH] Revert "kopper: Explicitly choose zink" - -On QEMU (virtio driver), without 3D acceleration enabled and without -mesa-vulkan-drivers installed, this commit prevents Mutter to start. - -This reverts commit c0bc957c5d8c7edd57626284b712dd6ea1e375fc. - -Related: https://bugzilla.redhat.com/show_bug.cgi?id=2360851 -Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13009 ---- - src/gallium/frontends/dri/kopper.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c -index a1d7dcb79b4..3bdb56022a9 100644 ---- a/src/gallium/frontends/dri/kopper.c -+++ b/src/gallium/frontends/dri/kopper.c -@@ -73,7 +73,7 @@ kopper_init_screen(struct dri_screen *screen, bool driver_name_is_inferred) - bool success; - #ifdef HAVE_LIBDRM - if (screen->fd != -1) -- success = pipe_loader_drm_probe_fd(&screen->dev, screen->fd, true); -+ success = pipe_loader_drm_probe_fd(&screen->dev, screen->fd, false); - else - success = pipe_loader_vk_probe_dri(&screen->dev); - #else --- -2.49.0 - diff --git a/anda/lib/mesa/anda.hcl b/anda/lib/mesa/anda.hcl index 5da277684e..934dfba828 100644 --- a/anda/lib/mesa/anda.hcl +++ b/anda/lib/mesa/anda.hcl @@ -6,5 +6,6 @@ project pkg { labels { mock = 1 subrepo = "mesa" + large = 1 } } diff --git a/anda/lib/mesa/bazzite.patch b/anda/lib/mesa/bazzite.patch index b9e368abbb..e05c18db0c 100644 --- a/anda/lib/mesa/bazzite.patch +++ b/anda/lib/mesa/bazzite.patch @@ -1,16 +1,7 @@ -From aac6b04f39717f7363071f5500a89bb33e01cb33 Mon Sep 17 00:00:00 2001 -From: Antheas Kapenekakis -Date: Sat, 15 Mar 2025 16:39:08 +0100 -Subject: [PATCH 01/12] [BEGIN] SteamOS Changes - --- -2.49.0 - - -From 9fc35e8c53fe7e6c84b7da9ddff3d528f22ea4a9 Mon Sep 17 00:00:00 2001 +From 21b062a757a202dcb737d40442b6145c34bb1e48 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Fri, 14 Jan 2022 15:58:45 +0100 -Subject: [PATCH 02/12] STEAMOS: radv: min image count override for FH5 +Subject: [PATCH 01/11] STEAMOS: radv: min image count override for FH5 Otherwise in combination with the vblank time reservation in gamescope the game could get stuck in low power states. @@ -19,10 +10,10 @@ gamescope the game could get stuck in low power states. 1 file changed, 4 insertions(+) diff --git a/src/util/00-radv-defaults.conf b/src/util/00-radv-defaults.conf -index aef8b9006cd..2a6b0ec84a4 100644 +index b82e8d4da4d..c8d059571ad 100644 --- a/src/util/00-radv-defaults.conf +++ b/src/util/00-radv-defaults.conf -@@ -223,5 +223,9 @@ Application bugs worked around in this file: +@@ -234,5 +234,9 @@ Application bugs worked around in this file: @@ -33,13 +24,13 @@ index aef8b9006cd..2a6b0ec84a4 100644 -- -2.49.0 +2.50.1 -From 09299a2cf516078ce9ed9786a49ea6f957ac6527 Mon Sep 17 00:00:00 2001 +From e837814b4f33e48eaf6a79975cb738da39ed0fd2 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 22 Feb 2024 22:32:45 +0100 -Subject: [PATCH 03/12] STEAMOS: Dynamic swapchain override for gamescope +Subject: [PATCH 02/11] STEAMOS: Dynamic swapchain override for gamescope limiter for DRI3 only The original patch (from Bas) contained WSI VK support too but it's @@ -52,7 +43,7 @@ Signed-off-by: Samuel Pitoiset 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/dri/loader_dri3_helper.c b/src/gallium/frontends/dri/loader_dri3_helper.c -index 37970f4fa33..f200f2063a2 100644 +index a795d45ce29..435ea2405a8 100644 --- a/src/gallium/frontends/dri/loader_dri3_helper.c +++ b/src/gallium/frontends/dri/loader_dri3_helper.c @@ -297,6 +297,30 @@ dri3_update_max_num_back(struct loader_dri3_drawable *draw) @@ -128,10 +119,10 @@ index 37970f4fa33..f200f2063a2 100644 * successful MSC and adding in a swap interval for each outstanding swap * request. target_msc=divisor=remainder=0 means "Use glXSwapBuffers() diff --git a/src/gallium/frontends/dri/loader_dri3_helper.h b/src/gallium/frontends/dri/loader_dri3_helper.h -index 4da19d73090..819a0e548fc 100644 +index 26f138d1b83..3f0f3f66fac 100644 --- a/src/gallium/frontends/dri/loader_dri3_helper.h +++ b/src/gallium/frontends/dri/loader_dri3_helper.h -@@ -170,6 +170,7 @@ struct loader_dri3_drawable { +@@ -169,6 +169,7 @@ struct loader_dri3_drawable { bool block_on_depleted_buffers; bool queries_buffer_age; int swap_interval; @@ -140,69 +131,31 @@ index 4da19d73090..819a0e548fc 100644 const struct loader_dri3_vtable *vtable; -- -2.49.0 +2.50.1 -From 379efbce79f2ca73d34ec48b10e28942be3ed1be Mon Sep 17 00:00:00 2001 +From 354cf8783e49b082c97982f2e5be305ad6e4ab50 Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Sat, 15 Mar 2025 16:39:25 +0100 -Subject: [PATCH 04/12] [BEGIN] SteamOS Backports +Subject: [PATCH 03/11] [BEGIN] SteamOS Backports -- -2.49.0 +2.50.1 -From a4ac8f2bcd23eb4194adfe41117d4e168ffc6ddd Mon Sep 17 00:00:00 2001 +From c5a4eab20075dfa2f2bdfb87e55ecec262ef00f6 Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Sat, 15 Mar 2025 16:39:33 +0100 -Subject: [PATCH 05/12] [BEGIN] Our Mesa backports +Subject: [PATCH 04/11] [BEGIN] Our Mesa backports -- -2.49.0 +2.50.1 -From 7286b058c851688929bd145116c61872d06d81c8 Mon Sep 17 00:00:00 2001 -From: Maarten Lankhorst -Date: Mon, 17 Feb 2025 14:55:29 -0800 -Subject: [PATCH 06/12] anv: Mark images with format modifiers set as scanout. - -We currently use the presence of struct WSI_IMAGE_CREATE_INFO_MESA.scanout to mark the BO as scanout, -but this only handles the linear case, and fails when drm format modifiers are used. - -Also handle the case of exportable BO with tiling set to VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. -This fixes the gamescope handling of using vulkan allocated images for scanout. - -Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12633 -Signed-off-by: Maarten Lankhorst -Signed-off-by: Matthew Schwartz - -Normalspeak: fixes battlemage iGPUs in gamescope ---- - src/intel/vulkan/anv_device.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c -index 0fb86e9d846..de37994d324 100644 ---- a/src/intel/vulkan/anv_device.c -+++ b/src/intel/vulkan/anv_device.c -@@ -1566,6 +1566,9 @@ VkResult anv_AllocateMemory( - dedicated_info->image != VK_NULL_HANDLE) { - ANV_FROM_HANDLE(anv_image, image, dedicated_info->image); - -+ if (image->vk.tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) -+ alloc_flags |= ANV_BO_ALLOC_SCANOUT; -+ - /* Apply implicit sync to be compatible with clients relying on - * implicit fencing. This matches the behavior in iris i915_batch - * submit. An example client is VA-API (iHD), so only dedicated --- -2.49.0 - - -From 643137e1f57b1c89451a77edec40565e6084e2e1 Mon Sep 17 00:00:00 2001 +From 221b11df6d9cd7b66c8502fa51d8d72cfc377e5e Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Mon, 24 Mar 2025 19:50:51 +0100 -Subject: [PATCH 07/12] Revert "winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM +Subject: [PATCH 05/11] Revert "winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM and GTT allocations" This reverts commit 8c91624614c1f939974fe0d2d1a3baf83335cecb. @@ -213,14 +166,14 @@ Messes with AutoVRAM, who would have thought? 1 file changed, 5 deletions(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c -index dfefc468bca..cc0719a1898 100644 +index d5646e9660b..a51348b44a8 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c -@@ -618,11 +618,6 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *aws, +@@ -624,11 +624,6 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *aws, if (flags & RADEON_FLAG_GTT_WC) request.flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC; -- if (aws->info.has_local_buffers && +- if (aws->info.has_vm_always_valid && - initial_domain & (RADEON_DOMAIN_VRAM_GTT | RADEON_DOMAIN_DOORBELL) && - flags & RADEON_FLAG_NO_INTERPROCESS_SHARING) - request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID; @@ -229,138 +182,2257 @@ index dfefc468bca..cc0719a1898 100644 aws->info.drm_minor >= 47) request.flags |= AMDGPU_GEM_CREATE_DISCARDABLE; -- -2.49.0 +2.50.1 -From e38d54fb349d78b10ca5000add7cd97bf921323a Mon Sep 17 00:00:00 2001 -From: Antheas Kapenekakis -Date: Wed, 7 May 2025 18:50:48 +0200 -Subject: [PATCH 08/12] [BEGIN] Intel DX12 fix +From cf8c0d66ed49f99d0d259c28fe72174d58c06de7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= +Date: Mon, 24 Mar 2025 21:25:29 +0100 +Subject: [PATCH 06/11] vulkan: implement VK_AMD_anti_lag as implicit vulkan + layer --- -2.49.0 +VkLayer_MESA_anti_lag is a lightweight implicit layer which provides +an open-source implementation of the VK_AMD_anti_lag vulkan extension. +The algorithm used by this layer is very simplistic and only aims to +minimize the delay between calls to vkQueueSubmit or vkQueueSubmit2 +and the begin of the execution of the submission. -From cb2c3290e03518f90e13e83f68edea63c9c6c0cf Mon Sep 17 00:00:00 2001 -From: Kyle Gospodnetich -Date: Sun, 18 May 2025 09:40:01 -0700 -Subject: [PATCH 09/12] [BEGIN] Proton-GE Patches +In order to build VkLayer_MESA_anti_lag, pass -Dlayers=anti-lag to meson. +It is possible to either install the layer or to use --- -2.49.0 + VK_ADD_IMPLICIT_LAYER_PATH=/share/vulkan/implicit_layer.d/ +for testing purposes. +(Keep in mind that you have to adjust the library_path in the json file in that case.) -From 24d4a18ec695dbdc4fba33eee941dcca49a9a106 Mon Sep 17 00:00:00 2001 -From: Kyle Gospodnetich -Date: Sun, 18 May 2025 09:41:21 -0700 -Subject: [PATCH 10/12] radv,driconf: Add radv_force_64k_sparse_alignment - config - +Part-of: --- - src/amd/vulkan/radv_buffer.c | 6 +++++- - src/amd/vulkan/radv_instance.c | 3 +++ - src/amd/vulkan/radv_instance.h | 1 + - src/util/00-radv-defaults.conf | 7 +++++++ - src/util/driconf.h | 3 +++ - 5 files changed, 19 insertions(+), 1 deletion(-) + meson.build | 1 + + meson.options | 2 +- + .../anti-lag-layer/VkLayer_MESA_anti_lag.json | 26 + + src/vulkan/anti-lag-layer/anti_lag_layer.c | 590 ++++++++++++ + src/vulkan/anti-lag-layer/anti_lag_layer.h | 111 +++ + .../anti-lag-layer/anti_lag_layer_interface.c | 899 ++++++++++++++++++ + src/vulkan/anti-lag-layer/meson.build | 26 + + src/vulkan/anti-lag-layer/ringbuffer.h | 58 ++ + src/vulkan/meson.build | 3 + + 9 files changed, 1715 insertions(+), 1 deletion(-) + create mode 100644 src/vulkan/anti-lag-layer/VkLayer_MESA_anti_lag.json + create mode 100644 src/vulkan/anti-lag-layer/anti_lag_layer.c + create mode 100644 src/vulkan/anti-lag-layer/anti_lag_layer.h + create mode 100644 src/vulkan/anti-lag-layer/anti_lag_layer_interface.c + create mode 100644 src/vulkan/anti-lag-layer/meson.build + create mode 100644 src/vulkan/anti-lag-layer/ringbuffer.h -diff --git a/src/amd/vulkan/radv_buffer.c b/src/amd/vulkan/radv_buffer.c -index 88111750517..8ef575f8246 100644 ---- a/src/amd/vulkan/radv_buffer.c -+++ b/src/amd/vulkan/radv_buffer.c -@@ -167,6 +167,7 @@ radv_get_buffer_memory_requirements(struct radv_device *device, VkDeviceSize siz - VkBufferUsageFlags2 usage, VkMemoryRequirements2 *pMemoryRequirements) - { - const struct radv_physical_device *pdev = radv_device_physical(device); -+ const struct radv_instance *instance = radv_physical_device_instance(pdev); - - pMemoryRequirements->memoryRequirements.memoryTypeBits = - ((1u << pdev->memory_properties.memoryTypeCount) - 1u) & ~pdev->memory_types_32bit; -@@ -179,7 +180,10 @@ radv_get_buffer_memory_requirements(struct radv_device *device, VkDeviceSize siz - pMemoryRequirements->memoryRequirements.memoryTypeBits = pdev->memory_types_32bit; - - if (flags & VK_BUFFER_CREATE_SPARSE_BINDING_BIT) { -- pMemoryRequirements->memoryRequirements.alignment = 4096; -+ if (instance->drirc.force_64k_sparse_alignment) -+ pMemoryRequirements->memoryRequirements.alignment = 65536; -+ else -+ pMemoryRequirements->memoryRequirements.alignment = 4096; - } else { - if (usage & VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT) - pMemoryRequirements->memoryRequirements.alignment = radv_dgc_get_buffer_alignment(device); -diff --git a/src/amd/vulkan/radv_instance.c b/src/amd/vulkan/radv_instance.c -index 7aebf073dfd..15a3f710502 100644 ---- a/src/amd/vulkan/radv_instance.c -+++ b/src/amd/vulkan/radv_instance.c -@@ -194,6 +194,7 @@ static const driOptionDescription radv_dri_options[] = { - DRI_CONF_RADV_APP_LAYER() - DRI_CONF_RADV_EMULATE_RT(false) - DRI_CONF_RADV_ENABLE_FLOAT16_GFX8(false) -+ DRI_CONF_RADV_FORCE_64K_SPARSE_ALIGNMENT(false) - DRI_CONF_SECTION_END - }; - // clang-format on -@@ -298,6 +299,8 @@ radv_init_dri_options(struct radv_instance *instance) - instance->drirc.emulate_rt = driQueryOptionb(&instance->drirc.options, "radv_emulate_rt"); - - instance->drirc.expose_float16_gfx8 = driQueryOptionb(&instance->drirc.options, "radv_enable_float16_gfx8"); +diff --git a/meson.build b/meson.build +index 427cfde435c..c6c6457abae 100644 +--- a/meson.build ++++ b/meson.build +@@ -95,6 +95,7 @@ with_vulkan_overlay_layer = get_option('vulkan-layers').contains('overlay') + with_vulkan_device_select_layer = get_option('vulkan-layers').contains('device-select') + with_vulkan_screenshot_layer = get_option('vulkan-layers').contains('screenshot') + with_vulkan_vram_report_limit_layer = get_option('vulkan-layers').contains('vram-report-limit') ++with_vulkan_anti_lag_layer = get_option('vulkan-layers').contains('anti-lag') + with_tools = get_option('tools') + if with_tools.contains('all') + with_tools = [ +diff --git a/meson.options b/meson.options +index c3c02c4c94f..cd0e56cc429 100644 +--- a/meson.options ++++ b/meson.options +@@ -299,7 +299,7 @@ option( + type : 'array', + value : [], + choices : [ +- 'device-select', 'intel-nullhw', 'overlay', 'screenshot', ++ 'device-select', 'intel-nullhw', 'overlay', 'screenshot', 'anti-lag', + 'vram-report-limit', + ], + description : 'List of vulkan layers to build' +diff --git a/src/vulkan/anti-lag-layer/VkLayer_MESA_anti_lag.json b/src/vulkan/anti-lag-layer/VkLayer_MESA_anti_lag.json +new file mode 100644 +index 00000000000..4e2ab794c9e +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/VkLayer_MESA_anti_lag.json +@@ -0,0 +1,26 @@ ++{ ++ "file_format_version": "1.2.1", ++ "layer": { ++ "name": "VK_LAYER_MESA_anti_lag", ++ "type": "GLOBAL", ++ "library_path": "libVkLayer_MESA_anti_lag.so", ++ "api_version": "1.4.303", ++ "implementation_version": "1", ++ "description": "Open-source implementation of the VK_AMD_anti_lag extension.", ++ "functions": { ++ "vkNegotiateLoaderLayerInterfaceVersion": "anti_lag_NegotiateLoaderLayerInterfaceVersion" ++ }, ++ "device_extensions": [ ++ { ++ "name": "VK_AMD_anti_lag", ++ "spec_version": "1", ++ "entrypoints": [ ++ "vkAntiLagUpdateAMD" ++ ] ++ } ++ ], ++ "disable_environment": { ++ "DISABLE_LAYER_MESA_ANTI_LAG": "1" ++ } ++ } ++} +\ No newline at end of file +diff --git a/src/vulkan/anti-lag-layer/anti_lag_layer.c b/src/vulkan/anti-lag-layer/anti_lag_layer.c +new file mode 100644 +index 00000000000..6c21e074024 +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/anti_lag_layer.c +@@ -0,0 +1,590 @@ ++/* ++ * Copyright © 2025 Valve Corporation ++ * ++ * SPDX-License-Identifier: MIT ++ */ + -+ instance->drirc.force_64k_sparse_alignment = driQueryOptionb(&instance->drirc.options, "radv_force_64k_sparse_alignment"); ++#include "anti_lag_layer.h" ++#include ++#include "util/os_time.h" ++#include "util/simple_mtx.h" ++#include "vulkan/vulkan_core.h" ++#include "ringbuffer.h" ++#include "vk_alloc.h" ++#include "vk_util.h" ++ ++static bool ++evaluate_frame(device_context *ctx, frame *frame, bool force_wait) ++{ ++ if (frame->state != FRAME_PRESENT) { ++ /* This frame is not finished yet. */ ++ assert(!force_wait); ++ return false; ++ } ++ ++ int query_flags = VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT; ++ const uint32_t frame_idx = ringbuffer_index(ctx->frames, frame); ++ ++ /* Before we commit to completing a frame, all submits on all queues must have completed. */ ++ for (unsigned i = 0; i < ctx->num_queues; i++) { ++ queue_context *queue_ctx = &ctx->queues[i]; ++ ringbuffer_lock(queue_ctx->queries); ++ uint64_t expected_signal_value = queue_ctx->semaphore_value - queue_ctx->queries.size + ++ queue_ctx->submissions_per_frame[frame_idx]; ++ ringbuffer_unlock(queue_ctx->queries); ++ ++ if (force_wait) { ++ /* Wait for the timeline semaphore of the frame to be signaled. */ ++ struct VkSemaphoreWaitInfo wait_info = { ++ .sType = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO, ++ .semaphoreCount = 1, ++ .pSemaphores = &queue_ctx->semaphore, ++ .pValues = &expected_signal_value, ++ }; ++ ctx->vtable.WaitSemaphores(ctx->device, &wait_info, 0); ++ } else { ++ /* Return early if the last timeline semaphore of the frame has not been signaled yet. */ ++ uint64_t signal_value; ++ ctx->vtable.GetSemaphoreCounterValue(ctx->device, queue_ctx->semaphore, &signal_value); ++ if (signal_value < expected_signal_value) ++ return false; ++ } ++ } ++ ++ /* For each queue, retrieve timestamp query results. */ ++ for (unsigned i = 0; i < ctx->num_queues; i++) { ++ queue_context *queue_ctx = &ctx->queues[i]; ++ ++ /* As we hold a global mtx and this is the only place where queries are free'd, ++ * we don't need to lock the query ringbuffer here in order to read the first entry. ++ */ ++ struct query *query = ringbuffer_first(queue_ctx->queries); ++ uint32_t query_idx = ringbuffer_index(queue_ctx->queries, query); ++ int num_timestamps = ++ MIN2(queue_ctx->submissions_per_frame[frame_idx], MAX_QUERIES - query_idx); ++ ++ while (num_timestamps > 0) { ++ /* Retreive timestamp results from this queue. */ ++ ctx->vtable.GetQueryPoolResults(ctx->device, queue_ctx->queryPool, query_idx, ++ num_timestamps, sizeof(uint64_t), &query->begin_gpu_ts, ++ sizeof(struct query), query_flags); ++ ++ ringbuffer_lock(queue_ctx->queries); ++ for (unsigned j = 0; j < num_timestamps; j++) { ++ ++ /* Calibrate device timestamps. */ ++ query->begin_gpu_ts = ++ ctx->calibration.delta + ++ (uint64_t)(query->begin_gpu_ts * ctx->calibration.timestamp_period); ++ if (query->begin_gpu_ts > query->submit_cpu_ts) ++ frame->min_delay = ++ MIN2(frame->min_delay, query->begin_gpu_ts - query->submit_cpu_ts); ++ ++ /* Check if we can reset half of the query pool at once. */ ++ uint32_t next_idx = ringbuffer_index(queue_ctx->queries, query) + 1; ++ const bool reset = next_idx == MAX_QUERIES || next_idx == MAX_QUERIES / 2; ++ if (reset) { ++ ringbuffer_unlock(queue_ctx->queries); ++ ctx->vtable.ResetQueryPool(ctx->device, queue_ctx->queryPool, ++ next_idx - MAX_QUERIES / 2, MAX_QUERIES / 2); ++ ringbuffer_lock(queue_ctx->queries); ++ } ++ ++ /* Free query. */ ++ ringbuffer_free(queue_ctx->queries, query); ++ queue_ctx->submissions_per_frame[frame_idx]--; ++ ++ query = ringbuffer_first(queue_ctx->queries); ++ } ++ ++ /* Ensure that the total number of queries across all frames is correct. */ ++ ASSERTED uint32_t count = 0; ++ for (unsigned i = 0; i < MAX_FRAMES; i++) ++ count += queue_ctx->submissions_per_frame[i]; ++ assert(count == queue_ctx->queries.size); ++ ++ query_idx = ringbuffer_index(queue_ctx->queries, query); ++ num_timestamps = ++ MIN2(queue_ctx->submissions_per_frame[frame_idx], MAX_QUERIES - query_idx); ++ ++ ringbuffer_unlock(queue_ctx->queries); ++ } ++ } ++ ++ frame->min_delay++; /* wrap UINT64_MAX in case we didn't have any submissions. */ ++ ++ return true; ++} ++ ++static bool ++calibrate_timestamps(device_context *ctx) ++{ ++ uint64_t ts[2]; ++ uint64_t deviation; ++ ++ VkCalibratedTimestampInfoKHR info[2] = { ++ { ++ .sType = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR, ++ .timeDomain = VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR, ++ }, ++ { ++ .sType = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR, ++ .timeDomain = VK_TIME_DOMAIN_DEVICE_KHR, ++ }, ++ }; ++ ++ VkResult result = ctx->vtable.GetCalibratedTimestampsKHR(ctx->device, 2, info, ts, &deviation); ++ if (result == VK_SUCCESS) { ++ /* We take a moving average in order to avoid variance. */ ++ int64_t new_delta = ts[0] - (int64_t)(ts[1] * ctx->calibration.timestamp_period); ++ ++ if (ctx->calibration.delta == 0) { ++ ctx->calibration.delta = new_delta; ++ } else { ++ int64_t diff = new_delta - ctx->calibration.delta; ++ ctx->calibration.delta += diff / 8; ++ } ++ ++ /* Take a new calibrated timestamp every second. */ ++ ctx->calibration.recalibrate_when = ts[0] + 1000000000ull; ++ } ++ ++ return result == VK_SUCCESS; ++} ++ ++static void ++begin_next_frame(device_context *ctx) ++{ ++ frame *next_frame; ++ if (ctx->active_frame) { ++ assert(ctx->active_frame->state == FRAME_SUBMIT); ++ ctx->active_frame->state = FRAME_PRESENT; ++ next_frame = ringbuffer_next(ctx->frames, ctx->active_frame); ++ } else { ++ next_frame = ringbuffer_last(ctx->frames); ++ } ++ ++ /* If there is a frame ready, it becomes active. */ ++ if (next_frame->state == FRAME_INPUT) { ++ next_frame->state = FRAME_SUBMIT; ++ ctx->active_frame = next_frame; ++ } else { ++ ctx->active_frame = NULL; ++ } ++} ++ ++static void ++anti_lag_disable(device_context *ctx) ++{ ++ ringbuffer_lock(ctx->frames); ++ while (ctx->frames.size) { ++ /* Set force-wait=true, so that all pending timestamp queries get completed. */ ++ begin_next_frame(ctx); ++ frame *frame = ringbuffer_first(ctx->frames); ++ evaluate_frame(ctx, frame, true); ++ frame->state = FRAME_INVALID; ++ ringbuffer_free(ctx->frames, frame); ++ } ++ assert(!ctx->active_frame); ++ ringbuffer_unlock(ctx->frames); ++} ++ ++#define TARGET_DELAY 4000000ll /* 4 ms */ ++/** ++ * Returns the amount of time that we want the next frame to be delayed. ++ * ++ * The algorithm used by this function is very simplistic and only aims ++ * to minimize the delay between calls to vkQueueSubmit or vkQueueSubmit2 ++ * and the begin of the execution of the submission. ++ */ ++static int64_t ++get_wait_time(device_context *ctx) ++{ ++ /* Take the previous evaluated frame's delay as baseline. */ ++ int64_t imposed_delay = ctx->base_delay; ++ int64_t adaptation = 0; ++ ++ ringbuffer_lock(ctx->frames); ++ /* In case our ringbuffer is completely full and no frame is in PRESENT stage, ++ * just move the oldest frame to PRESENT stage, and force-wait. ++ */ ++ bool force_wait = ctx->frames.size == MAX_FRAMES; ++ frame *next_frame = ringbuffer_first(ctx->frames); ++ if (force_wait && next_frame->state != FRAME_PRESENT) ++ begin_next_frame(ctx); ++ ++ /* Also force-wait for the oldest frame if there is already 2 frames in PRESENT stage. */ ++ force_wait |= ringbuffer_next(ctx->frames, next_frame)->state == FRAME_PRESENT; ++ ringbuffer_unlock(ctx->frames); ++ ++ /* Take new evaluated frames into consideration. */ ++ while (evaluate_frame(ctx, next_frame, force_wait)) { ++ ++ if (next_frame->min_delay < TARGET_DELAY / 2 && ctx->adaptation <= 0) { ++ /* If there is no delay between submission and GPU start, halve the base delay and ++ * set the delay for this frame to zero, in order to account for sudden changes. ++ */ ++ ctx->base_delay = ctx->base_delay / 2; ++ adaptation = -ctx->base_delay; ++ } else { ++ /* We use some kind of exponential weighted moving average function here, ++ * in order to determine a base-delay. We use a smoothing-factor of roughly ++ * 3%, but don't discount the previous value. This helps keeping the delay ++ * slightly below the target of 5 ms, most of the time. ++ */ ++ int64_t diff = (int64_t)next_frame->min_delay - TARGET_DELAY; ++ ctx->base_delay = MAX2(0, ctx->base_delay + diff / 32); /* corresponds to ~3 % */ ++ ++ /* As the base-delay gets adjusted rather slowly, we additionally use the half of the ++ * diff as adaptation delay to account for sudden changes. A quarter of the adaptation ++ * is then subtracted for the next frame, so that we can avoid overcompensation. ++ */ ++ adaptation = diff / 2 - ctx->adaptation / 4; ++ } ++ ++ /* We only need space for one frame. */ ++ force_wait = false; ++ ++ ringbuffer_lock(ctx->frames); ++ next_frame->state = FRAME_INVALID; ++ ringbuffer_free(ctx->frames, next_frame); ++ next_frame = ringbuffer_first(ctx->frames); ++ ringbuffer_unlock(ctx->frames); ++ } ++ imposed_delay = ctx->base_delay + adaptation; ++ ctx->adaptation = adaptation; ++ ++ if (imposed_delay > 100000000) { ++ /* This corresponds to <10 FPS. Something might have gone wrong. */ ++ calibrate_timestamps(ctx); ++ ctx->base_delay = ctx->adaptation = imposed_delay = 0; ++ } ++ ++ return MAX2(0, imposed_delay); ++} ++ ++static void ++reset_frame(frame *frame) ++{ ++ assert(frame->state == FRAME_INVALID); ++ frame->frame_idx = 0; ++ frame->frame_start_time = 0; ++ frame->min_delay = UINT64_MAX; ++ frame->state = FRAME_INPUT; ++} ++ ++VKAPI_ATTR void VKAPI_CALL ++anti_lag_AntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD *pData) ++{ ++ if (pData == NULL) ++ return; ++ ++ device_context *ctx = get_device_context(device); ++ if (pData->mode == VK_ANTI_LAG_MODE_OFF_AMD) { ++ /* Application request to disable Anti-Lag. */ ++ simple_mtx_lock(&ctx->mtx); ++ anti_lag_disable(ctx); ++ simple_mtx_unlock(&ctx->mtx); ++ return; ++ } ++ ++ uint64_t frame_idx = 0; ++ int64_t now = os_time_get_nano(); ++ int64_t imposed_delay = 0; ++ int64_t last_frame_begin = 0; ++ ++ if (pData->pPresentationInfo) { ++ /* The same frameIndex value should be used with VK_ANTI_LAG_STAGE_INPUT_AMD before ++ * the frame begins and with VK_ANTI_LAG_STAGE_PRESENT_AMD when the frame ends. ++ */ ++ frame_idx = pData->pPresentationInfo->frameIndex; ++ ++ /* This marks the end of the current frame. */ ++ if (pData->pPresentationInfo->stage == VK_ANTI_LAG_STAGE_PRESENT_AMD) { ++ /* If there is already a new frame pending, any submission that happens afterwards ++ * gets associated with the new frame. ++ */ ++ ringbuffer_lock(ctx->frames); ++ /* Check that the currently active frame is indeed the frame we are ending now. */ ++ while (ctx->active_frame && ctx->active_frame->frame_idx <= frame_idx) { ++ begin_next_frame(ctx); ++ } ++ ringbuffer_unlock(ctx->frames); ++ return; ++ } ++ } ++ ++ /* Lock this function, in order to avoid race conditions on frame allocation. */ ++ simple_mtx_lock(&ctx->mtx); ++ ++ /* VK_ANTI_LAG_STAGE_INPUT_AMD: This marks the begin of a new frame. ++ * Evaluate previous frames in order to determine the wait time. ++ */ ++ imposed_delay = get_wait_time(ctx); ++ int64_t next_deadline = now + imposed_delay; ++ ++ /* Ensure maxFPS adherence. */ ++ if (pData->maxFPS) { ++ int64_t frametime_period = 1000000000u / pData->maxFPS; ++ last_frame_begin = ringbuffer_last(ctx->frames)->frame_start_time; ++ next_deadline = MAX2(next_deadline, last_frame_begin + frametime_period); ++ } ++ ++ /* Recalibrate every now and then. */ ++ if (next_deadline > ctx->calibration.recalibrate_when) ++ calibrate_timestamps(ctx); ++ ++ /* Sleep until deadline is met. */ ++ os_time_nanosleep_until(next_deadline); ++ ++ /* Initialize new frame. */ ++ ringbuffer_lock(ctx->frames); ++ frame *new_frame = ringbuffer_alloc(ctx->frames); ++ reset_frame(new_frame); ++ new_frame->frame_start_time = next_deadline; ++ new_frame->imposed_delay = imposed_delay; ++ new_frame->frame_idx = frame_idx; ++ ++ /* Immediately set the frame active if there is no other frame already active. */ ++ if (!ctx->active_frame) ++ begin_next_frame(ctx); ++ ++ ringbuffer_unlock(ctx->frames); ++ simple_mtx_unlock(&ctx->mtx); ++} ++ ++static queue_context * ++get_queue_context(device_context *ctx, VkQueue queue) ++{ ++ for (unsigned i = 0; i < ctx->num_queues; i++) { ++ if (ctx->queues[i].queue == queue) ++ return &ctx->queues[i]; ++ } ++ ++ return NULL; ++} ++ ++static struct query * ++allocate_query(device_context *ctx, queue_context *queue_ctx) ++{ ++ if (!ctx->active_frame) ++ return NULL; ++ ++ /* Allow for a single frame to use at most half of the query pool. */ ++ uint32_t frame_idx = ringbuffer_index(ctx->frames, ctx->active_frame); ++ if (queue_ctx->submissions_per_frame[frame_idx] > MAX_QUERIES / 2) ++ return NULL; ++ ++ /* Check that the next query index has been reset properly: ++ * ++ * We use some double-buffering here in order to reduce the number of ++ * VkResetQueryPool commands. ++ * Return false if the next query-index allocation crosses into the half ++ * which still contains active queries, ++ */ ++ if (queue_ctx->queries.size > MAX_QUERIES / 2) { ++ struct query *last_query = ringbuffer_last(queue_ctx->queries); ++ uint32_t next_idx = ringbuffer_index(queue_ctx->queries, last_query) + 1; ++ if (next_idx == MAX_QUERIES || next_idx == MAX_QUERIES / 2) ++ return NULL; ++ } ++ ++ return ringbuffer_alloc(queue_ctx->queries); ++} ++ ++static bool ++get_commandbuffer(device_context *ctx, queue_context *queue_ctx, VkCommandBuffer *cmdbuffer) ++{ ++ uint64_t now = os_time_get_nano(); ++ ++ /* Begin critical section. */ ++ ringbuffer_lock(ctx->frames); ++ ringbuffer_lock(queue_ctx->queries); ++ struct query *query = allocate_query(ctx, queue_ctx); ++ if (query == NULL) { ++ ringbuffer_unlock(queue_ctx->queries); ++ ringbuffer_unlock(ctx->frames); ++ return false; ++ } ++ ++ query->submit_cpu_ts = now; ++ ++ /* Assign commandBuffer for timestamp. */ ++ *cmdbuffer = query->cmdbuffer; ++ ++ /* Increment timeline semaphore count. */ ++ queue_ctx->semaphore_value++; ++ ++ /* Add new submission entry for the current frame */ ++ assert(ctx->active_frame->state == FRAME_SUBMIT); ++ uint32_t frame_idx = ringbuffer_index(ctx->frames, ctx->active_frame); ++ queue_ctx->submissions_per_frame[frame_idx]++; ++ ++ ringbuffer_unlock(queue_ctx->queries); ++ ringbuffer_unlock(ctx->frames); ++ return true; ++} ++ ++static VkResult ++queue_submit2(device_context *ctx, VkQueue queue, uint32_t submitCount, ++ const VkSubmitInfo2 *pSubmits, VkFence fence, PFN_vkQueueSubmit2 queueSubmit2) ++{ ++ queue_context *queue_ctx = get_queue_context(ctx, queue); ++ if (!ctx->active_frame || !queue_ctx) ++ return queueSubmit2(queue, submitCount, pSubmits, fence); ++ ++ int first = -1; ++ VkCommandBuffer timestamp_cmdbuffer; ++ /* Check if any submission contains commandbuffers. */ ++ for (unsigned i = 0; i < submitCount; i++) { ++ if (pSubmits[i].commandBufferInfoCount) { ++ first = i; ++ break; ++ } ++ } ++ ++ /* Get timestamp commandbuffer. */ ++ if (first == -1 || !get_commandbuffer(ctx, queue_ctx, ×tamp_cmdbuffer)) ++ return queueSubmit2(queue, submitCount, pSubmits, fence); ++ ++ VkSubmitInfo2 *submits; ++ VkCommandBufferSubmitInfo *cmdbuffers; ++ VkSemaphoreSubmitInfo *semaphores; ++ VK_MULTIALLOC(ma); ++ vk_multialloc_add(&ma, &submits, VkSubmitInfo2, submitCount); ++ vk_multialloc_add(&ma, &cmdbuffers, VkCommandBufferSubmitInfo, ++ pSubmits[first].commandBufferInfoCount + 1); ++ vk_multialloc_add(&ma, &semaphores, VkSemaphoreSubmitInfo, ++ pSubmits[first].signalSemaphoreInfoCount + 1); ++ void *buf = vk_multialloc_zalloc(&ma, &ctx->alloc, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); ++ if (!buf) ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ ++ memcpy(submits, pSubmits, sizeof(VkSubmitInfo2) * submitCount); ++ VkSubmitInfo2 *submit_info = &submits[first]; ++ ++ /* Add commandbuffer to submission. */ ++ cmdbuffers[0] = (VkCommandBufferSubmitInfo){ ++ .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO, ++ .commandBuffer = timestamp_cmdbuffer, ++ }; ++ memcpy(&cmdbuffers[1], submit_info->pCommandBufferInfos, ++ sizeof(VkCommandBufferSubmitInfo) * submit_info->commandBufferInfoCount); ++ submit_info->pCommandBufferInfos = cmdbuffers; ++ submit_info->commandBufferInfoCount++; ++ ++ /* Add timeline semaphore to submission. */ ++ memcpy(semaphores, submit_info->pSignalSemaphoreInfos, ++ sizeof(VkSemaphoreSubmitInfo) * submit_info->signalSemaphoreInfoCount); ++ semaphores[submit_info->signalSemaphoreInfoCount] = (VkSemaphoreSubmitInfo){ ++ .sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, ++ .semaphore = queue_ctx->semaphore, ++ .value = queue_ctx->semaphore_value, ++ .stageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, ++ }; ++ submit_info->pSignalSemaphoreInfos = semaphores; ++ submit_info->signalSemaphoreInfoCount++; ++ ++ /* Submit with added timestamp query commandbuffer. */ ++ VkResult res = queueSubmit2(queue, submitCount, submits, fence); ++ vk_free(&ctx->alloc, submits); ++ return res; ++} ++ ++VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_QueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2 *pSubmits, ++ VkFence fence) ++{ ++ device_context *ctx = get_device_context(queue); ++ return queue_submit2(ctx, queue, submitCount, pSubmits, fence, ctx->vtable.QueueSubmit2KHR); ++} ++ ++VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_QueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2 *pSubmits, ++ VkFence fence) ++{ ++ device_context *ctx = get_device_context(queue); ++ return queue_submit2(ctx, queue, submitCount, pSubmits, fence, ctx->vtable.QueueSubmit2); ++} ++ ++VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, ++ VkFence fence) ++{ ++ device_context *ctx = get_device_context(queue); ++ queue_context *queue_ctx = get_queue_context(ctx, queue); ++ if (!ctx->active_frame || !queue_ctx) ++ return ctx->vtable.QueueSubmit(queue, submitCount, pSubmits, fence); ++ ++ int first = -1; ++ VkCommandBuffer timestamp_cmdbuffer; ++ /* Check if any submission contains commandbuffers. */ ++ for (unsigned i = 0; i < submitCount; i++) { ++ if (pSubmits[i].commandBufferCount) { ++ first = i; ++ break; ++ } ++ } ++ ++ /* Get timestamp commandbuffer. */ ++ if (first == -1 || !get_commandbuffer(ctx, queue_ctx, ×tamp_cmdbuffer)) ++ return ctx->vtable.QueueSubmit(queue, submitCount, pSubmits, fence); ++ ++ VkSubmitInfo *submits; ++ VkCommandBuffer *cmdbuffers; ++ VkSemaphore *semaphores; ++ VkTimelineSemaphoreSubmitInfo *semaphore_info; ++ uint64_t *semaphore_values; ++ VK_MULTIALLOC(ma); ++ vk_multialloc_add(&ma, &submits, VkSubmitInfo, submitCount); ++ vk_multialloc_add(&ma, &cmdbuffers, VkCommandBuffer, pSubmits[first].commandBufferCount + 1); ++ vk_multialloc_add(&ma, &semaphores, VkSemaphore, pSubmits[first].signalSemaphoreCount + 1); ++ vk_multialloc_add(&ma, &semaphore_info, VkTimelineSemaphoreSubmitInfo, 1); ++ vk_multialloc_add(&ma, &semaphore_values, uint64_t, pSubmits[first].signalSemaphoreCount + 1); ++ void *buf = vk_multialloc_zalloc(&ma, &ctx->alloc, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); ++ if (!buf) ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ ++ memcpy(submits, pSubmits, sizeof(VkSubmitInfo) * submitCount); ++ VkSubmitInfo *submit_info = &submits[first]; ++ ++ /* Add commandbuffer to submission. */ ++ cmdbuffers[0] = timestamp_cmdbuffer; ++ memcpy(&cmdbuffers[1], submit_info->pCommandBuffers, ++ sizeof(VkCommandBuffer) * submit_info->commandBufferCount); ++ submit_info->pCommandBuffers = cmdbuffers; ++ submit_info->commandBufferCount++; ++ ++ /* Add timeline semaphore to submission. */ ++ const VkTimelineSemaphoreSubmitInfo *tlssi = ++ vk_find_struct_const(pSubmits[first].pNext, TIMELINE_SEMAPHORE_SUBMIT_INFO); ++ semaphores[0] = queue_ctx->semaphore; ++ memcpy(&semaphores[1], submit_info->pSignalSemaphores, ++ sizeof(VkSemaphore) * submit_info->signalSemaphoreCount); ++ submit_info->pSignalSemaphores = semaphores; ++ submit_info->signalSemaphoreCount++; ++ semaphore_values[0] = queue_ctx->semaphore_value; ++ if (tlssi) { ++ *semaphore_info = *tlssi; /* save original values */ ++ memcpy(&semaphore_values[1], tlssi->pSignalSemaphoreValues, ++ sizeof(uint64_t) * tlssi->signalSemaphoreValueCount); ++ ((VkTimelineSemaphoreSubmitInfo *)tlssi)->pSignalSemaphoreValues = semaphore_values; ++ ((VkTimelineSemaphoreSubmitInfo *)tlssi)->signalSemaphoreValueCount = ++ submit_info->signalSemaphoreCount; ++ } else { ++ *semaphore_info = (VkTimelineSemaphoreSubmitInfo){ ++ .sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, ++ .pNext = submit_info->pNext, ++ .signalSemaphoreValueCount = submit_info->signalSemaphoreCount, ++ .pSignalSemaphoreValues = semaphore_values, ++ }; ++ submit_info->pNext = semaphore_info; ++ } ++ ++ /* Submit with added timestamp query commandbuffer. */ ++ VkResult res = ctx->vtable.QueueSubmit(queue, submitCount, submits, fence); ++ if (tlssi) ++ *(VkTimelineSemaphoreSubmitInfo *)tlssi = *semaphore_info; /* restore */ ++ vk_free(&ctx->alloc, buf); ++ return res; ++} +diff --git a/src/vulkan/anti-lag-layer/anti_lag_layer.h b/src/vulkan/anti-lag-layer/anti_lag_layer.h +new file mode 100644 +index 00000000000..31abb0f9aee +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/anti_lag_layer.h +@@ -0,0 +1,111 @@ ++/* ++ * Copyright © 2025 Valve Corporation ++ * ++ * SPDX-License-Identifier: MIT ++ */ ++ ++#ifndef ANTI_LAG_LAYER_H ++#define ANTI_LAG_LAYER_H ++ ++#include "util/simple_mtx.h" ++#include "vulkan/vk_layer.h" ++#include "vulkan/vulkan_core.h" ++#include "ringbuffer.h" ++ ++#define MAX_FRAMES 8 ++#define MAX_QUERIES 256 ++ ++enum frame_state { ++ FRAME_INVALID = 0, ++ FRAME_INPUT, /* Frame is in input stage. */ ++ FRAME_SUBMIT, /* All current queueSubmit calls are associated with this frame. */ ++ FRAME_PRESENT, /* Frame is in present stage and latencies can be evaluated. */ ++}; ++ ++typedef struct frame { ++ uint64_t frame_idx; ++ uint64_t frame_start_time; ++ uint64_t min_delay; ++ uint64_t imposed_delay; ++ enum frame_state state; ++} frame; ++ ++struct query { ++ uint64_t begin_gpu_ts; ++ uint64_t submit_cpu_ts; ++ VkCommandBuffer cmdbuffer; ++}; ++ ++typedef struct queue_context { ++ VkQueue queue; ++ uint32_t queue_family_idx; ++ VkCommandPool cmdPool; ++ VkQueryPool queryPool; ++ VkSemaphore semaphore; ++ uint64_t semaphore_value; ++ uint8_t submissions_per_frame[MAX_FRAMES]; ++ RINGBUFFER_DECLARE(queries, struct query, MAX_QUERIES); ++} queue_context; ++ ++typedef struct device_context { ++ ++ struct DeviceDispatchTable { ++#define DECLARE_HOOK(fn) PFN_vk##fn fn ++ DECLARE_HOOK(GetDeviceProcAddr); ++ DECLARE_HOOK(SetDeviceLoaderData); ++ DECLARE_HOOK(DestroyDevice); ++ DECLARE_HOOK(QueueSubmit); ++ DECLARE_HOOK(QueueSubmit2); ++ DECLARE_HOOK(QueueSubmit2KHR); ++ DECLARE_HOOK(GetDeviceQueue); ++ DECLARE_HOOK(CreateCommandPool); ++ DECLARE_HOOK(DestroyCommandPool); ++ DECLARE_HOOK(CreateQueryPool); ++ DECLARE_HOOK(ResetQueryPool); ++ DECLARE_HOOK(DestroyQueryPool); ++ DECLARE_HOOK(GetQueryPoolResults); ++ DECLARE_HOOK(AllocateCommandBuffers); ++ DECLARE_HOOK(FreeCommandBuffers); ++ DECLARE_HOOK(BeginCommandBuffer); ++ DECLARE_HOOK(EndCommandBuffer); ++ DECLARE_HOOK(GetCalibratedTimestampsKHR); ++ DECLARE_HOOK(CmdWriteTimestamp); ++ DECLARE_HOOK(CreateSemaphore); ++ DECLARE_HOOK(DestroySemaphore); ++ DECLARE_HOOK(GetSemaphoreCounterValue); ++ DECLARE_HOOK(WaitSemaphores); ++#undef DECLARE_HOOK ++ } vtable; ++ ++ VkDevice device; ++ VkAllocationCallbacks alloc; ++ simple_mtx_t mtx; ++ ++ struct { ++ int64_t delta; ++ uint64_t recalibrate_when; ++ float timestamp_period; ++ } calibration; ++ ++ RINGBUFFER_DECLARE(frames, frame, MAX_FRAMES); ++ frame *active_frame; ++ int64_t base_delay; ++ int64_t adaptation; ++ ++ unsigned num_queues; ++ queue_context queues[]; ++} device_context; ++ ++device_context *get_device_context(const void *object); ++ ++void anti_lag_AntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD *pData); ++VkResult anti_lag_QueueSubmit2KHR(VkQueue queue, uint32_t submitCount, ++ const VkSubmitInfo2 *pSubmits, VkFence fence); ++VkResult anti_lag_QueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2 *pSubmits, ++ VkFence fence); ++VkResult anti_lag_QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, ++ VkFence fence); ++ ++VkResult anti_lag_NegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct); ++ ++#endif /* ANTI_LAG_LAYER_H */ +diff --git a/src/vulkan/anti-lag-layer/anti_lag_layer_interface.c b/src/vulkan/anti-lag-layer/anti_lag_layer_interface.c +new file mode 100644 +index 00000000000..d2ca4a7dd44 +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/anti_lag_layer_interface.c +@@ -0,0 +1,899 @@ ++/* ++ * Copyright © 2025 Valve Corporation ++ * ++ * SPDX-License-Identifier: MIT ++ */ ++ ++#include "util/simple_mtx.h" ++#include "vulkan/vk_layer.h" ++#include "vulkan/vulkan_core.h" ++#include "anti_lag_layer.h" ++#include "vk_alloc.h" ++#include "vk_util.h" ++ ++static uintptr_t ++object_to_key(const void *object) ++{ ++ return (uintptr_t)*(uintptr_t *)object; ++} ++ ++typedef struct instance_data { ++ struct InstanceDispatchTable { ++#define DECLARE_HOOK(fn) PFN_vk##fn fn ++ DECLARE_HOOK(GetInstanceProcAddr); ++ DECLARE_HOOK(CreateInstance); ++ DECLARE_HOOK(DestroyInstance); ++ DECLARE_HOOK(CreateDevice); ++ DECLARE_HOOK(EnumerateDeviceExtensionProperties); ++ DECLARE_HOOK(GetPhysicalDeviceFeatures2KHR); ++ DECLARE_HOOK(GetPhysicalDeviceFeatures2); ++ DECLARE_HOOK(GetPhysicalDeviceProperties); ++ DECLARE_HOOK(GetPhysicalDeviceCalibrateableTimeDomainsEXT); ++ DECLARE_HOOK(GetPhysicalDeviceCalibrateableTimeDomainsKHR); ++ DECLARE_HOOK(GetPhysicalDeviceQueueFamilyProperties); ++#undef DECLARE_HOOK ++ } vtable; ++ ++ VkInstance instance; ++ uint32_t apiVersion; ++ VkAllocationCallbacks alloc; ++ struct instance_data *next; ++} instance_data; ++ ++static void ++init_instance_vtable(instance_data *ctx, PFN_vkGetInstanceProcAddr gpa) ++{ ++ ctx->vtable.GetInstanceProcAddr = gpa; ++#define INIT_HOOK(fn) ctx->vtable.fn = (PFN_vk##fn)gpa(ctx->instance, "vk" #fn) ++ INIT_HOOK(CreateInstance); ++ INIT_HOOK(DestroyInstance); ++ INIT_HOOK(CreateDevice); ++ INIT_HOOK(EnumerateDeviceExtensionProperties); ++ INIT_HOOK(GetPhysicalDeviceFeatures2KHR); ++ INIT_HOOK(GetPhysicalDeviceFeatures2); ++ INIT_HOOK(GetPhysicalDeviceProperties); ++ INIT_HOOK(GetPhysicalDeviceCalibrateableTimeDomainsEXT); ++ INIT_HOOK(GetPhysicalDeviceCalibrateableTimeDomainsKHR); ++ INIT_HOOK(GetPhysicalDeviceQueueFamilyProperties); ++#undef INIT_HOOK ++} ++ ++static simple_mtx_t instance_mtx = SIMPLE_MTX_INITIALIZER; ++static instance_data *instance_list = NULL; ++ ++static void ++add_instance(instance_data *instance) ++{ ++ simple_mtx_lock(&instance_mtx); ++ instance_data **ptr = &instance_list; ++ while (*ptr != NULL) ++ ptr = &(*ptr)->next; ++ *ptr = instance; ++ simple_mtx_unlock(&instance_mtx); ++} ++ ++static instance_data * ++remove_instance(const void *object) ++{ ++ uintptr_t key = object_to_key(object); ++ simple_mtx_lock(&instance_mtx); ++ instance_data **ptr = &instance_list; ++ while (*ptr && key != object_to_key((*ptr)->instance)) ++ ptr = &(*ptr)->next; ++ ++ instance_data *ctx = *ptr; ++ *ptr = ctx ? ctx->next : NULL; ++ simple_mtx_unlock(&instance_mtx); ++ return ctx; ++} ++ ++static instance_data * ++get_instance_data(const void *object) ++{ ++ uintptr_t key = object_to_key(object); ++ simple_mtx_lock(&instance_mtx); ++ instance_data *ctx = instance_list; ++ while (ctx && key != object_to_key(ctx->instance)) ++ ctx = ctx->next; ++ simple_mtx_unlock(&instance_mtx); ++ return ctx; ++} ++ ++static VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_CreateInstance(const VkInstanceCreateInfo *pCreateInfo, ++ const VkAllocationCallbacks *pAllocator, VkInstance *pInstance) ++{ ++ VkLayerInstanceCreateInfo *chain_info = (VkLayerInstanceCreateInfo *)(pCreateInfo->pNext); ++ while (chain_info && !(chain_info->sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO && ++ chain_info->function == VK_LAYER_LINK_INFO)) { ++ chain_info = (VkLayerInstanceCreateInfo *)(chain_info->pNext); ++ } ++ ++ assert(chain_info && chain_info->u.pLayerInfo); ++ PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = ++ chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; ++ PFN_vkCreateInstance fpCreateInstance = ++ (PFN_vkCreateInstance)fpGetInstanceProcAddr(NULL, "vkCreateInstance"); ++ if (fpCreateInstance == NULL) ++ return VK_ERROR_INITIALIZATION_FAILED; ++ ++ /* Advance the link info for the next element on the chain. */ ++ chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; ++ ++ /* Create Instance. */ ++ VkResult result = fpCreateInstance(pCreateInfo, pAllocator, pInstance); ++ if (result != VK_SUCCESS) ++ return result; ++ ++ /* Create Instance context. */ ++ const VkAllocationCallbacks *alloc = pAllocator ? pAllocator : vk_default_allocator(); ++ void *buf = vk_alloc(alloc, sizeof(instance_data), alignof(instance_data), ++ VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); ++ if (!buf) { ++ PFN_vkDestroyInstance fpDestroyInstance = ++ (PFN_vkDestroyInstance)fpGetInstanceProcAddr(*pInstance, "vkDestroyInstance"); ++ fpDestroyInstance(*pInstance, alloc); ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ } ++ instance_data *ctx = (instance_data *)buf; ++ ctx->apiVersion = pCreateInfo->pApplicationInfo && pCreateInfo->pApplicationInfo->apiVersion ++ ? pCreateInfo->pApplicationInfo->apiVersion ++ : VK_API_VERSION_1_0; ++ ctx->instance = *pInstance; ++ ctx->alloc = *alloc; ++ ctx->next = NULL; ++ init_instance_vtable(ctx, fpGetInstanceProcAddr); ++ add_instance(ctx); ++ ++ return VK_SUCCESS; ++} ++ ++static VKAPI_ATTR void VKAPI_CALL ++anti_lag_DestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) ++{ ++ instance_data *ctx = remove_instance(instance); ++ if (ctx) { ++ ctx->vtable.DestroyInstance(instance, pAllocator); ++ vk_free(&ctx->alloc, ctx); ++ } ++} ++ ++typedef struct device_data { ++ VkDevice device; ++ PFN_vkGetDeviceProcAddr GetDeviceProcAddr; ++ device_context *ctx; /* NULL if anti-lag ext is not enabled. */ ++ struct device_data *next; ++} device_data; ++ ++static void ++init_device_vtable(device_context *ctx, PFN_vkGetDeviceProcAddr gpa, PFN_vkSetDeviceLoaderData sld, ++ bool calibrated_timestamps_khr, bool host_query_reset_ext, ++ bool timeline_semaphore_khr) ++{ ++ ctx->vtable.GetDeviceProcAddr = gpa; ++ ctx->vtable.SetDeviceLoaderData = sld; ++#define INIT_HOOK(fn) ctx->vtable.fn = (PFN_vk##fn)gpa(ctx->device, "vk" #fn) ++#define INIT_HOOK_ALIAS(fn, alias, cond) \ ++ ctx->vtable.fn = (PFN_vk##fn)gpa(ctx->device, cond ? "vk" #alias : "vk" #fn) ++ INIT_HOOK(DestroyDevice); ++ INIT_HOOK(QueueSubmit); ++ INIT_HOOK(QueueSubmit2); ++ INIT_HOOK(QueueSubmit2KHR); ++ INIT_HOOK(GetDeviceQueue); ++ INIT_HOOK(CreateCommandPool); ++ INIT_HOOK(DestroyCommandPool); ++ INIT_HOOK(CreateQueryPool); ++ INIT_HOOK_ALIAS(ResetQueryPool, ResetQueryPoolEXT, host_query_reset_ext); ++ INIT_HOOK(DestroyQueryPool); ++ INIT_HOOK(GetQueryPoolResults); ++ INIT_HOOK(AllocateCommandBuffers); ++ INIT_HOOK(FreeCommandBuffers); ++ INIT_HOOK(BeginCommandBuffer); ++ INIT_HOOK(EndCommandBuffer); ++ INIT_HOOK_ALIAS(GetCalibratedTimestampsKHR, GetCalibratedTimestampsEXT, !calibrated_timestamps_khr); ++ INIT_HOOK(CmdWriteTimestamp); ++ INIT_HOOK(CreateSemaphore); ++ INIT_HOOK(DestroySemaphore); ++ INIT_HOOK_ALIAS(GetSemaphoreCounterValue, GetSemaphoreCounterValueKHR, timeline_semaphore_khr); ++ INIT_HOOK_ALIAS(WaitSemaphores, WaitSemaphoresKHR, timeline_semaphore_khr); ++#undef INIT_HOOK ++#undef INIT_HOOK_ALIAS ++} ++ ++static simple_mtx_t device_mtx = SIMPLE_MTX_INITIALIZER; ++static device_data *device_list = NULL; ++ ++static void ++add_device(device_data *device) ++{ ++ simple_mtx_lock(&device_mtx); ++ device_data **ptr = &device_list; ++ while (*ptr != NULL) ++ ptr = &(*ptr)->next; ++ *ptr = device; ++ simple_mtx_unlock(&device_mtx); ++} ++ ++static device_data * ++remove_device(const void *object) ++{ ++ uintptr_t key = object_to_key(object); ++ simple_mtx_lock(&device_mtx); ++ device_data **ptr = &device_list; ++ while (*ptr && key != object_to_key((*ptr)->device)) ++ ptr = &(*ptr)->next; ++ ++ device_data *ctx = *ptr; ++ *ptr = ctx ? ctx->next : NULL; ++ simple_mtx_unlock(&device_mtx); ++ return ctx; ++} ++ ++static device_data * ++get_device_data(const void *object) ++{ ++ uintptr_t key = object_to_key(object); ++ simple_mtx_lock(&device_mtx); ++ device_data *ctx = device_list; ++ while (ctx && key != object_to_key(ctx->device)) ++ ctx = ctx->next; ++ simple_mtx_unlock(&device_mtx); ++ return ctx; ++} ++ ++device_context * ++get_device_context(const void *object) ++{ ++ device_data *data = get_device_data(object); ++ assert(data && data->ctx); ++ return data->ctx; ++} ++ ++static VkLayerDeviceCreateInfo * ++get_device_chain_info(const VkDeviceCreateInfo *pCreateInfo, VkLayerFunction func) ++{ ++ vk_foreach_struct_const (item, pCreateInfo->pNext) { ++ if (item->sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO && ++ ((VkLayerDeviceCreateInfo *)item)->function == func) ++ return (VkLayerDeviceCreateInfo *)item; ++ } ++ return NULL; ++} ++ ++static bool ++should_enable_layer(instance_data *ctx, VkPhysicalDevice physicalDevice, ++ VkPhysicalDeviceAntiLagFeaturesAMD ext_feature) ++{ ++ /* The extension is not requested by the application. */ ++ if (!ext_feature.antiLag) ++ return false; ++ ++ /* Ensure that the underlying implementation does not expose VK_AMD_anti_lag itself. */ ++ ext_feature.antiLag = false; ++ VkPhysicalDeviceFeatures2 features = { ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, ++ .pNext = &ext_feature, ++ }; ++ ++ if (ctx->vtable.GetPhysicalDeviceFeatures2KHR) { ++ ctx->vtable.GetPhysicalDeviceFeatures2KHR(physicalDevice, &features); ++ return !ext_feature.antiLag; ++ } ++ ++ if (ctx->vtable.GetPhysicalDeviceFeatures2) { ++ ctx->vtable.GetPhysicalDeviceFeatures2(physicalDevice, &features); ++ return !ext_feature.antiLag; ++ } ++ ++ return false; ++} ++ ++static bool ++check_calibrated_timestamps(instance_data *data, VkPhysicalDevice physicalDevice, bool *has_khr) ++{ ++ VkResult res; ++ uint32_t count = 0; ++ res = data->vtable.EnumerateDeviceExtensionProperties(physicalDevice, NULL, &count, NULL); ++ VkExtensionProperties *extensions = ++ vk_alloc(&data->alloc, count * sizeof(VkExtensionProperties), alignof(VkExtensionProperties), ++ VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); ++ if (!extensions) ++ return false; ++ ++ res |= data->vtable.EnumerateDeviceExtensionProperties(physicalDevice, NULL, &count, extensions); ++ ++ *has_khr = false; ++ bool has_ext = false; ++ if (res == VK_SUCCESS) { ++ for (unsigned i = 0; i < count; i++) { ++ if (strcmp(extensions[i].extensionName, VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) == 0) ++ *has_khr = true; ++ if (strcmp(extensions[i].extensionName, VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) == 0) ++ has_ext = true; ++ } ++ } ++ ++ vk_free(&data->alloc, extensions); ++ return *has_khr || has_ext; ++} ++ ++/* Initialize per-queue context: ++ * ++ * This includes creating one CommandPool and one QueryPool per Queue as well as ++ * recording one CommandBuffer per timestamp query. ++ */ ++static VkResult ++init_queue_context(device_context *ctx, queue_context *queue_ctx) ++{ ++#define CHECK_RESULT(res, label) \ ++ if (res != VK_SUCCESS) { \ ++ goto label; \ ++ } ++ ++ VkResult result; ++ ++ /* Create command pool */ ++ struct VkCommandPoolCreateInfo pool_info = { ++ .sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, ++ .pNext = NULL, ++ .flags = 0, ++ .queueFamilyIndex = queue_ctx->queue_family_idx, ++ }; ++ result = ++ ctx->vtable.CreateCommandPool(ctx->device, &pool_info, &ctx->alloc, &queue_ctx->cmdPool); ++ CHECK_RESULT(result, fail_cmdpool) ++ ++ /* Create query pool */ ++ VkQueryPoolCreateInfo query_pool_info = { ++ .sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, ++ .queryType = VK_QUERY_TYPE_TIMESTAMP, ++ .queryCount = MAX_QUERIES, ++ }; ++ result = ctx->vtable.CreateQueryPool(ctx->device, &query_pool_info, &ctx->alloc, ++ &queue_ctx->queryPool); ++ CHECK_RESULT(result, fail_querypool) ++ ctx->vtable.ResetQueryPool(ctx->device, queue_ctx->queryPool, 0, MAX_QUERIES); ++ ringbuffer_init(queue_ctx->queries); ++ ++ /* Create timeline semaphore */ ++ VkSemaphoreTypeCreateInfo timelineCreateInfo = { ++ .sType = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO, ++ .pNext = NULL, ++ .semaphoreType = VK_SEMAPHORE_TYPE_TIMELINE, ++ .initialValue = 0, ++ }; ++ VkSemaphoreCreateInfo createInfo = { ++ .sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, ++ .pNext = &timelineCreateInfo, ++ .flags = 0, ++ }; ++ result = ++ ctx->vtable.CreateSemaphore(ctx->device, &createInfo, &ctx->alloc, &queue_ctx->semaphore); ++ CHECK_RESULT(result, fail_semaphore); ++ ++ for (unsigned j = 0; j < MAX_QUERIES; j++) { ++ struct query *query = &queue_ctx->queries.data[j]; ++ ++ /* Allocate commandBuffer for timestamp. */ ++ VkCommandBufferAllocateInfo buffer_info = { ++ .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, ++ .commandPool = queue_ctx->cmdPool, ++ .level = VK_COMMAND_BUFFER_LEVEL_PRIMARY, ++ .commandBufferCount = 1, ++ }; ++ result = ctx->vtable.AllocateCommandBuffers(ctx->device, &buffer_info, &query->cmdbuffer); ++ CHECK_RESULT(result, fail) ++ result = ctx->vtable.SetDeviceLoaderData(ctx->device, query->cmdbuffer); ++ CHECK_RESULT(result, fail) ++ ++ /* Record commandbuffer. */ ++ VkCommandBufferBeginInfo beginInfo = { ++ .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, ++ }; ++ ++ result = ctx->vtable.BeginCommandBuffer(query->cmdbuffer, &beginInfo); ++ CHECK_RESULT(result, fail) ++ ctx->vtable.CmdWriteTimestamp(query->cmdbuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, ++ queue_ctx->queryPool, j); ++ result = ctx->vtable.EndCommandBuffer(query->cmdbuffer); ++ CHECK_RESULT(result, fail) ++ } ++ ++#undef CHECK_RESULT ++ return result; ++ ++fail: ++ ctx->vtable.DestroySemaphore(ctx->device, queue_ctx->semaphore, &ctx->alloc); ++fail_semaphore: ++ ctx->vtable.DestroyQueryPool(ctx->device, queue_ctx->queryPool, &ctx->alloc); ++fail_querypool: ++ ctx->vtable.DestroyCommandPool(ctx->device, queue_ctx->cmdPool, &ctx->alloc); ++fail_cmdpool: ++ for (queue_context *qctx = ctx->queues; qctx != queue_ctx; qctx++) { ++ ctx->vtable.DestroyQueryPool(ctx->device, qctx->queryPool, &ctx->alloc); ++ ctx->vtable.DestroyCommandPool(ctx->device, qctx->cmdPool, &ctx->alloc); ++ } ++ ++ return result; ++} ++ ++static VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, ++ const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) ++{ ++ instance_data *instance_ctx = get_instance_data(physicalDevice); ++ VkLayerDeviceCreateInfo *chain_info = get_device_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); ++ PFN_vkGetDeviceProcAddr fpGetDeviceProcAddr = chain_info->u.pLayerInfo->pfnNextGetDeviceProcAddr; ++ PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = ++ chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; ++ PFN_vkCreateDevice fpCreateDevice = ++ (PFN_vkCreateDevice)fpGetInstanceProcAddr(instance_ctx->instance, "vkCreateDevice"); ++ if (fpCreateDevice == NULL) ++ return VK_ERROR_INITIALIZATION_FAILED; ++ ++ /* Advance the link info for the next element on the chain. */ ++ chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; ++ ++ const VkAllocationCallbacks *alloc = pAllocator ? pAllocator : &instance_ctx->alloc; ++ device_data *data; ++ VkResult result; ++ ++ /* Only allocate a context and add to dispatch if the extension is enabled. */ ++ const VkPhysicalDeviceAntiLagFeaturesAMD *ext_features = ++ vk_find_struct_const(pCreateInfo->pNext, PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD); ++ bool enable = ext_features && should_enable_layer(instance_ctx, physicalDevice, *ext_features); ++ if (enable) { ++ /* Count queues with sufficient timestamp valid bits. */ ++ // TODO: make it work with less than 64 valid bits ++ unsigned num_queue_families = 0; ++ unsigned num_queues = 0; ++ for (unsigned i = 0; i < pCreateInfo->queueCreateInfoCount; i++) ++ num_queue_families = ++ MAX2(num_queue_families, pCreateInfo->pQueueCreateInfos[i].queueFamilyIndex + 1); ++ VkQueueFamilyProperties *queue_family_props = ++ vk_alloc(alloc, num_queue_families * sizeof(VkQueueFamilyProperties), ++ alignof(VkQueueFamilyProperties), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); ++ if (!queue_family_props) ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ ++ instance_ctx->vtable.GetPhysicalDeviceQueueFamilyProperties( ++ physicalDevice, &num_queue_families, queue_family_props); ++ for (unsigned i = 0; i < pCreateInfo->queueCreateInfoCount; i++) { ++ uint32_t queue_family_idx = pCreateInfo->pQueueCreateInfos[i].queueFamilyIndex; ++ if (queue_family_props[queue_family_idx].timestampValidBits == 64 && ++ (queue_family_props[queue_family_idx].queueFlags & ++ (VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT))) { ++ num_queues += pCreateInfo->pQueueCreateInfos[i].queueCount; ++ } ++ } ++ ++ /* Allocate the context. */ ++ device_context *ctx; ++ queue_context *queues; ++ VK_MULTIALLOC(ma); ++ vk_multialloc_add(&ma, &data, device_data, 1); ++ vk_multialloc_add(&ma, &ctx, struct device_context, 1); ++ vk_multialloc_add(&ma, &queues, queue_context, num_queues); ++ void *buf = vk_multialloc_zalloc(&ma, alloc, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE); ++ if (!buf) { ++ vk_free(alloc, queue_family_props); ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ } ++ ++ VkPhysicalDeviceProperties properties; ++ instance_ctx->vtable.GetPhysicalDeviceProperties(physicalDevice, &properties); ++ ++ /* Ensure that calibrated timestamps and host query reset extensions are enabled. */ ++ bool has_calibrated_timestamps = false; ++ bool has_calibrated_timestamps_khr = false; ++ bool has_vk12 = instance_ctx->apiVersion >= VK_API_VERSION_1_2 && ++ properties.apiVersion >= VK_API_VERSION_1_2; ++ bool has_host_query_reset = has_vk12; ++ bool has_host_query_reset_ext = false; ++ bool has_timeline_semaphore = has_vk12; ++ bool has_timeline_semaphore_khr = false; ++ for (unsigned i = 0; i < pCreateInfo->enabledExtensionCount; i++) { ++ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], ++ VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) == 0) ++ has_calibrated_timestamps = has_calibrated_timestamps_khr = true; ++ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], ++ VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) == 0) ++ has_calibrated_timestamps = true; ++ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], ++ VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME) == 0) ++ has_host_query_reset = has_host_query_reset_ext = true; ++ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], ++ VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME) == 0) ++ has_timeline_semaphore = has_timeline_semaphore_khr = true; ++ } ++ ++ /* Add missing extensions. */ ++ VkDeviceCreateInfo create_info = *pCreateInfo; ++ const char **ext_names = NULL; ++ uint32_t num_extra_extensions = ++ !has_calibrated_timestamps + !has_host_query_reset + !has_timeline_semaphore; ++ if (num_extra_extensions) { ++ ext_names = vk_alloc( ++ alloc, (pCreateInfo->enabledExtensionCount + num_extra_extensions) * sizeof(char *), ++ alignof(char *), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); ++ if (!ext_names) { ++ result = VK_ERROR_OUT_OF_HOST_MEMORY; ++ goto fail; ++ } ++ ++ memcpy(ext_names, pCreateInfo->ppEnabledExtensionNames, ++ sizeof(char *) * pCreateInfo->enabledExtensionCount); ++ ++ if (!has_timeline_semaphore) { ++ has_timeline_semaphore_khr = true; ++ ext_names[create_info.enabledExtensionCount++] = ++ VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME; ++ } ++ if (!has_host_query_reset) { ++ has_host_query_reset_ext = true; ++ ext_names[create_info.enabledExtensionCount++] = VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME; ++ } ++ if (!has_calibrated_timestamps) { ++ check_calibrated_timestamps(instance_ctx, physicalDevice, ++ &has_calibrated_timestamps_khr); ++ ext_names[create_info.enabledExtensionCount++] = ++ has_calibrated_timestamps_khr ? VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME ++ : VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME; ++ } ++ create_info.ppEnabledExtensionNames = ext_names; ++ } ++ ++ /* Ensure that hostQueryReset feature is enabled. */ ++ const VkPhysicalDeviceVulkan12Features *vk12 = ++ vk_find_struct_const(pCreateInfo->pNext, PHYSICAL_DEVICE_VULKAN_1_2_FEATURES); ++ const VkPhysicalDeviceHostQueryResetFeatures *query_reset = ++ vk_find_struct_const(pCreateInfo->pNext, PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES); ++ const VkPhysicalDeviceTimelineSemaphoreFeatures *timeline_semaphore = ++ vk_find_struct_const(pCreateInfo->pNext, PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES); ++ uint32_t prev_hostQueryReset; ++ uint32_t prev_timelineSemaphore; ++ if (vk12) { ++ prev_hostQueryReset = vk12->hostQueryReset; ++ prev_timelineSemaphore = vk12->timelineSemaphore; ++ ((VkPhysicalDeviceVulkan12Features *)vk12)->hostQueryReset = VK_TRUE; ++ ((VkPhysicalDeviceVulkan12Features *)vk12)->timelineSemaphore = VK_TRUE; ++ } else { ++ if (query_reset) { ++ prev_hostQueryReset = query_reset->hostQueryReset; ++ ((VkPhysicalDeviceHostQueryResetFeatures *)query_reset)->hostQueryReset = VK_TRUE; ++ } else { ++ VkPhysicalDeviceHostQueryResetFeatures *feat = ++ alloca(sizeof(VkPhysicalDeviceHostQueryResetFeatures)); ++ *feat = (VkPhysicalDeviceHostQueryResetFeatures){ ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, ++ .pNext = (void *)create_info.pNext, ++ .hostQueryReset = VK_TRUE, ++ }; ++ create_info.pNext = feat; ++ } ++ if (timeline_semaphore) { ++ prev_timelineSemaphore = timeline_semaphore->timelineSemaphore; ++ ((VkPhysicalDeviceTimelineSemaphoreFeatures *)timeline_semaphore)->timelineSemaphore = ++ VK_TRUE; ++ } else { ++ VkPhysicalDeviceTimelineSemaphoreFeatures *feat = ++ alloca(sizeof(VkPhysicalDeviceTimelineSemaphoreFeatures)); ++ *feat = (VkPhysicalDeviceTimelineSemaphoreFeatures){ ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, ++ .pNext = (void *)create_info.pNext, ++ .timelineSemaphore = VK_TRUE, ++ }; ++ create_info.pNext = feat; ++ } ++ } ++ ++ /* Create Device. */ ++ result = fpCreateDevice(physicalDevice, &create_info, pAllocator, pDevice); ++ ++ if (vk12) { ++ ((VkPhysicalDeviceVulkan12Features *)vk12)->hostQueryReset = prev_hostQueryReset; ++ ((VkPhysicalDeviceVulkan12Features *)vk12)->timelineSemaphore = prev_timelineSemaphore; ++ } else { ++ if (query_reset) ++ ((VkPhysicalDeviceHostQueryResetFeatures *)query_reset)->hostQueryReset = ++ prev_hostQueryReset; ++ if (timeline_semaphore) ++ ((VkPhysicalDeviceTimelineSemaphoreFeatures *)timeline_semaphore)->timelineSemaphore = ++ prev_timelineSemaphore; ++ } ++ if (ext_names) ++ vk_free(alloc, ext_names); ++ ++ if (result != VK_SUCCESS) ++ goto fail; ++ ++ /* Initialize Context. */ ++ data->ctx = ctx; ++ ctx->device = *pDevice; ++ chain_info = get_device_chain_info(pCreateInfo, VK_LOADER_DATA_CALLBACK); ++ PFN_vkSetDeviceLoaderData fpSetDeviceLoaderData = ++ (PFN_vkSetDeviceLoaderData)chain_info->u.pfnSetDeviceLoaderData; ++ init_device_vtable(ctx, fpGetDeviceProcAddr, fpSetDeviceLoaderData, ++ has_calibrated_timestamps_khr, has_host_query_reset_ext, ++ has_timeline_semaphore_khr); ++ simple_mtx_init(&ctx->mtx, mtx_plain); ++ ctx->num_queues = num_queues; ++ ctx->alloc = *alloc; ++ ctx->calibration.timestamp_period = properties.limits.timestampPeriod; ++ ringbuffer_init(ctx->frames); ++ ++ /* Initialize Queue contexts. */ ++ unsigned idx = 0; ++ for (unsigned i = 0; i < pCreateInfo->queueCreateInfoCount; i++) { ++ /* Skip queue families without sufficient timestamp valid bits. ++ * Also skip queue families which cannot do GRAPHICS or COMPUTE since they ++ * always heavily async in nature (DMA transfers and sparse for example). ++ * Video is also irrelvant here since it should never be a critical path ++ * in a game that wants anti-lag. */ ++ uint32_t queue_family_idx = pCreateInfo->pQueueCreateInfos[i].queueFamilyIndex; ++ if (queue_family_props[queue_family_idx].timestampValidBits != 64 || ++ !(queue_family_props[queue_family_idx].queueFlags & ++ (VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT))) ++ continue; ++ ++ for (unsigned j = 0; j < pCreateInfo->pQueueCreateInfos[i].queueCount; j++) { ++ VkQueue queue; ++ ctx->vtable.GetDeviceQueue(*pDevice, queue_family_idx, j, &queue); ++ ctx->queues[idx].queue = queue; ++ ctx->queues[idx].queue_family_idx = queue_family_idx; ++ result = init_queue_context(ctx, &ctx->queues[idx]); ++ idx++; ++ if (result != VK_SUCCESS) ++ goto fail; ++ } ++ } ++ assert(idx == num_queues); ++ fail: ++ vk_free(alloc, queue_family_props); ++ } else { ++ data = (device_data *)vk_alloc(alloc, sizeof(device_data), alignof(device_data), ++ VK_SYSTEM_ALLOCATION_SCOPE_DEVICE); ++ if (!data) ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ result = fpCreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice); ++ data->ctx = NULL; ++ } ++ ++ if (result == VK_SUCCESS) { ++ data->device = *pDevice; ++ data->GetDeviceProcAddr = fpGetDeviceProcAddr; ++ data->next = NULL; ++ add_device(data); ++ } else { ++ vk_free(alloc, data); ++ } ++ ++ return result; ++} ++ ++static VKAPI_ATTR void VKAPI_CALL ++anti_lag_DestroyDevice(VkDevice pDevice, const VkAllocationCallbacks *pAllocator) ++{ ++ device_data *data = remove_device(pDevice); ++ assert(data && data->ctx); ++ device_context *ctx = data->ctx; ++ ++ /* Destroy per-queue context. ++ * The application must ensure that no work is active on the device. ++ */ ++ for (unsigned i = 0; i < ctx->num_queues; i++) { ++ queue_context *queue_ctx = &ctx->queues[i]; ++ ctx->vtable.DestroyQueryPool(ctx->device, queue_ctx->queryPool, &ctx->alloc); ++ ctx->vtable.DestroyCommandPool(ctx->device, queue_ctx->cmdPool, &ctx->alloc); ++ ctx->vtable.DestroySemaphore(ctx->device, queue_ctx->semaphore, &ctx->alloc); ++ } ++ ++ ctx->vtable.DestroyDevice(pDevice, pAllocator); ++ vk_free(&ctx->alloc, data); ++} ++ ++static bool ++is_anti_lag_supported(VkPhysicalDevice physicalDevice) ++{ ++ instance_data *data = get_instance_data(physicalDevice); ++ VkPhysicalDeviceProperties properties; ++ data->vtable.GetPhysicalDeviceProperties(physicalDevice, &properties); ++ if (properties.limits.timestampPeriod == 0.0 || !properties.limits.timestampComputeAndGraphics) ++ return false; ++ ++ /* Check whether calibrated timestamps are supported. */ ++ bool has_khr; ++ if (!check_calibrated_timestamps(data, physicalDevice, &has_khr)) ++ return false; ++ ++ /* Check whether timeline semaphores and host query reset are supported. */ ++ VkPhysicalDeviceTimelineSemaphoreFeatures timeline_semaphore = { ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, ++ .timelineSemaphore = VK_FALSE, ++ }; ++ VkPhysicalDeviceHostQueryResetFeatures query_reset = { ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, ++ .pNext = &timeline_semaphore, ++ .hostQueryReset = VK_FALSE, ++ }; ++ VkPhysicalDeviceFeatures2 features = { ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, ++ .pNext = &query_reset, ++ }; ++ if (data->vtable.GetPhysicalDeviceFeatures2KHR) ++ data->vtable.GetPhysicalDeviceFeatures2KHR(physicalDevice, &features); ++ else if (data->vtable.GetPhysicalDeviceFeatures2) ++ data->vtable.GetPhysicalDeviceFeatures2(physicalDevice, &features); ++ if (!timeline_semaphore.timelineSemaphore || !query_reset.hostQueryReset) ++ return false; ++ ++ /* Check that DEVICE and CLOCK_MONOTONIC time domains are available. */ ++ VkResult res; ++ uint32_t count = 0; ++ PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR ctd = ++ has_khr ? data->vtable.GetPhysicalDeviceCalibrateableTimeDomainsKHR ++ : data->vtable.GetPhysicalDeviceCalibrateableTimeDomainsEXT; ++ res = ctd(physicalDevice, &count, NULL); ++ VkTimeDomainKHR *time_domains = alloca(count * sizeof(VkTimeDomainKHR)); ++ res |= ctd(physicalDevice, &count, time_domains); ++ if (res != VK_SUCCESS) ++ return false; ++ ++ bool has_device_domain = false; ++ bool has_host_domain = false; ++ for (unsigned i = 0; i < count; i++) { ++ has_device_domain |= time_domains[i] == VK_TIME_DOMAIN_DEVICE_KHR; ++ has_host_domain |= time_domains[i] == VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR; ++ } ++ ++ return has_device_domain && has_host_domain; ++} ++ ++static VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, ++ uint32_t *pPropertyCount, ++ VkExtensionProperties *pProperties) ++{ ++ instance_data *instance_data = get_instance_data(physicalDevice); ++ ++ if (pLayerName && strcmp(pLayerName, "VK_LAYER_MESA_anti_lag") == 0) { ++ if (!is_anti_lag_supported(physicalDevice)) { ++ *pPropertyCount = 0; ++ return VK_SUCCESS; ++ } ++ ++ VK_OUTARRAY_MAKE_TYPED(VkExtensionProperties, out, pProperties, pPropertyCount); ++ vk_outarray_append_typed(VkExtensionProperties, &out, prop) ++ { ++ *prop = ++ (VkExtensionProperties){VK_AMD_ANTI_LAG_EXTENSION_NAME, VK_AMD_ANTI_LAG_SPEC_VERSION}; ++ } ++ return vk_outarray_status(&out); ++ } ++ ++ return instance_data->vtable.EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, ++ pPropertyCount, pProperties); ++} ++ ++static VKAPI_ATTR void VKAPI_CALL ++anti_lag_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, ++ VkPhysicalDeviceFeatures2 *pFeatures) ++{ ++ instance_data *ctx = get_instance_data(physicalDevice); ++ ctx->vtable.GetPhysicalDeviceFeatures2(physicalDevice, pFeatures); ++ VkPhysicalDeviceAntiLagFeaturesAMD *anti_lag_features = ++ vk_find_struct(pFeatures->pNext, PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD); ++ ++ if (anti_lag_features) { ++ anti_lag_features->antiLag |= is_anti_lag_supported(physicalDevice); ++ } ++} ++ ++static VKAPI_ATTR void VKAPI_CALL ++anti_lag_GetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, ++ VkPhysicalDeviceFeatures2 *pFeatures) ++{ ++ instance_data *ctx = get_instance_data(physicalDevice); ++ ctx->vtable.GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); ++ VkPhysicalDeviceAntiLagFeaturesAMD *anti_lag_features = ++ vk_find_struct(pFeatures->pNext, PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD); ++ ++ if (anti_lag_features) { ++ anti_lag_features->antiLag |= is_anti_lag_supported(physicalDevice); ++ } ++} ++ ++static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL ++anti_lag_GetInstanceProcAddr(VkInstance instance, const char *pName); ++ ++static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL ++anti_lag_GetDeviceProcAddr(VkDevice device, const char *pName); ++ ++#define ADD_HOOK(fn) {"vk" #fn, (PFN_vkVoidFunction)anti_lag_##fn} ++static const struct { ++ const char *name; ++ PFN_vkVoidFunction ptr; ++} instance_funcptr_map[] = { ++ ADD_HOOK(GetInstanceProcAddr), ++ ADD_HOOK(CreateInstance), ++ ADD_HOOK(DestroyInstance), ++ ADD_HOOK(EnumerateDeviceExtensionProperties), ++ ADD_HOOK(CreateDevice), ++ ADD_HOOK(GetPhysicalDeviceFeatures2), ++ ADD_HOOK(GetPhysicalDeviceFeatures2KHR), ++}; ++ ++static const struct { ++ const char *name; ++ PFN_vkVoidFunction ptr; ++} device_funcptr_map[] = { ++ ADD_HOOK(GetDeviceProcAddr), ++ ADD_HOOK(DestroyDevice), ++ ADD_HOOK(AntiLagUpdateAMD), ++ ADD_HOOK(QueueSubmit), ++ ADD_HOOK(QueueSubmit2), ++ ADD_HOOK(QueueSubmit2KHR), ++}; ++#undef ADD_HOOK ++ ++static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL ++anti_lag_GetInstanceProcAddr(VkInstance instance, const char *pName) ++{ ++ if (!pName) ++ return NULL; ++ ++ PFN_vkVoidFunction result = NULL; ++ if (instance) { ++ instance_data *ctx = get_instance_data(instance); ++ if (ctx) ++ result = ctx->vtable.GetInstanceProcAddr(instance, pName); ++ } ++ ++ /* Only hook instance functions which are exposed by the underlying impl. ++ * Ignore instance parameter for vkCreateInstance and vkCreateDevice. ++ */ ++ if (result || strcmp(pName, "vkCreateInstance") == 0 || strcmp(pName, "vkCreateDevice") == 0) { ++ for (uint32_t i = 0; i < ARRAY_SIZE(instance_funcptr_map); i++) { ++ if (strcmp(pName, instance_funcptr_map[i].name) == 0) ++ return instance_funcptr_map[i].ptr; ++ } ++ } ++ ++ return result; ++} ++ ++static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL ++anti_lag_GetDeviceProcAddr(VkDevice device, const char *pName) ++{ ++ if (!pName || !device) ++ return NULL; ++ ++ device_data *data = get_device_data(device); ++ PFN_vkVoidFunction result = data->GetDeviceProcAddr(device, pName); ++ ++ /* Only hook device functions if the Layer extension is enabled. */ ++ if (data->ctx && (result || strcmp(pName, "vkAntiLagUpdateAMD") == 0)) { ++ for (uint32_t i = 0; i < ARRAY_SIZE(device_funcptr_map); i++) { ++ if (strcmp(pName, device_funcptr_map[i].name) == 0) ++ return device_funcptr_map[i].ptr; ++ } ++ } ++ ++ return result; ++} ++ ++PUBLIC VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_NegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct) ++{ ++ assert(pVersionStruct != NULL); ++ assert(pVersionStruct->sType == LAYER_NEGOTIATE_INTERFACE_STRUCT); ++ ++ if (pVersionStruct->loaderLayerInterfaceVersion >= 2) { ++ pVersionStruct->loaderLayerInterfaceVersion = 2; ++ pVersionStruct->pfnGetInstanceProcAddr = anti_lag_GetInstanceProcAddr; ++ pVersionStruct->pfnGetDeviceProcAddr = anti_lag_GetDeviceProcAddr; ++ pVersionStruct->pfnGetPhysicalDeviceProcAddr = NULL; ++ } ++ ++ return VK_SUCCESS; ++} +diff --git a/src/vulkan/anti-lag-layer/meson.build b/src/vulkan/anti-lag-layer/meson.build +new file mode 100644 +index 00000000000..264c55c8e75 +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/meson.build +@@ -0,0 +1,26 @@ ++# Copyright © 2025 Valve Corporation ++# SPDX-License-Identifier: MIT ++ ++vklayer_files = files( ++ 'anti_lag_layer.c', ++ 'anti_lag_layer_interface.c', ++) ++ ++shared_library( ++ 'VkLayer_MESA_anti_lag', ++ vklayer_files, ++ c_args : [no_override_init_args], ++ gnu_symbol_visibility : 'hidden', ++ dependencies : [ ++ idep_vulkan_util, idep_mesautil, ++ ], ++ include_directories : [inc_include, inc_util, inc_src], ++ link_args : cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro']), ++ install : true ++) ++ ++install_data( ++ files('VkLayer_MESA_anti_lag.json'), ++ install_dir : join_paths(get_option('datadir'), 'vulkan', 'implicit_layer.d'), ++ install_tag : 'runtime', ++) +diff --git a/src/vulkan/anti-lag-layer/ringbuffer.h b/src/vulkan/anti-lag-layer/ringbuffer.h +new file mode 100644 +index 00000000000..1747b7e720f +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/ringbuffer.h +@@ -0,0 +1,58 @@ ++/* ++ * Copyright © 2025 Valve Corporation ++ * ++ * SPDX-License-Identifier: MIT ++ */ ++ ++#ifndef RINGBUFFER_H ++#define RINGBUFFER_H ++ ++#include "util/macros.h" ++ ++#define RINGBUFFER_DECLARE(name, type, N) \ ++ struct { \ ++ type data[N]; \ ++ uint32_t head; \ ++ uint32_t tail; \ ++ uint32_t size; \ ++ simple_mtx_t mtx; \ ++ } name ++ ++#define ringbuffer_init(buffer) \ ++ (buffer.head = buffer.tail = buffer.size = 0, simple_mtx_init(&buffer.mtx, mtx_plain)) ++ ++#define ringbuffer_lock(buffer) simple_mtx_lock(&buffer.mtx) ++#define ringbuffer_unlock(buffer) simple_mtx_unlock(&buffer.mtx) ++ ++static inline uint32_t ++__ringbuffer_add_wrap(uint32_t *val, uint32_t *size, uint32_t N) ++{ ++ uint32_t prev = *val; ++ *val = (*val + 1) % N; ++ *size = *size + 1; ++ assert(*size <= N); ++ return prev; ++} ++ ++#define ringbuffer_alloc(buffer) \ ++ (buffer.size == ARRAY_SIZE(buffer.data) \ ++ ? NULL \ ++ : &buffer.data[__ringbuffer_add_wrap(&buffer.head, &buffer.size, ARRAY_SIZE(buffer.data))]) ++ ++#define ringbuffer_free(buffer, elem) \ ++ assert(elem == NULL || elem == &buffer.data[buffer.tail]); \ ++ buffer.size--; \ ++ assert(buffer.size < ARRAY_SIZE(buffer.data)); \ ++ buffer.tail = (buffer.tail + 1) % ARRAY_SIZE(buffer.data) ++ ++#define ringbuffer_first(buffer) (&buffer.data[buffer.tail]) ++ ++#define ringbuffer_last(buffer) \ ++ (&buffer.data[(buffer.head + ARRAY_SIZE(buffer.data) - 1) % ARRAY_SIZE(buffer.data)]) ++ ++#define ringbuffer_index(buffer, elem) (elem - buffer.data) ++ ++#define ringbuffer_next(buffer, elem) \ ++ (&buffer.data[(ringbuffer_index(buffer, elem) + 1) % ARRAY_SIZE(buffer.data)]) ++ ++#endif /* RINGBUFFER_H */ +diff --git a/src/vulkan/meson.build b/src/vulkan/meson.build +index 3225b5f4a9d..cf62ecc6ae7 100644 +--- a/src/vulkan/meson.build ++++ b/src/vulkan/meson.build +@@ -98,3 +98,6 @@ endif + if with_vulkan_vram_report_limit_layer + subdir('vram-report-limit-layer') + endif ++if with_vulkan_anti_lag_layer ++ subdir('anti-lag-layer') ++endif +-- +2.50.1 + + +From e4adbbe12d9aafdaf80f340f685cf7bd7758d385 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= +Date: Thu, 30 May 2024 11:55:46 +0200 +Subject: [PATCH 07/11] util/time: add os_time_nanosleep_until() function + +Part-of: +--- + src/util/os_time.c | 16 +++++++++++++++- + src/util/os_time.h | 2 ++ + 2 files changed, 17 insertions(+), 1 deletion(-) + +diff --git a/src/util/os_time.c b/src/util/os_time.c +index da8ad7a80b8..209b7ae442c 100644 +--- a/src/util/os_time.c ++++ b/src/util/os_time.c +@@ -60,7 +60,21 @@ os_time_get_nano(void) + return ts.tv_nsec + ts.tv_sec*INT64_C(1000000000); } - static const struct vk_instance_extension_table radv_instance_extensions_supported = { -diff --git a/src/amd/vulkan/radv_instance.h b/src/amd/vulkan/radv_instance.h -index d0f23404285..81c4921222e 100644 ---- a/src/amd/vulkan/radv_instance.h -+++ b/src/amd/vulkan/radv_instance.h -@@ -74,6 +74,7 @@ struct radv_instance { - bool lower_terminate_to_discard; - bool emulate_rt; - bool expose_float16_gfx8; -+ bool force_64k_sparse_alignment; - char *app_layer; - uint8_t override_graphics_shader_version; - uint8_t override_compute_shader_version; -diff --git a/src/util/00-radv-defaults.conf b/src/util/00-radv-defaults.conf -index 2a6b0ec84a4..595a435802f 100644 ---- a/src/util/00-radv-defaults.conf -+++ b/src/util/00-radv-defaults.conf -@@ -123,6 +123,13 @@ Application bugs worked around in this file: -