Skip to content

Add support for wrap-git meson subprojects#423

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/add-support-wrap-git-subprojects
Draft

Add support for wrap-git meson subprojects#423
Copilot wants to merge 2 commits into
mainfrom
copilot/add-support-wrap-git-subprojects

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 4, 2026

Meson subproject support only handled wrap-file types. Projects using wrap-git subprojects (like ffmpeg with nasm-binary) would fail.

Changes

Extended wrap parser (parse_wrap()):

  • Detects wrap type from section header: [wrap-file] or [wrap-git]
  • Skips non-data sections like [provide]
  • Validates required fields per type:
    • wrap-file: directory, source_url, source_filename, source_hash
    • wrap-git: url, revision

Added git subproject fetcher (meson_subprojects_git_fetch()):

  • Clones git repositories into subprojects/ directory
  • Supports optional depth parameter for shallow clones
  • Supports optional directory parameter for custom checkout location
  • Checks out specified revision after clone

Updated subproject extraction (meson_subprojects_extract()):

  • Routes to file downloader or git cloner based on wrap type
  • Maintains offline mode behavior for both types

Example

# Now supported
[wrap-git]
url = https://gitlab.freedesktop.org/gstreamer/meson-ports/nasm-binary.git
revision = HEAD
depth = 1

[provide]
program_names = nasm
Original prompt

This commit 013e32c added support to downloading and using meson subprojects, but only wrap-file meson wraps were supported. wrap-git meson subprojects are missing.

Can you implement that updating cerbero/build/source.py ?


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Updated parse_wrap() to support both [wrap-file] and [wrap-git] sections
- Added meson_subprojects_git_fetch() method to handle git cloning for wrap-git
- Updated meson_subprojects_extract() to handle both wrap-file and wrap-git
- Parser now skips empty lines and section headers like [provide]
- Git subprojects are cloned with optional depth parameter
- Supports custom directory names for git subprojects

Co-authored-by: rgonzalezfluendo <56379722+rgonzalezfluendo@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for wrap-git meson subprojects in cerbero Add support for wrap-git meson subprojects Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants