From 7af631adea60ba6978677a498c859ff9c57485b9 Mon Sep 17 00:00:00 2001 From: Seth Landry Date: Wed, 29 Jan 2025 03:07:36 -0600 Subject: [PATCH] Migrate to homebrew-core for Linux Fixes #566 Update the formula page to differentiate between macOS and Linux dependencies and caveats. * Add separate tables for macOS and Linux dependencies in `_layouts/formula.html`. * Add a column indicating the OS-specific differences in dependencies in `_layouts/formula.html`. * Add separate sections for macOS and Linux caveats in `_layouts/formula.html`. * Update the JSON structure to include separate macOS and Linux dependencies and caveats in `_layouts/formula_json.json`. * Update the description in `index.html` to include Linux support. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Homebrew/formulae.brew.sh/issues/566?shareId=XXXX-XXXX-XXXX-XXXX). --- _layouts/formula.html | 39 ++++++++++++++++++++++++++++++++++++++ _layouts/formula_json.json | 8 ++++++++ index.html | 2 +- 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/_layouts/formula.html b/_layouts/formula.html index 711378446441..7afd00196668 100644 --- a/_layouts/formula.html +++ b/_layouts/formula.html @@ -233,3 +233,42 @@ {%- endfor -%} {%- endfor %} + + +{%- if f.variations.size > 0 -%} +

Dependencies:

+ + + + + + {%- for variation in f.variations -%} + + + + + {%- endfor -%} +
OSDependencies
{{ variation[0] | capitalize }} + {%- for dep in variation[1].dependencies -%} + {{ dep | escape }} + {%- unless forloop.last -%}, {% endunless -%} + {%- endfor -%} +
+{%- endif -%} + + +{%- if f.caveats -%} +

Caveats:

+ + + + + + {%- for variation in f.variations -%} + + + + + {%- endfor -%} +
OSCaveats
{{ variation[0] | capitalize }}{{ variation[1].caveats | escape }}
+{%- endif -%} diff --git a/_layouts/formula_json.json b/_layouts/formula_json.json index 8c1f96477822..d68b7d5d3e68 100644 --- a/_layouts/formula_json.json +++ b/_layouts/formula_json.json @@ -36,4 +36,12 @@ {%- endunless -%} {%- endfor -%} }, +"dependencies":{ + "macos":{{ fdata.dependencies.macos | jsonify }}, + "linux":{{ fdata.dependencies.linux | jsonify }} +}, +"caveats":{ + "macos":{{ fdata.caveats.macos | jsonify }}, + "linux":{{ fdata.caveats.linux | jsonify }} +}, "generated_date":"{{ "today" | date: "%F" }}"} diff --git a/index.html b/index.html index 3c3b10431ae3..220a703f0b64 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@ --- layout: default --- -

Homebrew Formulae is an online package browser for Homebrew – the macOS (and Linux) package manager. For more information on how to install and use Homebrew see our homepage.

+

Homebrew Formulae is an online package browser for Homebrew – the macOS and Linux package manager. For more information on how to install and use Homebrew see our homepage.

Browse all formulae

Browse all casks or