├── test ├── __init__.py ├── conftest.py ├── test_fetch.py ├── test_format.py ├── test_license.py └── test_cargo.py ├── integration_test ├── __init__.py ├── license-mapping.conf ├── synapse-0.1.0.ebuild ├── watchfiles-0.18.1.ebuild ├── cryptography-38.0.3.ebuild ├── blake3-0.3.3.ebuild ├── setuptools-rust-1.5.2.ebuild ├── qiskit-terra-0.22.3.ebuild ├── rustworkx-0.12.1.ebuild ├── rustls-0.20.7.ebuild ├── alass-2.0.0.ebuild ├── bindgen-0.63.0.ebuild ├── mdbook-linkcheck-0.7.7.ebuild ├── rustic-rs-0.5.0.ebuild ├── attest-0.1.0.ebuild ├── milkshake-terminal-0.0.0.ebuild ├── test_integration.py ├── news_flash_gtk-0.0.0.ebuild ├── lemmy_server-0.18.0.ebuild ├── ruffle_core-0.1.0.ebuild └── fractal-5.0.0.ebuild ├── .github ├── FUNDING.yml └── workflows │ └── ci.yaml ├── .gitignore ├── pycargoebuild ├── __init__.py ├── fetch.py ├── license.py ├── format.py ├── cargo.py └── ebuild.py ├── tox.ini ├── data └── share │ └── bash-completion │ └── completions │ └── pycargoebuild ├── pyproject.toml ├── README.rst └── COPYING /test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [mgorny] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__/ 2 | /.tox/ 3 | /integration_test/dist/ 4 | 5 | /dist/ 6 | -------------------------------------------------------------------------------- /pycargoebuild/__init__.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2025 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | """A generator for Rust/Cargo ebuilds written in Python""" 6 | 7 | __version__ = "0.15.0" 8 | -------------------------------------------------------------------------------- /integration_test/license-mapping.conf: -------------------------------------------------------------------------------- 1 | [spdx-to-ebuild] 2 | 0BSD = 0BSD 3 | AGPL-3.0-only = AGPL-3 4 | Apache-2.0 = Apache-2.0 5 | Apache-2.0 WITH LLVM-exception = Apache-2.0-with-LLVM-exceptions 6 | Artistic-2.0 = Artistic-2 7 | BSD-2-Clause = BSD-2 8 | BSD-3-Clause = BSD 9 | BSL-1.0 = Boost-1.0 10 | CC0-1.0 = CC0-1.0 11 | EPL-2.0 = EPL-2.0 12 | ISC = ISC 13 | GPL-3.0-only = GPL-3 14 | GPL-3.0-or-later = GPL-3+ 15 | LGPL-3.0-only = LGPL-3 16 | MIT = MIT 17 | MIT-0 = MIT-0 18 | MPL-2.0 = MPL-2.0 19 | OFL-1.1 = OFL-1.1 20 | Ubuntu-font-1.0 = UbuntuFontLicense-1.0 21 | Unicode-DFS-2016 = Unicode-DFS-2016 22 | Unlicense = Unlicense 23 | Zlib = ZLIB 24 | -------------------------------------------------------------------------------- /test/conftest.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2024 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import io 6 | 7 | import pytest 8 | 9 | from pycargoebuild.license import load_license_mapping 10 | 11 | TEST_LICENSE_MAPPING_CONF = """ 12 | [spdx-to-ebuild] 13 | Apache-2.0 = Apache-2.0 14 | Apache-2.0 WITH LLVM-exception = Apache-2.0-with-LLVM-exceptions 15 | BSD-3-Clause = BSD 16 | CC0-1.0 = CC0-1.0 17 | MIT = MIT 18 | Unicode-DFS-2016 = Unicode-DFS-2016 19 | Unlicense = Unlicense 20 | """ 21 | 22 | 23 | @pytest.fixture 24 | def real_license_mapping() -> None: 25 | with io.StringIO(TEST_LICENSE_MAPPING_CONF) as f: 26 | load_license_mapping(f) 27 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = qa,py310,py311,py312,py313,py314,pypy310,pypy311 3 | isolated_build = True 4 | 5 | [testenv] 6 | deps = 7 | mypy 8 | extras = 9 | test 10 | commands = 11 | pytest -vv {posargs:test} 12 | mypy {posargs:integration_test pycargoebuild test} 13 | 14 | [testenv:integration] 15 | deps = 16 | extras = 17 | test 18 | commands = 19 | pytest -vv {posargs:integration_test} 20 | 21 | [testenv:qa] 22 | skip_install = true 23 | deps = 24 | ruff 25 | commands = 26 | ruff check --preview {posargs:integration_test pycargoebuild test} 27 | 28 | [testenv:upload] 29 | skip_install = true 30 | deps = 31 | build 32 | twine 33 | commands = 34 | python -m build -s -w 35 | twine upload dist/* 36 | -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: [push, pull_request] 3 | jobs: 4 | ci: 5 | strategy: 6 | matrix: 7 | python-version: ["3.10", "3.11", "3.12", "3.13", "3.14-dev", "pypy-3.10", "pypy-3.11"] 8 | suite: ["py", "integration"] 9 | fail-fast: false 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v4 14 | - name: Set up Python 15 | uses: actions/setup-python@v5 16 | with: 17 | python-version: ${{ matrix.python-version }} 18 | cache: pip 19 | - name: Install tox 20 | run: pip install tox 21 | - name: Cache fetched crates 22 | uses: actions/cache@v4 23 | if: ${{ matrix.suite == 'integration' }} 24 | with: 25 | path: integration_test/dist 26 | key: dist 27 | - name: Test using tox 28 | run: tox -e ${{ matrix.suite }} 29 | qa: 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Checkout 33 | uses: actions/checkout@v2 34 | - name: Set up Python 35 | uses: actions/setup-python@v3 36 | with: 37 | python-version: "3.10" 38 | - name: Install tox 39 | run: pip install tox 40 | - name: Test using tox 41 | run: tox -e qa 42 | -------------------------------------------------------------------------------- /test/test_fetch.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2024 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import pytest 6 | 7 | from pycargoebuild.cargo import FileCrate 8 | from pycargoebuild.fetch import ChecksumMismatchError, verify_crates 9 | 10 | FOO_CSUM = "37d2046a395cbfcb2712ff5c96a727b1966876080047c56717009dbbc235f566" 11 | BAR_CSUM = "22d39d98821d4b60c3fcbd0fead3c873ddd568971cc530070254b769e18623f3" 12 | 13 | 14 | @pytest.fixture(scope="session") 15 | def test_crates(tmp_path_factory): 16 | test_dir = tmp_path_factory.mktemp("crates") 17 | (test_dir / "foo-1.crate").write_bytes(b"test string\n") 18 | (test_dir / "bar-2.crate").write_bytes(b"other string\n") 19 | yield test_dir 20 | 21 | 22 | def test_verify_pass(test_crates): 23 | verify_crates([FileCrate("foo", "1", FOO_CSUM), 24 | FileCrate("bar", "2", BAR_CSUM), 25 | ], distdir=test_crates) 26 | 27 | 28 | def test_verify_fail(test_crates): 29 | with pytest.raises(ChecksumMismatchError) as e: 30 | verify_crates([FileCrate("foo", "1", FOO_CSUM), 31 | FileCrate("bar", "2", FOO_CSUM), 32 | ], distdir=test_crates) 33 | 34 | assert (e.value.path, e.value.current, e.value.expected 35 | ) == (test_crates / "bar-2.crate", BAR_CSUM, FOO_CSUM) 36 | -------------------------------------------------------------------------------- /data/share/bash-completion/completions/pycargoebuild: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2024 Arthur Zamarin 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | _pycargoebuild() { 6 | local i cur prev 7 | _get_comp_words_by_ref cur prev 8 | 9 | local OPTS=( 10 | -h --help -c --crate-tarball -e --features --crate-tarball-path 11 | --crate-tarball-prefix --no-write-crate-tarball -d --distdir 12 | -f --force -F --fetcher -i --input --inplace --no-config 13 | -l --license-mapping -L --no-license -M --no-manifest -o --output 14 | ) 15 | 16 | case ${prev} in 17 | --crate-tarball-prefix) 18 | COMPREPLY=() 19 | return 0 20 | ;; 21 | --crate-tarball-path) 22 | _filedir 23 | return 0 24 | ;; 25 | -i|--input|--inplace|-o|--output) 26 | _filedir 'ebuild' 27 | return 0 28 | ;; 29 | -d|--distdir) 30 | _filedir -d 31 | return 0 32 | ;; 33 | -l|--license-mapping) 34 | _filedir 35 | return 0 36 | ;; 37 | -F|--fetcher) 38 | COMPREPLY=($(compgen -W 'auto aria2 wget' -- "${cur}")) 39 | return 0 40 | ;; 41 | esac 42 | 43 | if [[ ${cur} == -* ]]; then 44 | COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "${cur}") ) 45 | else 46 | _filedir -d 47 | fi 48 | } && 49 | complete -F _pycargoebuild pycargoebuild 50 | -------------------------------------------------------------------------------- /integration_test/synapse-0.1.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | aho-corasick@0.7.19 10 | anyhow@1.0.66 11 | arc-swap@1.5.1 12 | autocfg@1.1.0 13 | bitflags@1.3.2 14 | blake2@0.10.5 15 | block-buffer@0.10.3 16 | cfg-if@1.0.0 17 | crypto-common@0.1.6 18 | digest@0.10.5 19 | generic-array@0.14.6 20 | hex@0.4.3 21 | indoc@1.0.7 22 | itoa@1.0.4 23 | lazy_static@1.4.0 24 | libc@0.2.135 25 | lock_api@0.4.9 26 | log@0.4.17 27 | memchr@2.5.0 28 | memoffset@0.6.5 29 | once_cell@1.15.0 30 | parking_lot@0.12.1 31 | parking_lot_core@0.9.3 32 | proc-macro2@1.0.46 33 | pyo3-build-config@0.17.3 34 | pyo3-ffi@0.17.3 35 | pyo3-log@0.7.0 36 | pyo3-macros-backend@0.17.3 37 | pyo3-macros@0.17.3 38 | pyo3@0.17.3 39 | pythonize@0.17.0 40 | quote@1.0.21 41 | redox_syscall@0.2.16 42 | regex-syntax@0.6.27 43 | regex@1.7.0 44 | ryu@1.0.11 45 | scopeguard@1.1.0 46 | serde@1.0.147 47 | serde_derive@1.0.147 48 | serde_json@1.0.87 49 | smallvec@1.10.0 50 | subtle@2.4.1 51 | syn@1.0.102 52 | target-lexicon@0.12.4 53 | typenum@1.15.0 54 | unicode-ident@1.0.5 55 | unindent@0.1.10 56 | version_check@0.9.4 57 | windows-sys@0.36.1 58 | windows_aarch64_msvc@0.36.1 59 | windows_i686_gnu@0.36.1 60 | windows_i686_msvc@0.36.1 61 | windows_x86_64_gnu@0.36.1 62 | windows_x86_64_msvc@0.36.1 63 | " 64 | 65 | inherit cargo 66 | 67 | DESCRIPTION="" 68 | HOMEPAGE="" 69 | SRC_URI=" 70 | ${CARGO_CRATE_URIS} 71 | " 72 | 73 | LICENSE="" 74 | # Dependent crate licenses 75 | LICENSE+=" 76 | Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD MIT Unicode-DFS-2016 77 | " 78 | SLOT="0" 79 | KEYWORDS="~amd64" 80 | -------------------------------------------------------------------------------- /integration_test/watchfiles-0.18.1.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | autocfg@1.1.0 10 | bitflags@1.3.2 11 | cfg-if@1.0.0 12 | crossbeam-channel@0.5.4 13 | crossbeam-utils@0.8.8 14 | filetime@0.2.16 15 | fsevent-sys@4.1.0 16 | indoc@1.0.4 17 | inotify-sys@0.1.5 18 | inotify@0.9.6 19 | kqueue-sys@1.0.3 20 | kqueue@1.0.5 21 | lazy_static@1.4.0 22 | libc@0.2.124 23 | lock_api@0.4.7 24 | log@0.4.16 25 | memoffset@0.6.5 26 | mio@0.8.2 27 | miow@0.3.7 28 | notify@5.0.0 29 | ntapi@0.3.7 30 | once_cell@1.10.0 31 | parking_lot@0.12.0 32 | parking_lot_core@0.9.2 33 | proc-macro2@1.0.37 34 | pyo3-build-config@0.17.3 35 | pyo3-ffi@0.17.3 36 | pyo3-macros-backend@0.17.3 37 | pyo3-macros@0.17.3 38 | pyo3@0.17.3 39 | quote@1.0.18 40 | redox_syscall@0.2.13 41 | same-file@1.0.6 42 | scopeguard@1.1.0 43 | smallvec@1.8.0 44 | syn@1.0.91 45 | target-lexicon@0.12.3 46 | unicode-xid@0.2.2 47 | unindent@0.1.8 48 | walkdir@2.3.2 49 | wasi@0.11.0+wasi-snapshot-preview1 50 | winapi-i686-pc-windows-gnu@0.4.0 51 | winapi-util@0.1.5 52 | winapi-x86_64-pc-windows-gnu@0.4.0 53 | winapi@0.3.9 54 | windows-sys@0.34.0 55 | windows_aarch64_msvc@0.34.0 56 | windows_i686_gnu@0.34.0 57 | windows_i686_msvc@0.34.0 58 | windows_x86_64_gnu@0.34.0 59 | windows_x86_64_msvc@0.34.0 60 | " 61 | 62 | inherit cargo 63 | 64 | DESCRIPTION="" 65 | HOMEPAGE="https://github.com/samuelcolvin/watchfiles/watchfiles" 66 | SRC_URI=" 67 | ${CARGO_CRATE_URIS} 68 | " 69 | 70 | LICENSE="MIT" 71 | # Dependent crate licenses 72 | LICENSE+=" 73 | Apache-2.0 Apache-2.0-with-LLVM-exceptions ISC MIT 74 | || ( Artistic-2 CC0-1.0 ) 75 | " 76 | SLOT="0" 77 | KEYWORDS="~amd64" 78 | -------------------------------------------------------------------------------- /test/test_format.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2024 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import pytest 6 | 7 | from pycargoebuild.format import format_license_var 8 | 9 | FORMAT_TESTS = { 10 | "": "", 11 | "A": "A", 12 | "A B C": "A B C", 13 | "|| ( A B C )": "|| ( A B C )", 14 | "A B || ( C D )": """ 15 | \tA B 16 | \t|| ( C D ) 17 | """, 18 | "A B || ( C D ) E F": """ 19 | \tA B 20 | \t|| ( C D ) 21 | \tE F 22 | """, 23 | "|| ( A B ) C D": """ 24 | \t|| ( A B ) 25 | \tC D 26 | """, 27 | "A || ( B ( C D ) )": """ 28 | \tA 29 | \t|| ( 30 | \t\tB 31 | \t\t( C D ) 32 | \t) 33 | """, 34 | "|| ( ( A B ) ( C D ) )": """ 35 | \t|| ( 36 | \t\t( A B ) 37 | \t\t( C D ) 38 | \t) 39 | """, 40 | "A || ( B ( C || ( D E ) ) )": """ 41 | \tA 42 | \t|| ( 43 | \t\tB 44 | \t\t( 45 | \t\t\tC 46 | \t\t\t|| ( D E ) 47 | \t\t) 48 | \t) 49 | """, 50 | 51 | # line wrapping tests 52 | # 4 8 12 16 20 24 53 | # LICENSE="ABCD ABCD ABCD" 54 | # tab>ABCD ABCD ABCD ABCD 55 | "ABCD ABCD ABCD": "ABCD ABCD ABCD", 56 | "ABCD ABCD ABCD ABCD": """ 57 | \tABCD ABCD ABCD ABCD 58 | """, 59 | "ABCD ABCD ABCD ABCD ABCD": """ 60 | \tABCD ABCD ABCD ABCD 61 | \tABCD 62 | """, 63 | "ABCD ABCD ABCD ABCD ABCD || ( ABC ABC ABC )": """ 64 | \tABCD ABCD ABCD ABCD 65 | \tABCD 66 | \t|| ( ABC ABC ABC ) 67 | """, 68 | "ABCD ABCD ABCD ABCD ABCD || ( ABCD ABCD ABCD )": """ 69 | \tABCD ABCD ABCD ABCD 70 | \tABCD 71 | \t|| ( 72 | \t\tABCD ABCD ABCD 73 | \t) 74 | """, 75 | "ABCD ABCD ABCD ABCD ABCD || ( ABCD ABCD ABCD ABCD )": """ 76 | \tABCD ABCD ABCD ABCD 77 | \tABCD 78 | \t|| ( 79 | \t\tABCD ABCD ABCD 80 | \t\tABCD 81 | \t) 82 | """, 83 | } 84 | 85 | 86 | @pytest.mark.parametrize("value", FORMAT_TESTS) 87 | def test_format_license_var(value): 88 | assert format_license_var(value, prefix='LICENSE="', line_width=24 89 | ) == FORMAT_TESTS[value] 90 | -------------------------------------------------------------------------------- /integration_test/cryptography-38.0.3.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | Inflector@0.11.4 10 | aliasable@0.1.3 11 | android_system_properties@0.1.5 12 | asn1@0.12.2 13 | asn1_derive@0.12.2 14 | autocfg@1.1.0 15 | base64@0.13.0 16 | bitflags@1.3.2 17 | bumpalo@3.10.0 18 | cfg-if@1.0.0 19 | chrono@0.4.22 20 | core-foundation-sys@0.8.3 21 | iana-time-zone@0.1.47 22 | indoc-impl@0.3.6 23 | indoc@0.3.6 24 | instant@0.1.12 25 | js-sys@0.3.59 26 | libc@0.2.132 27 | lock_api@0.4.8 28 | log@0.4.17 29 | num-integer@0.1.45 30 | num-traits@0.2.15 31 | once_cell@1.14.0 32 | ouroboros@0.15.4 33 | ouroboros_macro@0.15.4 34 | parking_lot@0.11.2 35 | parking_lot_core@0.8.5 36 | paste-impl@0.1.18 37 | paste@0.1.18 38 | pem@1.1.0 39 | proc-macro-error-attr@1.0.4 40 | proc-macro-error@1.0.4 41 | proc-macro-hack@0.5.19 42 | proc-macro2@1.0.43 43 | pyo3-build-config@0.15.2 44 | pyo3-macros-backend@0.15.2 45 | pyo3-macros@0.15.2 46 | pyo3@0.15.2 47 | quote@1.0.21 48 | redox_syscall@0.2.16 49 | scopeguard@1.1.0 50 | smallvec@1.9.0 51 | syn@1.0.99 52 | unicode-ident@1.0.3 53 | unindent@0.1.10 54 | version_check@0.9.4 55 | wasm-bindgen-backend@0.2.82 56 | wasm-bindgen-macro-support@0.2.82 57 | wasm-bindgen-macro@0.2.82 58 | wasm-bindgen-shared@0.2.82 59 | wasm-bindgen@0.2.82 60 | winapi-i686-pc-windows-gnu@0.4.0 61 | winapi-x86_64-pc-windows-gnu@0.4.0 62 | winapi@0.3.9 63 | " 64 | 65 | inherit cargo 66 | 67 | DESCRIPTION="" 68 | HOMEPAGE="" 69 | SRC_URI=" 70 | ${CARGO_CRATE_URIS} 71 | " 72 | 73 | LICENSE="" 74 | # Dependent crate licenses 75 | LICENSE+=" Apache-2.0 BSD-2 BSD MIT Unicode-DFS-2016" 76 | SLOT="0" 77 | KEYWORDS="~amd64" 78 | IUSE="+extension-module" 79 | 80 | src_configure() { 81 | local myfeatures=( 82 | $(usev extension-module) 83 | ) 84 | cargo_src_configure 85 | } 86 | -------------------------------------------------------------------------------- /integration_test/blake3-0.3.3.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | arrayref@0.3.6 10 | arrayvec@0.7.2 11 | autocfg@1.1.0 12 | bitflags@1.3.2 13 | blake3@1.3.3 14 | block-buffer@0.10.3 15 | cc@1.0.78 16 | cfg-if@1.0.0 17 | constant_time_eq@0.2.4 18 | crossbeam-channel@0.5.6 19 | crossbeam-deque@0.8.2 20 | crossbeam-epoch@0.9.13 21 | crossbeam-utils@0.8.14 22 | crypto-common@0.1.6 23 | digest@0.10.6 24 | either@1.8.0 25 | generic-array@0.14.6 26 | hermit-abi@0.2.6 27 | hex@0.4.3 28 | indoc@1.0.8 29 | libc@0.2.138 30 | lock_api@0.4.9 31 | memoffset@0.6.5 32 | memoffset@0.7.1 33 | num_cpus@1.15.0 34 | once_cell@1.16.0 35 | parking_lot@0.12.1 36 | parking_lot_core@0.9.5 37 | proc-macro2@1.0.49 38 | pyo3-build-config@0.17.3 39 | pyo3-ffi@0.17.3 40 | pyo3-macros-backend@0.17.3 41 | pyo3-macros@0.17.3 42 | pyo3@0.17.3 43 | quote@1.0.23 44 | rayon-core@1.10.1 45 | rayon@1.6.1 46 | redox_syscall@0.2.16 47 | scopeguard@1.1.0 48 | smallvec@1.10.0 49 | subtle@2.4.1 50 | syn@1.0.107 51 | target-lexicon@0.12.5 52 | typenum@1.16.0 53 | unicode-ident@1.0.6 54 | unindent@0.1.11 55 | version_check@0.9.4 56 | windows-sys@0.42.0 57 | windows_aarch64_gnullvm@0.42.0 58 | windows_aarch64_msvc@0.42.0 59 | windows_i686_gnu@0.42.0 60 | windows_i686_msvc@0.42.0 61 | windows_x86_64_gnu@0.42.0 62 | windows_x86_64_gnullvm@0.42.0 63 | windows_x86_64_msvc@0.42.0 64 | " 65 | 66 | inherit cargo 67 | 68 | DESCRIPTION="Python bindings for the Rust blake3 crate" 69 | HOMEPAGE="https://github.com/oconnor663/blake3-py" 70 | SRC_URI=" 71 | ${CARGO_CRATE_URIS} 72 | " 73 | 74 | LICENSE="|| ( Apache-2.0 CC0-1.0 )" 75 | # Dependent crate licenses 76 | LICENSE+=" 77 | Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD MIT 78 | Unicode-DFS-2016 79 | " 80 | SLOT="0" 81 | KEYWORDS="~amd64" 82 | IUSE="neon" 83 | 84 | src_configure() { 85 | local myfeatures=( 86 | $(usev neon) 87 | ) 88 | cargo_src_configure 89 | } 90 | -------------------------------------------------------------------------------- /integration_test/setuptools-rust-1.5.2.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | autocfg@1.1.0 10 | bitflags@1.3.2 11 | byteorder@1.4.3 12 | cfg-if@1.0.0 13 | convert_case@0.4.0 14 | cssparser-macros@0.6.0 15 | cssparser@0.27.2 16 | derive_more@0.99.17 17 | dtoa-short@0.3.3 18 | dtoa@0.4.8 19 | futf@0.1.5 20 | fxhash@0.2.1 21 | getrandom@0.1.16 22 | html5ever@0.25.1 23 | indoc@1.0.4 24 | instant@0.1.12 25 | itoa@0.4.8 26 | kuchiki@0.8.1 27 | lazy_static@1.4.0 28 | libc@0.2.121 29 | lock_api@0.4.6 30 | log@0.4.14 31 | mac@0.1.1 32 | markup5ever@0.10.1 33 | matches@0.1.9 34 | memoffset@0.6.5 35 | new_debug_unreachable@1.0.4 36 | nodrop@0.1.14 37 | once_cell@1.10.0 38 | parking_lot@0.11.2 39 | parking_lot_core@0.8.5 40 | phf@0.8.0 41 | phf_codegen@0.8.0 42 | phf_generator@0.8.0 43 | phf_macros@0.8.0 44 | phf_shared@0.10.0 45 | phf_shared@0.8.0 46 | ppv-lite86@0.2.16 47 | precomputed-hash@0.1.1 48 | proc-macro-hack@0.5.19 49 | proc-macro2@1.0.36 50 | pyo3-build-config@0.17.1 51 | pyo3-ffi@0.17.1 52 | pyo3-macros-backend@0.17.1 53 | pyo3-macros@0.17.1 54 | pyo3@0.17.1 55 | quote@1.0.16 56 | rand@0.7.3 57 | rand_chacha@0.2.2 58 | rand_core@0.5.1 59 | rand_hc@0.2.0 60 | rand_pcg@0.2.1 61 | redox_syscall@0.2.11 62 | rustc_version@0.4.0 63 | scopeguard@1.1.0 64 | selectors@0.22.0 65 | semver@1.0.6 66 | serde@1.0.136 67 | servo_arc@0.1.1 68 | siphasher@0.3.10 69 | smallvec@1.8.0 70 | stable_deref_trait@1.2.0 71 | string_cache@0.8.3 72 | string_cache_codegen@0.5.1 73 | syn@1.0.89 74 | target-lexicon@0.12.3 75 | tendril@0.4.3 76 | thin-slice@0.1.1 77 | unicode-xid@0.2.2 78 | unindent@0.1.8 79 | utf-8@0.7.6 80 | wasi@0.9.0+wasi-snapshot-preview1 81 | winapi-i686-pc-windows-gnu@0.4.0 82 | winapi-x86_64-pc-windows-gnu@0.4.0 83 | winapi@0.3.9 84 | " 85 | 86 | inherit cargo 87 | 88 | DESCRIPTION="" 89 | HOMEPAGE="" 90 | SRC_URI=" 91 | ${CARGO_CRATE_URIS} 92 | " 93 | 94 | LICENSE="" 95 | SLOT="0" 96 | KEYWORDS="~amd64" 97 | -------------------------------------------------------------------------------- /integration_test/qiskit-terra-0.22.3.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | ahash@0.7.6 10 | ahash@0.8.0 11 | autocfg@1.1.0 12 | bitflags@1.3.2 13 | cfg-if@1.0.0 14 | crossbeam-channel@0.5.6 15 | crossbeam-deque@0.8.2 16 | crossbeam-epoch@0.9.13 17 | crossbeam-utils@0.8.14 18 | either@1.8.0 19 | fixedbitset@0.4.2 20 | getrandom@0.2.8 21 | hashbrown@0.11.2 22 | hashbrown@0.12.3 23 | hermit-abi@0.1.19 24 | indexmap@1.9.2 25 | indoc@1.0.7 26 | libc@0.2.137 27 | libm@0.2.6 28 | lock_api@0.4.9 29 | matrixmultiply@0.3.2 30 | memoffset@0.6.5 31 | memoffset@0.7.1 32 | ndarray@0.15.6 33 | num-bigint@0.4.3 34 | num-complex@0.4.2 35 | num-integer@0.1.45 36 | num-traits@0.2.15 37 | num_cpus@1.14.0 38 | numpy@0.17.2 39 | once_cell@1.16.0 40 | parking_lot@0.12.1 41 | parking_lot_core@0.9.4 42 | petgraph@0.6.2 43 | ppv-lite86@0.2.17 44 | proc-macro2@1.0.47 45 | pyo3-build-config@0.17.3 46 | pyo3-ffi@0.17.3 47 | pyo3-macros-backend@0.17.3 48 | pyo3-macros@0.17.3 49 | pyo3@0.17.3 50 | quote@1.0.21 51 | rand@0.8.5 52 | rand_chacha@0.3.1 53 | rand_core@0.6.4 54 | rand_distr@0.4.3 55 | rand_pcg@0.3.1 56 | rawpointer@0.2.1 57 | rayon-core@1.10.1 58 | rayon@1.6.0 59 | redox_syscall@0.2.16 60 | retworkx-core@0.11.0 61 | scopeguard@1.1.0 62 | smallvec@1.10.0 63 | syn@1.0.103 64 | target-lexicon@0.12.5 65 | unicode-ident@1.0.5 66 | unindent@0.1.10 67 | version_check@0.9.4 68 | wasi@0.11.0+wasi-snapshot-preview1 69 | windows-sys@0.42.0 70 | windows_aarch64_gnullvm@0.42.0 71 | windows_aarch64_msvc@0.42.0 72 | windows_i686_gnu@0.42.0 73 | windows_i686_msvc@0.42.0 74 | windows_x86_64_gnu@0.42.0 75 | windows_x86_64_gnullvm@0.42.0 76 | windows_x86_64_msvc@0.42.0 77 | " 78 | 79 | inherit cargo 80 | 81 | DESCRIPTION="" 82 | HOMEPAGE="" 83 | SRC_URI=" 84 | ${CARGO_CRATE_URIS} 85 | " 86 | 87 | LICENSE="" 88 | # Dependent crate licenses 89 | LICENSE+=" 90 | Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 MIT 91 | Unicode-DFS-2016 92 | " 93 | SLOT="0" 94 | KEYWORDS="~amd64" 95 | -------------------------------------------------------------------------------- /integration_test/rustworkx-0.12.1.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | ahash@0.7.6 10 | autocfg@1.1.0 11 | bitflags@1.3.2 12 | cfg-if@1.0.0 13 | crossbeam-channel@0.5.4 14 | crossbeam-deque@0.8.1 15 | crossbeam-epoch@0.9.8 16 | crossbeam-utils@0.8.8 17 | either@1.6.1 18 | fixedbitset@0.4.2 19 | getrandom@0.2.6 20 | hashbrown@0.11.2 21 | hermit-abi@0.1.19 22 | indexmap@1.7.0 23 | indoc@1.0.6 24 | instant@0.1.12 25 | itoa@1.0.2 26 | lazy_static@1.4.0 27 | libc@0.2.126 28 | lock_api@0.4.7 29 | matrixmultiply@0.2.4 30 | memchr@2.5.0 31 | memoffset@0.6.5 32 | ndarray@0.13.1 33 | num-bigint@0.4.3 34 | num-complex@0.2.4 35 | num-complex@0.4.1 36 | num-integer@0.1.45 37 | num-traits@0.2.15 38 | num_cpus@1.13.1 39 | numpy@0.17.2 40 | once_cell@1.12.0 41 | parking_lot@0.11.2 42 | parking_lot_core@0.8.5 43 | petgraph@0.6.2 44 | ppv-lite86@0.2.16 45 | priority-queue@1.2.0 46 | proc-macro2@1.0.39 47 | pyo3-build-config@0.17.3 48 | pyo3-ffi@0.17.3 49 | pyo3-macros-backend@0.17.3 50 | pyo3-macros@0.17.3 51 | pyo3@0.17.3 52 | quick-xml@0.22.0 53 | quote@1.0.18 54 | rand@0.8.5 55 | rand_chacha@0.3.1 56 | rand_core@0.6.3 57 | rand_pcg@0.3.1 58 | rawpointer@0.2.1 59 | rayon-core@1.9.3 60 | rayon@1.5.3 61 | redox_syscall@0.2.13 62 | ryu@1.0.10 63 | scopeguard@1.1.0 64 | serde@1.0.145 65 | serde_derive@1.0.145 66 | serde_json@1.0.89 67 | smallvec@1.8.0 68 | syn@1.0.96 69 | target-lexicon@0.12.4 70 | unicode-ident@1.0.0 71 | unindent@0.1.9 72 | version_check@0.9.4 73 | wasi@0.10.2+wasi-snapshot-preview1 74 | winapi-i686-pc-windows-gnu@0.4.0 75 | winapi-x86_64-pc-windows-gnu@0.4.0 76 | winapi@0.3.9 77 | " 78 | 79 | inherit cargo 80 | 81 | DESCRIPTION="A python graph library implemented in Rust" 82 | HOMEPAGE="" 83 | SRC_URI=" 84 | ${CARGO_CRATE_URIS} 85 | " 86 | 87 | LICENSE="Apache-2.0" 88 | # Dependent crate licenses 89 | LICENSE+=" 90 | Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD MIT 91 | || ( LGPL-3 MPL-2.0 ) 92 | " 93 | SLOT="0" 94 | KEYWORDS="~amd64" 95 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["flit_core >=3.7,<4"] 3 | build-backend = "flit_core.buildapi" 4 | 5 | [project] 6 | name = "pycargoebuild" 7 | authors = [{name = "Michał Górny", email = "mgorny@gentoo.org"}] 8 | license = {text = "GPL-2.0-or-later"} 9 | classifiers = [ 10 | "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", 11 | ] 12 | dynamic = ["version", "description"] 13 | readme = "README.rst" 14 | requires-python = ">=3.10" 15 | dependencies = [ 16 | "jinja2", 17 | "license_expression", 18 | "tomli >= 1.2.3; python_version < '3.11'", 19 | ] 20 | 21 | [project.optional-dependencies] 22 | pretty-log = ["rich"] 23 | test = [ 24 | "pytest", 25 | ] 26 | 27 | [project.scripts] 28 | pycargoebuild = "pycargoebuild.__main__:entry_point" 29 | 30 | [project.urls] 31 | Homepage = "https://github.com/projg2/pycargoebuild/" 32 | 33 | [tool.flit.external-data] 34 | directory = "data" 35 | 36 | [tool.flit.sdist] 37 | include = [ 38 | "COPYING", 39 | "integration_test", 40 | "test", 41 | "tox.ini", 42 | ] 43 | 44 | [tool.mypy] 45 | disallow_untyped_defs = true 46 | no_implicit_optional = true 47 | 48 | [[tool.mypy.overrides]] 49 | module = [ 50 | "integration_test.*", 51 | "test.*", 52 | ] 53 | # requiring explicit types for all test methods would be cumbersome 54 | disallow_untyped_defs = false 55 | check_untyped_defs = true 56 | 57 | [[tool.mypy.overrides]] 58 | module = [ 59 | "license_expression.*", 60 | "portage.*", 61 | "rich.*", 62 | ] 63 | ignore_missing_imports = true 64 | 65 | [tool.pytest.ini_options] 66 | testpaths = [ 67 | "test", 68 | ] 69 | 70 | [tool.ruff] 71 | line-length = 80 72 | 73 | [tool.ruff.lint] 74 | extend-select = [ 75 | "E", 76 | # "N", 77 | "W", 78 | "I", 79 | # "UP", 80 | # "ANN", 81 | # "B", 82 | "A", 83 | # "COM", 84 | "CPY", 85 | "C4", 86 | "EXE", 87 | "ISC", 88 | # "PIE", 89 | # "PT", 90 | "Q", 91 | # "RSE", 92 | "RET", 93 | "SLOT", 94 | # "SIM", 95 | "TCH", 96 | # "ARG", 97 | # "ERA", 98 | # "PGH", 99 | # "PL", 100 | # "PERF", 101 | "FURB", 102 | # "RUF", 103 | ] 104 | 105 | [tool.ruff.lint.flake8-copyright] 106 | min-file-size = 1 107 | notice-rgx = "\\(c\\) \\d{4}(-\\d{4})?" 108 | -------------------------------------------------------------------------------- /integration_test/rustls-0.20.7.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | aho-corasick@0.7.19 10 | atty@0.2.14 11 | autocfg@1.1.0 12 | base64@0.13.0 13 | bitflags@1.3.2 14 | bstr@0.2.17 15 | bumpalo@3.11.0 16 | cast@0.3.0 17 | cc@1.0.73 18 | cfg-if@1.0.0 19 | clap@2.34.0 20 | criterion-plot@0.4.5 21 | criterion@0.3.6 22 | crossbeam-channel@0.5.6 23 | crossbeam-deque@0.8.2 24 | crossbeam-epoch@0.9.11 25 | crossbeam-utils@0.8.12 26 | csv-core@0.1.10 27 | csv@1.1.6 28 | either@1.8.0 29 | env_logger@0.9.1 30 | half@1.8.2 31 | hermit-abi@0.1.19 32 | humantime@2.1.0 33 | itertools@0.10.5 34 | itoa@0.4.8 35 | itoa@1.0.4 36 | js-sys@0.3.60 37 | lazy_static@1.4.0 38 | libc@0.2.135 39 | log@0.4.17 40 | memchr@2.5.0 41 | memoffset@0.6.5 42 | num-traits@0.2.15 43 | num_cpus@1.13.1 44 | once_cell@1.15.0 45 | oorandom@11.1.3 46 | plotters-backend@0.3.4 47 | plotters-svg@0.3.3 48 | plotters@0.3.4 49 | proc-macro2@1.0.47 50 | quote@1.0.21 51 | rayon-core@1.9.3 52 | rayon@1.5.3 53 | regex-automata@0.1.10 54 | regex-syntax@0.6.27 55 | regex@1.6.0 56 | ring@0.16.20 57 | rustls-pemfile@1.0.1 58 | rustversion@1.0.9 59 | ryu@1.0.11 60 | same-file@1.0.6 61 | scopeguard@1.1.0 62 | sct@0.7.0 63 | serde@1.0.145 64 | serde_cbor@0.11.2 65 | serde_derive@1.0.145 66 | serde_json@1.0.86 67 | spin@0.5.2 68 | syn@1.0.102 69 | termcolor@1.1.3 70 | textwrap@0.11.0 71 | tinytemplate@1.2.1 72 | unicode-ident@1.0.5 73 | unicode-width@0.1.10 74 | untrusted@0.7.1 75 | walkdir@2.3.2 76 | wasm-bindgen-backend@0.2.83 77 | wasm-bindgen-macro-support@0.2.83 78 | wasm-bindgen-macro@0.2.83 79 | wasm-bindgen-shared@0.2.83 80 | wasm-bindgen@0.2.83 81 | web-sys@0.3.60 82 | webpki-roots@0.22.5 83 | webpki@0.22.0 84 | winapi-i686-pc-windows-gnu@0.4.0 85 | winapi-util@0.1.5 86 | winapi-x86_64-pc-windows-gnu@0.4.0 87 | winapi@0.3.9 88 | " 89 | 90 | inherit cargo 91 | 92 | DESCRIPTION="Rustls is a modern TLS library written in Rust." 93 | HOMEPAGE="https://github.com/rustls/rustls" 94 | SRC_URI=" 95 | ${CARGO_CRATE_URIS} 96 | " 97 | 98 | LICENSE="|| ( Apache-2.0 ISC MIT )" 99 | # Dependent crate licenses 100 | LICENSE+=" 101 | ISC MIT MPL-2.0 Unicode-DFS-2016 102 | || ( Apache-2.0 Boost-1.0 ) 103 | " 104 | SLOT="0" 105 | KEYWORDS="~amd64" 106 | -------------------------------------------------------------------------------- /integration_test/alass-2.0.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2025 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.14.0 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | aho-corasick@0.6.10 10 | ansi_term@0.11.0 11 | ascii@0.7.1 12 | atty@0.2.13 13 | autocfg@0.1.6 14 | backtrace-sys@0.1.31 15 | backtrace@0.3.38 16 | bitflags@1.2.0 17 | byteorder@1.3.2 18 | c2-chacha@0.2.2 19 | cast@0.2.2 20 | cc@1.0.45 21 | cfg-if@0.1.10 22 | clap@2.33.0 23 | combine@2.5.2 24 | ctrlc@3.1.3 25 | either@1.5.3 26 | encoding_rs@0.8.20 27 | enum_primitive@0.1.1 28 | error-chain@0.10.0 29 | failure@0.1.5 30 | failure_derive@0.1.5 31 | getrandom@0.1.12 32 | image@0.13.0 33 | itertools@0.8.0 34 | itoa@0.4.4 35 | lazy_static@0.2.11 36 | lazy_static@1.4.0 37 | libc@0.2.62 38 | log@0.3.9 39 | log@0.4.8 40 | memchr@2.2.1 41 | nix@0.14.1 42 | nom@2.1.0 43 | num-integer@0.1.41 44 | num-iter@0.1.39 45 | num-rational@0.1.42 46 | num-traits@0.1.43 47 | num-traits@0.2.8 48 | num_cpus@1.10.1 49 | numtoa@0.1.0 50 | pbr@1.0.2 51 | ppv-lite86@0.2.5 52 | proc-macro2@0.4.30 53 | proc-macro2@1.0.4 54 | quote@0.6.13 55 | quote@1.0.2 56 | rand@0.7.2 57 | rand_chacha@0.2.1 58 | rand_core@0.5.1 59 | rand_hc@0.2.0 60 | redox_syscall@0.1.56 61 | redox_termios@0.1.1 62 | regex-syntax@0.5.6 63 | regex@0.2.11 64 | rmp-serde@0.14.0 65 | rmp@0.8.8 66 | rustc-demangle@0.1.16 67 | ryu@1.0.0 68 | safemem@0.2.0 69 | serde@1.0.101 70 | serde_derive@1.0.101 71 | serde_json@1.0.40 72 | strsim@0.8.0 73 | subparse@0.6.2 74 | syn@0.15.44 75 | syn@1.0.5 76 | synstructure@0.10.2 77 | termion@1.5.3 78 | textwrap@0.11.0 79 | thread_local@0.3.6 80 | threadpool@1.7.1 81 | time@0.1.42 82 | ucd-util@0.1.5 83 | unicode-width@0.1.6 84 | unicode-xid@0.1.0 85 | unicode-xid@0.2.0 86 | utf8-ranges@1.0.4 87 | vec_map@0.8.1 88 | vobsub@0.2.3 89 | void@1.0.2 90 | wasi@0.7.0 91 | webrtc-vad@0.4.0 92 | winapi-i686-pc-windows-gnu@0.4.0 93 | winapi-x86_64-pc-windows-gnu@0.4.0 94 | winapi@0.3.8 95 | " 96 | 97 | inherit cargo 98 | 99 | DESCRIPTION="Automatic Language-Agnostic Subtitle Synchronization (Command Line Tool)" 100 | HOMEPAGE="" 101 | SRC_URI=" 102 | ${CARGO_CRATE_URIS} 103 | " 104 | 105 | LICENSE="GPL-3" 106 | # Dependent crate licenses 107 | LICENSE+=" 108 | CC0-1.0 MIT MPL-2.0 109 | || ( Apache-2.0 Boost-1.0 ) 110 | " 111 | SLOT="0" 112 | KEYWORDS="~amd64" 113 | -------------------------------------------------------------------------------- /integration_test/bindgen-0.63.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | aho-corasick@0.5.3 10 | aho-corasick@0.7.18 11 | ansi_term@0.12.1 12 | atty@0.2.14 13 | autocfg@1.1.0 14 | bitflags@1.3.2 15 | block@0.1.6 16 | cc@1.0.73 17 | cexpr@0.6.0 18 | cfg-if@1.0.0 19 | clang-sys@1.3.3 20 | clap@2.34.0 21 | clap@3.2.12 22 | clap_lex@0.2.4 23 | diff@0.1.12 24 | either@1.6.1 25 | env_logger@0.3.5 26 | env_logger@0.9.0 27 | fuchsia-cprng@0.1.1 28 | getrandom@0.2.3 29 | glob@0.3.0 30 | hashbrown@0.12.2 31 | hermit-abi@0.1.19 32 | humantime@2.1.0 33 | indexmap@1.9.1 34 | kernel32-sys@0.2.2 35 | lazy_static@1.4.0 36 | lazycell@1.3.0 37 | libc@0.2.126 38 | libloading@0.6.7 39 | libloading@0.7.0 40 | log@0.3.9 41 | log@0.4.14 42 | malloc_buf@0.0.6 43 | memchr@0.1.11 44 | memchr@2.5.0 45 | minimal-lexical@0.1.4 46 | nom@7.0.0 47 | objc@0.2.7 48 | os_str_bytes@6.2.0 49 | peeking_take_while@0.1.2 50 | ppv-lite86@0.2.10 51 | proc-macro2@1.0.43 52 | quickcheck@0.4.1 53 | quote@1.0.9 54 | rand@0.3.23 55 | rand@0.4.6 56 | rand@0.8.4 57 | rand_chacha@0.3.1 58 | rand_core@0.3.1 59 | rand_core@0.4.2 60 | rand_core@0.6.3 61 | rand_hc@0.3.1 62 | rdrand@0.4.0 63 | redox_syscall@0.2.9 64 | regex-syntax@0.3.9 65 | regex-syntax@0.6.25 66 | regex@0.1.80 67 | regex@1.5.5 68 | remove_dir_all@0.5.3 69 | rustc-hash@1.1.0 70 | shlex@1.0.0 71 | strsim@0.10.0 72 | strsim@0.8.0 73 | syn@1.0.99 74 | tempdir@0.3.7 75 | tempfile@3.2.0 76 | termcolor@1.1.3 77 | textwrap@0.11.0 78 | textwrap@0.15.0 79 | thread-id@2.0.0 80 | thread_local@0.2.7 81 | unicode-ident@1.0.3 82 | unicode-width@0.1.10 83 | utf8-ranges@0.1.3 84 | vec_map@0.8.2 85 | version_check@0.9.3 86 | wasi@0.10.2+wasi-snapshot-preview1 87 | which@4.2.2 88 | winapi-build@0.1.1 89 | winapi-i686-pc-windows-gnu@0.4.0 90 | winapi-util@0.1.5 91 | winapi-x86_64-pc-windows-gnu@0.4.0 92 | winapi@0.2.8 93 | winapi@0.3.9 94 | " 95 | 96 | inherit cargo 97 | 98 | DESCRIPTION="Automatically generates Rust FFI bindings to C and C++ libraries." 99 | HOMEPAGE="https://rust-lang.github.io/rust-bindgen/" 100 | SRC_URI=" 101 | ${CARGO_CRATE_URIS} 102 | " 103 | 104 | LICENSE="BSD" 105 | # Dependent crate licenses 106 | LICENSE+=" Apache-2.0 ISC MIT Unicode-DFS-2016" 107 | SLOT="0" 108 | KEYWORDS="~amd64" 109 | -------------------------------------------------------------------------------- /test/test_license.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2024 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import typing 6 | import unittest.mock 7 | 8 | import license_expression 9 | import pytest 10 | 11 | from pycargoebuild.license import spdx_to_ebuild, symbol_to_ebuild 12 | 13 | TEST_LICENSE_MAPPING = { 14 | # keys are lowercase in MAPPING 15 | "a": "A", 16 | "b": "B", 17 | "c": "Cm", 18 | "a with exc": "A-EXC", 19 | "b with exc": "B-EXC", 20 | 21 | "a+": "|| ( A B )", 22 | "multi": "A B", 23 | } 24 | 25 | SPDX_TEST_SYMBOLS = [ 26 | "A", 27 | "B", 28 | "C", 29 | "A+", 30 | "MULTI", 31 | "B+", 32 | "MULTI+", 33 | license_expression.LicenseSymbol("EXC", is_exception=True), 34 | ] 35 | 36 | SPDX_TEST_VALUES = { 37 | "A": "A", 38 | "B": "B", 39 | "C": "Cm", 40 | "A AND B": "A B", 41 | "A AND B AND C": "A B Cm", 42 | "A OR B": "|| ( A B )", 43 | "A OR B OR C": "|| ( A B Cm )", 44 | "A AND ( B OR C )": "A || ( B Cm )", 45 | "( A AND B ) OR C": "|| ( ( A B ) Cm )", 46 | "A AND B OR C": "|| ( ( A B ) Cm )", 47 | "A AND B OR C AND B": "|| ( ( A B ) ( Cm B ) )", 48 | "A WITH EXC": "A-EXC", 49 | "A WITH EXC AND B": "A-EXC B", 50 | "A WITH EXC OR B": "|| ( A-EXC B )", 51 | "A AND B WITH EXC": "A B-EXC", 52 | "A OR B WITH EXC": "|| ( A B-EXC )", 53 | 54 | "A+": "|| ( A B )", 55 | "A+ OR C": "|| ( A B Cm )", 56 | "A+ AND C": "|| ( A B ) Cm", 57 | "MULTI": "A B", 58 | "MULTI OR C": "|| ( ( A B ) Cm )", 59 | "MULTI AND C": "A B Cm", 60 | 61 | "A+ WITH EXC": "A-EXC", 62 | "B+": "B", 63 | "B+ WITH EXC": "B-EXC", 64 | "MULTI+": "A B", 65 | } 66 | 67 | REAL_MAPPING_TEST_VALUES = { 68 | "BSD-3-Clause": "BSD", 69 | "Apache-2.0": "Apache-2.0", 70 | "aPACHE-2.0": "Apache-2.0", 71 | "Apache-2.0 WITH LLVM-exception": "Apache-2.0-with-LLVM-exceptions", 72 | "aPACHE-2.0 WITH llvm-Exception": "Apache-2.0-with-LLVM-exceptions", 73 | } 74 | 75 | 76 | @pytest.fixture(scope="module") 77 | def spdx() -> typing.Generator[license_expression.Licensing, None, None]: 78 | with unittest.mock.patch("pycargoebuild.license.MAPPING", 79 | new=TEST_LICENSE_MAPPING): 80 | yield license_expression.Licensing(SPDX_TEST_SYMBOLS) 81 | 82 | 83 | @pytest.mark.parametrize("value", SPDX_TEST_VALUES) 84 | def test_spdx_to_ebuild(spdx, value): 85 | parsed_license = spdx.parse(value, validate=True, strict=True) 86 | assert spdx_to_ebuild(parsed_license) == SPDX_TEST_VALUES[value] 87 | 88 | 89 | @pytest.mark.parametrize("value", REAL_MAPPING_TEST_VALUES) 90 | def test_real_license_mapping(real_license_mapping, value): 91 | assert symbol_to_ebuild(value) == REAL_MAPPING_TEST_VALUES[value] 92 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | pycargoebuild 3 | ============= 4 | :Author: Michał Górny 5 | :License: GPL-2.0-or-later 6 | :Homepage: https://github.com/projg2/pycargoebuild/ 7 | 8 | 9 | pycargoebuild is a generator for ebuilds using the Cargo infrastructure 10 | of Rust language. It is primarily meant to aid in keeping the list 11 | of ``CRATES`` and their ``LICENSE`` up-to-date. It is a rewrite 12 | of the `cargo-ebuild`_ tool in Python, with no actual dependency 13 | on Rust. 14 | 15 | pycargoebuild reads ``Cargo.toml`` and ``Cargo.lock`` files in order 16 | to obtain the package's metadata and dependency list, respectively. 17 | Then it fetches all dependent crates into ``DISTDIR`` and reads their 18 | ``Cargo.toml`` files to construct the complete list of licenses. 19 | The resulting data can either be used to construct a new ebuild from 20 | a template or to update the values of ``CRATES`` and ``LICENSE`` 21 | in an existing ebuild. 22 | 23 | 24 | Why not cargo-ebuild? 25 | ===================== 26 | pycargoebuild has the following features that cargo-ebuild 0.5.2 27 | is missing: 28 | 29 | - small size (cargo-ebuild compiles to 5.5M on my system) 30 | 31 | - full support for SPDX-2.0 license expressions with boolean 32 | simplification (whereas cargo-ebuild just dumps all licenses it finds) 33 | 34 | - pretty-printing with line wrapping for license expressions 35 | 36 | - support for updating ``CRATES`` and crate ``LICENSE`` in existing 37 | ebuilds (whereas cargo-ebuild can only generate new ebuilds) 38 | 39 | - support for combining the data from multiple subpackages (useful 40 | e.g. in setuptools-rust) 41 | 42 | - support for fast crate fetching if ``aria2c`` is installed 43 | 44 | - support for skipping crate licenses (e.g. for when Crates are used 45 | at build/test time only) 46 | 47 | 48 | Usage 49 | ===== 50 | To create a new ebuild, run:: 51 | 52 | pycargoebuild 53 | 54 | where *package-directory* is the directory containing ``Cargo.toml``. 55 | This creates an ebuild file named after the package name and version 56 | in the current directory, and outputs its name. 57 | 58 | To update an existing ebuild, use instead:: 59 | 60 | pycargoebuild -i .ebuild 61 | 62 | Note that the existing file must contain both ``CRATES`` variable 63 | and ``LICENSE+=`` assignment like the following:: 64 | 65 | # Dependent crate licenses 66 | LICENSE+="..." 67 | 68 | It is also possible to explicitly specify the output filename using 69 | the ``-o`` option. 70 | 71 | 72 | Configuration file 73 | ================== 74 | pycargoebuild can additionally be configured using 75 | ``pycargoebuild.toml`` in one of the XDG config directories 76 | (usually ``~/.config``). The following example provides a quick summary 77 | of configuration options available:: 78 | 79 | [paths] 80 | # default --distdir, Portage config is used if not set 81 | distdir = "/var/cache/portage/distfiles" 82 | # default --license-mapping, "metadata/license-mapping.conf" from 83 | # ::gentoo repo (via Portage API) is used if not set 84 | license-mapping = "/var/db/repos/gentoo/metadata/license-mapping.conf" 85 | 86 | [license-overrides] 87 | # provide an SPDX license string for packages missing the metadata 88 | nihav_codec_support = "MIT" 89 | nihav_core = "MIT" 90 | nihav_duck = "MIT" 91 | 92 | [license-mapping] 93 | # additional mappings from SPDX licenses to Gentoo licenses 94 | "LicenseRef-UFL-1.0" = "UbuntuFontLicense-1.0" 95 | 96 | 97 | .. _cargo-ebuild: https://github.com/gentoo/cargo-ebuild/ 98 | -------------------------------------------------------------------------------- /pycargoebuild/fetch.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2024 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import hashlib 6 | import subprocess 7 | import sys 8 | import tempfile 9 | import typing 10 | from pathlib import Path 11 | 12 | from pycargoebuild.cargo import Crate, FileCrate 13 | 14 | 15 | class ChecksumMismatchError(RuntimeError): 16 | def __init__(self, 17 | path: Path, 18 | current: str, 19 | expected: str, 20 | ) -> None: 21 | super().__init__(f"Checksum mismatch for {path}\n" 22 | f" current: {current}\n" 23 | f"expected: {expected}") 24 | self.path = path 25 | self.current = current 26 | self.expected = expected 27 | 28 | 29 | def fetch_crates_using_aria2(crates: typing.Iterable[Crate], *, distdir: Path 30 | ) -> None: 31 | """ 32 | Fetch specified crates into distdir using aria2c(1) 33 | """ 34 | 35 | distdir.mkdir(parents=True, exist_ok=True) 36 | with tempfile.NamedTemporaryFile("w+") as file_list_f: 37 | by_filename = {crate.filename: crate for crate in crates} 38 | for filename, crate in by_filename.items(): 39 | if not (distdir / filename).exists(): 40 | file_list_f.write( 41 | f"{crate.download_url}\n\tout={crate.filename}\n") 42 | 43 | if file_list_f.tell() == 0: 44 | # no crates to fetch 45 | return 46 | 47 | file_list_f.flush() 48 | 49 | subprocess.check_call( 50 | ["aria2c", "-d", str(distdir), "-i", file_list_f.name], 51 | stdout=sys.stderr) 52 | 53 | 54 | def fetch_files_using_wget(files: typing.Iterable[typing.Tuple[str, Path]] 55 | ) -> None: 56 | """ 57 | Fetch specified URLs to the specified filenames using wget(1) 58 | """ 59 | 60 | for url, path in files: 61 | if not path.exists(): 62 | subprocess.check_call( 63 | ["wget", "-O", str(path), url], 64 | stdout=sys.stderr) 65 | 66 | 67 | def fetch_crates_using_wget(crates: typing.Iterable[Crate], *, distdir: Path 68 | ) -> None: 69 | """ 70 | Fetch specified crates into distdir using wget(1) 71 | """ 72 | 73 | distdir.mkdir(parents=True, exist_ok=True) 74 | fetch_files_using_wget( 75 | (crate.download_url, distdir / crate.filename) for crate in crates) 76 | 77 | 78 | def verify_files(files: typing.Iterable[typing.Tuple[Path, str]]) -> None: 79 | """ 80 | Verify checksums of specified files 81 | """ 82 | 83 | buffer = bytearray(128 * 1024) 84 | mv = memoryview(buffer) 85 | for path, checksum in files: 86 | with open(path, "rb", buffering=0) as f: 87 | hasher = hashlib.sha256() 88 | while True: 89 | rd = f.readinto(mv) 90 | if rd == 0: 91 | break 92 | hasher.update(mv[:rd]) 93 | if hasher.hexdigest() != checksum: 94 | raise ChecksumMismatchError(path, hasher.hexdigest(), checksum) 95 | 96 | 97 | def verify_crates(crates: typing.Iterable[Crate], *, distdir: Path) -> None: 98 | """ 99 | Verify checksums of crates fetched into distdir 100 | """ 101 | 102 | verify_files((distdir / crate.filename, crate.checksum) 103 | for crate in crates 104 | if isinstance(crate, FileCrate)) 105 | -------------------------------------------------------------------------------- /pycargoebuild/license.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2024 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import configparser 6 | import logging 7 | import typing 8 | 9 | import license_expression 10 | 11 | MAPPING: typing.Dict[str, str] = {} 12 | 13 | 14 | class UnmatchedLicense(RuntimeError): 15 | """License does not match anything in the mapping""" 16 | 17 | def __init__(self, 18 | license_key: str, 19 | crate: typing.Optional[str] = None, 20 | ) -> None: 21 | super().__init__() 22 | self.license_key = license_key 23 | self.crate = crate 24 | 25 | 26 | def load_license_mapping(f: typing.IO["str"]) -> None: 27 | """Read license mapping from the specified file""" 28 | conf = configparser.ConfigParser(comment_prefixes=("#",), 29 | delimiters=("=",), 30 | empty_lines_in_values=False, 31 | interpolation=None) 32 | conf.read_file(f) 33 | MAPPING.update((k.lower(), v) for k, v in conf.items("spdx-to-ebuild")) 34 | 35 | 36 | def symbol_to_ebuild(license_symbol: license_expression.LicenseSymbol) -> str: 37 | full_key = str(license_symbol).lower() 38 | full_match = MAPPING.get(full_key) 39 | no_plus = MAPPING.get(full_key.replace("+", "")) 40 | 41 | # we permit matching LicenseRef- to mapping but do not throw an error 42 | # if it's not there 43 | if no_plus is None and full_key.startswith("licenseref-"): 44 | logging.warning( 45 | f"User defined license found: {str(license_symbol)!r}, mapping " 46 | "not possible.") 47 | return "" 48 | 49 | if full_match is not None: 50 | return full_match 51 | 52 | # if we do not have an exact match, check if it is a "+" expression 53 | # and try a match without the "+" symbol 54 | if no_plus is not None: 55 | logging.warning( 56 | f"No explicit entry for license {license_symbol} found, " 57 | f"assuming {str(license_symbol).replace('+', '')}.") 58 | return no_plus 59 | 60 | raise UnmatchedLicense(str(license_symbol)) 61 | 62 | 63 | def spdx_to_ebuild(spdx: license_expression.Renderable) -> str: 64 | """ 65 | Convert SPDX license expression to ebuild license string. 66 | """ 67 | def sub(x: license_expression.LicenseExpression, in_or: bool 68 | ) -> typing.Generator[str, None, None]: 69 | if isinstance(x, license_expression.AND): 70 | if in_or: 71 | yield "(" 72 | for y in x.args: 73 | yield from sub(y, in_or=False) 74 | if in_or: 75 | yield ")" 76 | elif isinstance(x, license_expression.OR): 77 | if not in_or: 78 | yield "|| (" 79 | for y in x.args: 80 | yield from sub(y, in_or=True) 81 | if not in_or: 82 | yield ")" 83 | elif isinstance(x, (license_expression.LicenseSymbol, 84 | license_expression.LicenseWithExceptionSymbol)): 85 | def is_pure_or(symbols: typing.Iterable[str]) -> bool: 86 | """ 87 | Test whether symbols is a pure any-of clause "|| ( ... )" 88 | """ 89 | 90 | it = iter(symbols) 91 | # it must start with a "|| (" 92 | if next(it) != "||": 93 | return False 94 | if next(it) != "(": 95 | return False 96 | level = 1 97 | for x in it: 98 | if x == ")": 99 | level -= 1 100 | elif level == 0: 101 | # if we have anything past top-level ")", we have 102 | # an AND-expression 103 | return False 104 | elif x == "(": 105 | level += 1 106 | return True 107 | 108 | mapped = symbol_to_ebuild(x).split() 109 | if len(mapped) > 1 and in_or: 110 | if is_pure_or(mapped): 111 | # avoid nesting || ( || ( ... ) ) 112 | yield from mapped[2:-1] 113 | else: 114 | # if we are inside || ( ... ), we need explicit ( ... ) 115 | # for AND-groups 116 | yield "(" 117 | yield from mapped 118 | yield ")" 119 | else: 120 | # single replacement item can always go inline, 121 | # as well as AND_groups inside an AND group 122 | yield from mapped 123 | else: 124 | assert False, f"Unknown type {type(x)}" 125 | 126 | return " ".join(sub(spdx, in_or=False)) 127 | -------------------------------------------------------------------------------- /pycargoebuild/format.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2024 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import typing 6 | from textwrap import TextWrapper 7 | 8 | 9 | class CompoundGroup(typing.NamedTuple): 10 | prefix: typing.List[str] 11 | values: typing.List[typing.Union[str, "CompoundGroup"]] 12 | suffix: typing.List[str] 13 | 14 | 15 | class Line(typing.NamedTuple): 16 | indent: int 17 | tokens: typing.List[str] 18 | 19 | 20 | def format_license_var(value: str, *, prefix: str, line_width: int = 72 21 | ) -> str: 22 | """ 23 | Pretty-format and wrap value for use in LICENSE 24 | 25 | prefix specifies the expected variable prefix (e.g. 'LICENSE="'), that 26 | is used to determine the line wrapping. Neither prefix nor the '"' suffix 27 | are included in the return value. 28 | """ 29 | 30 | suffix = '"' 31 | 32 | # 1. tokenize into series of license tokens and compound groups 33 | def tokenize_into(current_group: CompoundGroup, 34 | token_it: typing.Iterator[str], 35 | ) -> CompoundGroup: 36 | try: 37 | while True: 38 | token = next(token_it) 39 | if token in ("||", "("): 40 | prefix = [token] 41 | if token == "||": 42 | prefix.append(next(token_it)) 43 | if prefix[-1] != "(": 44 | raise ValueError("|| not followed by (") 45 | current_group.values.append( 46 | tokenize_into(CompoundGroup(prefix, [], []), token_it)) 47 | elif token == ")": 48 | current_group.suffix.append(token) 49 | return current_group 50 | else: 51 | current_group.values.append(token) 52 | except StopIteration as exception: 53 | if current_group.prefix and not current_group.suffix: 54 | raise ValueError("Unterminated license group") from exception 55 | return current_group 56 | 57 | tokens = iter(value.split()) 58 | ast = tokenize_into(CompoundGroup([], [], []), tokens) 59 | 60 | # 2. if we're dealing with something trivial, see if we can fit it as-is 61 | # on one line 62 | flat_list = all(isinstance(x, str) for x in ast.values) 63 | one_flat_group = ( 64 | not flat_list and len(ast.values) == 1 and 65 | all(isinstance(x, str) for x in ast.values[0].values)) # type: ignore 66 | if flat_list or one_flat_group: 67 | expected_length = len(prefix) + len(value) + len(suffix) 68 | if expected_length <= line_width: 69 | return value 70 | 71 | # 3. pretty-format the AST into a list of lines 72 | def format_into(lines: typing.List[Line], 73 | indent: int, 74 | compound_group: CompoundGroup 75 | ) -> typing.List[Line]: 76 | value_it = iter(compound_group.values) 77 | value_span = [] 78 | while True: 79 | try: 80 | value = next(value_it) 81 | except StopIteration: 82 | value = None 83 | 84 | if isinstance(value, str): 85 | value_span.append(value) 86 | else: 87 | # flush the current value_span 88 | if value_span: 89 | lines.append(Line(indent, value_span)) 90 | value_span = [] 91 | # return if we reached the end of the list 92 | if value is None: 93 | return lines 94 | # compound group 95 | # again, if it's flat and short, let's inline it 96 | if all(isinstance(x, str) for x in value.values): 97 | # mypy can't figure the all() clause above out 98 | sub_values: typing.List[str] = ( 99 | value.prefix + value.values + 100 | value.suffix) # type: ignore 101 | test_line = indent * " " + " ".join(sub_values) 102 | if len(test_line) <= line_width: 103 | lines.append(Line(indent, sub_values)) 104 | continue 105 | # otherwise, append it multi-line 106 | lines.append(Line(indent, value.prefix)) 107 | format_into(lines, indent + 1, value) 108 | lines.append(Line(indent, value.suffix)) 109 | 110 | lines = format_into([], 1, ast) 111 | 112 | # 4. combine lines into string, adding indentation and wrapping 113 | # as necessary 114 | value = "\n" 115 | wrapper = TextWrapper(expand_tabs=False, 116 | replace_whitespace=False, 117 | drop_whitespace=True, 118 | break_long_words=False, 119 | break_on_hyphens=False) 120 | for line in lines: 121 | wrapper.width = line_width - line.indent * 4 122 | for wrapped_line in wrapper.wrap(" ".join(line.tokens)): 123 | value += line.indent * "\t" + f"{wrapped_line}\n" 124 | 125 | return value 126 | -------------------------------------------------------------------------------- /integration_test/mdbook-linkcheck-0.7.7.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | adler@1.0.2 10 | aho-corasick@0.7.19 11 | android_system_properties@0.1.5 12 | ansi_term@0.11.0 13 | ansi_term@0.12.1 14 | anyhow@1.0.65 15 | atty@0.2.14 16 | autocfg@1.1.0 17 | base64@0.13.0 18 | bincode@1.3.3 19 | bitflags@1.3.2 20 | block-buffer@0.10.3 21 | bstr@0.2.17 22 | build-info-build@0.0.21 23 | build-info-common@0.0.21 24 | build-info-proc@0.0.21 25 | build-info@0.0.21 26 | bumpalo@3.11.0 27 | byteorder@1.4.3 28 | bytes@1.2.1 29 | bzip2-sys@0.1.11+1.0.8 30 | bzip2@0.4.3 31 | cargo-platform@0.1.2 32 | cargo_metadata@0.12.3 33 | cc@1.0.73 34 | cfg-if@1.0.0 35 | chrono@0.4.22 36 | clap@2.34.0 37 | clap@3.2.22 38 | clap_complete@3.2.5 39 | clap_lex@0.2.4 40 | codespan-reporting@0.11.1 41 | codespan@0.11.1 42 | convert_case@0.4.0 43 | core-foundation-sys@0.8.3 44 | core-foundation@0.9.3 45 | cpufeatures@0.2.5 46 | crc32fast@1.3.2 47 | crypto-common@0.1.6 48 | ctor@0.1.23 49 | derive_more@0.99.17 50 | diff@0.1.13 51 | difference@2.0.0 52 | digest@0.10.5 53 | dunce@1.0.2 54 | encoding_rs@0.8.31 55 | env_logger@0.8.4 56 | env_logger@0.9.1 57 | fastrand@1.8.0 58 | flate2@1.0.24 59 | fnv@1.0.7 60 | foreign-types-shared@0.1.1 61 | foreign-types@0.3.2 62 | form_urlencoded@1.1.0 63 | format-buf@1.0.0 64 | futures-channel@0.3.24 65 | futures-core@0.3.24 66 | futures-executor@0.3.24 67 | futures-io@0.3.24 68 | futures-macro@0.3.24 69 | futures-sink@0.3.24 70 | futures-task@0.3.24 71 | futures-util@0.3.24 72 | futures@0.3.24 73 | generic-array@0.14.6 74 | getopts@0.2.21 75 | git2@0.13.25 76 | glob@0.3.0 77 | h2@0.3.14 78 | handlebars@4.3.4 79 | hashbrown@0.12.3 80 | heck@0.3.3 81 | hermit-abi@0.1.19 82 | http-body@0.4.5 83 | http@0.2.8 84 | httparse@1.8.0 85 | httpdate@1.0.2 86 | humantime@2.1.0 87 | hyper-tls@0.5.0 88 | hyper@0.14.20 89 | iana-time-zone@0.1.50 90 | idna@0.3.0 91 | indexmap@1.9.1 92 | instant@0.1.12 93 | ipnet@2.5.0 94 | itoa@1.0.3 95 | jobserver@0.1.25 96 | js-sys@0.3.60 97 | lazy_static@1.4.0 98 | libc@0.2.134 99 | libgit2-sys@0.12.26+1.3.0 100 | libz-sys@1.1.8 101 | linkcheck@0.4.1 102 | linkify@0.7.0 103 | log@0.4.17 104 | lzma-sys@0.1.19 105 | mdbook@0.4.21 106 | memchr@2.5.0 107 | mime@0.3.16 108 | miniz_oxide@0.5.4 109 | mio@0.8.4 110 | native-tls@0.2.10 111 | num-bigint@0.3.3 112 | num-integer@0.1.45 113 | num-traits@0.2.15 114 | num_cpus@1.13.1 115 | once_cell@1.15.0 116 | opener@0.5.0 117 | openssl-macros@0.1.0 118 | openssl-probe@0.1.5 119 | openssl-src@111.22.0+1.1.1q 120 | openssl-sys@0.9.76 121 | openssl@0.10.42 122 | os_str_bytes@6.3.0 123 | output_vt100@0.1.3 124 | percent-encoding@2.2.0 125 | pest@2.4.0 126 | pest_derive@2.4.0 127 | pest_generator@2.4.0 128 | pest_meta@2.4.0 129 | pin-project-lite@0.2.9 130 | pin-utils@0.1.0 131 | pkg-config@0.3.25 132 | pretty_assertions@0.6.1 133 | pretty_assertions@1.3.0 134 | proc-macro-error-attr@1.0.4 135 | proc-macro-error@1.0.4 136 | proc-macro-hack@0.5.19 137 | proc-macro2@1.0.46 138 | pulldown-cmark@0.8.0 139 | pulldown-cmark@0.9.2 140 | quote@1.0.21 141 | redox_syscall@0.2.16 142 | regex-automata@0.1.10 143 | regex-syntax@0.6.27 144 | regex@1.6.0 145 | remove_dir_all@0.5.3 146 | reqwest@0.11.12 147 | rustc_version@0.3.3 148 | rustc_version@0.4.0 149 | ryu@1.0.11 150 | schannel@0.1.20 151 | security-framework-sys@2.6.1 152 | security-framework@2.7.0 153 | semver-parser@0.10.2 154 | semver@0.11.0 155 | semver@1.0.14 156 | serde@1.0.145 157 | serde_derive@1.0.145 158 | serde_json@1.0.85 159 | serde_urlencoded@0.7.1 160 | sha1@0.10.5 161 | shlex@1.1.0 162 | slab@0.4.7 163 | socket2@0.4.7 164 | strsim@0.10.0 165 | strsim@0.8.0 166 | structopt-derive@0.4.18 167 | structopt@0.3.26 168 | syn@1.0.101 169 | tempfile@3.3.0 170 | termcolor@1.1.3 171 | textwrap@0.11.0 172 | textwrap@0.15.1 173 | thiserror-impl@1.0.37 174 | thiserror@1.0.37 175 | time@0.1.44 176 | tinyvec@1.6.0 177 | tinyvec_macros@0.1.0 178 | tokio-native-tls@0.3.0 179 | tokio-util@0.7.4 180 | tokio@1.21.2 181 | toml@0.5.9 182 | topological-sort@0.1.0 183 | tower-service@0.3.2 184 | tracing-core@0.1.29 185 | tracing@0.1.36 186 | try-lock@0.2.3 187 | typenum@1.15.0 188 | ucd-trie@0.1.5 189 | unicase@2.6.0 190 | unicode-bidi@0.3.8 191 | unicode-ident@1.0.4 192 | unicode-normalization@0.1.22 193 | unicode-segmentation@1.10.0 194 | unicode-width@0.1.10 195 | url@2.3.1 196 | vcpkg@0.2.15 197 | vec_map@0.8.2 198 | version_check@0.9.4 199 | want@0.3.0 200 | wasi@0.10.0+wasi-snapshot-preview1 201 | wasi@0.11.0+wasi-snapshot-preview1 202 | wasm-bindgen-backend@0.2.83 203 | wasm-bindgen-futures@0.4.33 204 | wasm-bindgen-macro-support@0.2.83 205 | wasm-bindgen-macro@0.2.83 206 | wasm-bindgen-shared@0.2.83 207 | wasm-bindgen@0.2.83 208 | web-sys@0.3.60 209 | winapi-i686-pc-windows-gnu@0.4.0 210 | winapi-util@0.1.5 211 | winapi-x86_64-pc-windows-gnu@0.4.0 212 | winapi@0.3.9 213 | windows-sys@0.36.1 214 | windows_aarch64_msvc@0.36.1 215 | windows_i686_gnu@0.36.1 216 | windows_i686_msvc@0.36.1 217 | windows_x86_64_gnu@0.36.1 218 | windows_x86_64_msvc@0.36.1 219 | winreg@0.10.1 220 | xz2@0.1.7 221 | yansi@0.5.1 222 | zip@0.5.13 223 | " 224 | 225 | inherit cargo 226 | 227 | DESCRIPTION="A backend for \`mdbook\` which will check your links for you." 228 | HOMEPAGE="" 229 | SRC_URI=" 230 | ${CARGO_CRATE_URIS} 231 | " 232 | 233 | LICENSE="MIT" 234 | # Dependent crate licenses 235 | LICENSE+=" Apache-2.0 BSD CC0-1.0 MIT MPL-2.0 Unicode-DFS-2016" 236 | SLOT="0" 237 | KEYWORDS="~amd64" 238 | -------------------------------------------------------------------------------- /integration_test/rustic-rs-0.5.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.6.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | adler@1.0.2 10 | aead@0.4.3 11 | aes256ctr_poly1305aes@0.1.1 12 | aes@0.7.5 13 | ahash@0.8.3 14 | aho-corasick@0.7.20 15 | android_system_properties@0.1.5 16 | anyhow@1.0.70 17 | array-init@2.1.0 18 | atty@0.2.14 19 | autocfg@1.1.0 20 | backoff@0.4.0 21 | base64@0.13.1 22 | base64@0.21.0 23 | binrw@0.11.1 24 | binrw_derive@0.11.1 25 | bitflags@1.3.2 26 | block-buffer@0.10.4 27 | bstr@1.4.0 28 | bumpalo@3.12.0 29 | bytemuck@1.13.1 30 | bytes@1.4.0 31 | bytesize@1.2.0 32 | cachedir@0.3.0 33 | cc@1.0.79 34 | cfg-if@1.0.0 35 | chrono@0.4.24 36 | cipher@0.3.0 37 | cipher@0.4.4 38 | clap@3.2.23 39 | clap_complete@3.2.5 40 | clap_derive@3.2.18 41 | clap_lex@0.2.4 42 | codespan-reporting@0.11.1 43 | comfy-table@6.1.4 44 | console@0.15.5 45 | const-random-macro@0.1.15 46 | const-random@0.1.15 47 | convert_case@0.4.0 48 | core-foundation-sys@0.8.3 49 | cpufeatures@0.2.5 50 | crc32fast@1.3.2 51 | crossbeam-channel@0.5.7 52 | crossbeam-deque@0.8.3 53 | crossbeam-epoch@0.9.14 54 | crossbeam-utils@0.8.15 55 | crossterm@0.25.0 56 | crossterm_winapi@0.9.0 57 | crunchy@0.2.2 58 | crypto-common@0.1.6 59 | ctr@0.8.0 60 | cxx-build@1.0.93 61 | cxx@1.0.93 62 | cxxbridge-flags@1.0.93 63 | cxxbridge-macro@1.0.93 64 | darling@0.14.4 65 | darling_core@0.14.4 66 | darling_macro@0.14.4 67 | derivative@2.2.0 68 | derive-getters@0.2.0 69 | derive_more@0.99.17 70 | digest@0.10.6 71 | directories@5.0.0 72 | dirs-sys@0.4.0 73 | dirs@5.0.0 74 | dunce@1.0.3 75 | either@1.8.1 76 | encode_unicode@0.3.6 77 | encoding_rs@0.8.32 78 | enum-map-derive@0.11.0 79 | enum-map@2.5.0 80 | env_logger@0.8.4 81 | errno-dragonfly@0.1.2 82 | errno@0.2.8 83 | fastrand@1.9.0 84 | filetime@0.2.20 85 | flate2@1.0.25 86 | fnv@1.0.7 87 | form_urlencoded@1.1.0 88 | futures-channel@0.3.27 89 | futures-core@0.3.27 90 | futures-executor@0.3.27 91 | futures-io@0.3.27 92 | futures-macro@0.3.27 93 | futures-sink@0.3.27 94 | futures-task@0.3.27 95 | futures-timer@3.0.2 96 | futures-util@0.3.27 97 | futures@0.3.27 98 | generic-array@0.14.6 99 | gethostname@0.4.1 100 | getrandom@0.2.8 101 | globset@0.4.10 102 | h2@0.3.16 103 | hashbrown@0.12.3 104 | heck@0.4.1 105 | hermit-abi@0.1.19 106 | hermit-abi@0.2.6 107 | hermit-abi@0.3.1 108 | hex@0.4.3 109 | hmac@0.12.1 110 | http-body@0.4.5 111 | http@0.2.9 112 | httparse@1.8.0 113 | httpdate@1.0.2 114 | humantime@2.1.0 115 | hyper-rustls@0.23.2 116 | hyper@0.14.25 117 | iana-time-zone-haiku@0.1.1 118 | iana-time-zone@0.1.54 119 | ident_case@1.0.1 120 | idna@0.3.0 121 | ignore@0.4.20 122 | indexmap@1.9.2 123 | indicatif@0.17.3 124 | inout@0.1.3 125 | instant@0.1.12 126 | integer-sqrt@0.1.5 127 | io-lifetimes@1.0.9 128 | ipnet@2.7.1 129 | itertools@0.10.5 130 | itoa@1.0.6 131 | jobserver@0.1.26 132 | js-sys@0.3.61 133 | lazy_static@1.4.0 134 | libc@0.2.140 135 | link-cplusplus@1.0.8 136 | linux-raw-sys@0.1.4 137 | lock_api@0.4.9 138 | log@0.4.17 139 | memchr@2.5.0 140 | memoffset@0.7.1 141 | memoffset@0.8.0 142 | merge@0.1.0 143 | merge_derive@0.1.0 144 | mime@0.3.17 145 | minimal-lexical@0.2.1 146 | miniz_oxide@0.6.2 147 | mio@0.8.6 148 | nix@0.26.2 149 | nom@7.1.3 150 | num-integer@0.1.45 151 | num-traits@0.2.15 152 | num_cpus@1.15.0 153 | num_threads@0.1.6 154 | number_prefix@0.4.0 155 | once_cell@1.17.1 156 | opaque-debug@0.3.0 157 | os_str_bytes@6.5.0 158 | owo-colors@3.5.0 159 | parking_lot@0.12.1 160 | parking_lot_core@0.9.7 161 | path-dedot@3.0.18 162 | pbkdf2@0.12.1 163 | percent-encoding@2.2.0 164 | pin-project-lite@0.2.9 165 | pin-utils@0.1.0 166 | pkg-config@0.3.26 167 | poly1305@0.7.2 168 | portable-atomic@0.3.19 169 | ppv-lite86@0.2.17 170 | proc-macro-error-attr@1.0.4 171 | proc-macro-error@1.0.4 172 | proc-macro-hack@0.5.20+deprecated 173 | proc-macro2@1.0.53 174 | quick-xml@0.23.1 175 | quickcheck@1.0.3 176 | quickcheck_macros@1.0.0 177 | quote@1.0.26 178 | rand@0.8.5 179 | rand_chacha@0.3.1 180 | rand_core@0.6.4 181 | rayon-core@1.11.0 182 | rayon@1.7.0 183 | redox_syscall@0.2.16 184 | redox_users@0.4.3 185 | regex-syntax@0.6.29 186 | regex@1.7.2 187 | reqwest@0.11.15 188 | rhai@1.13.0 189 | rhai_codegen@1.5.0 190 | ring@0.16.20 191 | rpassword@7.2.0 192 | rstest@0.17.0 193 | rstest_macros@0.17.0 194 | rtoolbox@0.0.1 195 | rustc_version@0.4.0 196 | rustix@0.36.11 197 | rustls-pemfile@1.0.2 198 | rustls@0.20.8 199 | rustversion@1.0.12 200 | ryu@1.0.13 201 | salsa20@0.10.2 202 | same-file@1.0.6 203 | scopeguard@1.1.0 204 | scratch@1.0.5 205 | scrypt@0.11.0 206 | sct@0.7.0 207 | self_update@0.36.0 208 | semver@1.0.17 209 | serde-aux@4.1.2 210 | serde@1.0.158 211 | serde_derive@1.0.158 212 | serde_json@1.0.94 213 | serde_spanned@0.6.1 214 | serde_urlencoded@0.7.1 215 | serde_with@2.3.1 216 | serde_with_macros@2.3.1 217 | sha2@0.10.6 218 | signal-hook-mio@0.2.3 219 | signal-hook-registry@1.4.1 220 | signal-hook@0.3.15 221 | simplelog@0.12.1 222 | slab@0.4.8 223 | smallvec@1.10.0 224 | smartstring@1.0.1 225 | socket2@0.4.9 226 | spin@0.5.2 227 | static_assertions@1.1.0 228 | strsim@0.10.0 229 | strum@0.24.1 230 | strum_macros@0.24.3 231 | subtle@2.4.1 232 | syn@1.0.109 233 | syn@2.0.8 234 | tar@0.4.38 235 | tempfile@3.4.0 236 | termcolor@1.1.3 237 | textwrap@0.16.0 238 | thiserror-impl@1.0.40 239 | thiserror@1.0.40 240 | thread_local@1.1.7 241 | time-core@0.1.0 242 | time-macros@0.2.8 243 | time@0.3.20 244 | tiny-keccak@2.0.2 245 | tinyvec@1.6.0 246 | tinyvec_macros@0.1.1 247 | tokio-rustls@0.23.4 248 | tokio-util@0.7.7 249 | tokio@1.26.0 250 | toml@0.7.3 251 | toml_datetime@0.6.1 252 | toml_edit@0.19.8 253 | tower-service@0.3.2 254 | tracing-core@0.1.30 255 | tracing@0.1.37 256 | try-lock@0.2.4 257 | typenum@1.16.0 258 | unicode-bidi@0.3.13 259 | unicode-ident@1.0.8 260 | unicode-normalization@0.1.22 261 | unicode-width@0.1.10 262 | universal-hash@0.4.1 263 | untrusted@0.7.1 264 | url@2.3.1 265 | urlencoding@2.1.2 266 | users@0.11.0 267 | version_check@0.9.4 268 | walkdir@2.3.3 269 | want@0.3.0 270 | wasi@0.11.0+wasi-snapshot-preview1 271 | wasm-bindgen-backend@0.2.84 272 | wasm-bindgen-futures@0.4.34 273 | wasm-bindgen-macro-support@0.2.84 274 | wasm-bindgen-macro@0.2.84 275 | wasm-bindgen-shared@0.2.84 276 | wasm-bindgen@0.2.84 277 | wasm-streams@0.2.3 278 | web-sys@0.3.61 279 | webpki-roots@0.22.6 280 | webpki@0.22.0 281 | winapi-i686-pc-windows-gnu@0.4.0 282 | winapi-util@0.1.5 283 | winapi-x86_64-pc-windows-gnu@0.4.0 284 | winapi@0.3.9 285 | windows-sys@0.42.0 286 | windows-sys@0.45.0 287 | windows-targets@0.42.2 288 | windows@0.43.0 289 | windows@0.46.0 290 | windows_aarch64_gnullvm@0.42.2 291 | windows_aarch64_msvc@0.42.2 292 | windows_i686_gnu@0.42.2 293 | windows_i686_msvc@0.42.2 294 | windows_x86_64_gnu@0.42.2 295 | windows_x86_64_gnullvm@0.42.2 296 | windows_x86_64_msvc@0.42.2 297 | winnow@0.4.1 298 | winreg@0.10.1 299 | xattr@0.2.3 300 | xattr@1.0.0 301 | zeroize@1.4.3 302 | zstd-safe@6.0.4+zstd.1.5.4 303 | zstd-sys@2.0.7+zstd.1.5.4 304 | zstd@0.12.3+zstd.1.5.2 305 | " 306 | 307 | inherit cargo 308 | 309 | DESCRIPTION="fast, encrypted, deduplicated backups powered by pure Rust" 310 | HOMEPAGE="" 311 | SRC_URI=" 312 | ${CARGO_CRATE_URIS} 313 | " 314 | 315 | LICENSE="|| ( Apache-2.0 MIT )" 316 | # Dependent crate licenses 317 | LICENSE+=" 318 | Apache-2.0 BSD CC0-1.0 ISC MIT MPL-2.0 MPL-2.0 Unicode-DFS-2016 319 | " 320 | SLOT="0" 321 | KEYWORDS="~amd64" 322 | -------------------------------------------------------------------------------- /integration_test/attest-0.1.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.13.0 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | addr2line@0.21.0 10 | adler@1.0.2 11 | aead@0.4.3 12 | aead@0.5.2 13 | aes-gcm-siv@0.11.1 14 | aes-gcm@0.9.2 15 | aes@0.7.5 16 | aes@0.8.3 17 | aho-corasick@1.1.2 18 | android-tzdata@0.1.1 19 | android_system_properties@0.1.5 20 | anes@0.1.6 21 | anstream@0.6.5 22 | anstyle-parse@0.2.3 23 | anstyle-query@1.0.2 24 | anstyle-wincon@3.0.2 25 | anstyle@1.0.4 26 | anyhow@1.0.75 27 | argon2@0.5.2 28 | array-concat@0.5.2 29 | arrayref@0.3.7 30 | arrayvec@0.7.4 31 | asn1@0.15.5 32 | asn1_derive@0.15.5 33 | assert_matches@1.5.0 34 | async-compression@0.4.5 35 | async-trait@0.1.74 36 | autocfg@1.1.0 37 | backtrace@0.3.69 38 | base64@0.21.5 39 | base64ct@1.6.0 40 | bincode@1.3.3 41 | bindgen@0.66.1 42 | bit-set@0.5.3 43 | bit-vec@0.6.3 44 | bitflags@1.3.2 45 | bitflags@2.4.1 46 | bitstream-io@1.8.0 47 | blake2@0.10.6 48 | block-buffer@0.10.4 49 | block-padding@0.3.3 50 | bumpalo@3.14.0 51 | bytemuck@1.14.0 52 | byteorder@1.5.0 53 | bytes@1.5.0 54 | cast@0.3.0 55 | cbc@0.1.2 56 | cc@1.0.83 57 | cesu8@1.1.0 58 | cexpr@0.6.0 59 | cfg-if@1.0.0 60 | chacha20@0.8.2 61 | chacha20@0.9.1 62 | chacha20poly1305@0.10.1 63 | chacha20poly1305@0.9.1 64 | chrono@0.4.31 65 | ciborium-io@0.2.1 66 | ciborium-ll@0.2.1 67 | ciborium@0.2.1 68 | cipher@0.3.0 69 | cipher@0.4.4 70 | clang-sys@1.6.1 71 | clap@4.4.11 72 | clap_builder@4.4.11 73 | clap_derive@4.4.7 74 | clap_lex@0.6.0 75 | cmake@0.1.48 76 | colorchoice@1.0.0 77 | combine@4.6.6 78 | convert_case@0.4.0 79 | core-foundation-sys@0.8.4 80 | core-foundation@0.9.3 81 | cpufeatures@0.2.11 82 | crc32fast@1.3.2 83 | criterion-plot@0.5.0 84 | criterion@0.5.1 85 | crossbeam-deque@0.8.3 86 | crossbeam-epoch@0.9.15 87 | crossbeam-utils@0.8.16 88 | crypto-common@0.1.6 89 | ctr@0.7.0 90 | ctr@0.9.2 91 | darling@0.14.4 92 | darling_core@0.14.4 93 | darling_macro@0.14.4 94 | data-encoding@2.4.0 95 | derive-where@1.2.7 96 | derive_builder@0.12.0 97 | derive_builder_core@0.12.0 98 | derive_builder_macro@0.12.0 99 | derive_more@0.99.17 100 | digest@0.10.7 101 | displaydoc@0.2.4 102 | downcast-rs@1.2.0 103 | dunce@1.0.4 104 | dyn-clonable-impl@0.9.0 105 | dyn-clonable@0.9.0 106 | dyn-clone@1.0.14 107 | either@1.9.0 108 | encoding_rs@0.8.33 109 | env_logger@0.10.0 110 | equivalent@1.0.1 111 | errno@0.3.5 112 | fastrand@2.0.1 113 | fiat-crypto@0.2.5 114 | fixedbitset@0.4.2 115 | flate2@1.0.28 116 | fnv@1.0.7 117 | foreign-types-macros@0.2.3 118 | foreign-types-shared@0.3.1 119 | foreign-types@0.5.0 120 | form_urlencoded@1.2.0 121 | fs_extra@1.3.0 122 | fslock@0.2.1 123 | futures-channel@0.3.29 124 | futures-core@0.3.29 125 | futures-executor@0.3.29 126 | futures-io@0.3.29 127 | futures-macro@0.3.29 128 | futures-sink@0.3.29 129 | futures-task@0.3.29 130 | futures-util@0.3.29 131 | futures@0.3.29 132 | generic-array@0.14.7 133 | getrandom@0.2.10 134 | ghash@0.4.4 135 | ghash@0.5.0 136 | gimli@0.28.0 137 | glob@0.3.1 138 | h2@0.3.21 139 | half@1.8.2 140 | hashbrown@0.12.3 141 | hashbrown@0.14.2 142 | headers-core@0.2.0 143 | headers@0.3.9 144 | heck@0.3.3 145 | heck@0.4.1 146 | hermit-abi@0.3.3 147 | hex-literal@0.4.1 148 | hex@0.4.3 149 | hkdf@0.12.3 150 | hmac@0.12.1 151 | home@0.5.5 152 | http-body-util@0.1.0-rc.3 153 | http-body@0.4.5 154 | http-body@1.0.0-rc.2 155 | http@0.2.9 156 | httparse@1.8.0 157 | httpdate@1.0.3 158 | humantime@2.1.0 159 | hyper@0.14.27 160 | hyper@1.0.0-rc.4 161 | iana-time-zone-haiku@0.1.2 162 | iana-time-zone@0.1.58 163 | ident_case@1.0.1 164 | idna@0.4.0 165 | indexmap@1.9.3 166 | indexmap@2.1.0 167 | inout@0.1.3 168 | is-terminal@0.4.9 169 | itertools@0.10.5 170 | itertools@0.11.0 171 | itoa@1.0.9 172 | jni-sys@0.3.0 173 | jni@0.21.1 174 | jobserver@0.1.27 175 | js-sys@0.3.65 176 | lazy_static@1.4.0 177 | lazycell@1.3.0 178 | libc@0.2.149 179 | libloading@0.6.7 180 | libloading@0.7.4 181 | libm@0.2.8 182 | linkme-impl@0.3.17 183 | linkme@0.3.17 184 | linux-raw-sys@0.4.10 185 | lock_api@0.4.11 186 | log-panics@2.1.0 187 | log@0.4.20 188 | mediasan-common@0.5.1 189 | memchr@2.6.4 190 | memoffset@0.9.0 191 | mime@0.3.17 192 | mime_guess@2.0.4 193 | minimal-lexical@0.2.1 194 | miniz_oxide@0.7.1 195 | mio@0.8.9 196 | mp4san-derive@0.5.1 197 | mp4san@0.5.1 198 | multer@2.1.0 199 | multimap@0.8.3 200 | neon-build@0.10.1 201 | neon-macros@0.10.1 202 | neon-runtime@0.10.1 203 | neon@0.10.1 204 | nom@7.1.3 205 | nonzero_ext@0.3.0 206 | num-integer@0.1.45 207 | num-traits@0.2.17 208 | num_cpus@1.16.0 209 | num_enum@0.6.1 210 | num_enum_derive@0.6.1 211 | object@0.32.1 212 | once_cell@1.18.0 213 | oorandom@11.1.3 214 | opaque-debug@0.3.0 215 | openssl-probe@0.1.5 216 | parking_lot@0.12.1 217 | parking_lot_core@0.9.9 218 | partial-default-derive@0.1.0 219 | partial-default@0.1.0 220 | password-hash@0.5.0 221 | paste@1.0.14 222 | peeking_take_while@0.1.2 223 | percent-encoding@2.3.0 224 | petgraph@0.6.4 225 | pin-project-internal@1.1.3 226 | pin-project-lite@0.2.13 227 | pin-project@1.1.3 228 | pin-utils@0.1.0 229 | platforms@3.2.0 230 | plotters-backend@0.3.5 231 | plotters-svg@0.3.5 232 | plotters@0.3.5 233 | poly1305@0.7.2 234 | poly1305@0.8.0 235 | polyval@0.5.3 236 | polyval@0.6.1 237 | ppv-lite86@0.2.17 238 | pqcrypto-internals@0.2.5 239 | pqcrypto-kyber@0.7.9 240 | pqcrypto-kyber@0.8.0 241 | pqcrypto-traits@0.3.5 242 | prettyplease@0.2.15 243 | proc-macro-crate@1.3.1 244 | proc-macro2@1.0.69 245 | proptest@1.3.1 246 | prost-build@0.12.1 247 | prost-derive@0.12.1 248 | prost-types@0.12.1 249 | prost@0.12.1 250 | quick-error@1.2.3 251 | quote@1.0.33 252 | rand@0.8.5 253 | rand_chacha@0.3.1 254 | rand_core@0.6.4 255 | rand_xorshift@0.3.0 256 | rayon-core@1.12.0 257 | rayon@1.8.0 258 | redox_syscall@0.4.1 259 | regex-automata@0.4.3 260 | regex-syntax@0.7.5 261 | regex-syntax@0.8.2 262 | regex@1.10.2 263 | ring@0.17.5 264 | rustc-demangle@0.1.23 265 | rustc-hash@1.1.0 266 | rustc_version@0.4.0 267 | rustix@0.38.21 268 | rustls-native-certs@0.6.3 269 | rustls-pemfile@1.0.3 270 | rustls-webpki@0.101.7 271 | rustls@0.21.8 272 | rusty-fork@0.3.0 273 | ryu@1.0.15 274 | same-file@1.0.6 275 | schannel@0.1.22 276 | scoped-tls@1.0.1 277 | scopeguard@1.2.0 278 | sct@0.7.1 279 | security-framework-sys@2.9.1 280 | security-framework@2.9.2 281 | semver-parser@0.7.0 282 | semver@0.9.0 283 | semver@1.0.20 284 | serde@1.0.190 285 | serde_derive@1.0.190 286 | serde_json@1.0.108 287 | serde_urlencoded@0.7.1 288 | sha1@0.10.6 289 | sha2@0.10.8 290 | shlex@1.2.0 291 | signal-hook-registry@1.4.1 292 | slab@0.4.9 293 | smallvec@1.11.1 294 | snow@0.9.3 295 | socket2@0.4.10 296 | socket2@0.5.5 297 | spin@0.9.8 298 | static_assertions@1.1.0 299 | strsim@0.10.0 300 | subtle@2.5.0 301 | syn-mid@0.5.4 302 | syn@1.0.109 303 | syn@2.0.38 304 | tempfile@3.8.1 305 | termcolor@1.3.0 306 | test-case-core@3.3.1 307 | test-case-macros@3.3.1 308 | test-case@3.3.1 309 | test-log-macros@0.2.14 310 | test-log@0.2.14 311 | thiserror-impl@1.0.50 312 | thiserror@1.0.50 313 | tinytemplate@1.2.1 314 | tinyvec@1.6.0 315 | tinyvec_macros@0.1.1 316 | tokio-macros@2.1.0 317 | tokio-rustls@0.24.1 318 | tokio-stream@0.1.14 319 | tokio-tungstenite@0.19.0 320 | tokio-tungstenite@0.20.1 321 | tokio-util@0.7.10 322 | tokio@1.33.0 323 | toml_datetime@0.6.5 324 | toml_edit@0.19.15 325 | tower-service@0.3.2 326 | tracing-core@0.1.32 327 | tracing@0.1.40 328 | try-lock@0.2.4 329 | tungstenite@0.19.0 330 | tungstenite@0.20.1 331 | typenum@1.17.0 332 | unarray@0.1.4 333 | unicase@2.7.0 334 | unicode-bidi@0.3.13 335 | unicode-ident@1.0.12 336 | unicode-normalization@0.1.22 337 | unicode-segmentation@1.10.1 338 | universal-hash@0.4.0 339 | universal-hash@0.5.1 340 | untrusted@0.9.0 341 | url@2.4.1 342 | utf-8@0.7.6 343 | utf8parse@0.2.1 344 | uuid@1.5.0 345 | variant_count@1.1.0 346 | version_check@0.9.4 347 | wait-timeout@0.2.0 348 | walkdir@2.4.0 349 | want@0.3.1 350 | warp@0.3.6 351 | wasi@0.11.0+wasi-snapshot-preview1 352 | wasm-bindgen-backend@0.2.88 353 | wasm-bindgen-macro-support@0.2.88 354 | wasm-bindgen-macro@0.2.88 355 | wasm-bindgen-shared@0.2.88 356 | wasm-bindgen@0.2.88 357 | web-sys@0.3.65 358 | webpsan@0.5.1 359 | which@4.4.2 360 | winapi-i686-pc-windows-gnu@0.4.0 361 | winapi-util@0.1.6 362 | winapi-x86_64-pc-windows-gnu@0.4.0 363 | winapi@0.3.9 364 | windows-core@0.51.1 365 | windows-sys@0.45.0 366 | windows-sys@0.48.0 367 | windows-sys@0.52.0 368 | windows-targets@0.42.2 369 | windows-targets@0.48.5 370 | windows-targets@0.52.0 371 | windows_aarch64_gnullvm@0.42.2 372 | windows_aarch64_gnullvm@0.48.5 373 | windows_aarch64_gnullvm@0.52.0 374 | windows_aarch64_msvc@0.42.2 375 | windows_aarch64_msvc@0.48.5 376 | windows_aarch64_msvc@0.52.0 377 | windows_i686_gnu@0.42.2 378 | windows_i686_gnu@0.48.5 379 | windows_i686_gnu@0.52.0 380 | windows_i686_msvc@0.42.2 381 | windows_i686_msvc@0.48.5 382 | windows_i686_msvc@0.52.0 383 | windows_x86_64_gnu@0.42.2 384 | windows_x86_64_gnu@0.48.5 385 | windows_x86_64_gnu@0.52.0 386 | windows_x86_64_gnullvm@0.42.2 387 | windows_x86_64_gnullvm@0.48.5 388 | windows_x86_64_gnullvm@0.52.0 389 | windows_x86_64_msvc@0.42.2 390 | windows_x86_64_msvc@0.48.5 391 | windows_x86_64_msvc@0.52.0 392 | winnow@0.5.18 393 | x25519-dalek@2.0.0 394 | zeroize@1.6.0 395 | zeroize_derive@1.4.2 396 | " 397 | 398 | declare -A GIT_CRATES=( 399 | [boring-sys]='https://github.com/signalapp/boring;8245063ae6eb97d909982b89fad45bb7f0a2a1a0;boring-%commit%/boring-sys' 400 | [boring]='https://github.com/signalapp/boring;8245063ae6eb97d909982b89fad45bb7f0a2a1a0;boring-%commit%/boring' 401 | [curve25519-dalek-derive]='https://github.com/signalapp/curve25519-dalek;a12ab4e58455bb3dc7cd73a0f9f3443507b2854b;curve25519-dalek-%commit%/curve25519-dalek-derive' 402 | [curve25519-dalek]='https://github.com/signalapp/curve25519-dalek;a12ab4e58455bb3dc7cd73a0f9f3443507b2854b;curve25519-dalek-%commit%/curve25519-dalek' 403 | [tokio-boring]='https://github.com/signalapp/boring;8245063ae6eb97d909982b89fad45bb7f0a2a1a0;boring-%commit%/tokio-boring' 404 | ) 405 | 406 | inherit cargo 407 | 408 | DESCRIPTION="" 409 | HOMEPAGE="" 410 | SRC_URI=" 411 | ${CARGO_CRATE_URIS} 412 | " 413 | 414 | LICENSE="AGPL-3" 415 | # Dependent crate licenses 416 | LICENSE+=" AGPL-3 Apache-2.0 BSD-2 BSD ISC MIT Unicode-DFS-2016" 417 | SLOT="0" 418 | KEYWORDS="~amd64" 419 | -------------------------------------------------------------------------------- /test/test_cargo.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2024 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import io 6 | import tarfile 7 | import typing 8 | from pathlib import PurePath 9 | 10 | import pytest 11 | 12 | from pycargoebuild.cargo import ( 13 | FileCrate, 14 | GitCrate, 15 | PackageMetadata, 16 | cargo_to_spdx, 17 | get_crates, 18 | get_package_metadata, 19 | ) 20 | 21 | CARGO_LOCK_TOML = b''' 22 | version = 3 23 | 24 | [[package]] 25 | name = "libc" 26 | version = "0.2.124" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | checksum = """21a41fed9d98f27ab1c6d161da622a4f\\ 29 | a35e8a54a8adc24bbf3ddd0ef70b0e50""" 30 | 31 | [[package]] 32 | name = "fsevent-sys" 33 | version = "4.1.0" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = """76ee7a02da4d231650c7cea31349b889\\ 36 | be2f45ddb3ef3032d2ec8185f6313fd2""" 37 | dependencies = [ 38 | "libc", 39 | ] 40 | 41 | [[package]] 42 | name = "test" 43 | version = "1.2.3" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = """76ee7a02da4d231650c7cea31349b889\\ 46 | be2f45ddb3ef3032d2ec8185f6313fd2""" 47 | 48 | [[package]] 49 | name = "test" 50 | version = "1.2.3" 51 | dependencies = [ 52 | "fsevent-sys", 53 | "test", 54 | ] 55 | 56 | [[package]] 57 | name = "regex-syntax" 58 | version = "0.6.28" 59 | source = """git+https://github.com/01mf02/regex.git/?rev=90eebbd\\ 60 | #90eebbdb9396ca10510130327073a3d596674d04""" 61 | 62 | [[package]] 63 | name = "virtiofsd" 64 | version = "1.12.0" 65 | source = """git+https://gitlab.com/virtio-fs/virtiofsd?tag=v1.12.0\\ 66 | #af439fbf89f53e18021e8d01dbbb7f66ffd824c1""" 67 | 68 | [[package]] 69 | name = "pipewire" 70 | version = "0.8.0" 71 | source = """git+https://gitlab.freedesktop.org/pipewire/pipewire-rs\\ 72 | ?tag=v0.8.0#449bf53f5d5edc8d0be6c0c80bc19d882f712dd7""" 73 | ''' 74 | 75 | PREHISTORIC_CARGO_LOCK_TOML = b""" 76 | [[package]] 77 | name = "libc" 78 | version = "0.2.124" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | 81 | [[package]] 82 | name = "fsevent-sys" 83 | version = "4.1.0" 84 | source = "registry+https://github.com/rust-lang/crates.io-index" 85 | dependencies = [ 86 | "libc 0.2.124 (registry+https://github.com/rust-lang/crates.io-index)", 87 | ] 88 | 89 | [[package]] 90 | name = "test" 91 | version = "1.2.3" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | 94 | [[package]] 95 | name = "test" 96 | version = "1.2.3" 97 | dependencies = [ 98 | "fsevent-sys 4.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 99 | "test 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 100 | ] 101 | 102 | [metadata] 103 | "checksum libc 0.2.124\ 104 | (registry+https://github.com/rust-lang/crates.io-index)"\ 105 | = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" 106 | "checksum fsevent-sys 4.1.0\ 107 | (registry+https://github.com/rust-lang/crates.io-index)"\ 108 | = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" 109 | "checksum test 1.2.3\ 110 | (registry+https://github.com/rust-lang/crates.io-index)"\ 111 | = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" 112 | """ 113 | 114 | CRATES = [ 115 | FileCrate("libc", "0.2.124", "21a41fed9d98f27ab1c6d161da622a4f" 116 | "a35e8a54a8adc24bbf3ddd0ef70b0e50"), 117 | FileCrate("fsevent-sys", "4.1.0", "76ee7a02da4d231650c7cea31349b889" 118 | "be2f45ddb3ef3032d2ec8185f6313fd2"), 119 | FileCrate("test", "1.2.3", "76ee7a02da4d231650c7cea31349b889" 120 | "be2f45ddb3ef3032d2ec8185f6313fd2"), 121 | GitCrate("regex-syntax", "0.6.28", 122 | "https://github.com/01mf02/regex", 123 | "90eebbdb9396ca10510130327073a3d596674d04"), 124 | GitCrate("virtiofsd", "1.12.0", 125 | "https://gitlab.com/virtio-fs/virtiofsd", 126 | "af439fbf89f53e18021e8d01dbbb7f66ffd824c1"), 127 | GitCrate("pipewire", "0.8.0", 128 | "https://gitlab.freedesktop.org/pipewire/pipewire-rs", 129 | "449bf53f5d5edc8d0be6c0c80bc19d882f712dd7"), 130 | ] 131 | 132 | 133 | def test_cargo_to_spdx(): 134 | assert cargo_to_spdx("A/B/C") == "A OR B OR C" 135 | 136 | 137 | def test_get_crates(): 138 | input_toml = CARGO_LOCK_TOML 139 | 140 | assert list(get_crates(io.BytesIO(input_toml))) == CRATES 141 | 142 | 143 | def test_get_crates_prehistoric(): 144 | input_toml = PREHISTORIC_CARGO_LOCK_TOML 145 | 146 | assert list(get_crates(io.BytesIO(input_toml)) 147 | ) == [x for x in CRATES if isinstance(x, FileCrate)] 148 | 149 | 150 | @pytest.mark.parametrize("exclude", ["", "description", "homepage", "license"]) 151 | def test_get_package_metadata(exclude): 152 | data: typing.Dict[str, typing.Optional[str]] = { 153 | "name": "test", 154 | "version": "1.2.3", 155 | "license": "MIT", 156 | "description": "A test package", 157 | "homepage": "https://example.com/test", 158 | } 159 | 160 | for k in exclude.split(): 161 | data[k] = None 162 | 163 | input_toml = "[package]\n" 164 | for k, v in data.items(): 165 | if v is not None: 166 | input_toml += f'{k} = "{v}"\n' 167 | 168 | assert (get_package_metadata(io.BytesIO(input_toml.encode("utf-8"))) == 169 | PackageMetadata(**data)) # type: ignore 170 | 171 | 172 | @pytest.mark.parametrize("exclude", ["", "description", "homepage", "license"]) 173 | def test_get_package_metadata_workspace(exclude): 174 | data: typing.Dict[str, typing.Optional[str]] = { 175 | "version": "1.2.3", 176 | "license": "MIT", 177 | "description": "A test package", 178 | "homepage": "https://example.com/test", 179 | } 180 | 181 | for k in exclude.split(): 182 | data[k] = None 183 | 184 | input_toml = '[package]\nname = "test"\n' 185 | for k, v in data.items(): 186 | if v is not None: 187 | input_toml += f"{k}.workspace = true\n" 188 | 189 | data["name"] = "test" 190 | assert (get_package_metadata(io.BytesIO(input_toml.encode("utf-8")), 191 | data) == 192 | PackageMetadata(**data)) # type: ignore 193 | 194 | 195 | def test_get_package_metadata_license_file(): 196 | input_toml = """ 197 | [package] 198 | name = "test" 199 | version = "0" 200 | license-file = "COPYING" 201 | """ 202 | 203 | assert (get_package_metadata(io.BytesIO(input_toml.encode("utf-8"))) == 204 | PackageMetadata(name="test", 205 | version="0", 206 | license_file="COPYING")) 207 | 208 | 209 | def test_get_package_metadata_features(): 210 | input_toml = """ 211 | [package] 212 | name = "test" 213 | version = "0" 214 | license-file = "COPYING" 215 | 216 | [features] 217 | default = ["a", "c", "f"] 218 | a = ["foo"] 219 | b = ["bar", "baz"] 220 | c = [] 221 | d = ["foo", "baz"] 222 | e = [] 223 | f = ["foo", "bar"] 224 | """ 225 | 226 | assert (get_package_metadata(io.BytesIO(input_toml.encode("utf-8"))) == 227 | PackageMetadata(name="test", 228 | version="0", 229 | features={ 230 | "a": True, 231 | "b": False, 232 | "c": True, 233 | "d": False, 234 | "e": False, 235 | "f": True, 236 | }, 237 | license_file="COPYING")) 238 | 239 | 240 | TOP_CARGO_TOML = b"""\ 241 | [package] 242 | name = "toplevel" 243 | version = "0.1" 244 | license = "MIT" 245 | 246 | [workspace] 247 | members = ["sub"] 248 | """ 249 | 250 | SUB_CARGO_TOML = b"""\ 251 | [package] 252 | name = "subpkg" 253 | version = "0.1" 254 | license = "MIT" 255 | """ 256 | 257 | 258 | @pytest.mark.parametrize( 259 | "name,expected", 260 | [("toplevel", ""), 261 | ("subpkg", "sub"), 262 | ("nonexistent", RuntimeError), 263 | ]) 264 | def test_git_crate_package_directory(tmp_path, name, expected): 265 | commit = "5ace474ad2e92da836de60afd9014cbae7bdd481" 266 | crate = GitCrate(name, "0.1", 267 | "https://github.com/projg2/pycargoebuild", 268 | commit) 269 | basename = f"pycargoebuild-{commit}" 270 | 271 | with tarfile.open(tmp_path / f"{basename}.gh.tar.gz", "x:gz") as tarf: 272 | tar_info = tarfile.TarInfo(f"{basename}/Cargo.toml") 273 | tar_info.size = len(TOP_CARGO_TOML) 274 | tarf.addfile(tar_info, io.BytesIO(TOP_CARGO_TOML)) 275 | tar_info = tarfile.TarInfo(f"{basename}/sub/Cargo.toml") 276 | tar_info.size = len(SUB_CARGO_TOML) 277 | tarf.addfile(tar_info, io.BytesIO(SUB_CARGO_TOML)) 278 | 279 | if expected is RuntimeError: 280 | with pytest.raises(RuntimeError): 281 | crate.get_package_directory(tmp_path) 282 | else: 283 | assert (crate.get_package_directory(tmp_path) == 284 | PurePath(basename) / expected) 285 | 286 | 287 | @pytest.mark.parametrize("have_lock", [False, True]) 288 | def test_git_crate_root_directory(tmp_path, have_lock): 289 | commit = "5ace474ad2e92da836de60afd9014cbae7bdd481" 290 | crate = GitCrate("pycargoebuild", "0.1", 291 | "https://github.com/projg2/pycargoebuild", 292 | commit) 293 | basename = f"pycargoebuild-{commit}" 294 | 295 | with tarfile.open(tmp_path / f"{basename}.gh.tar.gz", "x:gz") as tarf: 296 | tar_info = tarfile.TarInfo(f"{basename}/Cargo.toml") 297 | tar_info.size = len(TOP_CARGO_TOML) 298 | tarf.addfile(tar_info, io.BytesIO(TOP_CARGO_TOML)) 299 | tar_info = tarfile.TarInfo(f"{basename}/sub/Cargo.toml") 300 | tar_info.size = len(SUB_CARGO_TOML) 301 | tarf.addfile(tar_info, io.BytesIO(SUB_CARGO_TOML)) 302 | if have_lock: 303 | tar_info = tarfile.TarInfo(f"{basename}/Cargo.lock") 304 | tarf.addfile(tar_info, io.BytesIO(b"")) 305 | 306 | assert crate.get_root_directory(tmp_path) == PurePath(basename) 307 | -------------------------------------------------------------------------------- /integration_test/milkshake-terminal-0.0.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.13.3 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | ab_glyph@0.2.29 10 | ab_glyph_rasterizer@0.1.8 11 | accesskit@0.16.3 12 | accesskit_consumer@0.24.3 13 | accesskit_macos@0.17.4 14 | accesskit_windows@0.23.2 15 | accesskit_winit@0.22.4 16 | adler2@2.0.0 17 | ahash@0.8.11 18 | aho-corasick@1.1.3 19 | allocator-api2@0.2.18 20 | alsa-sys@0.3.1 21 | alsa@0.9.1 22 | android-activity@0.6.0 23 | android-properties@0.2.2 24 | android_log-sys@0.3.1 25 | android_system_properties@0.1.5 26 | approx@0.5.1 27 | arrayref@0.3.9 28 | arrayvec@0.7.6 29 | ash@0.38.0+1.3.281 30 | assert_type_match@0.1.1 31 | async-broadcast@0.5.1 32 | async-channel@2.3.1 33 | async-executor@1.13.1 34 | async-fs@2.1.2 35 | async-lock@3.4.0 36 | async-task@4.7.1 37 | atomic-waker@1.1.2 38 | atomicow@1.0.0 39 | autocfg@1.4.0 40 | base64@0.21.7 41 | base64@0.22.1 42 | bevy@0.15.0-rc.2 43 | bevy_a11y@0.15.0-rc.2 44 | bevy_animation@0.15.0-rc.2 45 | bevy_animation_derive@0.15.0-rc.2 46 | bevy_app@0.15.0-rc.2 47 | bevy_asset@0.15.0-rc.2 48 | bevy_asset_macros@0.15.0-rc.2 49 | bevy_audio@0.15.0-rc.2 50 | bevy_color@0.15.0-rc.2 51 | bevy_core@0.15.0-rc.2 52 | bevy_core_pipeline@0.15.0-rc.2 53 | bevy_derive@0.15.0-rc.2 54 | bevy_diagnostic@0.15.0-rc.2 55 | bevy_ecs@0.15.0-rc.2 56 | bevy_ecs_macros@0.15.0-rc.2 57 | bevy_encase_derive@0.15.0-rc.2 58 | bevy_gizmos@0.15.0-rc.2 59 | bevy_gizmos_macros@0.15.0-rc.2 60 | bevy_hierarchy@0.15.0-rc.2 61 | bevy_image@0.15.0-rc.2 62 | bevy_input@0.15.0-rc.2 63 | bevy_internal@0.15.0-rc.2 64 | bevy_log@0.15.0-rc.2 65 | bevy_macro_utils@0.15.0-rc.2 66 | bevy_math@0.15.0-rc.2 67 | bevy_mesh@0.15.0-rc.2 68 | bevy_mikktspace@0.15.0-rc.2 69 | bevy_pbr@0.15.0-rc.2 70 | bevy_picking@0.15.0-rc.2 71 | bevy_ptr@0.15.0-rc.2 72 | bevy_reflect@0.15.0-rc.2 73 | bevy_reflect_derive@0.15.0-rc.2 74 | bevy_render@0.15.0-rc.2 75 | bevy_render_macros@0.15.0-rc.2 76 | bevy_scene@0.15.0-rc.2 77 | bevy_sprite@0.15.0-rc.2 78 | bevy_tasks@0.15.0-rc.2 79 | bevy_text@0.15.0-rc.2 80 | bevy_time@0.15.0-rc.2 81 | bevy_transform@0.15.0-rc.2 82 | bevy_ui@0.15.0-rc.2 83 | bevy_utils@0.15.0-rc.2 84 | bevy_utils_proc_macros@0.15.0-rc.2 85 | bevy_window@0.15.0-rc.2 86 | bevy_winit@0.15.0-rc.2 87 | bindgen@0.70.1 88 | bit-set@0.5.3 89 | bit-set@0.6.0 90 | bit-vec@0.6.3 91 | bit-vec@0.7.0 92 | bitflags@1.3.2 93 | bitflags@2.6.0 94 | blake3@1.5.4 95 | block2@0.5.1 96 | block@0.1.6 97 | blocking@1.6.1 98 | bumpalo@3.16.0 99 | bytemuck@1.19.0 100 | bytemuck_derive@1.8.0 101 | byteorder-lite@0.1.0 102 | byteorder@1.5.0 103 | bytes@1.8.0 104 | calloop-wayland-source@0.3.0 105 | calloop@0.13.0 106 | castaway@0.2.3 107 | cc@1.1.31 108 | cesu8@1.1.0 109 | cexpr@0.6.0 110 | cfg-if@1.0.0 111 | cfg_aliases@0.1.1 112 | cfg_aliases@0.2.1 113 | clang-sys@1.8.1 114 | codespan-reporting@0.11.1 115 | com@0.6.0 116 | com_macros@0.6.0 117 | com_macros_support@0.6.0 118 | combine@4.6.7 119 | compact_str@0.8.0 120 | concurrent-queue@2.5.0 121 | console_error_panic_hook@0.1.7 122 | const-fnv1a-hash@1.1.0 123 | const-random-macro@0.1.16 124 | const-random@0.1.18 125 | const_panic@0.2.10 126 | const_soft_float@0.1.4 127 | constant_time_eq@0.3.1 128 | constgebra@0.1.4 129 | core-foundation-sys@0.8.7 130 | core-foundation@0.9.4 131 | core-graphics-types@0.1.3 132 | core-graphics@0.23.2 133 | coreaudio-rs@0.11.3 134 | coreaudio-sys@0.2.16 135 | cosmic-text@0.12.1 136 | cpal@0.15.3 137 | crc32fast@1.4.2 138 | crossbeam-channel@0.5.13 139 | crossbeam-deque@0.8.5 140 | crossbeam-epoch@0.9.18 141 | crossbeam-utils@0.8.20 142 | crunchy@0.2.2 143 | ctrlc@3.4.5 144 | cursor-icon@1.1.0 145 | d3d12@22.0.0 146 | dasp_sample@0.11.0 147 | data-encoding@2.6.0 148 | derive_more-impl@1.0.0 149 | derive_more@1.0.0 150 | dispatch@0.2.0 151 | disqualified@1.0.0 152 | dlib@0.5.2 153 | document-features@0.2.10 154 | downcast-rs@1.2.1 155 | dpi@0.1.1 156 | either@1.13.0 157 | encase@0.10.0 158 | encase_derive@0.10.0 159 | encase_derive_impl@0.10.0 160 | equivalent@1.0.1 161 | erased-serde@0.4.5 162 | errno@0.3.9 163 | euclid@0.22.11 164 | event-listener-strategy@0.5.2 165 | event-listener@2.5.3 166 | event-listener@5.3.1 167 | fastrand@2.1.1 168 | fdeflate@0.3.6 169 | fixedbitset@0.4.2 170 | fixedbitset@0.5.7 171 | flate2@1.0.34 172 | font-types@0.7.2 173 | fontconfig-parser@0.5.7 174 | fontdb@0.16.2 175 | foreign-types-macros@0.2.3 176 | foreign-types-shared@0.3.1 177 | foreign-types@0.5.0 178 | futures-channel@0.3.31 179 | futures-core@0.3.31 180 | futures-io@0.3.31 181 | futures-lite@2.3.0 182 | getrandom@0.2.15 183 | gl_generator@0.14.0 184 | glam@0.29.0 185 | glob@0.3.1 186 | glow@0.13.1 187 | glutin_wgl_sys@0.6.0 188 | gpu-alloc-types@0.3.0 189 | gpu-alloc@0.6.0 190 | gpu-allocator@0.26.0 191 | gpu-descriptor-types@0.2.0 192 | gpu-descriptor@0.3.0 193 | grid@0.14.0 194 | guillotiere@0.6.2 195 | hashbrown@0.14.5 196 | hashbrown@0.15.0 197 | hassle-rs@0.11.0 198 | hermit-abi@0.4.0 199 | hexasphere@15.0.0 200 | hexf-parse@0.2.1 201 | image@0.25.4 202 | immutable-chunkmap@2.0.6 203 | indexmap@2.6.0 204 | itertools@0.13.0 205 | itoa@1.0.11 206 | jni-sys@0.3.0 207 | jni@0.21.1 208 | jobserver@0.1.32 209 | js-sys@0.3.72 210 | khronos-egl@6.0.0 211 | khronos_api@3.1.0 212 | ktx2@0.3.0 213 | lazy_static@1.5.0 214 | libc@0.2.161 215 | libloading@0.8.5 216 | libm@0.2.11 217 | libredox@0.1.3 218 | linux-raw-sys@0.4.14 219 | litrs@0.4.1 220 | lock_api@0.4.12 221 | log@0.4.22 222 | mach2@0.4.2 223 | malloc_buf@0.0.6 224 | matchers@0.1.0 225 | memchr@2.7.4 226 | memmap2@0.9.5 227 | metal@0.29.0 228 | minimal-lexical@0.2.1 229 | miniz_oxide@0.8.0 230 | naga@22.1.0 231 | naga_oil@0.15.0 232 | ndk-context@0.1.1 233 | ndk-sys@0.5.0+25.2.9519653 234 | ndk-sys@0.6.0+11769913 235 | ndk@0.8.0 236 | ndk@0.9.0 237 | nix@0.29.0 238 | nom@7.1.3 239 | nonmax@0.5.5 240 | nu-ansi-term@0.46.0 241 | num-derive@0.4.2 242 | num-traits@0.2.19 243 | num_enum@0.7.3 244 | num_enum_derive@0.7.3 245 | objc-sys@0.3.5 246 | objc2-app-kit@0.2.2 247 | objc2-cloud-kit@0.2.2 248 | objc2-contacts@0.2.2 249 | objc2-core-data@0.2.2 250 | objc2-core-image@0.2.2 251 | objc2-core-location@0.2.2 252 | objc2-encode@4.0.3 253 | objc2-foundation@0.2.2 254 | objc2-link-presentation@0.2.2 255 | objc2-metal@0.2.2 256 | objc2-quartz-core@0.2.2 257 | objc2-symbols@0.2.2 258 | objc2-ui-kit@0.2.2 259 | objc2-uniform-type-identifiers@0.2.2 260 | objc2-user-notifications@0.2.2 261 | objc2@0.5.2 262 | objc@0.2.7 263 | oboe-sys@0.6.1 264 | oboe@0.6.1 265 | offset-allocator@0.2.0 266 | once_cell@1.20.2 267 | orbclient@0.3.48 268 | overload@0.1.1 269 | owned_ttf_parser@0.25.0 270 | parking@2.2.1 271 | parking_lot@0.12.3 272 | parking_lot_core@0.9.10 273 | paste@1.0.15 274 | petgraph@0.6.5 275 | pin-project-internal@1.1.7 276 | pin-project-lite@0.2.15 277 | pin-project@1.1.7 278 | piper@0.2.4 279 | pkg-config@0.3.31 280 | png@0.17.14 281 | polling@3.7.3 282 | pp-rs@0.2.1 283 | ppv-lite86@0.2.20 284 | presser@0.3.1 285 | prettyplease@0.2.25 286 | proc-macro-crate@3.2.0 287 | proc-macro2@1.0.89 288 | profiling@1.0.16 289 | quick-xml@0.36.2 290 | quote@1.0.37 291 | radsort@0.1.1 292 | rand@0.8.5 293 | rand_chacha@0.3.1 294 | rand_core@0.6.4 295 | rand_distr@0.4.3 296 | range-alloc@0.1.3 297 | rangemap@1.5.1 298 | raw-window-handle@0.6.2 299 | rayon-core@1.12.1 300 | rayon@1.10.0 301 | read-fonts@0.22.5 302 | rectangle-pack@0.4.2 303 | redox_syscall@0.4.1 304 | redox_syscall@0.5.7 305 | regex-automata@0.1.10 306 | regex-automata@0.4.8 307 | regex-syntax@0.6.29 308 | regex-syntax@0.8.5 309 | regex@1.11.1 310 | renderdoc-sys@1.1.0 311 | rodio@0.19.0 312 | ron@0.8.1 313 | roxmltree@0.20.0 314 | rustc-hash@1.1.0 315 | rustix-openpty@0.1.1 316 | rustix@0.38.38 317 | rustversion@1.0.18 318 | rustybuzz@0.14.1 319 | ruzstd@0.7.2 320 | ryu@1.0.18 321 | same-file@1.0.6 322 | scoped-tls@1.0.1 323 | scopeguard@1.2.0 324 | sctk-adwaita@0.10.1 325 | self_cell@1.0.4 326 | send_wrapper@0.6.0 327 | serde@1.0.214 328 | serde_derive@1.0.214 329 | sharded-slab@0.1.7 330 | shlex@1.3.0 331 | simd-adler32@0.3.7 332 | skrifa@0.22.3 333 | slab@0.4.9 334 | slotmap@1.0.7 335 | smallvec@1.13.2 336 | smithay-client-toolkit@0.19.2 337 | smol_str@0.2.2 338 | spirv@0.3.0+sdk-1.3.268.0 339 | stackfuture@0.3.0 340 | static_assertions@1.1.0 341 | strict-num@0.1.1 342 | svg_fmt@0.4.3 343 | swash@0.1.19 344 | syn@1.0.109 345 | syn@2.0.85 346 | sys-locale@0.3.1 347 | taffy@0.5.2 348 | termcolor@1.4.1 349 | thiserror-impl@1.0.65 350 | thiserror@1.0.65 351 | thread_local@1.1.8 352 | tiny-keccak@2.0.2 353 | tiny-skia-path@0.11.4 354 | tiny-skia@0.11.4 355 | tinyvec@1.8.0 356 | tinyvec_macros@0.1.1 357 | toml_datetime@0.6.8 358 | toml_edit@0.22.22 359 | tracing-attributes@0.1.27 360 | tracing-core@0.1.32 361 | tracing-log@0.2.0 362 | tracing-oslog@0.2.0 363 | tracing-subscriber@0.3.18 364 | tracing-wasm@0.2.1 365 | tracing@0.1.40 366 | ttf-parser@0.20.0 367 | ttf-parser@0.21.1 368 | ttf-parser@0.25.0 369 | twox-hash@1.6.3 370 | typeid@1.0.2 371 | unicode-bidi-mirroring@0.2.0 372 | unicode-bidi@0.3.17 373 | unicode-ccc@0.2.0 374 | unicode-ident@1.0.13 375 | unicode-linebreak@0.1.5 376 | unicode-properties@0.1.3 377 | unicode-script@0.5.7 378 | unicode-segmentation@1.12.0 379 | unicode-width@0.1.14 380 | unicode-xid@0.2.6 381 | utf8parse@0.2.2 382 | uuid@1.11.0 383 | valuable@0.1.0 384 | version_check@0.9.5 385 | vte@0.13.0 386 | vte_generate_state_changes@0.1.2 387 | walkdir@2.5.0 388 | wasi@0.11.0+wasi-snapshot-preview1 389 | wasm-bindgen-backend@0.2.95 390 | wasm-bindgen-futures@0.4.45 391 | wasm-bindgen-macro-support@0.2.95 392 | wasm-bindgen-macro@0.2.95 393 | wasm-bindgen-shared@0.2.95 394 | wasm-bindgen@0.2.95 395 | wayland-backend@0.3.7 396 | wayland-client@0.31.7 397 | wayland-csd-frame@0.3.0 398 | wayland-cursor@0.31.7 399 | wayland-protocols-plasma@0.3.5 400 | wayland-protocols-wlr@0.3.5 401 | wayland-protocols@0.32.5 402 | wayland-scanner@0.31.5 403 | wayland-sys@0.31.5 404 | web-sys@0.3.72 405 | web-time@1.1.0 406 | wgpu-core@22.1.0 407 | wgpu-hal@22.0.0 408 | wgpu-types@22.0.0 409 | wgpu@22.1.0 410 | widestring@1.1.0 411 | winapi-i686-pc-windows-gnu@0.4.0 412 | winapi-util@0.1.9 413 | winapi-x86_64-pc-windows-gnu@0.4.0 414 | winapi@0.3.9 415 | windows-core@0.52.0 416 | windows-core@0.54.0 417 | windows-core@0.58.0 418 | windows-implement@0.58.0 419 | windows-interface@0.58.0 420 | windows-result@0.1.2 421 | windows-result@0.2.0 422 | windows-strings@0.1.0 423 | windows-sys@0.45.0 424 | windows-sys@0.52.0 425 | windows-sys@0.59.0 426 | windows-targets@0.42.2 427 | windows-targets@0.52.6 428 | windows@0.52.0 429 | windows@0.54.0 430 | windows@0.58.0 431 | windows_aarch64_gnullvm@0.42.2 432 | windows_aarch64_gnullvm@0.52.6 433 | windows_aarch64_msvc@0.42.2 434 | windows_aarch64_msvc@0.52.6 435 | windows_i686_gnu@0.42.2 436 | windows_i686_gnu@0.52.6 437 | windows_i686_gnullvm@0.52.6 438 | windows_i686_msvc@0.42.2 439 | windows_i686_msvc@0.52.6 440 | windows_x86_64_gnu@0.42.2 441 | windows_x86_64_gnu@0.52.6 442 | windows_x86_64_gnullvm@0.42.2 443 | windows_x86_64_gnullvm@0.52.6 444 | windows_x86_64_msvc@0.42.2 445 | windows_x86_64_msvc@0.52.6 446 | winit@0.30.5 447 | winnow@0.6.20 448 | xcursor@0.3.8 449 | xkbcommon-dl@0.4.2 450 | xkeysym@0.2.1 451 | xml-rs@0.8.22 452 | yazi@0.1.6 453 | zeno@0.2.3 454 | zerocopy-derive@0.7.35 455 | zerocopy@0.7.35 456 | zune-core@0.4.12 457 | zune-jpeg@0.4.13 458 | " 459 | 460 | inherit cargo 461 | 462 | DESCRIPTION="" 463 | HOMEPAGE="" 464 | SRC_URI=" 465 | ${CARGO_CRATE_URIS} 466 | " 467 | 468 | LICENSE="" 469 | # Dependent crate licenses 470 | LICENSE+=" 471 | Apache-2.0 BSD-2 BSD CC0-1.0 ISC MIT MIT-0 Unicode-DFS-2016 ZLIB 472 | " 473 | SLOT="0" 474 | KEYWORDS="~amd64" 475 | -------------------------------------------------------------------------------- /integration_test/test_integration.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2024 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import logging 6 | import tarfile 7 | import typing 8 | from pathlib import Path, PurePosixPath 9 | from urllib.parse import urlparse 10 | 11 | import pytest 12 | 13 | from pycargoebuild.__main__ import main 14 | from pycargoebuild.fetch import fetch_files_using_wget, verify_files 15 | 16 | 17 | class Package(typing.NamedTuple): 18 | url: str 19 | checksum: str 20 | directories: typing.List[str] 21 | expected_filename: typing.Optional[str] = None 22 | crate_license: bool = True 23 | has_crates_without_license: bool = False 24 | uses_license_file: bool = False 25 | uses_licenseref: bool = False 26 | uses_plus_fallback: bool = False 27 | use_features: bool = False 28 | 29 | 30 | PACKAGES = { 31 | "alass-2.0.0.ebuild": Package( 32 | url="https://github.com/kaegi/alass/archive/refs/tags/v2.0.0.tar.gz", 33 | checksum="ce88f92c7a427b623edcabb1b64e80be" 34 | "70cca2777f3da4b96702820a6cdf1e26", 35 | directories=["alass-2.0.0/alass-cli", 36 | "alass-2.0.0/alass-core"], 37 | expected_filename="alass-cli-2.0.0.ebuild"), 38 | "attest-0.1.0.ebuild": Package( 39 | url="https://github.com/signalapp/libsignal/archive/v0.38.0.tar.gz", 40 | checksum="2e31240d41fc31105b3ee9d8c2e0492e" 41 | "d0b93bbe62c1003c13fc9de463da60f6", 42 | directories=["libsignal-0.38.0/rust/attest"], 43 | uses_license_file=True), 44 | "bindgen-0.63.0.ebuild": Package( 45 | url="https://github.com/rust-lang/rust-bindgen/archive/" 46 | "refs/tags/v0.63.0.tar.gz", 47 | checksum="9fdfea04da35b9f602967426e4a5893e" 48 | "4efb453bceb0d7954efb1b3c88caaf33", 49 | directories=["rust-bindgen-0.63.0/bindgen"], 50 | uses_license_file=True), 51 | "blake3-0.3.3.ebuild": Package( 52 | url="https://files.pythonhosted.org/packages/7e/88/" 53 | "271fc900d7e8f091601c01412f3eafb62c62a9ce98091a24a822b4c392c1/" 54 | "blake3-0.3.3.tar.gz", 55 | checksum="0a78908b6299fd21dd46eb00fa4592b2" 56 | "59ee419d586d545a3b86e1f2e4d0ee6d", 57 | directories=["blake3-0.3.3"], 58 | use_features=True), 59 | "cryptography-38.0.3.ebuild": Package( 60 | url="https://files.pythonhosted.org/packages/13/dd/" 61 | "a9608b7aebe5d2dc0c98a4b2090a6b815628efa46cc1c046b89d8cd25f4c/" 62 | "cryptography-38.0.3.tar.gz", 63 | checksum="bfbe6ee19615b07a98b1d2287d6a6073" 64 | "f734735b49ee45b11324d85efc4d5cbd", 65 | directories=["cryptography-38.0.3/src/rust"], 66 | expected_filename="cryptography-rust-0.1.0.ebuild", 67 | use_features=True), 68 | "fractal-5.0.0.ebuild": Package( 69 | url="https://gitlab.gnome.org/GNOME/fractal/-/archive/5/" 70 | "fractal-5.tar.gz", 71 | checksum="649fbf06810fb3636098cf576773daa3" 72 | "065879794bb1e1984c6cd1bd2509d045", 73 | directories=["fractal-5"], 74 | uses_license_file=True, 75 | uses_plus_fallback=True), 76 | "lemmy_server-0.18.0.ebuild": Package( 77 | url="https://github.com/LemmyNet/lemmy/archive/0.18.0.tar.gz", 78 | checksum="dff7ce501cade3aed2427268d48a27ea" 79 | "646159b3e6293db6ff0b78ef46ecba0d", 80 | directories=["lemmy-0.18.0"], 81 | uses_license_file=True, 82 | use_features=True), 83 | "mdbook-linkcheck-0.7.7.ebuild": Package( 84 | url="https://github.com/Michael-F-Bryan/mdbook-linkcheck/archive/" 85 | "v0.7.7.tar.gz", 86 | checksum="3194243acf12383bd328a9440ab1ae30" 87 | "4e9ba244d3bd7f85f1c23b0745c4847a", 88 | directories=["mdbook-linkcheck-0.7.7"]), 89 | "milkshake-terminal-0.0.0.ebuild": Package( 90 | url="https://github.com/mizz1e/milkshake-terminal/archive/" 91 | "v0.0.1.tar.gz", 92 | checksum="1230635f2e1f707276f33a9e30e91334" 93 | "fcff3df7c0e4d4486596e9c9102776d6", 94 | directories=["milkshake-terminal-0.0.1"]), 95 | "qiskit-terra-0.22.3.ebuild": Package( 96 | url="https://files.pythonhosted.org/packages/98/11/" 97 | "afb20dd5af0fcf9d5ca57e4cfb2b0b3b1e73fa9dcd39ece82389b77f428a/" 98 | "qiskit-terra-0.22.3.tar.gz", 99 | checksum="4dfd246177883c6d1908ff532e384e9a" 100 | "e063ceb61236833ad656e2da9953a387", 101 | directories=["qiskit-terra-0.22.3"]), 102 | "ruffle_core-0.1.0.ebuild": Package( 103 | url="https://github.com/ruffle-rs/ruffle/archive/" 104 | "nightly-2023-06-24.tar.gz", 105 | checksum="8a47502bcbccae064d45dedde739b2ab" 106 | "3f6ccf97fb9feb5e3898d6e11302db87", 107 | directories=[ 108 | f"ruffle-nightly-2023-06-24/{x}" 109 | for x 110 | in ["core", "core/build_playerglobal", "core/macros", 111 | "desktop", "exporter", "render", "render/canvas", 112 | "render/naga-agal", "render/naga-pixelbender", 113 | "render/webgl", "render/wgpu", "scanner", "swf", 114 | "tests", "tests/input-format", "video", 115 | "video/software", "web", "web/common", 116 | "web/packages/extension/safari", "wstr"] 117 | ], 118 | has_crates_without_license=True), 119 | "rustworkx-0.12.1.ebuild": Package( 120 | url="https://files.pythonhosted.org/packages/17/e6/" 121 | "924967efd523c0bfed2868b62c334a3339f21fba0ac4b447089731312159/" 122 | "rustworkx-0.12.1.tar.gz", 123 | checksum="13a19a2f64dff086b3bffffb294c4630" 124 | "100ecbc13634b4995d9d36a481ae130e", 125 | directories=["rustworkx-0.12.1"]), 126 | "rustic-rs-0.5.0.ebuild": Package( 127 | url="https://github.com/rustic-rs/rustic/archive/v0.5.0.tar.gz", 128 | checksum="cd3cdc17c3165b1533498f713e1c834d" 129 | "0d65a80670f65597cc19c508ce15e957", 130 | directories=["rustic-0.5.0"], 131 | uses_license_file=True, 132 | uses_plus_fallback=True), 133 | "rustls-0.20.7.ebuild": Package( 134 | url="https://crates.io/api/v1/crates/rustls/0.20.7/download", 135 | checksum="539a2bfe908f471bfa933876bd1eb6a1" 136 | "9cf2176d375f82ef7f99530a40e48c2c", 137 | directories=["rustls-0.20.7"], 138 | uses_license_file=True), 139 | "setuptools-rust-1.5.2.ebuild": Package( 140 | url="https://files.pythonhosted.org/packages/99/db/" 141 | "e4ecb483ffa194d632ed44bda32cb740e564789fed7e56c2be8e2a0e2aa6/" 142 | "setuptools-rust-1.5.2.tar.gz", 143 | checksum="d8daccb14dc0eae1b6b6eb3ecef79675" 144 | "bd37b4065369f79c35393dd5c55652c7", 145 | directories=[f"setuptools-rust-1.5.2/examples/{x}" 146 | for x in ["hello-world", 147 | "hello-world-script", 148 | "html-py-ever", 149 | "namespace_package", 150 | "rust_with_cffi", 151 | ]], 152 | expected_filename="hello-world-0.1.0.ebuild", 153 | crate_license=False), 154 | "watchfiles-0.18.1.ebuild": Package( 155 | url="https://files.pythonhosted.org/packages/5e/6a/" 156 | "2760278f309655cc7305392b0bb664738104202bf5d50396eb138258c5ca/" 157 | "watchfiles-0.18.1.tar.gz", 158 | checksum="4ec0134a5e31797eb3c6c624dbe9354f" 159 | "2a8ee9c720e0b46fc5b7bab472b7c6d4", 160 | directories=["watchfiles-0.18.1"], 161 | expected_filename="watchfiles_rust_notify-0.18.1.ebuild"), 162 | "synapse-0.1.0.ebuild": Package( 163 | url="https://files.pythonhosted.org/packages/2b/a0/" 164 | "fda30d4ec70be0ce89db13c121a1ea72127f91b0b2d6ef6a2f27a1bb61f3/" 165 | "matrix_synapse-1.72.0.tar.gz", 166 | checksum="52fd58ffd0865793eb96f4c959c971eb" 167 | "e724881863ab0dafca445baf89d21714", 168 | directories=["matrix_synapse-1.72.0/rust"]), 169 | "news_flash_gtk-0.0.0.ebuild": Package( 170 | url="https://gitlab.com/news-flash/news_flash_gtk/-/archive/" 171 | "v.3.3.4/news_flash_gtk-v.3.3.4.tar.gz", 172 | checksum="f408f4c2d1e1507008ef583868b84827" 173 | "08d13269b86b8e22d2ba73da9c93a0ae", 174 | directories=["news_flash_gtk-v.3.3.4"], 175 | has_crates_without_license=True, 176 | uses_license_file=True, 177 | use_features=True), 178 | } 179 | 180 | 181 | def normalize_ebuild(path: Path) -> str: 182 | """Strip the dynamic ebuild header for comparison""" 183 | return "".join(path.read_text(encoding="utf-8").partition("EAPI=")[1:]) 184 | 185 | 186 | @pytest.mark.parametrize("ebuild", PACKAGES) 187 | def test_integration(tmp_path, capfd, caplog, ebuild): 188 | caplog.set_level(logging.WARNING) 189 | 190 | pkg_info = PACKAGES[ebuild] 191 | 192 | test_dir = Path(__file__).parent 193 | dist_dir = test_dir / "dist" 194 | dist_dir.mkdir(exist_ok=True) 195 | archive_name = PurePosixPath(urlparse(pkg_info.url).path).name 196 | dist_file = dist_dir / archive_name 197 | 198 | fetch_files_using_wget([(pkg_info.url, dist_file)]) 199 | verify_files([(dist_file, pkg_info.checksum)]) 200 | with tarfile.open(dist_file, "r") as tarf: 201 | for directory in pkg_info.directories: 202 | member_toml = tarf.getmember(f"{directory}/Cargo.toml") 203 | assert member_toml is not None 204 | tarf.extract(member_toml, tmp_path, set_attrs=False) 205 | for current in (PurePosixPath(directory) / "Cargo.lock").parents: 206 | try: 207 | member_lock = tarf.getmember(f"{current}/Cargo.lock") 208 | except KeyError: 209 | continue 210 | else: 211 | member_workspace = tarf.getmember(f"{current}/Cargo.toml") 212 | break 213 | assert member_lock is not None 214 | assert member_workspace is not None 215 | tarf.extract(member_lock, tmp_path, set_attrs=False) 216 | tarf.extract(member_workspace, tmp_path, set_attrs=False) 217 | 218 | args = ["-d", str(dist_dir), 219 | "-l", str(test_dir / "license-mapping.conf"), 220 | "-o", str(tmp_path / "{name}-{version}.ebuild"), 221 | "--no-config"] 222 | if not pkg_info.crate_license: 223 | args.append("-L") 224 | if pkg_info.use_features: 225 | args.append("-e") 226 | args += [str(tmp_path / directory) for directory in pkg_info.directories] 227 | 228 | assert main("test", *args) == 0 229 | stdout, _ = capfd.readouterr() 230 | expected = tmp_path / (pkg_info.expected_filename or ebuild) 231 | assert stdout == str(expected) + "\n" 232 | assert normalize_ebuild(expected) == normalize_ebuild(test_dir / ebuild) 233 | 234 | records = set(caplog.records) 235 | if pkg_info.has_crates_without_license: 236 | # we should get a warning about license-file use 237 | no_license_warnings = [ 238 | rec for rec in records 239 | if "does not specify a license" in rec.message] 240 | assert len(no_license_warnings) > 0 241 | records.difference_update(no_license_warnings) 242 | if pkg_info.uses_license_file: 243 | # we should get a warning about license-file use 244 | license_file_warnings = [ 245 | rec for rec in records if "uses license-file" in rec.message] 246 | assert len(license_file_warnings) > 0 247 | records.difference_update(license_file_warnings) 248 | if pkg_info.uses_licenseref: 249 | # we should get a warning about LicenseRef-* use 250 | licenseref_warnings = [ 251 | rec for rec in records if "User defined license" in rec.message] 252 | assert len(licenseref_warnings) > 0 253 | records.difference_update(licenseref_warnings) 254 | if pkg_info.uses_plus_fallback: 255 | # we should get a warning about foo+ fallback to foo 256 | license_file_warnings = [ 257 | rec for rec in records if "No explicit entry for license" 258 | in rec.message] 259 | assert len(license_file_warnings) > 0 260 | records.difference_update(license_file_warnings) 261 | if len(pkg_info.directories) > 1: 262 | # we should get a warning about multiple directories 263 | multiple_dir_warnings = [ 264 | rec for rec in records if "Multiple directories" in rec.message] 265 | assert len(multiple_dir_warnings) > 0 266 | records.difference_update(multiple_dir_warnings) 267 | assert len(records) == 0 268 | -------------------------------------------------------------------------------- /pycargoebuild/cargo.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2024 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import dataclasses 6 | import enum 7 | import functools 8 | import sys 9 | import tarfile 10 | import typing 11 | import urllib.parse 12 | from pathlib import Path, PurePath 13 | 14 | if sys.version_info >= (3, 11): 15 | import tomllib 16 | else: 17 | import tomli as tomllib 18 | 19 | 20 | CRATE_REGISTRY = "registry+https://github.com/rust-lang/crates.io-index" 21 | 22 | 23 | @dataclasses.dataclass(frozen=True) 24 | class Crate: 25 | name: str 26 | version: str 27 | 28 | @property 29 | def filename(self) -> str: 30 | return f"{self.name}-{self.version}.crate" 31 | 32 | def get_workspace_toml(self, distdir: Path) -> dict: 33 | return {} 34 | 35 | def get_package_directory(self, distdir: Path) -> PurePath: 36 | return PurePath(f"{self.name}-{self.version}") 37 | 38 | def get_root_directory(self, distdir: Path) -> typing.Optional[PurePath]: 39 | return self.get_package_directory(distdir) 40 | 41 | @property 42 | def download_url(self) -> str: 43 | raise NotImplementedError() 44 | 45 | 46 | @dataclasses.dataclass(frozen=True) 47 | class FileCrate(Crate): 48 | checksum: str 49 | 50 | @property 51 | def download_url(self) -> str: 52 | return (f"https://crates.io/api/v1/crates/{self.name}/{self.version}/" 53 | "download") 54 | 55 | @property 56 | def crate_entry(self) -> str: 57 | return f"{self.name}@{self.version}" 58 | 59 | 60 | class GitHost(enum.Enum): 61 | GITHUB = enum.auto() 62 | GITLAB = enum.auto() 63 | GITLAB_SELFHOSTED = enum.auto() 64 | 65 | 66 | @dataclasses.dataclass(frozen=True) 67 | class GitCrate(Crate): 68 | repository: str 69 | commit: str 70 | 71 | def __post_init__(self) -> None: 72 | self.repo_host # check for supported git hosts 73 | 74 | @functools.cached_property 75 | def repo_host(self) -> GitHost: 76 | if self.repository.startswith("https://github.com/"): 77 | return GitHost.GITHUB 78 | if self.repository.startswith("https://gitlab.com/"): 79 | return GitHost.GITLAB 80 | if self.repository.startswith("https://gitlab."): 81 | return GitHost.GITLAB_SELFHOSTED 82 | raise RuntimeError("Unsupported git crate source: " 83 | f"{self.repository}") 84 | 85 | @property 86 | def repo_name(self) -> str: 87 | return self.repository.rpartition("/")[2] 88 | 89 | @property 90 | def repo_ext(self) -> str: 91 | """Used by cargo.eclass to abbreviate crate URI""" 92 | match self.repo_host: 93 | case GitHost.GITHUB: 94 | return ".gh" 95 | case GitHost.GITLAB: 96 | return ".gl" 97 | case GitHost.GITLAB_SELFHOSTED: 98 | return "" 99 | case _ as host: 100 | typing.assert_never(host) 101 | 102 | @property 103 | def download_url(self) -> str: 104 | match self.repo_host: 105 | case GitHost.GITHUB: 106 | return f"{self.repository}/archive/{self.commit}.tar.gz" 107 | case GitHost.GITLAB | GitHost.GITLAB_SELFHOSTED: 108 | return (f"{self.repository}/-/archive/{self.commit}/" 109 | f"{self.repo_name}-{self.commit}.tar.gz") 110 | case _ as host: 111 | typing.assert_never(host) 112 | 113 | @property 114 | def filename(self) -> str: 115 | return f"{self.repo_name}-{self.commit}{self.repo_ext}.tar.gz" 116 | 117 | @functools.cache 118 | def get_workspace_toml(self, distdir: Path) -> dict: 119 | filename = self.filename 120 | root_dir = self.get_root_directory(distdir) 121 | if root_dir is None: 122 | return {} 123 | with tarfile.open(distdir / filename, "r:gz") as crate_tar: 124 | tarf = crate_tar.extractfile(str(root_dir / "Cargo.toml")) 125 | if tarf is None: 126 | raise RuntimeError( 127 | f"{root_dir}/Cargo.toml not found in {filename}") 128 | with tarf: 129 | # tarfile.ExFileObject() is IO[bytes] while tomli/tomllib 130 | # expects BinaryIO -- but it actually is compatible 131 | # https://github.com/hukkin/tomli/issues/214 132 | return (tomllib.load(tarf).get("workspace", {}) # type: ignore 133 | .get("package", {})) 134 | 135 | @functools.cache 136 | def get_package_directory(self, distdir: Path) -> PurePath: 137 | workspace_toml = self.get_workspace_toml(distdir) 138 | # TODO: perhaps it'd be more correct to follow workspaces 139 | with tarfile.open(distdir / self.filename, "r:gz") as crate_tar: 140 | while (tar_info := crate_tar.next()) is not None: 141 | path = PurePath(tar_info.name) 142 | if path.name == "Cargo.toml": 143 | f = crate_tar.extractfile(tar_info) 144 | if f is None: 145 | continue 146 | 147 | # tarfile.ExFileObject() is IO[bytes] while tomli/tomllib 148 | # expects BinaryIO -- but it actually is compatible 149 | # https://github.com/hukkin/tomli/issues/214 150 | try: 151 | metadata = get_package_metadata( 152 | f, workspace_toml) # type: ignore 153 | except WorkspaceCargoTomlError: 154 | continue 155 | if (metadata.name == self.name and 156 | metadata.version == self.version): 157 | return path.parent 158 | 159 | raise RuntimeError(f"Package {self.name} not found in crate " 160 | f"{distdir / self.filename}") 161 | 162 | def get_git_crate_entry(self, distdir: Path) -> str: 163 | subdir = (str(self.get_package_directory(distdir)) 164 | .replace(self.commit, "%commit%")) 165 | match self.repo_host: 166 | case GitHost.GITHUB | GitHost.GITLAB: 167 | return f"{self.repository};{self.commit};{subdir}" 168 | case GitHost.GITLAB_SELFHOSTED: 169 | crate_uri = self.download_url.replace(self.commit, "%commit%") 170 | return f"{crate_uri};{self.commit};{subdir}" 171 | case _ as host: 172 | typing.assert_never(host) 173 | 174 | @functools.cache 175 | def get_root_directory(self, distdir: Path) -> typing.Optional[PurePath]: 176 | """Get the directory containing Cargo.lock""" 177 | with tarfile.open(distdir / self.filename, "r:gz") as crate_tar: 178 | while (tar_info := crate_tar.next()) is not None: 179 | path = PurePath(tar_info.name) 180 | if path.name == "Cargo.lock": 181 | return path.parent 182 | if path.name == "Cargo.toml": 183 | tarf = crate_tar.extractfile(tar_info) 184 | assert tarf is not None 185 | with tarf: 186 | if "workspace" in tomllib.load(tarf): # type: ignore 187 | return path.parent 188 | return None 189 | 190 | 191 | class PackageMetadata(typing.NamedTuple): 192 | name: str 193 | version: str 194 | features: dict[str, bool] = {} 195 | license: typing.Optional[str] = None 196 | license_file: typing.Optional[str] = None 197 | description: typing.Optional[str] = None 198 | homepage: typing.Optional[str] = None 199 | 200 | def with_replaced_license(self, new_license: typing.Optional[str] 201 | ) -> "PackageMetadata": 202 | return PackageMetadata(name=self.name, 203 | version=self.version, 204 | features=self.features, 205 | license=new_license, 206 | license_file=None, 207 | description=self.description, 208 | homepage=self.homepage) 209 | 210 | 211 | class WorkspaceCargoTomlError(RuntimeError): 212 | """Cargo.toml belongs to a workspace root""" 213 | 214 | def __init__(self, members: list[str]) -> None: 215 | super().__init__() 216 | self.members = members 217 | 218 | 219 | def cargo_to_spdx(license_str: str) -> str: 220 | """ 221 | Convert deprecated Cargo license string to SPDX-2.0, if necessary. 222 | """ 223 | return license_str.replace("/", " OR ") 224 | 225 | 226 | def get_crates(f: typing.BinaryIO) -> typing.Generator[Crate, None, None]: 227 | """Read crate list from the open ``Cargo.lock`` file""" 228 | cargo_lock = tomllib.load(f) 229 | lock_version = cargo_lock.get("version", None) 230 | if lock_version not in (None, 3, 4): 231 | raise NotImplementedError( 232 | f"Cargo.lock version '{cargo_lock['version']} unsupported") 233 | 234 | for p in cargo_lock["package"]: 235 | # Skip all crates without "source", they should be local. 236 | if "source" not in p: 237 | continue 238 | 239 | try: 240 | if p["source"] == CRATE_REGISTRY: 241 | if lock_version is None: 242 | checksum = cargo_lock["metadata"][ 243 | f"checksum {p['name']} {p['version']} " 244 | f"({p['source']})"] 245 | else: 246 | checksum = p["checksum"] 247 | yield FileCrate(name=p["name"], 248 | version=p["version"], 249 | checksum=checksum) 250 | elif p["source"].startswith("git+"): 251 | parsed_url = urllib.parse.urlsplit(p["source"]) 252 | if not parsed_url.fragment: 253 | raise RuntimeError( 254 | "Git crate with no fragment identifier (i.e. commit " 255 | f"identifier): {p['source']!r}") 256 | repo = parsed_url.path.strip("/").removesuffix(".git") 257 | if repo.count("/") != 1: 258 | raise RuntimeError("Invalid GitHub/GitLab URL: " 259 | f"{p['source']}") 260 | yield GitCrate( 261 | name=p["name"], 262 | version=p["version"], 263 | repository=f"https://{parsed_url.netloc}/{repo}", 264 | commit=parsed_url.fragment) 265 | else: 266 | raise RuntimeError(f"Unsupported crate source: {p['source']}") 267 | except KeyError as e: 268 | raise RuntimeError("Incorrect/insufficient metadata for crate: " 269 | f"{p!r}") from e 270 | 271 | 272 | def get_meta_key(key: str, pkg_meta: dict, 273 | workspace_pkg_meta: dict) -> typing.Optional[str]: 274 | """Get a key from package metadata respecting ``workspace: true``""" 275 | value = pkg_meta.get(key) 276 | 277 | if isinstance(value, str) or value is None: 278 | return value 279 | if isinstance(value, dict) and value.get("workspace") is True: 280 | return get_meta_key(key, workspace_pkg_meta, {}) 281 | raise ValueError(f"Invalid metadata key value: {key!r}={value!r}") 282 | 283 | 284 | def get_package_metadata(f: typing.BinaryIO, 285 | workspace_pkg_meta: dict = {}, 286 | ) -> PackageMetadata: 287 | """Read package from the open ``Cargo.toml`` file""" 288 | cargo_toml = tomllib.load(f) 289 | 290 | if "package" not in cargo_toml and "workspace" in cargo_toml: 291 | raise WorkspaceCargoTomlError( 292 | cargo_toml["workspace"]["members"]) 293 | 294 | pkg_meta = cargo_toml["package"] 295 | _get_meta_key = functools.partial(get_meta_key, 296 | pkg_meta=pkg_meta, 297 | workspace_pkg_meta=workspace_pkg_meta) 298 | 299 | pkg_license = _get_meta_key("license") 300 | if pkg_license is not None: 301 | pkg_license = cargo_to_spdx(pkg_license) 302 | 303 | pkg_version = _get_meta_key("version") 304 | if pkg_version is None: 305 | raise ValueError(f"No version found in {f.name}") 306 | 307 | features = cargo_toml.get("features", {}) 308 | default_features = features.pop("default", []) 309 | 310 | return PackageMetadata( 311 | name=pkg_meta["name"], 312 | version=pkg_version, 313 | license=pkg_license, 314 | features={name: name in default_features for name in features}, 315 | license_file=_get_meta_key("license-file"), 316 | description=_get_meta_key("description"), 317 | homepage=_get_meta_key("homepage")) 318 | -------------------------------------------------------------------------------- /pycargoebuild/ebuild.py: -------------------------------------------------------------------------------- 1 | # pycargoebuild 2 | # (c) 2022-2025 Michał Górny 3 | # SPDX-License-Identifier: GPL-2.0-or-later 4 | 5 | import datetime 6 | import logging 7 | import re 8 | import shlex 9 | import tarfile 10 | import typing 11 | import urllib.parse 12 | from functools import partial 13 | from pathlib import Path 14 | 15 | import jinja2 16 | import license_expression 17 | 18 | from pycargoebuild import __version__ 19 | from pycargoebuild.cargo import ( 20 | Crate, 21 | FileCrate, 22 | GitCrate, 23 | PackageMetadata, 24 | get_package_metadata, 25 | ) 26 | from pycargoebuild.format import format_license_var 27 | from pycargoebuild.license import UnmatchedLicense, spdx_to_ebuild 28 | 29 | EBUILD_TEMPLATE = """\ 30 | # Copyright {{year}} Gentoo Authors 31 | # Distributed under the terms of the GNU General Public License v2 32 | 33 | # Autogenerated by pycargoebuild {{prog_version}} 34 | 35 | EAPI=8 36 | 37 | CRATES="{{crates}}"{{opt_git_crates}} 38 | 39 | inherit cargo 40 | 41 | DESCRIPTION="{{description}}" 42 | HOMEPAGE="{{homepage}}" 43 | SRC_URI=" 44 | \t${CARGO_CRATE_URIS} 45 | " 46 | {% if opt_crate_tarball %} 47 | if [[ ${PKGBUMPING} != ${PVR} ]]; then 48 | \tSRC_URI+=" 49 | \t\t{{opt_crate_tarball}} 50 | \t" 51 | fi\ 52 | 53 | {% endif %} 54 | 55 | LICENSE="{{pkg_license}}" 56 | {% if crate_licenses is not none %} 57 | # Dependent crate licenses 58 | LICENSE+="{{crate_licenses}}" 59 | {% endif %} 60 | SLOT="0" 61 | KEYWORDS="~amd64" 62 | {% if pkg_features is not none %} 63 | IUSE="{{pkg_features}}" 64 | 65 | src_configure() { 66 | \tlocal myfeatures=( 67 | {{pkg_features_use}} 68 | \t) 69 | \tcargo_src_configure 70 | } 71 | {% endif %} 72 | """ 73 | 74 | 75 | def get_CRATES(crates: typing.Iterable[Crate], 76 | ) -> str: 77 | """ 78 | Return the value of CRATES for the given crate list 79 | """ 80 | if not crates: 81 | # cargo.eclass rejects empty crates, we need some whitespace 82 | return "\n" 83 | return ("\n" + 84 | "\n".join(sorted(f"\t{c.crate_entry}" 85 | for c in crates 86 | if isinstance(c, FileCrate))) + 87 | "\n") 88 | 89 | 90 | def get_IUSE(features: dict[str, bool]) -> str: 91 | """ 92 | Return the IUSE string for the given features dictionary. 93 | """ 94 | return " ".join( 95 | f"+{name}" if is_def else name 96 | for name, is_def in sorted(features.items())) 97 | 98 | 99 | def get_myfeatures(features: dict[str, bool]) -> str: 100 | """ 101 | Return the value of myfeatures for the given crate list 102 | """ 103 | return "\n".join(f"\t\t$(usev {feature})" 104 | for feature in sorted(features)) 105 | 106 | 107 | def get_GIT_CRATES(crates: typing.Iterable[Crate], 108 | distdir: Path, 109 | ) -> str: 110 | """ 111 | Return the complete GIT_CRATES assignment for the given crate list 112 | """ 113 | 114 | values = "\n".join( 115 | sorted(f"\t[{c.name}]={shlex.quote(c.get_git_crate_entry(distdir))}" 116 | for c in crates if isinstance(c, GitCrate))) 117 | if values: 118 | return f"\n\ndeclare -A GIT_CRATES=(\n{values}\n)" 119 | return "" 120 | 121 | 122 | def get_package_LICENSE(license_str: typing.Optional[str]) -> str: 123 | """ 124 | Get the value of package's LICENSE string 125 | """ 126 | 127 | spdx = license_expression.get_spdx_licensing() 128 | if license_str is not None: 129 | parsed_pkg_license = spdx.parse(license_str, strict=True).simplify() 130 | return format_license_var(spdx_to_ebuild(parsed_pkg_license), 131 | prefix='LICENSE="') 132 | return "" 133 | 134 | 135 | def get_license_from_crate(crate: Crate, 136 | distdir: Path, 137 | ) -> typing.Optional[str]: 138 | """ 139 | Read the metadata from specified crate and return its license string 140 | """ 141 | 142 | filename = crate.filename 143 | base_dir = crate.get_package_directory(distdir) 144 | workspace_toml = crate.get_workspace_toml(distdir) 145 | with tarfile.open(distdir / filename, "r:gz") as crate_tar: 146 | tarf = crate_tar.extractfile(str(base_dir / "Cargo.toml")) 147 | if tarf is None: 148 | raise RuntimeError( 149 | f"{base_dir}/Cargo.toml not found in {filename}") 150 | with tarf: 151 | # tarfile.ExFileObject() is IO[bytes] while tomli/tomllib 152 | # expects BinaryIO -- but it actually is compatible 153 | # https://github.com/hukkin/tomli/issues/214 154 | crate_metadata = get_package_metadata( 155 | tarf, workspace_toml) # type: ignore 156 | if crate_metadata.license_file is not None: 157 | logging.warning( 158 | f"Crate {filename!r} (in {str(base_dir)!r}) uses " 159 | f"license-file={crate_metadata.license_file!r}, please " 160 | "inspect the license manually and add it *separately* " 161 | "from crate licenses") 162 | elif crate_metadata.license is None: 163 | logging.warning( 164 | f"Crate {filename!r} (in {str(base_dir)!r}, " 165 | f"name={crate_metadata.name!r}) does not specify " 166 | "a license!") 167 | return crate_metadata.license 168 | 169 | 170 | def get_crate_LICENSE(crates: typing.Iterable[Crate], 171 | distdir: Path, 172 | license_overrides: typing.Dict[str, str] = {}, 173 | ) -> str: 174 | """ 175 | Get the value of LICENSE string for crates 176 | """ 177 | 178 | spdx = license_expression.get_spdx_licensing() 179 | crate_licenses = { 180 | crate.filename: get_license_from_crate(crate, distdir) 181 | if crate.name not in license_overrides 182 | else license_overrides[crate.name] 183 | for crate in crates 184 | } 185 | crate_licenses_set = set(crate_licenses.values()) 186 | crate_licenses_set.discard(None) 187 | 188 | # combine crate licenses and simplify the result 189 | combined_license = " AND ".join(f"( {x} )" for x in crate_licenses_set) 190 | parsed_license = spdx.parse(combined_license, strict=True) 191 | if parsed_license is None: 192 | return "" 193 | final_license = parsed_license.simplify() 194 | try: 195 | crate_licenses_str = format_license_var(spdx_to_ebuild(final_license), 196 | prefix='LICENSE+=" ') 197 | except UnmatchedLicense as e: 198 | # find the crate using that license 199 | for crate_name, crate_license in crate_licenses.items(): 200 | parsed_license = spdx.parse(crate_license, strict=True) 201 | if parsed_license is not None: 202 | if e.license_key in (str(x) for x in parsed_license.symbols): 203 | raise UnmatchedLicense(e.license_key, crate_name) 204 | raise AssertionError("Unable to match unmatched license to a crate") 205 | # if it's not a multiline string, we need to prepend " " 206 | if not crate_licenses_str.startswith("\n"): 207 | crate_licenses_str = " " + crate_licenses_str 208 | return crate_licenses_str 209 | 210 | 211 | DQUOTE_SPECIAL_RE = re.compile(r'([$`"\\])') 212 | DQUOTE_SPECIAL_PLUS_WS_RE = re.compile(r'[$`"\\\s]') 213 | 214 | 215 | def collapse_whitespace(value: str) -> str: 216 | """Collapse sequences of whitespace into a single space""" 217 | return " ".join(value.split()) 218 | 219 | 220 | def bash_dquote_escape(value: str) -> str: 221 | """Escape all characters with special meaning in bash double-quotes""" 222 | return DQUOTE_SPECIAL_RE.sub(r"\\\1", value) 223 | 224 | 225 | def url_dquote_escape(value: str) -> str: 226 | """URL-encode whitespace and special chars to use in bash double-quotes""" 227 | return DQUOTE_SPECIAL_PLUS_WS_RE.sub( 228 | lambda x: urllib.parse.quote_plus(x.group(0)), value) 229 | 230 | 231 | def get_ebuild(pkg_meta: PackageMetadata, 232 | crates: typing.Iterable[Crate], 233 | distdir: Path, 234 | *, 235 | crate_license: bool = True, 236 | crate_tarball: typing.Optional[Path] = None, 237 | license_overrides: typing.Dict[str, str] = {}, 238 | use_features: bool = False, 239 | ) -> str: 240 | """ 241 | Get ebuild contents for passed contents of Cargo.toml and Cargo.lock. 242 | """ 243 | 244 | jinja_env = jinja2.Environment(keep_trailing_newline=True, 245 | trim_blocks=True) 246 | template = EBUILD_TEMPLATE 247 | compiled_template = jinja_env.from_string(template) 248 | 249 | return compiled_template.render( 250 | crates=get_CRATES(crates if crate_tarball is None else ()), 251 | crate_licenses=(get_crate_LICENSE(crates, distdir, license_overrides) 252 | if crate_license else None), 253 | description=bash_dquote_escape(collapse_whitespace( 254 | pkg_meta.description or "")), 255 | homepage=url_dquote_escape(pkg_meta.homepage or ""), 256 | opt_crate_tarball=(crate_tarball.name 257 | if crate_tarball is not None else None), 258 | opt_git_crates=get_GIT_CRATES(crates, distdir), 259 | pkg_features=(get_IUSE(pkg_meta.features) 260 | if use_features and pkg_meta.features else None), 261 | pkg_features_use=(get_myfeatures(pkg_meta.features) 262 | if use_features and pkg_meta.features else None), 263 | pkg_license=get_package_LICENSE(pkg_meta.license), 264 | prog_version=__version__, 265 | year=datetime.date.today().year) 266 | 267 | 268 | CRATES_RE = re.compile( 269 | r"^(?PCRATES=(?P['\"])).*?(?P=delim)$", 270 | re.DOTALL | re.MULTILINE) 271 | 272 | GIT_CRATES_RE = re.compile( 273 | r"(?P\n\n?)declare -A GIT_CRATES=[(].*?[)]$", 274 | re.DOTALL | re.MULTILINE) 275 | 276 | CRATE_LICENSE_RE = re.compile( 277 | r"^(?P# Dependent crate licenses\n" 278 | r"LICENSE[+]=(?P['\"])).*?(?P=delim)$", 279 | re.DOTALL | re.MULTILINE) 280 | 281 | GIT_CRATES_APPEND_RE = re.compile( 282 | r"^(?PCRATES=(?P['\"]).*?(?P=delim2))(?P)$", 283 | re.DOTALL | re.MULTILINE) 284 | 285 | 286 | class CountingSubst: 287 | def __init__(self, repl: typing.Callable[[], str] 288 | ) -> None: 289 | self.count = 0 290 | self.repl = repl 291 | 292 | def __call__(self, match: re.Match) -> str: 293 | self.count += 1 294 | return match.group("start") + self.repl() + match.group("delim") 295 | 296 | def assert_count(self, desc: str, expected: int) -> None: 297 | if self.count != expected: 298 | raise RuntimeError( 299 | f"{desc} matched {self.count} times, {expected} expected") 300 | 301 | 302 | class GitCratesSubst(CountingSubst): 303 | def __call__(self, match: re.Match) -> str: 304 | self.count += 1 305 | if repl := self.repl().lstrip(): 306 | return match.group("ws") + repl 307 | return "" 308 | 309 | 310 | def update_ebuild(ebuild: str, 311 | pkg_meta: PackageMetadata, 312 | crates: typing.Iterable[Crate], 313 | distdir: Path, 314 | *, 315 | crate_license: bool = True, 316 | crate_tarball: typing.Optional[Path] = None, 317 | license_overrides: typing.Dict[str, str] = {}, 318 | ) -> str: 319 | """ 320 | Update the CRATES, GIT_CRATES and LICENSE in an existing ebuild 321 | """ 322 | 323 | crates_repl = CountingSubst( 324 | partial(get_CRATES, crates if crate_tarball is None else ())) 325 | git_crates_repl = GitCratesSubst(partial(get_GIT_CRATES, crates, distdir)) 326 | crate_license_repl = ( 327 | CountingSubst(partial(get_crate_LICENSE, crates, distdir, 328 | license_overrides))) 329 | 330 | for regex, repl in ((CRATES_RE, crates_repl), 331 | (GIT_CRATES_RE, git_crates_repl), 332 | (CRATE_LICENSE_RE, crate_license_repl)): 333 | ebuild = regex.sub(repl, ebuild) 334 | 335 | crates_repl.assert_count("CRATES=", 1) 336 | crate_license_repl.assert_count( 337 | "Crate LICENSE+= (with marker comment)", 1 if crate_license else 0) 338 | 339 | if git_crates_repl.count == 0: 340 | if git_crates := git_crates_repl.repl(): 341 | git_crates_append = CountingSubst(lambda: git_crates) 342 | ebuild = GIT_CRATES_APPEND_RE.sub(git_crates_append, ebuild) 343 | git_crates_append.assert_count( 344 | "CRATES= (while appending GIT_CRATES=)", 1) 345 | else: 346 | git_crates_repl.assert_count("GIT_CRATES=", 1) 347 | 348 | return ebuild 349 | -------------------------------------------------------------------------------- /integration_test/news_flash_gtk-0.0.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2024 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.13.4 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | addr2line@0.22.0 10 | adler@1.0.2 11 | aes@0.7.5 12 | aho-corasick@1.1.3 13 | aligned-vec@0.5.0 14 | alloc-no-stdlib@2.0.4 15 | alloc-stdlib@0.2.2 16 | ammonia@3.3.0 17 | android-tzdata@0.1.1 18 | android_system_properties@0.1.5 19 | anyhow@1.0.86 20 | arbitrary@1.3.2 21 | arc-swap@1.7.1 22 | arg_enum_proc_macro@0.3.4 23 | arrayvec@0.7.4 24 | ashpd@0.9.1 25 | async-broadcast@0.7.1 26 | async-channel@2.3.1 27 | async-compression@0.4.12 28 | async-executor@1.13.0 29 | async-fs@2.1.2 30 | async-io@2.3.3 31 | async-lock@3.4.0 32 | async-net@2.0.0 33 | async-process@2.2.3 34 | async-recursion@1.1.1 35 | async-signal@0.2.9 36 | async-task@4.7.1 37 | async-trait@0.1.81 38 | atomic-waker@1.1.2 39 | autocfg@1.3.0 40 | av1-grain@0.2.3 41 | avif-serialize@0.8.1 42 | backtrace@0.3.73 43 | base64@0.21.7 44 | base64@0.22.1 45 | bigdecimal@0.4.5 46 | bit_field@0.10.2 47 | bitflags@1.3.2 48 | bitflags@2.6.0 49 | bitstream-io@2.5.0 50 | block-buffer@0.10.4 51 | block-buffer@0.9.0 52 | block-modes@0.8.1 53 | block-padding@0.2.1 54 | block@0.1.6 55 | blocking@1.6.1 56 | brotli-decompressor@4.0.1 57 | brotli@6.0.0 58 | built@0.7.4 59 | bumpalo@3.16.0 60 | bytemuck@1.16.1 61 | byteorder-lite@0.1.0 62 | byteorder@1.5.0 63 | bytes@1.6.1 64 | bytesize@1.3.0 65 | cairo-rs@0.20.0 66 | cairo-sys-rs@0.20.0 67 | cc@1.1.7 68 | cfg-expr@0.15.8 69 | cfg-if@1.0.0 70 | cfg_aliases@0.2.1 71 | chrono@0.4.38 72 | cipher@0.3.0 73 | color-backtrace@0.6.1 74 | color_quant@1.1.0 75 | commafeed_api@0.2.1 76 | concurrent-queue@2.5.0 77 | cookie@0.18.1 78 | cookie_store@0.21.0 79 | core-foundation-sys@0.8.6 80 | core-foundation@0.9.4 81 | cpufeatures@0.2.12 82 | crc-any@2.5.0 83 | crc32fast@1.4.2 84 | crossbeam-channel@0.5.13 85 | crossbeam-deque@0.8.5 86 | crossbeam-epoch@0.9.18 87 | crossbeam-utils@0.8.20 88 | crunchy@0.2.2 89 | crypto-common@0.1.6 90 | darling@0.20.10 91 | darling_core@0.20.10 92 | darling_macro@0.20.10 93 | data-encoding@2.6.0 94 | debug-helper@0.3.13 95 | deranged@0.3.11 96 | derivative@2.2.0 97 | des@0.7.0 98 | destructure_traitobject@0.2.0 99 | diesel@2.2.2 100 | diesel_derives@2.2.2 101 | diesel_migrations@2.2.0 102 | diesel_table_macro_syntax@0.2.0 103 | diffus-derive@0.10.0 104 | diffus@0.10.0 105 | digest@0.10.7 106 | digest@0.9.0 107 | dirs-sys@0.4.1 108 | dirs@5.0.1 109 | dsl_auto_type@0.1.2 110 | either@1.13.0 111 | encoding_rs@0.8.34 112 | endi@1.1.0 113 | entities@1.0.1 114 | enum-as-inner@0.6.0 115 | enumflags2@0.7.10 116 | enumflags2_derive@0.7.10 117 | equivalent@1.0.1 118 | errno@0.3.9 119 | escaper@0.1.1 120 | event-listener-strategy@0.5.2 121 | event-listener@5.3.1 122 | exr@1.72.0 123 | eyre@0.6.12 124 | fastrand@2.1.0 125 | fdeflate@0.3.4 126 | feed-rs@2.1.0 127 | feedbin_api@0.3.0 128 | feedly_api@0.6.0 129 | fever_api@0.5.0 130 | field-offset@0.3.6 131 | flate2@1.0.30 132 | flume@0.11.0 133 | fnv@1.0.7 134 | foreign-types-shared@0.1.1 135 | foreign-types@0.3.2 136 | form_urlencoded@1.2.1 137 | futf@0.1.5 138 | futures-channel@0.3.30 139 | futures-core@0.3.30 140 | futures-executor@0.3.30 141 | futures-io@0.3.30 142 | futures-lite@2.3.0 143 | futures-macro@0.3.30 144 | futures-sink@0.3.30 145 | futures-task@0.3.30 146 | futures-util@0.3.30 147 | futures@0.3.30 148 | gdk-pixbuf-sys@0.20.0 149 | gdk-pixbuf@0.20.0 150 | gdk4-sys@0.9.0 151 | gdk4@0.9.0 152 | generic-array@0.14.7 153 | getrandom@0.2.15 154 | gettext-rs@0.7.0 155 | gettext-sys@0.21.3 156 | gif@0.13.1 157 | gimli@0.29.0 158 | gio-sys@0.20.0 159 | gio@0.20.0 160 | glib-macros@0.20.0 161 | glib-sys@0.20.0 162 | glib@0.20.0 163 | gobject-sys@0.20.0 164 | graphene-rs@0.20.0 165 | graphene-sys@0.20.0 166 | greader_api@0.5.0 167 | gsk4-sys@0.9.0 168 | gsk4@0.9.0 169 | gstreamer-sys@0.23.0 170 | gstreamer@0.23.0 171 | gtk4-macros@0.9.0 172 | gtk4-sys@0.9.0 173 | gtk4@0.9.0 174 | h2@0.4.5 175 | half@2.4.1 176 | hard-xml-derive@1.36.0 177 | hard-xml@1.36.0 178 | hashbrown@0.14.5 179 | heck@0.4.1 180 | heck@0.5.0 181 | hermit-abi@0.3.9 182 | hermit-abi@0.4.0 183 | hex@0.4.3 184 | hickory-proto@0.24.1 185 | hickory-resolver@0.24.1 186 | hostname@0.3.1 187 | html2pango@0.6.0 188 | html5ever@0.26.0 189 | http-body-util@0.1.2 190 | http-body@1.0.1 191 | http@1.1.0 192 | httparse@1.9.4 193 | humantime@2.1.0 194 | hyper-rustls@0.27.2 195 | hyper-tls@0.6.0 196 | hyper-util@0.1.6 197 | hyper@1.4.1 198 | iana-time-zone-haiku@0.1.2 199 | iana-time-zone@0.1.60 200 | ident_case@1.0.1 201 | idna@0.3.0 202 | idna@0.4.0 203 | idna@0.5.0 204 | image-webp@0.1.3 205 | image@0.25.2 206 | imgref@1.10.1 207 | indenter@0.3.3 208 | indexmap@2.2.6 209 | interpolate_name@0.2.4 210 | ipconfig@0.3.2 211 | ipnet@2.9.0 212 | ipnetwork@0.20.0 213 | itertools@0.10.5 214 | itertools@0.12.1 215 | itertools@0.13.0 216 | itoa@1.0.11 217 | javascriptcore6-sys@0.4.0 218 | javascriptcore6@0.4.0 219 | jetscii@0.5.3 220 | jobserver@0.1.32 221 | jpeg-decoder@0.3.1 222 | js-sys@0.3.69 223 | lazy_static@1.5.0 224 | lebe@0.5.2 225 | libadwaita-sys@0.7.0 226 | libadwaita@0.7.0 227 | libc@0.2.155 228 | libfuzzer-sys@0.4.7 229 | libm@0.2.8 230 | libredox@0.1.3 231 | libsqlite3-sys@0.29.0 232 | libxml@0.3.3 233 | linked-hash-map@0.5.6 234 | linkify@0.9.0 235 | linux-raw-sys@0.4.14 236 | locale_config@0.3.0 237 | lock_api@0.4.12 238 | log-mdc@0.1.0 239 | log4rs@1.3.0 240 | log@0.4.22 241 | loop9@0.1.5 242 | lru-cache@0.1.2 243 | mac@0.1.1 244 | magic-crypt@3.1.13 245 | malloc_buf@0.0.6 246 | maplit@1.0.2 247 | markup5ever@0.11.0 248 | markup5ever_rcdom@0.2.0 249 | match_cfg@0.1.0 250 | maybe-rayon@0.1.1 251 | md-5@0.9.1 252 | md5@0.7.0 253 | mediatype@0.19.18 254 | memchr@2.7.4 255 | memoffset@0.9.1 256 | migrations_internals@2.2.0 257 | migrations_macros@2.2.0 258 | mime@0.3.17 259 | mime_guess@2.0.5 260 | miniflux_api@0.7.1 261 | minimal-lexical@0.2.1 262 | miniz_oxide@0.7.4 263 | mio@1.0.1 264 | moka@0.12.8 265 | muldiv@1.0.1 266 | nanohtml2text@0.1.4 267 | native-tls@0.2.12 268 | new_debug_unreachable@1.0.6 269 | nextcloud_news_api@0.4.0 270 | nix@0.29.0 271 | nom@7.1.3 272 | noop_proc_macro@0.3.0 273 | num-bigint@0.4.6 274 | num-conv@0.1.0 275 | num-derive@0.4.2 276 | num-integer@0.1.46 277 | num-rational@0.4.2 278 | num-traits@0.2.19 279 | num_cpus@1.16.0 280 | obfstr@0.4.3 281 | objc-foundation@0.1.1 282 | objc@0.2.7 283 | objc_id@0.1.1 284 | object@0.36.2 285 | once_cell@1.19.0 286 | opaque-debug@0.3.1 287 | openssl-macros@0.1.1 288 | openssl-probe@0.1.5 289 | openssl-sys@0.9.103 290 | openssl@0.10.66 291 | opml@1.1.6 292 | option-ext@0.2.0 293 | option-operations@0.5.0 294 | ordered-float@2.10.1 295 | ordered-stream@0.2.0 296 | pango-sys@0.20.0 297 | pango@0.20.0 298 | parking@2.2.0 299 | parking_lot@0.12.3 300 | parking_lot_core@0.9.10 301 | paste@1.0.15 302 | percent-encoding@2.3.1 303 | phf@0.10.1 304 | phf_codegen@0.10.0 305 | phf_generator@0.10.0 306 | phf_shared@0.10.0 307 | pin-project-internal@1.1.5 308 | pin-project-lite@0.2.14 309 | pin-project@1.1.5 310 | pin-utils@0.1.0 311 | piper@0.2.3 312 | pkg-config@0.3.30 313 | png@0.17.13 314 | polling@3.7.2 315 | powerfmt@0.2.0 316 | ppv-lite86@0.2.17 317 | precomputed-hash@0.1.1 318 | proc-macro-crate@3.1.0 319 | proc-macro2@1.0.86 320 | profiling-procmacros@1.0.15 321 | profiling@1.0.15 322 | psl-types@2.0.11 323 | publicsuffix@2.2.3 324 | qoi@0.4.1 325 | quanta@0.12.3 326 | quick-error@1.2.3 327 | quick-error@2.0.1 328 | quick-xml@0.36.1 329 | quote@1.0.36 330 | r2d2@0.8.10 331 | rand@0.8.5 332 | rand_chacha@0.3.1 333 | rand_core@0.6.4 334 | random_color@0.8.0 335 | rav1e@0.7.1 336 | ravif@0.11.9 337 | raw-cpuid@11.1.0 338 | rayon-core@1.12.1 339 | rayon@1.10.0 340 | rc-writer@1.1.10 341 | redox_syscall@0.5.3 342 | redox_users@0.4.5 343 | regex-automata@0.4.7 344 | regex-syntax@0.8.4 345 | regex@1.10.5 346 | reqwest@0.12.5 347 | resolv-conf@0.7.0 348 | rgb@0.8.45 349 | ring@0.17.8 350 | rust-embed-impl@8.5.0 351 | rust-embed-utils@8.5.0 352 | rust-embed@8.5.0 353 | rustc-demangle@0.1.24 354 | rustc_version@0.4.0 355 | rustix@0.38.34 356 | rustls-pemfile@2.1.2 357 | rustls-pki-types@1.7.0 358 | rustls-webpki@0.102.6 359 | rustls@0.23.12 360 | ryu@1.0.18 361 | same-file@1.0.6 362 | sanitize-filename@0.5.0 363 | schannel@0.1.23 364 | scheduled-thread-pool@0.2.7 365 | scopeguard@1.2.0 366 | security-framework-sys@2.11.1 367 | security-framework@2.11.1 368 | semver@1.0.23 369 | serde-value@0.7.0 370 | serde@1.0.204 371 | serde_derive@1.0.204 372 | serde_json@1.0.121 373 | serde_repr@0.1.19 374 | serde_spanned@0.6.7 375 | serde_urlencoded@0.7.1 376 | serde_yaml@0.9.34+deprecated 377 | sha1@0.10.6 378 | sha2@0.10.8 379 | sha2@0.9.9 380 | shellexpand@3.1.0 381 | signal-hook-registry@1.4.2 382 | simd-adler32@0.3.7 383 | simd_helpers@0.1.0 384 | siphasher@0.3.11 385 | siphasher@1.0.1 386 | slab@0.4.9 387 | smallvec@1.13.2 388 | socket2@0.5.7 389 | soup3-sys@0.7.0 390 | soup3@0.7.0 391 | spin@0.9.8 392 | static_assertions@1.1.0 393 | string_cache@0.8.7 394 | string_cache_codegen@0.5.2 395 | strsim@0.11.1 396 | subtle@2.6.1 397 | syn@1.0.109 398 | syn@2.0.72 399 | sync_wrapper@1.0.1 400 | system-configuration-sys@0.5.0 401 | system-configuration@0.5.1 402 | system-deps@6.2.2 403 | system-deps@7.0.1 404 | tagptr@0.2.0 405 | target-lexicon@0.12.15 406 | temp-dir@0.1.13 407 | tempfile@3.10.1 408 | tendril@0.4.3 409 | termcolor@1.4.1 410 | thiserror-impl@1.0.63 411 | thiserror@1.0.63 412 | thread-id@4.2.2 413 | tiff@0.9.1 414 | tiger@0.1.0 415 | time-core@0.1.2 416 | time-macros@0.2.18 417 | time@0.3.36 418 | tinyvec@1.8.0 419 | tinyvec_macros@0.1.1 420 | tokio-macros@2.4.0 421 | tokio-native-tls@0.3.1 422 | tokio-rustls@0.26.0 423 | tokio-socks@0.5.2 424 | tokio-util@0.7.11 425 | tokio@1.39.2 426 | toml@0.8.16 427 | toml_datetime@0.6.7 428 | toml_edit@0.21.1 429 | toml_edit@0.22.17 430 | tower-layer@0.3.2 431 | tower-service@0.3.2 432 | tower@0.4.13 433 | tracing-attributes@0.1.27 434 | tracing-core@0.1.32 435 | tracing@0.1.40 436 | triomphe@0.1.11 437 | try-lock@0.2.5 438 | typemap-ors@1.0.0 439 | typenum@1.17.0 440 | uds_windows@1.1.0 441 | unic-char-property@0.9.0 442 | unic-char-range@0.9.0 443 | unic-common@0.9.0 444 | unic-emoji-char@0.9.0 445 | unic-ucd-version@0.9.0 446 | unicase@2.7.0 447 | unicode-bidi@0.3.15 448 | unicode-ident@1.0.12 449 | unicode-normalization@0.1.23 450 | unsafe-any-ors@1.0.0 451 | unsafe-libyaml@0.2.11 452 | untrusted@0.9.0 453 | url@2.5.2 454 | utf-8@0.7.6 455 | uuid@1.10.0 456 | v_frame@0.3.8 457 | vcpkg@0.2.15 458 | version-compare@0.2.0 459 | version_check@0.9.5 460 | walkdir@2.5.0 461 | want@0.3.1 462 | wasi@0.11.0+wasi-snapshot-preview1 463 | wasm-bindgen-backend@0.2.92 464 | wasm-bindgen-futures@0.4.42 465 | wasm-bindgen-macro-support@0.2.92 466 | wasm-bindgen-macro@0.2.92 467 | wasm-bindgen-shared@0.2.92 468 | wasm-bindgen@0.2.92 469 | wasm-streams@0.4.0 470 | web-sys@0.3.69 471 | webkit6-sys@0.4.0 472 | webkit6@0.4.0 473 | weezl@0.1.8 474 | widestring@1.1.0 475 | winapi-i686-pc-windows-gnu@0.4.0 476 | winapi-util@0.1.8 477 | winapi-x86_64-pc-windows-gnu@0.4.0 478 | winapi@0.3.9 479 | windows-core@0.52.0 480 | windows-sys@0.48.0 481 | windows-sys@0.52.0 482 | windows-targets@0.48.5 483 | windows-targets@0.52.6 484 | windows_aarch64_gnullvm@0.48.5 485 | windows_aarch64_gnullvm@0.52.6 486 | windows_aarch64_msvc@0.48.5 487 | windows_aarch64_msvc@0.52.6 488 | windows_i686_gnu@0.48.5 489 | windows_i686_gnu@0.52.6 490 | windows_i686_gnullvm@0.52.6 491 | windows_i686_msvc@0.48.5 492 | windows_i686_msvc@0.52.6 493 | windows_x86_64_gnu@0.48.5 494 | windows_x86_64_gnu@0.52.6 495 | windows_x86_64_gnullvm@0.48.5 496 | windows_x86_64_gnullvm@0.52.6 497 | windows_x86_64_msvc@0.48.5 498 | windows_x86_64_msvc@0.52.6 499 | winnow@0.5.40 500 | winnow@0.6.16 501 | winreg@0.50.0 502 | winreg@0.52.0 503 | xdg-home@1.2.0 504 | xml-rs@0.8.20 505 | xml5ever@0.17.0 506 | xmlparser@0.13.6 507 | xmltree@0.10.3 508 | zbus@4.4.0 509 | zbus_macros@4.4.0 510 | zbus_names@3.0.0 511 | zeroize@1.8.1 512 | zune-core@0.4.12 513 | zune-inflate@0.2.54 514 | zune-jpeg@0.4.13 515 | zvariant@4.2.0 516 | zvariant_derive@4.2.0 517 | zvariant_utils@2.1.0 518 | " 519 | 520 | declare -A GIT_CRATES=( 521 | [article_scraper]='https://gitlab.com/news-flash/article_scraper;b3ce28632dab8678ae04789aeae76262283b1bb0;article_scraper-%commit%/article_scraper' 522 | [clapper-gtk-sys]='https://gitlab.gnome.org/JanGernert/clapper-rs/-/archive/%commit%/clapper-rs-%commit%.tar.gz;31161aa56fffe9cabd0a46159198949082f9d035;clapper-rs-%commit%/libclapper-gtk-rs/sys' 523 | [clapper-gtk]='https://gitlab.gnome.org/JanGernert/clapper-rs/-/archive/%commit%/clapper-rs-%commit%.tar.gz;31161aa56fffe9cabd0a46159198949082f9d035;clapper-rs-%commit%/libclapper-gtk-rs' 524 | [clapper-sys]='https://gitlab.gnome.org/JanGernert/clapper-rs/-/archive/%commit%/clapper-rs-%commit%.tar.gz;31161aa56fffe9cabd0a46159198949082f9d035;clapper-rs-%commit%/libclapper-rs/sys' 525 | [clapper]='https://gitlab.gnome.org/JanGernert/clapper-rs/-/archive/%commit%/clapper-rs-%commit%.tar.gz;31161aa56fffe9cabd0a46159198949082f9d035;clapper-rs-%commit%/libclapper-rs' 526 | [news-flash]='https://gitlab.com/news_flash/news_flash;2ec37e6fccac4e7ef295a76ffda97a0d71ed2e74;news_flash-%commit%' 527 | [newsblur_api]='https://gitlab.com/news-flash/newsblur_api;1e2b41e52a19e28c41a981fca6823f9447d82df4;newsblur_api-%commit%' 528 | ) 529 | 530 | inherit cargo 531 | 532 | DESCRIPTION="Feed Reader written in GTK" 533 | HOMEPAGE="" 534 | SRC_URI=" 535 | ${CARGO_CRATE_URIS} 536 | " 537 | 538 | LICENSE="" 539 | # Dependent crate licenses 540 | LICENSE+=" 541 | Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD GPL-3+ ISC MIT 542 | MPL-2.0 Unicode-DFS-2016 Unlicense 543 | " 544 | SLOT="0" 545 | KEYWORDS="~amd64" 546 | -------------------------------------------------------------------------------- /integration_test/lemmy_server-0.18.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.8 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | Inflector@0.11.4 10 | activitypub_federation@0.4.4 11 | activitystreams-kinds@0.3.0 12 | actix-codec@0.5.0 13 | actix-cors@0.6.4 14 | actix-form-data@0.7.0-beta.2 15 | actix-http@3.3.1 16 | actix-macros@0.2.3 17 | actix-multipart@0.6.0 18 | actix-router@0.5.1 19 | actix-rt@2.8.0 20 | actix-server@2.1.1 21 | actix-service@2.0.2 22 | actix-tls@3.0.3 23 | actix-utils@3.0.1 24 | actix-web-codegen@4.2.0 25 | actix-web@4.3.1 26 | addr2line@0.19.0 27 | adler@1.0.2 28 | ahash@0.7.6 29 | ahash@0.8.3 30 | aho-corasick@1.0.2 31 | android-tzdata@0.1.1 32 | android_system_properties@0.1.5 33 | anyhow@1.0.71 34 | argparse@0.2.2 35 | arrayvec@0.5.2 36 | assert-json-diff@2.0.2 37 | ast_node@0.8.8 38 | async-stream-impl@0.3.3 39 | async-stream@0.3.3 40 | async-trait@0.1.68 41 | atom_syndication@0.12.1 42 | autocfg@1.1.0 43 | awc@3.0.1 44 | axum-core@0.2.9 45 | axum-core@0.3.4 46 | axum@0.5.17 47 | axum@0.6.18 48 | backtrace@0.3.67 49 | base32@0.4.0 50 | base64@0.13.1 51 | base64@0.21.2 52 | bcrypt@0.13.0 53 | better_scoped_tls@0.1.0 54 | bincode@1.3.3 55 | bit-set@0.5.3 56 | bit-vec@0.6.3 57 | bitflags@1.3.2 58 | bitflags@2.3.1 59 | bitvec@0.19.6 60 | block-buffer@0.10.3 61 | blowfish@0.9.1 62 | bumpalo@3.11.1 63 | bytemuck@1.12.1 64 | byteorder@1.4.3 65 | bytes@1.4.0 66 | bytestring@1.1.0 67 | captcha@0.0.9 68 | cc@1.0.73 69 | cesu8@1.1.0 70 | cfg-if@1.0.0 71 | chrono@0.4.26 72 | cipher@0.4.3 73 | clap@4.0.32 74 | clap_derive@4.0.21 75 | clap_lex@0.3.0 76 | clokwerk@0.3.5 77 | codespan-reporting@0.11.1 78 | color-eyre@0.6.2 79 | color-spantrace@0.2.0 80 | color_quant@1.1.0 81 | combine@4.6.6 82 | config@0.13.3 83 | console-api@0.5.0 84 | console-subscriber@0.1.9 85 | const_format@0.2.31 86 | const_format_proc_macros@0.2.31 87 | constant_time_eq@0.2.4 88 | convert_case@0.4.0 89 | cookie@0.16.2 90 | core-foundation-sys@0.8.3 91 | core-foundation@0.9.3 92 | cpufeatures@0.2.5 93 | crc32fast@1.3.2 94 | crossbeam-channel@0.5.6 95 | crossbeam-epoch@0.9.13 96 | crossbeam-utils@0.8.12 97 | crypto-common@0.1.6 98 | cxx-build@1.0.80 99 | cxx@1.0.80 100 | cxxbridge-flags@1.0.80 101 | cxxbridge-macro@1.0.80 102 | darling@0.13.4 103 | darling@0.14.1 104 | darling_core@0.13.4 105 | darling_core@0.14.1 106 | darling_macro@0.13.4 107 | darling_macro@0.14.1 108 | dashmap@5.4.0 109 | deadpool-runtime@0.1.2 110 | deadpool@0.9.5 111 | debug_unreachable@0.1.1 112 | deno_ast@0.20.0 113 | derivative@2.2.0 114 | derive_builder@0.12.0 115 | derive_builder_core@0.12.0 116 | derive_builder_macro@0.12.0 117 | derive_more@0.99.17 118 | deser-hjson@1.0.2 119 | diesel-async@0.3.1 120 | diesel-derive-enum@2.1.0 121 | diesel-derive-newtype@2.1.0 122 | diesel@2.1.0 123 | diesel_derives@2.1.0 124 | diesel_ltree@0.3.0 125 | diesel_migrations@2.1.0 126 | diesel_table_macro_syntax@0.1.0 127 | digest@0.10.5 128 | diligent-date-parser@0.1.3 129 | displaydoc@0.2.4 130 | dlv-list@0.3.0 131 | doku-derive@0.21.1 132 | doku@0.21.1 133 | downcast-rs@1.2.0 134 | dprint-core@0.59.0 135 | dprint-plugin-typescript@0.77.0 136 | dprint-swc-ext@0.5.0 137 | dyn-clone@1.0.11 138 | either@1.8.0 139 | email-encoding@0.1.3 140 | email_address@0.2.3 141 | encoding-index-japanese@1.20141219.5 142 | encoding-index-korean@1.20141219.5 143 | encoding-index-simpchinese@1.20141219.5 144 | encoding-index-singlebyte@1.20141219.5 145 | encoding-index-tradchinese@1.20141219.5 146 | encoding@0.2.33 147 | encoding_index_tests@0.1.4 148 | encoding_rs@0.8.31 149 | entities@1.0.1 150 | enum-map-derive@0.11.0 151 | enum-map@2.5.0 152 | enum_delegate@0.2.0 153 | enum_delegate_lib@0.2.0 154 | enum_kind@0.2.2 155 | errno-dragonfly@0.1.2 156 | errno@0.2.8 157 | eyre@0.6.8 158 | fallible-iterator@0.2.0 159 | fallible_collections@0.4.5 160 | fancy-regex@0.7.1 161 | fastrand@1.8.0 162 | fixedbitset@0.4.2 163 | flate2@1.0.24 164 | fnv@1.0.7 165 | foreign-types-shared@0.1.1 166 | foreign-types@0.3.2 167 | form_urlencoded@1.2.0 168 | from_variant@0.1.5 169 | fs2@0.4.3 170 | funty@1.1.0 171 | futf@0.1.5 172 | futures-channel@0.3.28 173 | futures-core@0.3.28 174 | futures-executor@0.3.28 175 | futures-io@0.3.28 176 | futures-macro@0.3.28 177 | futures-sink@0.3.28 178 | futures-task@0.3.28 179 | futures-util@0.3.28 180 | futures@0.3.28 181 | fxhash@0.2.1 182 | generic-array@0.14.6 183 | getrandom@0.1.16 184 | getrandom@0.2.8 185 | gimli@0.27.0 186 | h2@0.3.14 187 | half@1.8.2 188 | hashbrown@0.12.3 189 | hdrhistogram@7.5.2 190 | heck@0.3.3 191 | heck@0.4.0 192 | hermit-abi@0.1.19 193 | hermit-abi@0.2.6 194 | hex@0.4.3 195 | hmac@0.12.1 196 | hostname@0.3.1 197 | hound@3.5.0 198 | html-escape@0.2.13 199 | html2md@0.2.14 200 | html2text@0.6.0 201 | html5ever@0.25.2 202 | html5ever@0.26.0 203 | http-body@0.4.5 204 | http-range-header@0.3.0 205 | http-signature-normalization-actix@0.6.2 206 | http-signature-normalization-reqwest@0.8.0 207 | http-signature-normalization@0.6.0 208 | http-signature-normalization@0.7.0 209 | http@0.2.9 210 | httparse@1.8.0 211 | httpdate@1.0.2 212 | humantime@2.1.0 213 | hyper-timeout@0.4.1 214 | hyper-tls@0.5.0 215 | hyper@0.14.25 216 | iana-time-zone-haiku@0.1.1 217 | iana-time-zone@0.1.51 218 | ident_case@1.0.1 219 | idna@0.2.3 220 | idna@0.4.0 221 | image@0.24.4 222 | indenter@0.3.3 223 | indexmap@1.9.1 224 | inout@0.1.3 225 | instant@0.1.12 226 | io-lifetimes@1.0.3 227 | ipnet@2.5.0 228 | is-macro@0.2.2 229 | is-terminal@0.4.2 230 | itertools@0.10.5 231 | itoa@1.0.6 232 | jni-sys@0.3.0 233 | jni@0.19.0 234 | js-sys@0.3.60 235 | json5@0.4.1 236 | jsonwebtoken@8.1.1 237 | language-tags@0.3.2 238 | lazy_static@1.4.0 239 | lettre@0.10.1 240 | lexical-core@0.7.6 241 | lexical-core@0.8.5 242 | lexical-parse-float@0.8.5 243 | lexical-parse-integer@0.8.6 244 | lexical-util@0.8.5 245 | lexical-write-float@0.8.5 246 | lexical-write-integer@0.8.5 247 | lexical@6.1.1 248 | libc@0.2.146 249 | line-wrap@0.1.1 250 | link-cplusplus@1.0.7 251 | linked-hash-map@0.5.6 252 | linkify@0.9.0 253 | linux-raw-sys@0.1.4 254 | local-channel@0.1.3 255 | local-waker@0.1.3 256 | lock_api@0.4.9 257 | lodepng@3.7.2 258 | log@0.4.17 259 | mac@0.1.1 260 | markdown-it@0.5.0 261 | markup5ever@0.10.1 262 | markup5ever@0.11.0 263 | markup5ever_rcdom@0.1.0 264 | markup5ever_rcdom@0.2.0 265 | match_cfg@0.1.0 266 | matchers@0.1.0 267 | matches@0.1.9 268 | matchit@0.5.0 269 | matchit@0.7.0 270 | md-5@0.10.5 271 | mdurl@0.3.1 272 | memchr@2.5.0 273 | memoffset@0.7.1 274 | migrations_internals@2.1.0 275 | migrations_macros@2.1.0 276 | mime@0.3.16 277 | mime_guess@2.0.4 278 | minimal-lexical@0.2.1 279 | miniz_oxide@0.5.4 280 | miniz_oxide@0.6.2 281 | mio@0.8.4 282 | multimap@0.8.3 283 | native-tls@0.2.10 284 | never@0.1.0 285 | new_debug_unreachable@1.0.4 286 | nom@6.1.2 287 | nom@7.1.1 288 | nu-ansi-term@0.46.0 289 | num-bigint@0.4.3 290 | num-integer@0.1.45 291 | num-rational@0.4.1 292 | num-traits@0.2.15 293 | num_cpus@1.13.1 294 | num_threads@0.1.6 295 | object@0.30.0 296 | once_cell@1.18.0 297 | openssl-macros@0.1.0 298 | openssl-probe@0.1.5 299 | openssl-sys@0.9.88 300 | openssl@0.10.54 301 | opentelemetry-otlp@0.10.0 302 | opentelemetry-otlp@0.12.0 303 | opentelemetry-proto@0.2.0 304 | opentelemetry@0.16.0 305 | opentelemetry@0.17.0 306 | opentelemetry@0.19.0 307 | opentelemetry_api@0.19.0 308 | opentelemetry_sdk@0.19.0 309 | ordered-multimap@0.4.3 310 | os_str_bytes@6.4.1 311 | overload@0.1.1 312 | owo-colors@3.5.0 313 | parking_lot@0.11.2 314 | parking_lot@0.12.1 315 | parking_lot_core@0.8.6 316 | parking_lot_core@0.9.4 317 | paste@1.0.9 318 | pathdiff@0.2.1 319 | pem@1.1.0 320 | percent-encoding@2.3.0 321 | pest@2.4.0 322 | pest_derive@2.4.0 323 | pest_generator@2.4.0 324 | pest_meta@2.4.0 325 | petgraph@0.6.2 326 | phf@0.10.1 327 | phf@0.11.1 328 | phf@0.8.0 329 | phf_codegen@0.10.0 330 | phf_codegen@0.8.0 331 | phf_generator@0.10.0 332 | phf_generator@0.8.0 333 | phf_shared@0.10.0 334 | phf_shared@0.11.1 335 | phf_shared@0.8.0 336 | pict-rs@0.4.0-rc.3 337 | pin-project-internal@1.0.12 338 | pin-project-lite@0.2.9 339 | pin-project@1.0.12 340 | pin-utils@0.1.0 341 | pkg-config@0.3.25 342 | plist@1.4.3 343 | pmutil@0.5.3 344 | png@0.17.6 345 | postgres-protocol@0.6.4 346 | postgres-types@0.2.4 347 | ppv-lite86@0.2.16 348 | pq-sys@0.4.7 349 | precomputed-hash@0.1.1 350 | proc-macro-error-attr@1.0.4 351 | proc-macro-error@1.0.4 352 | proc-macro2@1.0.59 353 | prost-build@0.9.0 354 | prost-derive@0.11.0 355 | prost-derive@0.9.0 356 | prost-types@0.11.1 357 | prost-types@0.9.0 358 | prost@0.11.0 359 | prost@0.9.0 360 | psm@0.1.21 361 | quick-xml@0.27.1 362 | quick-xml@0.28.2 363 | quote@1.0.28 364 | quoted_printable@0.4.5 365 | radium@0.5.3 366 | rand@0.7.3 367 | rand@0.8.5 368 | rand_chacha@0.2.2 369 | rand_chacha@0.3.1 370 | rand_core@0.5.1 371 | rand_core@0.6.4 372 | rand_hc@0.2.0 373 | rand_pcg@0.2.1 374 | readonly@0.2.8 375 | redox_syscall@0.2.16 376 | regex-automata@0.1.10 377 | regex-syntax@0.6.27 378 | regex-syntax@0.7.2 379 | regex@1.8.4 380 | remove_dir_all@0.5.3 381 | reqwest-middleware@0.2.2 382 | reqwest-tracing@0.4.4 383 | reqwest@0.11.18 384 | retain_mut@0.1.9 385 | rgb@0.8.34 386 | ring@0.16.20 387 | ron@0.7.1 388 | rosetta-build@0.1.2 389 | rosetta-i18n@0.1.2 390 | rss@2.0.4 391 | rust-ini@0.18.0 392 | rustc-demangle@0.1.21 393 | rustc-hash@1.1.0 394 | rustc_version@0.4.0 395 | rustix@0.36.5 396 | rustls@0.20.7 397 | rustversion@1.0.9 398 | rusty-s3@0.4.1 399 | ryu@1.0.11 400 | safemem@0.3.3 401 | same-file@1.0.6 402 | schannel@0.1.20 403 | scoped-futures@0.1.3 404 | scoped-tls@1.0.1 405 | scopeguard@1.1.0 406 | scratch@1.0.2 407 | sct@0.7.0 408 | security-framework-sys@2.6.1 409 | security-framework@2.7.0 410 | select@0.5.0 411 | semver@1.0.14 412 | serde@1.0.164 413 | serde_cbor@0.11.2 414 | serde_derive@1.0.164 415 | serde_json@1.0.96 416 | serde_plain@1.0.1 417 | serde_spanned@0.6.2 418 | serde_urlencoded@0.7.1 419 | serde_with@1.14.0 420 | serde_with_macros@1.5.2 421 | serial_test@0.9.0 422 | serial_test_derive@0.9.0 423 | sha1@0.10.5 424 | sha2@0.10.6 425 | sharded-slab@0.1.4 426 | signal-hook-registry@1.4.0 427 | simple_asn1@0.6.2 428 | siphasher@0.3.10 429 | slab@0.4.7 430 | sled@0.34.7 431 | smallvec@1.10.0 432 | smart-default@0.7.1 433 | socket2@0.4.9 434 | spin@0.5.2 435 | stable_deref_trait@1.2.0 436 | stacker@0.1.15 437 | static_assertions@1.1.0 438 | storage-path-generator@0.1.1 439 | string_cache@0.8.4 440 | string_cache_codegen@0.5.2 441 | string_enum@0.3.4 442 | stringprep@0.1.2 443 | strsim@0.10.0 444 | strum@0.24.1 445 | strum_macros@0.24.3 446 | subtle@2.4.1 447 | swc_atoms@0.4.23 448 | swc_common@0.29.10 449 | swc_ecma_ast@0.94.14 450 | swc_ecma_parser@0.122.19 451 | swc_eq_ignore_macros@0.1.1 452 | swc_macros_common@0.3.7 453 | swc_visit@0.5.5 454 | swc_visit_macros@0.5.6 455 | syn@1.0.103 456 | syn@2.0.18 457 | sync_wrapper@0.1.1 458 | syntect@5.0.0 459 | tap@1.0.1 460 | task-local-extensions@0.1.4 461 | tempfile@3.3.0 462 | tendril@0.4.3 463 | termcolor@1.1.3 464 | text_lines@0.6.0 465 | thiserror-impl@1.0.40 466 | thiserror@1.0.40 467 | thread_local@1.1.4 468 | time-macros@0.2.4 469 | time@0.1.44 470 | time@0.3.15 471 | tinyjson@2.5.0 472 | tinyvec@1.6.0 473 | tinyvec_macros@0.1.0 474 | tokio-io-timeout@1.2.0 475 | tokio-macros@2.1.0 476 | tokio-native-tls@0.3.0 477 | tokio-postgres@0.7.7 478 | tokio-rustls@0.23.4 479 | tokio-stream@0.1.11 480 | tokio-util@0.6.10 481 | tokio-util@0.7.4 482 | tokio@1.28.2 483 | toml@0.5.9 484 | toml@0.7.4 485 | toml_datetime@0.6.2 486 | toml_edit@0.19.10 487 | tonic-build@0.6.2 488 | tonic@0.6.2 489 | tonic@0.8.2 490 | tonic@0.9.2 491 | totp-rs@5.0.2 492 | tower-http@0.3.4 493 | tower-layer@0.3.2 494 | tower-service@0.3.2 495 | tower@0.4.13 496 | tracing-actix-web@0.6.2 497 | tracing-actix-web@0.7.5 498 | tracing-attributes@0.1.23 499 | tracing-awc@0.1.7 500 | tracing-core@0.1.30 501 | tracing-error@0.2.0 502 | tracing-futures@0.2.5 503 | tracing-log@0.1.3 504 | tracing-opentelemetry@0.16.0 505 | tracing-opentelemetry@0.17.4 506 | tracing-opentelemetry@0.19.0 507 | tracing-serde@0.1.3 508 | tracing-subscriber@0.3.17 509 | tracing@0.1.37 510 | triomphe@0.1.8 511 | try-lock@0.2.3 512 | ts-rs-macros@6.2.0 513 | ts-rs@6.2.1 514 | typed-arena@2.0.2 515 | typed-builder@0.10.0 516 | typenum@1.15.0 517 | ucd-trie@0.1.5 518 | unicase@2.6.0 519 | unicode-bidi@0.3.13 520 | unicode-general-category@0.6.0 521 | unicode-id@0.3.3 522 | unicode-ident@1.0.5 523 | unicode-normalization@0.1.22 524 | unicode-segmentation@1.10.0 525 | unicode-width@0.1.10 526 | unicode-xid@0.2.4 527 | unreachable@0.1.1 528 | untrusted@0.7.1 529 | url@2.4.0 530 | urlencoding@2.1.2 531 | utf-8@0.7.6 532 | utf8-width@0.1.6 533 | uuid@1.3.4 534 | valuable@0.1.0 535 | vcpkg@0.2.15 536 | version_check@0.9.4 537 | void@1.0.2 538 | walkdir@2.3.2 539 | want@0.3.0 540 | wasi@0.10.0+wasi-snapshot-preview1 541 | wasi@0.11.0+wasi-snapshot-preview1 542 | wasi@0.9.0+wasi-snapshot-preview1 543 | wasm-bindgen-backend@0.2.83 544 | wasm-bindgen-futures@0.4.33 545 | wasm-bindgen-macro-support@0.2.83 546 | wasm-bindgen-macro@0.2.83 547 | wasm-bindgen-shared@0.2.83 548 | wasm-bindgen@0.2.83 549 | wasm-streams@0.2.3 550 | web-sys@0.3.60 551 | webmention@0.4.0 552 | webpage@1.6.0 553 | webpki-roots@0.22.5 554 | webpki@0.22.0 555 | which@4.3.0 556 | winapi-i686-pc-windows-gnu@0.4.0 557 | winapi-util@0.1.5 558 | winapi-x86_64-pc-windows-gnu@0.4.0 559 | winapi@0.3.9 560 | windows-sys@0.36.1 561 | windows-sys@0.42.0 562 | windows-sys@0.48.0 563 | windows-targets@0.48.0 564 | windows_aarch64_gnullvm@0.42.2 565 | windows_aarch64_gnullvm@0.48.0 566 | windows_aarch64_msvc@0.36.1 567 | windows_aarch64_msvc@0.42.2 568 | windows_aarch64_msvc@0.48.0 569 | windows_i686_gnu@0.36.1 570 | windows_i686_gnu@0.42.2 571 | windows_i686_gnu@0.48.0 572 | windows_i686_msvc@0.36.1 573 | windows_i686_msvc@0.42.2 574 | windows_i686_msvc@0.48.0 575 | windows_x86_64_gnu@0.36.1 576 | windows_x86_64_gnu@0.42.2 577 | windows_x86_64_gnu@0.48.0 578 | windows_x86_64_gnullvm@0.42.2 579 | windows_x86_64_gnullvm@0.48.0 580 | windows_x86_64_msvc@0.36.1 581 | windows_x86_64_msvc@0.42.2 582 | windows_x86_64_msvc@0.48.0 583 | winnow@0.4.6 584 | winreg@0.10.1 585 | wyz@0.2.0 586 | xml5ever@0.16.2 587 | xml5ever@0.17.0 588 | yaml-rust@0.4.5 589 | zeroize@1.5.7 590 | " 591 | 592 | inherit cargo 593 | 594 | DESCRIPTION="A link aggregator for the fediverse" 595 | HOMEPAGE="https://join-lemmy.org/" 596 | SRC_URI=" 597 | ${CARGO_CRATE_URIS} 598 | " 599 | 600 | LICENSE="AGPL-3" 601 | # Dependent crate licenses 602 | LICENSE+=" 603 | 0BSD AGPL-3 Apache-2.0 BSD-2 BSD CC0-1.0 GPL-3 GPL-3+ ISC MIT 604 | MPL-2.0 Unicode-DFS-2016 ZLIB 605 | " 606 | SLOT="0" 607 | KEYWORDS="~amd64" 608 | IUSE="console embed-pictrs" 609 | 610 | src_configure() { 611 | local myfeatures=( 612 | $(usev console) 613 | $(usev embed-pictrs) 614 | ) 615 | cargo_src_configure 616 | } 617 | -------------------------------------------------------------------------------- /integration_test/ruffle_core-0.1.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.8 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | ab_glyph@0.2.21 10 | ab_glyph_rasterizer@0.1.8 11 | addr2line@0.19.0 12 | adler32@1.2.0 13 | adler@1.0.2 14 | ahash@0.7.6 15 | ahash@0.8.3 16 | aho-corasick@0.7.20 17 | aho-corasick@1.0.2 18 | aliasable@0.1.3 19 | allocator-api2@0.2.15 20 | alsa-sys@0.3.1 21 | alsa@0.7.0 22 | android-activity@0.4.1 23 | android-properties@0.2.2 24 | android-tzdata@0.1.1 25 | android_system_properties@0.1.5 26 | anstream@0.3.2 27 | anstyle-parse@0.2.0 28 | anstyle-query@1.0.0 29 | anstyle-wincon@1.0.1 30 | anstyle@1.0.0 31 | anyhow@1.0.71 32 | approx@0.5.1 33 | arboard@3.2.0 34 | arc-swap@1.6.0 35 | arrayref@0.3.7 36 | arrayvec@0.7.4 37 | ash@0.37.3+1.3.251 38 | async-channel@1.8.0 39 | async-io@1.13.0 40 | async-lock@2.7.0 41 | atk-sys@0.16.0 42 | atomic_refcell@0.1.10 43 | atty@0.2.14 44 | autocfg@1.1.0 45 | backtrace@0.3.67 46 | base64@0.13.1 47 | base64@0.21.2 48 | bindgen@0.64.0 49 | bit-set@0.5.3 50 | bit-vec@0.6.3 51 | bitflags@1.3.2 52 | bitflags@2.3.2 53 | bitstream-io@1.6.0 54 | block-buffer@0.10.4 55 | block-sys@0.1.0-beta.1 56 | block2@0.2.0-alpha.6 57 | block@0.1.6 58 | bstr@1.5.0 59 | bumpalo@3.13.0 60 | bytemuck@1.13.1 61 | bytemuck_derive@1.4.1 62 | byteorder@1.4.3 63 | bytes@1.4.0 64 | cairo-sys-rs@0.16.3 65 | calloop@0.10.6 66 | castaway@0.1.2 67 | cc@1.0.79 68 | cesu8@1.1.0 69 | cexpr@0.6.0 70 | cfg-expr@0.15.2 71 | cfg-if@1.0.0 72 | cfg_aliases@0.1.1 73 | chrono@0.4.26 74 | clang-sys@1.6.1 75 | clap@4.3.4 76 | clap_builder@4.3.4 77 | clap_derive@4.3.2 78 | clap_lex@0.5.0 79 | clipboard-win@4.5.0 80 | codespan-reporting@0.11.1 81 | color_quant@1.1.0 82 | colorchoice@1.0.0 83 | colored@2.0.0 84 | com-rs@0.2.1 85 | combine@4.6.6 86 | concurrent-queue@2.2.0 87 | console@0.15.7 88 | console_error_panic_hook@0.1.7 89 | convert_case@0.6.0 90 | cookie-factory@0.3.2 91 | core-foundation-sys@0.6.2 92 | core-foundation-sys@0.8.4 93 | core-foundation@0.9.3 94 | core-graphics-types@0.1.1 95 | core-graphics@0.22.3 96 | coreaudio-rs@0.11.2 97 | coreaudio-sys@0.2.12 98 | cpal@0.15.2 99 | cpufeatures@0.2.8 100 | crc-catalog@2.2.0 101 | crc32fast@1.3.2 102 | crc@3.0.1 103 | crossbeam-channel@0.5.8 104 | crossbeam-deque@0.8.3 105 | crossbeam-epoch@0.9.15 106 | crossbeam-utils@0.8.16 107 | crypto-common@0.1.6 108 | csv-core@0.1.10 109 | csv@1.2.2 110 | ctor@0.1.26 111 | curl-sys@0.4.63+curl-8.1.2 112 | curl@0.4.44 113 | d3d12@0.6.0 114 | darling@0.20.1 115 | darling_core@0.20.1 116 | darling_macro@0.20.1 117 | dasp_sample@0.11.0 118 | data-encoding@2.4.0 119 | derive-try-from-primitive@1.0.0 120 | diff@0.1.13 121 | digest@0.10.7 122 | dirs-sys@0.4.1 123 | dirs@5.0.1 124 | dispatch@0.2.0 125 | displaydoc@0.2.4 126 | dlib@0.5.2 127 | doc-comment@0.3.3 128 | downcast-rs@1.2.0 129 | ecolor@0.22.0 130 | egui-wgpu@0.22.0 131 | egui-winit@0.22.0 132 | egui@0.22.0 133 | egui_extras@0.22.0 134 | either@1.8.1 135 | emath@0.22.0 136 | embed-resource@2.1.1 137 | encode_unicode@0.3.6 138 | encoding_rs@0.8.32 139 | enum-map-derive@0.11.0 140 | enum-map@2.5.0 141 | enumset@1.1.2 142 | enumset_derive@0.8.1 143 | env_logger@0.10.0 144 | epaint@0.22.0 145 | errno-dragonfly@0.1.2 146 | errno@0.3.1 147 | error-code@2.3.1 148 | euclid@0.22.9 149 | event-listener@2.5.3 150 | fastrand@1.9.0 151 | fdeflate@0.3.0 152 | flate2@1.0.26 153 | float_next_after@0.1.5 154 | fluent-bundle@0.15.2 155 | fluent-langneg@0.13.0 156 | fluent-syntax@0.11.0 157 | fluent-template-macros@0.8.0 158 | fluent-templates@0.8.0 159 | fluent@0.16.0 160 | flume@0.10.14 161 | fnv@1.0.7 162 | foreign-types-shared@0.1.1 163 | foreign-types@0.3.2 164 | form_urlencoded@1.2.0 165 | futures-channel@0.3.28 166 | futures-core@0.3.28 167 | futures-executor@0.3.28 168 | futures-io@0.3.28 169 | futures-lite@1.13.0 170 | futures-macro@0.3.28 171 | futures-sink@0.3.28 172 | futures-task@0.3.28 173 | futures-util@0.3.28 174 | futures@0.3.28 175 | gdk-pixbuf-sys@0.16.3 176 | gdk-sys@0.16.0 177 | generational-arena@0.2.9 178 | generator@0.7.4 179 | generic-array@0.14.7 180 | gethostname@0.2.3 181 | getrandom@0.2.10 182 | gif@0.12.0 183 | gimli@0.27.3 184 | gio-sys@0.16.3 185 | glib-sys@0.16.3 186 | glob@0.3.1 187 | globset@0.4.10 188 | glow@0.12.2 189 | gobject-sys@0.16.3 190 | gpu-alloc-types@0.2.0 191 | gpu-alloc@0.5.4 192 | gpu-allocator@0.22.0 193 | gpu-descriptor-types@0.1.1 194 | gpu-descriptor@0.2.3 195 | gtk-sys@0.16.0 196 | hashbrown@0.12.3 197 | hashbrown@0.13.2 198 | hashbrown@0.14.0 199 | hassle-rs@0.10.0 200 | heck@0.4.1 201 | hermit-abi@0.1.19 202 | hermit-abi@0.2.6 203 | hermit-abi@0.3.1 204 | hexf-parse@0.2.1 205 | home@0.5.5 206 | http@0.2.9 207 | humantime@2.1.0 208 | iana-time-zone-haiku@0.1.2 209 | iana-time-zone@0.1.57 210 | ident_case@1.0.1 211 | idna@0.4.0 212 | ignore@0.4.20 213 | image@0.24.6 214 | indexmap@1.9.3 215 | indicatif@0.17.5 216 | insta@1.29.0 217 | instant@0.1.12 218 | intl-memoizer@0.5.1 219 | intl_pluralrules@7.0.2 220 | io-lifetimes@1.0.11 221 | is-terminal@0.4.7 222 | isahc@1.7.2 223 | itoa@1.0.6 224 | jni-sys@0.3.0 225 | jni@0.19.0 226 | jni@0.20.0 227 | jni@0.21.1 228 | jobserver@0.1.26 229 | jpeg-decoder@0.3.0 230 | js-sys@0.3.64 231 | khronos-egl@4.1.0 232 | lazy_static@1.4.0 233 | lazycell@1.3.0 234 | libc@0.2.146 235 | libflate@1.4.0 236 | libflate_lz77@1.2.0 237 | libloading@0.7.4 238 | libloading@0.8.0 239 | libm@0.2.7 240 | libnghttp2-sys@0.1.7+1.45.0 241 | libtest-mimic@0.6.0 242 | libz-sys@1.1.9 243 | linked-hash-map@0.5.6 244 | linkme-impl@0.3.10 245 | linkme@0.3.10 246 | linux-raw-sys@0.3.8 247 | lock_api@0.4.10 248 | log@0.4.19 249 | loom@0.5.6 250 | lru@0.10.0 251 | lyon@1.0.1 252 | lyon_algorithms@1.0.3 253 | lyon_geom@1.0.4 254 | lyon_path@1.0.3 255 | lyon_tessellation@1.0.10 256 | lzma-rs@0.3.0 257 | mach2@0.4.1 258 | malloc_buf@0.0.6 259 | matchers@0.1.0 260 | memchr@2.5.0 261 | memmap2@0.5.10 262 | memoffset@0.6.5 263 | memoffset@0.9.0 264 | metal@0.24.0 265 | mime@0.3.17 266 | minimal-lexical@0.2.1 267 | miniz_oxide@0.6.2 268 | miniz_oxide@0.7.1 269 | mio@0.8.8 270 | naga@0.12.2 271 | naga_oil@0.7.0 272 | ndk-context@0.1.1 273 | ndk-sys@0.4.1+23.1.7779620 274 | ndk@0.7.0 275 | nix@0.24.3 276 | nix@0.25.1 277 | nohash-hasher@0.2.0 278 | nom@7.1.3 279 | nu-ansi-term@0.46.0 280 | num-bigint@0.4.3 281 | num-complex@0.4.3 282 | num-derive@0.3.3 283 | num-integer@0.1.45 284 | num-rational@0.4.1 285 | num-traits@0.2.15 286 | num_cpus@1.15.0 287 | num_enum@0.5.11 288 | num_enum_derive@0.5.11 289 | number_prefix@0.4.0 290 | objc-foundation@0.1.1 291 | objc-sys@0.2.0-beta.2 292 | objc2-encode@2.0.0-pre.2 293 | objc2@0.3.0-beta.3.patch-leaks.3 294 | objc@0.2.7 295 | objc_exception@0.1.2 296 | objc_id@0.1.1 297 | object@0.30.4 298 | oboe-sys@0.5.0 299 | oboe@0.5.0 300 | once_cell@1.18.0 301 | openssl-probe@0.1.5 302 | openssl-sys@0.9.88 303 | option-ext@0.2.0 304 | orbclient@0.3.45 305 | os_info@3.7.0 306 | ouroboros@0.17.0 307 | ouroboros_macro@0.17.0 308 | output_vt100@0.1.3 309 | overload@0.1.1 310 | owned_ttf_parser@0.19.0 311 | pango-sys@0.16.3 312 | parking@2.1.0 313 | parking_lot@0.12.1 314 | parking_lot_core@0.9.8 315 | path-slash@0.2.1 316 | peeking_take_while@0.1.2 317 | percent-encoding@2.3.0 318 | pin-project-internal@1.1.0 319 | pin-project-lite@0.2.9 320 | pin-project@1.1.0 321 | pin-utils@0.1.0 322 | pkg-config@0.3.27 323 | png@0.17.9 324 | polling@2.8.0 325 | portable-atomic@1.3.3 326 | pp-rs@0.2.1 327 | ppv-lite86@0.2.17 328 | pretty_assertions@1.3.0 329 | primal-check@0.3.3 330 | proc-macro-crate@1.3.1 331 | proc-macro-error-attr@1.0.4 332 | proc-macro-error@1.0.4 333 | proc-macro-hack@0.5.20+deprecated 334 | proc-macro2@1.0.60 335 | profiling-procmacros@1.0.8 336 | profiling@1.0.8 337 | quick-xml@0.29.0 338 | quote@1.0.28 339 | rand@0.8.5 340 | rand_chacha@0.3.1 341 | rand_core@0.6.4 342 | range-alloc@0.1.3 343 | raw-window-handle@0.5.2 344 | rayon-core@1.11.0 345 | rayon@1.7.0 346 | realfft@3.3.0 347 | redox_syscall@0.2.16 348 | redox_syscall@0.3.5 349 | redox_users@0.4.3 350 | regex-automata@0.1.10 351 | regex-syntax@0.6.29 352 | regex-syntax@0.7.2 353 | regex@1.8.4 354 | regress@0.6.0 355 | renderdoc-sys@1.0.0 356 | rfd@0.11.4 357 | rle-decode-fast@1.0.3 358 | ron@0.8.0 359 | rustc-demangle@0.1.23 360 | rustc-hash@1.1.0 361 | rustc_version@0.4.0 362 | rustdct@0.7.1 363 | rustfft@6.1.0 364 | rustix@0.37.20 365 | rustversion@1.0.12 366 | ryu@1.0.13 367 | safe_arch@0.7.0 368 | same-file@1.0.6 369 | schannel@0.1.21 370 | scoped-tls@1.0.1 371 | scopeguard@1.1.0 372 | sctk-adwaita@0.5.4 373 | self_cell@0.10.2 374 | semver@1.0.17 375 | serde-wasm-bindgen@0.5.0 376 | serde-xml-rs@0.6.0 377 | serde@1.0.164 378 | serde_derive@1.0.164 379 | serde_json@1.0.97 380 | serde_spanned@0.6.2 381 | sha2@0.10.7 382 | sharded-slab@0.1.4 383 | shlex@1.1.0 384 | simd-adler32@0.3.5 385 | similar@2.2.1 386 | simple_asn1@0.6.2 387 | slab@0.4.8 388 | slotmap@1.0.6 389 | sluice@0.5.5 390 | smallvec@1.10.0 391 | smithay-client-toolkit@0.16.0 392 | smithay-clipboard@0.6.6 393 | snafu-derive@0.7.4 394 | snafu@0.7.4 395 | socket2@0.4.9 396 | spin@0.9.8 397 | spirv@0.2.0+1.5.4 398 | sptr@0.3.2 399 | static_assertions@1.1.0 400 | str-buf@1.0.6 401 | strength_reduce@0.2.4 402 | strict-num@0.1.1 403 | strsim@0.10.0 404 | symphonia-bundle-mp3@0.5.3 405 | symphonia-core@0.5.3 406 | symphonia-metadata@0.5.3 407 | symphonia@0.5.3 408 | syn@1.0.109 409 | syn@2.0.18 410 | synstructure@0.13.0 411 | sys-locale@0.3.0 412 | system-deps@6.1.0 413 | target-lexicon@0.12.7 414 | termcolor@1.2.0 415 | thiserror-impl@1.0.40 416 | thiserror@1.0.40 417 | thread_local@1.1.7 418 | threadpool@1.8.1 419 | tiff@0.8.1 420 | time-core@0.1.1 421 | time-macros@0.2.9 422 | time@0.3.22 423 | tiny-skia-path@0.8.4 424 | tiny-skia@0.8.4 425 | tinystr@0.7.1 426 | tinyvec@1.6.0 427 | tinyvec_macros@0.1.1 428 | toml@0.7.4 429 | toml_datetime@0.6.2 430 | toml_edit@0.19.10 431 | tracing-attributes@0.1.24 432 | tracing-core@0.1.31 433 | tracing-futures@0.2.5 434 | tracing-log@0.1.3 435 | tracing-subscriber@0.3.17 436 | tracing-tracy@0.10.2 437 | tracing-wasm@0.2.1 438 | tracing@0.1.37 439 | tracy-client-sys@0.21.0 440 | tracy-client@0.15.2 441 | transpose@0.2.2 442 | ttf-parser@0.19.0 443 | type-map@0.4.0 444 | type-map@0.5.0 445 | typed-arena@2.0.2 446 | typenum@1.16.0 447 | unic-langid-impl@0.9.1 448 | unic-langid-macros-impl@0.9.1 449 | unic-langid-macros@0.9.1 450 | unic-langid@0.9.1 451 | unicode-bidi@0.3.13 452 | unicode-ident@1.0.9 453 | unicode-normalization@0.1.22 454 | unicode-segmentation@1.10.1 455 | unicode-width@0.1.10 456 | unicode-xid@0.2.4 457 | url@2.4.0 458 | utf8parse@0.2.1 459 | valuable@0.1.0 460 | vcpkg@0.2.15 461 | vec_map@0.8.2 462 | vergen@8.2.1 463 | version-compare@0.1.1 464 | version_check@0.9.4 465 | vswhom-sys@0.1.2 466 | vswhom@0.1.0 467 | waker-fn@1.1.0 468 | walkdir@2.3.3 469 | wasi@0.11.0+wasi-snapshot-preview1 470 | wasm-bindgen-backend@0.2.87 471 | wasm-bindgen-futures@0.4.37 472 | wasm-bindgen-macro-support@0.2.87 473 | wasm-bindgen-macro@0.2.87 474 | wasm-bindgen-shared@0.2.87 475 | wasm-bindgen@0.2.87 476 | wayland-client@0.29.5 477 | wayland-commons@0.29.5 478 | wayland-cursor@0.29.5 479 | wayland-protocols@0.29.5 480 | wayland-scanner@0.29.5 481 | wayland-sys@0.29.5 482 | weak-table@0.3.2 483 | web-sys@0.3.64 484 | webbrowser@0.8.10 485 | weezl@0.1.7 486 | wgpu-core@0.16.1 487 | wgpu-hal@0.16.1 488 | wgpu-types@0.16.0 489 | wgpu@0.16.1 490 | wide@0.7.10 491 | widestring@1.0.2 492 | winapi-i686-pc-windows-gnu@0.4.0 493 | winapi-util@0.1.5 494 | winapi-wsapoll@0.1.1 495 | winapi-x86_64-pc-windows-gnu@0.4.0 496 | winapi@0.3.9 497 | windows-sys@0.42.0 498 | windows-sys@0.45.0 499 | windows-sys@0.48.0 500 | windows-targets@0.42.2 501 | windows-targets@0.48.0 502 | windows@0.44.0 503 | windows@0.46.0 504 | windows@0.48.0 505 | windows_aarch64_gnullvm@0.42.2 506 | windows_aarch64_gnullvm@0.48.0 507 | windows_aarch64_msvc@0.42.2 508 | windows_aarch64_msvc@0.48.0 509 | windows_i686_gnu@0.42.2 510 | windows_i686_gnu@0.48.0 511 | windows_i686_msvc@0.42.2 512 | windows_i686_msvc@0.48.0 513 | windows_x86_64_gnu@0.42.2 514 | windows_x86_64_gnu@0.48.0 515 | windows_x86_64_gnullvm@0.42.2 516 | windows_x86_64_gnullvm@0.48.0 517 | windows_x86_64_msvc@0.42.2 518 | windows_x86_64_msvc@0.48.0 519 | winit@0.28.6 520 | winnow@0.4.7 521 | winreg@0.11.0 522 | x11-dl@2.21.0 523 | x11rb-protocol@0.10.0 524 | x11rb@0.10.1 525 | xcursor@0.3.4 526 | xml-rs@0.8.14 527 | yaml-rust@0.4.5 528 | yansi@0.5.1 529 | " 530 | 531 | declare -A GIT_CRATES=( 532 | [dasp]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp' 533 | [dasp_envelope]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp_envelope' 534 | [dasp_frame]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp_frame' 535 | [dasp_interpolate]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp_interpolate' 536 | [dasp_peak]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp_peak' 537 | [dasp_ring_buffer]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp_ring_buffer' 538 | [dasp_rms]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp_rms' 539 | [dasp_sample]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp_sample' 540 | [dasp_signal]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp_signal' 541 | [dasp_slice]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp_slice' 542 | [dasp_window]='https://github.com/RustAudio/dasp;f05a703d247bb504d7e812b51e95f3765d9c5e94;dasp-%commit%/dasp_window' 543 | [flash-lso]='https://github.com/ruffle-rs/rust-flash-lso;8376453eddddbe701031a091c0eed94068fa5649;rust-flash-lso-%commit%/flash-lso' 544 | [gc-arena-derive]='https://github.com/kyren/gc-arena;63dab12871321e0e5ada10ff1f1de8f4cf1764f9;gc-arena-%commit%/src/gc-arena-derive' 545 | [gc-arena]='https://github.com/kyren/gc-arena;63dab12871321e0e5ada10ff1f1de8f4cf1764f9;gc-arena-%commit%/src/gc-arena' 546 | [h263-rs-yuv]='https://github.com/ruffle-rs/h263-rs;d5d78eb251c1ce1f1da57c63db14f0fdc77a4b36;h263-rs-%commit%/yuv' 547 | [h263-rs]='https://github.com/ruffle-rs/h263-rs;d5d78eb251c1ce1f1da57c63db14f0fdc77a4b36;h263-rs-%commit%/h263' 548 | [nellymoser-rs]='https://github.com/ruffle-rs/nellymoser;4a33521c29a918950df8ae9fe07e527ac65553f5;nellymoser-%commit%' 549 | [nihav_codec_support]='https://github.com/ruffle-rs/nihav-vp6;9416fcc9fc8aab8f4681aa9093b42922214abbd3;nihav-vp6-%commit%/nihav-codec-support' 550 | [nihav_core]='https://github.com/ruffle-rs/nihav-vp6;9416fcc9fc8aab8f4681aa9093b42922214abbd3;nihav-vp6-%commit%/nihav-core' 551 | [nihav_duck]='https://github.com/ruffle-rs/nihav-vp6;9416fcc9fc8aab8f4681aa9093b42922214abbd3;nihav-vp6-%commit%/nihav-duck' 552 | ) 553 | 554 | inherit cargo 555 | 556 | DESCRIPTION="" 557 | HOMEPAGE="https://ruffle.rs" 558 | SRC_URI=" 559 | ${CARGO_CRATE_URIS} 560 | " 561 | 562 | LICENSE="|| ( Apache-2.0 MIT )" 563 | # Dependent crate licenses 564 | LICENSE+=" 565 | Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD Boost-1.0 566 | CC0-1.0 ISC MIT MPL-2.0 OFL-1.1 UbuntuFontLicense-1.0 567 | Unicode-DFS-2016 ZLIB 568 | " 569 | SLOT="0" 570 | KEYWORDS="~amd64" 571 | -------------------------------------------------------------------------------- /integration_test/fractal-5.0.0.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Gentoo Authors 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | # Autogenerated by pycargoebuild 0.10 5 | 6 | EAPI=8 7 | 8 | CRATES=" 9 | addr2line@0.21.0 10 | adler@1.0.2 11 | aead@0.5.2 12 | aes@0.8.3 13 | ahash@0.8.6 14 | aho-corasick@1.1.2 15 | allocator-api2@0.2.16 16 | ammonia@3.3.0 17 | android-tzdata@0.1.1 18 | android_system_properties@0.1.5 19 | anyhow@1.0.75 20 | anymap2@0.13.0 21 | aquamarine@0.3.2 22 | arrayref@0.3.7 23 | arrayvec@0.7.4 24 | as_variant@1.2.0 25 | ashpd@0.6.7 26 | assign@1.1.1 27 | async-broadcast@0.5.1 28 | async-channel@1.9.0 29 | async-compression@0.4.4 30 | async-io@1.13.0 31 | async-io@2.2.0 32 | async-lock@2.8.0 33 | async-lock@3.0.0 34 | async-once-cell@0.5.3 35 | async-process@1.8.1 36 | async-recursion@1.0.5 37 | async-rx@0.1.3 38 | async-signal@0.2.5 39 | async-stream-impl@0.3.5 40 | async-stream@0.3.5 41 | async-task@4.5.0 42 | async-trait@0.1.74 43 | async_cell@0.2.2 44 | atomic-waker@1.1.2 45 | atomic_refcell@0.1.13 46 | autocfg@1.1.0 47 | backoff@0.4.0 48 | backtrace@0.3.69 49 | base16ct@0.2.0 50 | base64@0.21.5 51 | base64ct@1.6.0 52 | bindgen@0.66.1 53 | bit_field@0.10.2 54 | bitflags@1.3.2 55 | bitflags@2.4.1 56 | bitmaps@3.2.0 57 | blake3@1.5.0 58 | block-buffer@0.10.4 59 | block-padding@0.3.3 60 | block@0.1.6 61 | blocking@1.4.1 62 | bs58@0.5.0 63 | bumpalo@3.14.0 64 | bytemuck@1.14.0 65 | byteorder@1.5.0 66 | bytes@1.5.0 67 | bytesize@1.3.0 68 | cairo-rs@0.18.3 69 | cairo-sys-rs@0.18.2 70 | cbc@0.1.2 71 | cc@1.0.83 72 | cexpr@0.6.0 73 | cfg-expr@0.15.5 74 | cfg-if@1.0.0 75 | cfg-vis@0.3.0 76 | chacha20@0.9.1 77 | chacha20poly1305@0.10.1 78 | checked_int_cast@1.0.0 79 | chrono@0.4.31 80 | cipher@0.4.4 81 | clang-sys@1.6.1 82 | color_quant@1.1.0 83 | concurrent-queue@2.3.0 84 | const-oid@0.9.5 85 | const_panic@0.2.8 86 | constant_time_eq@0.3.0 87 | convert_case@0.6.0 88 | cookie-factory@0.3.2 89 | core-foundation-sys@0.8.4 90 | core-foundation@0.9.3 91 | cpufeatures@0.2.11 92 | crc32fast@1.3.2 93 | crossbeam-channel@0.5.8 94 | crossbeam-deque@0.8.3 95 | crossbeam-epoch@0.9.15 96 | crossbeam-utils@0.8.16 97 | crunchy@0.2.2 98 | crypto-bigint@0.5.3 99 | crypto-common@0.1.6 100 | ctr@0.9.2 101 | curve25519-dalek-derive@0.1.1 102 | curve25519-dalek@4.1.1 103 | darling@0.14.4 104 | darling@0.20.3 105 | darling_core@0.14.4 106 | darling_core@0.20.3 107 | darling_macro@0.14.4 108 | darling_macro@0.20.3 109 | data-encoding@2.4.0 110 | deadpool-runtime@0.1.3 111 | deadpool-sqlite@0.6.0 112 | deadpool-sync@0.1.2 113 | deadpool@0.10.0 114 | der@0.7.8 115 | der_derive@0.7.2 116 | deranged@0.3.9 117 | derivative@2.2.0 118 | derive_builder@0.12.0 119 | derive_builder_core@0.12.0 120 | derive_builder_macro@0.12.0 121 | digest@0.10.7 122 | displaydoc@0.2.4 123 | djb_hash@0.1.3 124 | dyn-clone@1.0.16 125 | ecdsa@0.16.8 126 | ed25519-dalek@2.0.0 127 | ed25519@2.2.3 128 | either@1.9.0 129 | elliptic-curve@0.13.6 130 | encoding_rs@0.8.33 131 | enumflags2@0.7.8 132 | enumflags2_derive@0.7.8 133 | equivalent@1.0.1 134 | errno@0.3.5 135 | event-listener-strategy@0.3.0 136 | event-listener@2.5.3 137 | event-listener@3.0.1 138 | exr@1.71.0 139 | eyeball-im-util@0.5.1 140 | eyeball-im@0.4.2 141 | eyeball@0.8.7 142 | fallible-iterator@0.2.0 143 | fallible-streaming-iterator@0.1.9 144 | fastrand@1.9.0 145 | fastrand@2.0.1 146 | fdeflate@0.3.1 147 | ff@0.13.0 148 | fiat-crypto@0.2.2 149 | field-offset@0.3.6 150 | flagset@0.4.4 151 | flate2@1.0.28 152 | flume@0.11.0 153 | fnv@1.0.7 154 | foreign-types-shared@0.1.1 155 | foreign-types@0.3.2 156 | form_urlencoded@1.2.0 157 | futf@0.1.5 158 | futures-channel@0.3.29 159 | futures-core@0.3.29 160 | futures-executor@0.3.29 161 | futures-io@0.3.29 162 | futures-lite@1.13.0 163 | futures-lite@2.0.1 164 | futures-macro@0.3.29 165 | futures-sink@0.3.29 166 | futures-task@0.3.29 167 | futures-util@0.3.29 168 | futures@0.3.29 169 | fuzzy-matcher@0.3.7 170 | g2gen@1.0.1 171 | g2p@1.0.1 172 | g2poly@1.0.1 173 | gdk-pixbuf-sys@0.18.0 174 | gdk-pixbuf@0.18.3 175 | gdk4-sys@0.7.2 176 | gdk4-win32-sys@0.7.2 177 | gdk4-win32@0.7.2 178 | gdk4@0.7.3 179 | generic-array@0.14.7 180 | geo-uri@0.2.1 181 | getopts@0.2.21 182 | getrandom@0.2.11 183 | gettext-rs@0.7.0 184 | gettext-sys@0.21.3 185 | gif@0.12.0 186 | gimli@0.28.0 187 | gio-sys@0.18.1 188 | gio@0.18.3 189 | glib-macros@0.18.3 190 | glib-sys@0.18.1 191 | glib@0.18.3 192 | glob@0.3.1 193 | gloo-timers@0.3.0 194 | gloo-utils@0.2.0 195 | gobject-sys@0.18.0 196 | graphene-rs@0.18.1 197 | graphene-sys@0.18.1 198 | group@0.13.0 199 | gsk4-sys@0.7.3 200 | gsk4@0.7.3 201 | gst-plugin-gtk4@0.11.1 202 | gst-plugin-version-helper@0.8.0 203 | gstreamer-audio-sys@0.21.1 204 | gstreamer-audio@0.21.1 205 | gstreamer-base-sys@0.21.1 206 | gstreamer-base@0.21.0 207 | gstreamer-gl-sys@0.21.1 208 | gstreamer-gl@0.21.1 209 | gstreamer-pbutils-sys@0.21.0 210 | gstreamer-pbutils@0.21.1 211 | gstreamer-play-sys@0.21.0 212 | gstreamer-play@0.21.0 213 | gstreamer-sys@0.21.1 214 | gstreamer-video-sys@0.21.1 215 | gstreamer-video@0.21.1 216 | gstreamer@0.21.1 217 | gtk4-macros@0.7.2 218 | gtk4-sys@0.7.3 219 | gtk4@0.7.3 220 | h2@0.3.21 221 | half@2.2.1 222 | hashbrown@0.12.3 223 | hashbrown@0.13.2 224 | hashbrown@0.14.2 225 | hashlink@0.8.4 226 | hdrhistogram@7.5.2 227 | headers-core@0.2.0 228 | headers@0.3.9 229 | heck@0.4.1 230 | hermit-abi@0.3.3 231 | hex@0.4.3 232 | hkdf@0.12.3 233 | hmac@0.12.1 234 | html-escape@0.2.13 235 | html2pango@0.6.0 236 | html5ever@0.26.0 237 | html5gum@0.5.7 238 | http-body@0.4.5 239 | http-range-header@0.3.1 240 | http@0.2.11 241 | httparse@1.8.0 242 | httpdate@1.0.3 243 | hyper-rustls@0.24.2 244 | hyper-tls@0.5.0 245 | hyper@0.14.27 246 | iana-time-zone-haiku@0.1.2 247 | iana-time-zone@0.1.58 248 | ident_case@1.0.1 249 | idna@0.4.0 250 | image@0.23.14 251 | image@0.24.7 252 | imbl-sized-chunks@0.1.1 253 | imbl@2.0.3 254 | include_dir@0.7.3 255 | include_dir_macros@0.7.3 256 | indexed_db_futures@0.3.0 257 | indexmap@1.9.3 258 | indexmap@2.1.0 259 | inout@0.1.3 260 | instant@0.1.12 261 | io-lifetimes@1.0.11 262 | ipnet@2.9.0 263 | iri-string@0.7.0 264 | itertools@0.10.5 265 | itertools@0.11.0 266 | itoa@1.0.9 267 | jetscii@0.5.3 268 | jpeg-decoder@0.3.0 269 | js-sys@0.3.65 270 | js_int@0.2.2 271 | js_option@0.1.1 272 | k256@0.13.1 273 | konst@0.3.6 274 | konst_kernel@0.3.6 275 | language-tags@0.3.2 276 | lazy_static@1.4.0 277 | lazycell@1.3.0 278 | lebe@0.5.2 279 | libadwaita-sys@0.5.3 280 | libadwaita@0.5.3 281 | libc@0.2.150 282 | libloading@0.7.4 283 | libm@0.2.8 284 | libshumate-sys@0.4.0 285 | libshumate@0.4.1 286 | libspa-sys@0.7.2 287 | libspa@0.7.2 288 | libsqlite3-sys@0.26.0 289 | linkify@0.9.0 290 | linux-raw-sys@0.3.8 291 | linux-raw-sys@0.4.10 292 | locale_config@0.3.0 293 | lock_api@0.4.11 294 | log@0.4.20 295 | lru@0.9.0 296 | mac@0.1.1 297 | malloc_buf@0.0.6 298 | maplit@1.0.2 299 | markup5ever@0.11.0 300 | markup5ever_rcdom@0.2.0 301 | matchers@0.1.0 302 | matrix-pickle-derive@0.1.1 303 | matrix-pickle@0.1.1 304 | memchr@2.6.4 305 | memoffset@0.7.1 306 | memoffset@0.9.0 307 | mime2ext@0.1.52 308 | mime@0.3.17 309 | mime_guess@2.0.4 310 | minimal-lexical@0.2.1 311 | miniz_oxide@0.7.1 312 | mio@0.8.9 313 | muldiv@1.0.1 314 | native-tls@0.2.11 315 | new_debug_unreachable@1.0.4 316 | nix@0.26.4 317 | nom@7.1.3 318 | nu-ansi-term@0.46.0 319 | num-bigint-dig@0.8.4 320 | num-bigint@0.4.4 321 | num-complex@0.4.4 322 | num-integer@0.1.45 323 | num-iter@0.1.43 324 | num-rational@0.3.2 325 | num-rational@0.4.1 326 | num-traits@0.2.17 327 | num@0.4.1 328 | num_cpus@1.16.0 329 | objc-foundation@0.1.1 330 | objc@0.2.7 331 | objc_id@0.1.1 332 | object@0.32.1 333 | once_cell@1.18.0 334 | oo7@0.2.1 335 | opaque-debug@0.3.0 336 | openssl-macros@0.1.1 337 | openssl-probe@0.1.5 338 | openssl-sys@0.9.95 339 | openssl@0.10.59 340 | opentelemetry-http@0.9.0 341 | opentelemetry-semantic-conventions@0.12.0 342 | opentelemetry@0.20.0 343 | opentelemetry_api@0.20.0 344 | opentelemetry_sdk@0.20.0 345 | option-operations@0.5.0 346 | ordered-float@3.9.2 347 | ordered-stream@0.2.0 348 | overload@0.1.1 349 | p256@0.13.2 350 | p384@0.13.0 351 | pango-sys@0.18.0 352 | pango@0.18.3 353 | parking@2.2.0 354 | parking_lot@0.12.1 355 | parking_lot_core@0.9.9 356 | parse-display-derive@0.8.2 357 | parse-display@0.8.2 358 | paste@1.0.14 359 | pbkdf2@0.12.2 360 | peeking_take_while@0.1.2 361 | pem-rfc7468@0.7.0 362 | percent-encoding@2.3.0 363 | phf@0.10.1 364 | phf@0.11.2 365 | phf_codegen@0.10.0 366 | phf_generator@0.10.0 367 | phf_generator@0.11.2 368 | phf_macros@0.11.2 369 | phf_shared@0.10.0 370 | phf_shared@0.11.2 371 | pin-project-internal@1.1.3 372 | pin-project-lite@0.2.13 373 | pin-project@1.1.3 374 | pin-utils@0.1.0 375 | piper@0.2.1 376 | pipewire-sys@0.7.2 377 | pipewire@0.7.2 378 | pkcs1@0.7.5 379 | pkcs5@0.7.1 380 | pkcs7@0.4.1 381 | pkcs8@0.10.2 382 | pkg-config@0.3.27 383 | platforms@3.2.0 384 | png@0.17.10 385 | polling@2.8.0 386 | polling@3.3.0 387 | poly1305@0.8.0 388 | powerfmt@0.2.0 389 | ppv-lite86@0.2.17 390 | precomputed-hash@0.1.1 391 | pretty-hex@0.3.0 392 | primeorder@0.13.3 393 | proc-macro-crate@1.3.1 394 | proc-macro-crate@2.0.0 395 | proc-macro-error-attr@1.0.4 396 | proc-macro-error@1.0.4 397 | proc-macro2@1.0.69 398 | prost-derive@0.12.1 399 | prost@0.12.1 400 | pulldown-cmark@0.9.3 401 | qoi@0.4.1 402 | qrcode@0.12.0 403 | quote@1.0.33 404 | rand@0.8.5 405 | rand_chacha@0.3.1 406 | rand_core@0.6.4 407 | rand_xoshiro@0.6.0 408 | rayon-core@1.12.0 409 | rayon@1.8.0 410 | readlock@0.1.7 411 | redox_syscall@0.4.1 412 | regex-automata@0.1.10 413 | regex-automata@0.4.3 414 | regex-syntax@0.6.29 415 | regex-syntax@0.7.5 416 | regex-syntax@0.8.2 417 | regex@1.10.2 418 | reqwest@0.11.22 419 | rfc6979@0.4.0 420 | ring@0.17.5 421 | rmp-serde@1.1.2 422 | rmp@0.8.12 423 | rqrr@0.6.0 424 | rsa@0.9.3 425 | ruma-client-api@0.17.3 426 | ruma-common@0.12.1 427 | ruma-events@0.27.9 428 | ruma-federation-api@0.8.0 429 | ruma-html@0.1.0 430 | ruma-identifiers-validation@0.9.3 431 | ruma-macros@0.12.0 432 | ruma-push-gateway-api@0.8.0 433 | ruma@0.9.2 434 | rusqlite@0.29.0 435 | rustc-demangle@0.1.23 436 | rustc-hash@1.1.0 437 | rustc_version@0.4.0 438 | rustix@0.37.27 439 | rustix@0.38.21 440 | rustls-native-certs@0.6.3 441 | rustls-pemfile@1.0.3 442 | rustls-webpki@0.101.7 443 | rustls@0.21.8 444 | rustversion@1.0.14 445 | ryu@1.0.15 446 | salsa20@0.10.2 447 | schannel@0.1.22 448 | schemars@0.8.15 449 | schemars_derive@0.8.15 450 | scopeguard@1.2.0 451 | scrypt@0.11.0 452 | sct@0.7.1 453 | sec1@0.7.3 454 | secular@1.0.1 455 | security-framework-sys@2.9.1 456 | security-framework@2.9.2 457 | semver@1.0.20 458 | serde-wasm-bindgen@0.5.0 459 | serde@1.0.192 460 | serde_bytes@0.11.12 461 | serde_derive@1.0.192 462 | serde_derive_internals@0.26.0 463 | serde_html_form@0.2.2 464 | serde_json@1.0.108 465 | serde_repr@0.1.17 466 | serde_spanned@0.6.4 467 | serde_urlencoded@0.7.1 468 | serde_with@3.4.0 469 | serde_with_macros@3.4.0 470 | sha1@0.10.6 471 | sha2@0.10.8 472 | sharded-slab@0.1.7 473 | shlex@1.2.0 474 | signal-hook-registry@1.4.1 475 | signature@2.1.0 476 | simd-adler32@0.3.7 477 | siphasher@0.3.11 478 | slab@0.4.9 479 | smallvec@1.11.2 480 | socket2@0.4.10 481 | socket2@0.5.5 482 | sourceview5-sys@0.7.1 483 | sourceview5@0.7.1 484 | spin@0.5.2 485 | spin@0.9.8 486 | spki@0.7.2 487 | static_assertions@1.1.0 488 | string_cache@0.8.7 489 | string_cache_codegen@0.5.2 490 | strsim@0.10.0 491 | structmeta-derive@0.2.0 492 | structmeta@0.2.0 493 | strum@0.25.0 494 | strum_macros@0.25.3 495 | subtle@2.5.0 496 | syn@1.0.109 497 | syn@2.0.39 498 | system-configuration-sys@0.5.0 499 | system-configuration@0.5.1 500 | system-deps@6.2.0 501 | target-lexicon@0.12.12 502 | temp-dir@0.1.11 503 | tempfile@3.8.1 504 | tendril@0.4.3 505 | thiserror-impl@1.0.50 506 | thiserror@1.0.50 507 | thread_local@1.1.7 508 | tiff@0.9.0 509 | time-core@0.1.2 510 | time-macros@0.2.15 511 | time@0.3.30 512 | tinyvec@1.6.0 513 | tinyvec_macros@0.1.1 514 | tokio-macros@2.1.0 515 | tokio-native-tls@0.3.1 516 | tokio-rustls@0.24.1 517 | tokio-socks@0.5.1 518 | tokio-stream@0.1.14 519 | tokio-util@0.7.10 520 | tokio@1.33.0 521 | toml@0.8.8 522 | toml_datetime@0.6.5 523 | toml_edit@0.19.15 524 | toml_edit@0.20.7 525 | toml_edit@0.21.0 526 | tower-http@0.4.4 527 | tower-layer@0.3.2 528 | tower-service@0.3.2 529 | tower@0.4.13 530 | tracing-attributes@0.1.27 531 | tracing-core@0.1.32 532 | tracing-log@0.1.4 533 | tracing-opentelemetry@0.21.0 534 | tracing-subscriber@0.3.17 535 | tracing@0.1.40 536 | try-lock@0.2.4 537 | typenum@1.17.0 538 | typewit@1.8.0 539 | typewit_proc_macros@1.8.1 540 | uds_windows@1.0.2 541 | ulid@1.1.0 542 | unicase@2.7.0 543 | unicode-bidi@0.3.13 544 | unicode-ident@1.0.12 545 | unicode-normalization@0.1.22 546 | unicode-segmentation@1.10.1 547 | unicode-width@0.1.11 548 | universal-hash@0.5.1 549 | untrusted@0.9.0 550 | url@2.4.1 551 | urlencoding@2.1.3 552 | utf-8@0.7.6 553 | utf8-width@0.1.6 554 | uuid@1.5.0 555 | valuable@0.1.0 556 | vcpkg@0.2.15 557 | version-compare@0.1.1 558 | version_check@0.9.4 559 | vodozemac@0.5.0 560 | waker-fn@1.1.1 561 | want@0.3.1 562 | wasi@0.11.0+wasi-snapshot-preview1 563 | wasm-bindgen-backend@0.2.88 564 | wasm-bindgen-futures@0.4.38 565 | wasm-bindgen-macro-support@0.2.88 566 | wasm-bindgen-macro@0.2.88 567 | wasm-bindgen-shared@0.2.88 568 | wasm-bindgen@0.2.88 569 | wasm-streams@0.3.0 570 | web-sys@0.3.65 571 | weezl@0.1.7 572 | wildmatch@2.1.1 573 | winapi-i686-pc-windows-gnu@0.4.0 574 | winapi-x86_64-pc-windows-gnu@0.4.0 575 | winapi@0.3.9 576 | windows-core@0.51.1 577 | windows-sys@0.48.0 578 | windows-targets@0.48.5 579 | windows_aarch64_gnullvm@0.48.5 580 | windows_aarch64_msvc@0.48.5 581 | windows_i686_gnu@0.48.5 582 | windows_i686_msvc@0.48.5 583 | windows_x86_64_gnu@0.48.5 584 | windows_x86_64_gnullvm@0.48.5 585 | windows_x86_64_msvc@0.48.5 586 | winnow@0.5.19 587 | winreg@0.50.0 588 | x25519-dalek@2.0.0 589 | x509-cert@0.2.4 590 | xdg-home@1.0.0 591 | xml5ever@0.17.0 592 | zbus@3.14.1 593 | zbus_macros@3.14.1 594 | zbus_names@2.6.0 595 | zerocopy-derive@0.7.26 596 | zerocopy@0.7.26 597 | zeroize@1.6.0 598 | zeroize_derive@1.4.2 599 | zune-inflate@0.2.54 600 | zvariant@3.15.0 601 | zvariant_derive@3.15.0 602 | zvariant_utils@1.0.1 603 | " 604 | 605 | declare -A GIT_CRATES=( 606 | [mas-http]='https://github.com/matrix-org/matrix-authentication-service;357481b52e6dc092178a16b8a7d86df036aac608;matrix-authentication-service-%commit%/crates/http' 607 | [mas-iana]='https://github.com/matrix-org/matrix-authentication-service;357481b52e6dc092178a16b8a7d86df036aac608;matrix-authentication-service-%commit%/crates/iana' 608 | [mas-jose]='https://github.com/matrix-org/matrix-authentication-service;357481b52e6dc092178a16b8a7d86df036aac608;matrix-authentication-service-%commit%/crates/jose' 609 | [mas-keystore]='https://github.com/matrix-org/matrix-authentication-service;357481b52e6dc092178a16b8a7d86df036aac608;matrix-authentication-service-%commit%/crates/keystore' 610 | [mas-oidc-client]='https://github.com/matrix-org/matrix-authentication-service;357481b52e6dc092178a16b8a7d86df036aac608;matrix-authentication-service-%commit%/crates/oidc-client' 611 | [mas-tower]='https://github.com/matrix-org/matrix-authentication-service;357481b52e6dc092178a16b8a7d86df036aac608;matrix-authentication-service-%commit%/crates/tower' 612 | [matrix-sdk-base]='https://github.com/matrix-org/matrix-rust-sdk;8895ce40d13faa79012144c97044990284215758;matrix-rust-sdk-%commit%/crates/matrix-sdk-base' 613 | [matrix-sdk-common]='https://github.com/matrix-org/matrix-rust-sdk;8895ce40d13faa79012144c97044990284215758;matrix-rust-sdk-%commit%/crates/matrix-sdk-common' 614 | [matrix-sdk-crypto]='https://github.com/matrix-org/matrix-rust-sdk;8895ce40d13faa79012144c97044990284215758;matrix-rust-sdk-%commit%/crates/matrix-sdk-crypto' 615 | [matrix-sdk-indexeddb]='https://github.com/matrix-org/matrix-rust-sdk;8895ce40d13faa79012144c97044990284215758;matrix-rust-sdk-%commit%/crates/matrix-sdk-indexeddb' 616 | [matrix-sdk-qrcode]='https://github.com/matrix-org/matrix-rust-sdk;8895ce40d13faa79012144c97044990284215758;matrix-rust-sdk-%commit%/crates/matrix-sdk-qrcode' 617 | [matrix-sdk-sqlite]='https://github.com/matrix-org/matrix-rust-sdk;8895ce40d13faa79012144c97044990284215758;matrix-rust-sdk-%commit%/crates/matrix-sdk-sqlite' 618 | [matrix-sdk-store-encryption]='https://github.com/matrix-org/matrix-rust-sdk;8895ce40d13faa79012144c97044990284215758;matrix-rust-sdk-%commit%/crates/matrix-sdk-store-encryption' 619 | [matrix-sdk-ui]='https://github.com/matrix-org/matrix-rust-sdk;8895ce40d13faa79012144c97044990284215758;matrix-rust-sdk-%commit%/crates/matrix-sdk-ui' 620 | [matrix-sdk]='https://github.com/matrix-org/matrix-rust-sdk;8895ce40d13faa79012144c97044990284215758;matrix-rust-sdk-%commit%/crates/matrix-sdk' 621 | [oauth2-types]='https://github.com/matrix-org/matrix-authentication-service;357481b52e6dc092178a16b8a7d86df036aac608;matrix-authentication-service-%commit%/crates/oauth2-types' 622 | ) 623 | 624 | inherit cargo 625 | 626 | DESCRIPTION="" 627 | HOMEPAGE="" 628 | SRC_URI=" 629 | ${CARGO_CRATE_URIS} 630 | " 631 | 632 | LICENSE="" 633 | # Dependent crate licenses 634 | LICENSE+=" 635 | Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD GPL-3+ ISC MIT 636 | MPL-2.0 MPL-2.0 Unicode-DFS-2016 ZLIB 637 | " 638 | SLOT="0" 639 | KEYWORDS="~amd64" 640 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | --------------------------------------------------------------------------------